mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 18:46:43 -05:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b73b09a1d3 | ||
|
|
a69a9778a6 | ||
|
|
6d3995aa29 | ||
|
|
7cf0847ef5 | ||
|
|
8e8e1f6913 | ||
|
|
7a421cc0bd | ||
|
|
fb82440412 | ||
|
|
2263ea48a1 | ||
|
|
1868a6127a | ||
|
|
5e4b8924ec | ||
|
|
62de97da54 | ||
|
|
9e051c6f63 | ||
|
|
a43444e95f | ||
|
|
a3948ac744 | ||
|
|
1cd4b39e9d | ||
|
|
e691b278ae |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,5 +1,29 @@
|
||||
# Change Log
|
||||
|
||||
## Version 0.25.2
|
||||
* Release date: January 17, 2017
|
||||
* Release status: Public Preview
|
||||
|
||||
## What's new in this version
|
||||
The January release focuses on addressing a few of the top upvoted feature suggestions, as well as fixing high-priority bugs. This release period coincides with holiday vacations, so the churn in this release is
|
||||
relatively scoped.
|
||||
|
||||
Here's some of the highlights in the January release.
|
||||
|
||||
* Tab-coloring based on Server Group
|
||||
* Saved Server connections are available in Connection Dialog
|
||||
* Enable HotExit feature
|
||||
* Fix broken Run Current Query command
|
||||
* Fix drag-and-drop breaking scripting bug
|
||||
* Fix incorrect pinned Start Menu icon
|
||||
* Fix missing Azure Account branding icon
|
||||
* Change "Server name" to "Server" in Connection Dialog
|
||||
|
||||
## Contributions and "thank you"
|
||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||
|
||||
* alextercete for `Fix "No extension gallery service configured" error (#427)`
|
||||
|
||||
## Version 0.24.1
|
||||
* Release date: December 19, 2017
|
||||
* Release status: Public Preview
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"service": {
|
||||
"downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/v{#version#}/microsoft.sqltools.servicelayer-{#fileName#}",
|
||||
"version": "1.2.0-alpha.49",
|
||||
"version": "1.4.0-alpha.3",
|
||||
"downloadFileNames": {
|
||||
"Windows_86": "win-x86-netcoreapp2.0.zip",
|
||||
"Windows_64": "win-x64-netcoreapp2.0.zip",
|
||||
|
||||
15
extensions/mssql/npm-shrinkwrap.json
generated
15
extensions/mssql/npm-shrinkwrap.json
generated
@@ -2,5 +2,20 @@
|
||||
"name": "mssql",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"dataprotocol-client": {
|
||||
"version": "2.6.3",
|
||||
"from": "..\\..\\dataprotocol-node\\client",
|
||||
"resolved": "file:..\\..\\dataprotocol-node\\client"
|
||||
},
|
||||
"dataprotocol-jsonrpc": {
|
||||
"version": "2.4.0",
|
||||
"from": "..\\..\\dataprotocol-node\\jsonrpc",
|
||||
"resolved": "file:..\\..\\dataprotocol-node\\jsonrpc"
|
||||
},
|
||||
"dataprotocol-languageserver-types": {
|
||||
"version": "1.0.4",
|
||||
"from": "..\\..\\dataprotocol-node\\types",
|
||||
"resolved": "file:..\\..\\dataprotocol-node\\types"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
npm-shrinkwrap.json
generated
30
npm-shrinkwrap.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sqlops",
|
||||
"version": "0.24.1",
|
||||
"version": "0.25.3",
|
||||
"dependencies": {
|
||||
"@angular/animations": {
|
||||
"version": "4.1.3",
|
||||
@@ -63,9 +63,9 @@
|
||||
"resolved": "https://registry.npmjs.org/angular2-grid/-/angular2-grid-2.0.6.tgz"
|
||||
},
|
||||
"angular2-slickgrid": {
|
||||
"version": "1.2.3",
|
||||
"from": "git://github.com/Microsoft/angular2-slickgrid.git#1.3.5",
|
||||
"resolved": "git://github.com/Microsoft/angular2-slickgrid.git#d122015f2f3e4023394a7e485079da62f20b8356"
|
||||
"version": "1.3.6",
|
||||
"from": "git://github.com/Microsoft/angular2-slickgrid.git#1.3.6",
|
||||
"resolved": "git://github.com/Microsoft/angular2-slickgrid.git#0393bae34ba65464e6b6fc248b950ccea44382d9"
|
||||
},
|
||||
"anymatch": {
|
||||
"version": "1.3.2",
|
||||
@@ -134,9 +134,9 @@
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz"
|
||||
},
|
||||
"caniuse-db": {
|
||||
"version": "1.0.30000783",
|
||||
"version": "1.0.30000787",
|
||||
"from": "caniuse-db@>=1.0.30000161 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000783.tgz"
|
||||
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000787.tgz"
|
||||
},
|
||||
"chart.js": {
|
||||
"version": "2.7.1",
|
||||
@@ -296,9 +296,9 @@
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz"
|
||||
},
|
||||
"html-query-plan": {
|
||||
"version": "1.0.0",
|
||||
"from": "git://github.com/anthonydresser/html-query-plan.git#2.2.5",
|
||||
"resolved": "git://github.com/anthonydresser/html-query-plan.git#fbf8beac00b3870c0d3f4e95de979f7f1ec7af5d"
|
||||
"version": "2.2.6",
|
||||
"from": "git://github.com/anthonydresser/html-query-plan.git#2.2.6",
|
||||
"resolved": "git://github.com/anthonydresser/html-query-plan.git#e09ffda978113c73366b663066372f884cf75e05"
|
||||
},
|
||||
"http-proxy-agent": {
|
||||
"version": "0.2.7",
|
||||
@@ -436,9 +436,9 @@
|
||||
"resolved": "https://registry.npmjs.org/lodash.isundefined/-/lodash.isundefined-3.0.1.tgz"
|
||||
},
|
||||
"make-error": {
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.2",
|
||||
"from": "make-error@>=1.1.1 <2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.0.tgz"
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.2.tgz"
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "2.3.11",
|
||||
@@ -451,9 +451,9 @@
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz"
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.20.0",
|
||||
"version": "2.20.1",
|
||||
"from": "moment@>=2.15.1 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.20.0.tgz"
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz"
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
@@ -811,9 +811,9 @@
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz"
|
||||
},
|
||||
"zone.js": {
|
||||
"version": "0.8.18",
|
||||
"version": "0.8.19",
|
||||
"from": "zone.js@>=0.8.4 <0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.18.tgz"
|
||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.8.19.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sqlops",
|
||||
"version": "0.25.0",
|
||||
"version": "0.25.3",
|
||||
"electronVersion": "1.7.9",
|
||||
"distro": "8c3e97e3425cc9814496472ab73e076de2ba99ee",
|
||||
"author": {
|
||||
@@ -33,7 +33,7 @@
|
||||
"@angular/router": "~4.1.3",
|
||||
"@angular/upgrade": "~4.1.3",
|
||||
"angular2-grid": "2.0.6",
|
||||
"angular2-slickgrid": "git://github.com/Microsoft/angular2-slickgrid.git#1.3.5",
|
||||
"angular2-slickgrid": "git://github.com/Microsoft/angular2-slickgrid.git#1.3.6",
|
||||
"applicationinsights": "0.17.1",
|
||||
"chart.js": "^2.6.0",
|
||||
"core-js": "^2.4.1",
|
||||
@@ -45,7 +45,7 @@
|
||||
"gc-signals": "^0.0.1",
|
||||
"getmac": "1.0.7",
|
||||
"graceful-fs": "4.1.11",
|
||||
"html-query-plan": "git://github.com/anthonydresser/html-query-plan.git#2.2.5",
|
||||
"html-query-plan": "git://github.com/anthonydresser/html-query-plan.git#2.2.6",
|
||||
"http-proxy-agent": "0.2.7",
|
||||
"https-proxy-agent": "0.3.6",
|
||||
"iconv-lite": "0.4.15",
|
||||
|
||||
@@ -93,7 +93,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
|
||||
protected renderBody(container: HTMLElement) {
|
||||
let descriptionSection;
|
||||
$().div({ class: 'firewall-rule-description-section new-section' }, (descriptionContainer) => {
|
||||
$().div({ 'class': 'firewall-rule-description-section new-section' }, (descriptionContainer) => {
|
||||
descriptionSection = descriptionContainer.getHTMLElement();
|
||||
DOM.append(descriptionContainer.getHTMLElement(), DOM.$('div.firewall-rule-icon'));
|
||||
|
||||
@@ -101,9 +101,11 @@ export class FirewallRuleDialog extends Modal {
|
||||
let dialogDescription = localize('firewallRuleDialogDescription',
|
||||
'Your client IP address does not have access to the server. Sign in to an Azure account and create a new firewall rule to enable access.');
|
||||
this.createLabelElement(new Builder(textDescriptionContainer), dialogDescription, false);
|
||||
this._helpLink = DOM.append(textDescriptionContainer, DOM.$('a.help-link'));
|
||||
this._helpLink.setAttribute('href', 'https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure');
|
||||
this._helpLink.innerHTML += localize('firewallRuleHelpDescription', 'Learn more about firewall settings');
|
||||
|
||||
// TODO: Make this 1) extensible and 2) open the info via an action (01/08/2018, https://github.com/Microsoft/sqlopsstudio/issues/450)
|
||||
// this._helpLink = DOM.append(textDescriptionContainer, DOM.$('a.help-link'));
|
||||
// this._helpLink.setAttribute('href', 'https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure');
|
||||
// this._helpLink.innerHTML += localize('firewallRuleHelpDescription', 'Learn more about firewall settings');
|
||||
});
|
||||
|
||||
// Create account picker with event handling
|
||||
@@ -116,43 +118,43 @@ export class FirewallRuleDialog extends Modal {
|
||||
this._accountPickerService.onAccountSelectionChangeEvent((account) => this.onAccountSelectionChange(account));
|
||||
|
||||
let azureAccountSection;
|
||||
$().div({ class: 'azure-account-section new-section' }, (azureAccountContainer) => {
|
||||
$().div({ 'class': 'azure-account-section new-section' }, (azureAccountContainer) => {
|
||||
azureAccountSection = azureAccountContainer.getHTMLElement();
|
||||
let azureAccountLabel = localize('azureAccount', 'Azure account');
|
||||
this.createLabelElement(azureAccountContainer, azureAccountLabel, true);
|
||||
azureAccountContainer.div({ class: 'dialog-input' }, (inputCellContainer) => {
|
||||
azureAccountContainer.div({ 'class': 'dialog-input' }, (inputCellContainer) => {
|
||||
this._accountPickerService.renderAccountPicker(inputCellContainer.getHTMLElement());
|
||||
});
|
||||
});
|
||||
|
||||
let subnetIPRangeSection;
|
||||
$().div({ class: 'subnet-ip-range-input' }, (subnetIPRangeContainer) => {
|
||||
$().div({ 'class': 'subnet-ip-range-input' }, (subnetIPRangeContainer) => {
|
||||
subnetIPRangeSection = subnetIPRangeContainer.getHTMLElement();
|
||||
subnetIPRangeContainer.div({ class: 'dialog-input-section' }, (inputContainer) => {
|
||||
inputContainer.div({ class: 'dialog-label' }, (labelContainer) => {
|
||||
subnetIPRangeContainer.div({ 'class': 'dialog-input-section' }, (inputContainer) => {
|
||||
inputContainer.div({ 'class': 'dialog-label' }, (labelContainer) => {
|
||||
labelContainer.innerHtml(localize('from', 'From'));
|
||||
});
|
||||
|
||||
inputContainer.div({ class: 'dialog-input' }, (inputCellContainer) => {
|
||||
inputContainer.div({ 'class': 'dialog-input' }, (inputCellContainer) => {
|
||||
this._fromRangeinputBox = new InputBox(inputCellContainer.getHTMLElement(), this._contextViewService);
|
||||
});
|
||||
|
||||
inputContainer.div({ class: 'dialog-label' }, (labelContainer) => {
|
||||
inputContainer.div({ 'class': 'dialog-label' }, (labelContainer) => {
|
||||
labelContainer.innerHtml(localize('to', 'To'));
|
||||
});
|
||||
|
||||
inputContainer.div({ class: 'dialog-input' }, (inputCellContainer) => {
|
||||
inputContainer.div({ 'class': 'dialog-input' }, (inputCellContainer) => {
|
||||
this._toRangeinputBox = new InputBox(inputCellContainer.getHTMLElement(), this._contextViewService);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
let firewallRuleSection;
|
||||
$().div({ class: 'firewall-rule-section new-section' }, (firewallRuleContainer) => {
|
||||
$().div({ 'class': 'firewall-rule-section new-section' }, (firewallRuleContainer) => {
|
||||
firewallRuleSection = firewallRuleContainer.getHTMLElement();
|
||||
let firewallRuleLabel = localize('filewallRule', 'Firewall rule');
|
||||
this.createLabelElement(firewallRuleContainer, firewallRuleLabel, true);
|
||||
firewallRuleContainer.div({ class: 'radio-section' }, (radioContainer) => {
|
||||
firewallRuleContainer.div({ 'class': 'radio-section' }, (radioContainer) => {
|
||||
const form = DOM.append(radioContainer.getHTMLElement(), DOM.$('form.firewall-rule'));
|
||||
const IPAddressDiv = DOM.append(form, DOM.$('div.firewall-ip-address dialog-input'));
|
||||
const subnetIPRangeDiv = DOM.append(form, DOM.$('div.firewall-subnet-ip-range dialog-input'));
|
||||
@@ -177,7 +179,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
});
|
||||
});
|
||||
|
||||
new Builder(container).div({ class: 'firewall-rule-dialog' }, (builder) => {
|
||||
new Builder(container).div({ 'class': 'firewall-rule-dialog' }, (builder) => {
|
||||
builder.append(descriptionSection);
|
||||
builder.append(azureAccountSection);
|
||||
builder.append(firewallRuleSection);
|
||||
@@ -214,7 +216,7 @@ export class FirewallRuleDialog extends Modal {
|
||||
if (isHeader) {
|
||||
className += ' header';
|
||||
}
|
||||
container.div({ class: className }, (labelContainer) => {
|
||||
container.div({ 'class': className }, (labelContainer) => {
|
||||
labelContainer.innerHtml(content);
|
||||
});
|
||||
}
|
||||
@@ -305,4 +307,4 @@ export class FirewallRuleDialog extends Modal {
|
||||
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import * as TelemetryUtils from 'sql/common/telemetryUtilities';
|
||||
import { warn } from 'sql/base/common/log';
|
||||
import { IResourceProviderService } from 'sql/parts/accountManagement/common/interfaces';
|
||||
import { IAngularEventingService, AngularEventType } from 'sql/services/angularEventing/angularEventingService';
|
||||
import * as QueryConstants from 'sql/parts/query/common/constants';
|
||||
|
||||
import * as data from 'data';
|
||||
|
||||
@@ -1331,7 +1332,7 @@ export class ConnectionManagementService implements IConnectionManagementService
|
||||
}
|
||||
|
||||
public getTabColorForUri(uri: string): string {
|
||||
if (!WorkbenchUtils.getSqlConfigValue<string>(this._workspaceConfigurationService, 'enableTabColors')) {
|
||||
if (WorkbenchUtils.getSqlConfigValue<string>(this._workspaceConfigurationService, 'tabColorMode') === QueryConstants.tabColorModeOff) {
|
||||
return undefined;
|
||||
}
|
||||
let connectionProfile = this.getConnectionProfile(uri);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { EditorInput, EditorModel } from 'vs/workbench/common/editor';
|
||||
import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import URI from 'vs/base/common/uri';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
@@ -70,7 +69,7 @@ export class DashboardInput extends EditorInput {
|
||||
}
|
||||
|
||||
public getTypeId(): string {
|
||||
return UntitledEditorInput.ID;
|
||||
return DashboardInput.ID;
|
||||
}
|
||||
|
||||
public getResource(): URI {
|
||||
|
||||
@@ -10,3 +10,6 @@ export const configShowBatchTime = 'showBatchTime';
|
||||
export const querySection = 'query';
|
||||
export const shortcutStart = 'shortcut';
|
||||
|
||||
export const tabColorModeOff = 'off';
|
||||
export const tabColorModeBorder = 'border';
|
||||
export const tabColorModeFill = 'fill';
|
||||
|
||||
@@ -31,6 +31,7 @@ import * as gridActions from 'sql/parts/grid/views/gridActions';
|
||||
import * as gridCommands from 'sql/parts/grid/views/gridCommands';
|
||||
import { QueryPlanEditor } from 'sql/parts/queryPlan/queryPlanEditor';
|
||||
import { QueryPlanInput } from 'sql/parts/queryPlan/queryPlanInput';
|
||||
import * as Constants from 'sql/parts/query/common/constants';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
const gridCommandsWeightBonus = 100; // give our commands a little bit more weight over other default list/tree commands
|
||||
@@ -240,10 +241,16 @@ let registryProperties = {
|
||||
'description': localize('sql.showBatchTime', '[Optional] Should execution time be shown for individual batches'),
|
||||
'default': false
|
||||
},
|
||||
'sql.enableTabColors': {
|
||||
'type': 'boolean',
|
||||
'description': localize('sql.enableTabColors', 'True to color tabs based on the server group of their active connection, false otherwise'),
|
||||
'default': true
|
||||
'sql.tabColorMode': {
|
||||
'type': 'string',
|
||||
'enum': [Constants.tabColorModeOff, Constants.tabColorModeBorder, Constants.tabColorModeFill],
|
||||
'enumDescriptions': [
|
||||
localize('tabColorMode.off', "Tab coloring will be disabled"),
|
||||
localize('tabColorMode.border', "The top border of each editor tab will be colored to match the relevant server group"),
|
||||
localize('tabColorMode.fill', "Each editor tab's background color will match the relevant server group"),
|
||||
],
|
||||
'default': Constants.tabColorModeOff,
|
||||
'description': localize('tabColorMode', "Controls how to color tabs based on the server group of their active connection")
|
||||
},
|
||||
'mssql.intelliSense.enableIntelliSense': {
|
||||
'type': 'boolean',
|
||||
|
||||
@@ -116,7 +116,7 @@ export class QueryInput extends EditorInput implements IEncodingSupport, IConnec
|
||||
public getQueryResultsInputResource(): string { return this._results.uri; }
|
||||
public showQueryResultsEditor(): void { this._showQueryResultsEditor.fire(); }
|
||||
public updateSelection(selection: ISelectionData): void { this._updateSelection.fire(selection); }
|
||||
public getTypeId(): string { return UntitledEditorInput.ID; }
|
||||
public getTypeId(): string { return QueryInput.ID; }
|
||||
public getDescription(): string { return this._description; }
|
||||
public supportsSplitEditor(): boolean { return false; }
|
||||
public getModeId(): string { return QueryInput.SCHEMA; }
|
||||
|
||||
@@ -68,7 +68,7 @@ export class ProductContribution implements IWorkbenchContribution {
|
||||
text => editorService.openEditor(instantiationService.createInstance(ReleaseNotesInput, pkg.version, text), { pinned: true }),
|
||||
() => {
|
||||
messageService.show(Severity.Info, {
|
||||
message: nls.localize('read the release notes', "Welcome to {0} December Public Preview! Would you like to view the Getting Started Guide?", product.nameLong, pkg.version),
|
||||
message: nls.localize('read the release notes', "Welcome to {0} January Public Preview! Would you like to view the Getting Started Guide?", product.nameLong, pkg.version),
|
||||
actions: [
|
||||
instantiationService.createInstance(OpenGettingStartedInBrowserAction),
|
||||
CloseAction
|
||||
|
||||
@@ -774,7 +774,7 @@ suite('SQL ConnectionManagementService tests', () => {
|
||||
|
||||
test('getTabColorForUri returns the group color corresponding to the connection for a URI', done => {
|
||||
// Set up the connection store to give back a group for the expected connection profile
|
||||
configResult['enableTabColors'] = true;
|
||||
configResult['tabColorMode'] = 'border';
|
||||
let expectedColor = 'red';
|
||||
connectionStore.setup(x => x.getGroupFromId(connectionProfile.groupId)).returns(() => <IConnectionProfileGroup> {
|
||||
color: expectedColor
|
||||
|
||||
@@ -77,10 +77,14 @@
|
||||
background-image: url('expanded.svg');
|
||||
}
|
||||
|
||||
.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.selected > .content:before {
|
||||
.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children.selected.expanded > .content:before {
|
||||
background-image: url('expanded-hc.svg');
|
||||
}
|
||||
|
||||
.monaco-tree .monaco-tree-rows.show-twisties > .monaco-tree-row.has-children.selected > .content:before {
|
||||
background-image: url('collapsed-hc.svg');
|
||||
}
|
||||
|
||||
.monaco-tree .monaco-tree-rows > .monaco-tree-row.has-children.loading > .content:before {
|
||||
background-image: url('loading.svg');
|
||||
}
|
||||
|
||||
@@ -123,6 +123,14 @@ export class ExtensionManagementService implements IExtensionManagementService {
|
||||
|
||||
this._onInstallExtension.fire({ identifier, zipPath });
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Until there's a gallery for SQL Ops Studio, skip retrieving the metadata from the gallery
|
||||
return this.installExtension({ zipPath, id: identifier.id, metadata: null })
|
||||
.then(
|
||||
local => this._onDidInstallExtension.fire({ identifier, zipPath, local }),
|
||||
error => { this._onDidInstallExtension.fire({ identifier, zipPath, error }); return TPromise.wrapError(error); }
|
||||
);
|
||||
/*
|
||||
return this.galleryService.query({ names: [getGalleryExtensionId(manifest.publisher, manifest.name)], pageSize: 1 })
|
||||
.then(galleryResult => {
|
||||
const galleryExtension = galleryResult.firstPage[0];
|
||||
@@ -133,6 +141,7 @@ export class ExtensionManagementService implements IExtensionManagementService {
|
||||
error => { this._onDidInstallExtension.fire({ identifier, zipPath, error }); return TPromise.wrapError(error); }
|
||||
);
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -41,7 +41,8 @@ export class Win32AutoUpdaterImpl extends EventEmitter implements IAutoUpdater {
|
||||
}
|
||||
|
||||
get cachePath(): TPromise<string> {
|
||||
const result = path.join(tmpdir(), `vscode-update-${process.arch}`);
|
||||
// {{SQL CARBON EDIT}}
|
||||
const result = path.join(tmpdir(), `sqlops-update-${process.arch}`);
|
||||
return new TPromise<string>((c, e) => mkdirp(result, null, err => err ? e(err) : c(result)));
|
||||
}
|
||||
|
||||
@@ -112,7 +113,8 @@ export class Win32AutoUpdaterImpl extends EventEmitter implements IAutoUpdater {
|
||||
}
|
||||
|
||||
private getUpdatePackagePath(version: string): TPromise<string> {
|
||||
return this.cachePath.then(cachePath => path.join(cachePath, `CodeSetup-${product.quality}-${version}.exe`));
|
||||
// {{SQL CARBON EDIT}}
|
||||
return this.cachePath.then(cachePath => path.join(cachePath, `SqlOpsStudioSetup-${product.quality}-${version}.exe`));
|
||||
}
|
||||
|
||||
private cleanup(exceptVersion: string = null): Promise {
|
||||
|
||||
@@ -42,10 +42,6 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { GroupOnePicker, GroupTwoPicker, GroupThreePicker, AllEditorsPicker } from 'vs/workbench/browser/parts/editor/editorPicker';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
|
||||
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||
|
||||
// Register String Editor
|
||||
Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
|
||||
new EditorDescriptor(
|
||||
@@ -136,23 +132,15 @@ class UntitledEditorInputFactory implements IEditorInputFactory {
|
||||
return JSON.stringify(serialized);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
public deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput {
|
||||
return instantiationService.invokeFunction<EditorInput>(accessor => {
|
||||
public deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): UntitledEditorInput {
|
||||
return instantiationService.invokeFunction<UntitledEditorInput>(accessor => {
|
||||
const deserialized: ISerializedUntitledEditorInput = JSON.parse(serializedEditorInput);
|
||||
const resource = !!deserialized.resourceJSON ? URI.revive(deserialized.resourceJSON) : URI.parse(deserialized.resource);
|
||||
const filePath = resource.scheme === 'file' ? resource.fsPath : void 0;
|
||||
const language = deserialized.modeId;
|
||||
const encoding = deserialized.encoding;
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
let input = accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language, encoding }) as UntitledEditorInput;
|
||||
if (deserialized.modeId === QueryInput.SCHEMA) {
|
||||
const queryResultsInput: QueryResultsInput = instantiationService.createInstance(QueryResultsInput, resource.toString());
|
||||
return instantiationService.createInstance(QueryInput, input.getName(), '', input, queryResultsInput, undefined);
|
||||
} else {
|
||||
return input;
|
||||
}
|
||||
return accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language, encoding }) as UntitledEditorInput;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ import { IWorkspacesService } from 'vs/platform/workspaces/common/workspaces';
|
||||
|
||||
// {{SQL CARBON EDIT}} -- Display the editor's tab color
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration';
|
||||
import * as QueryConstants from 'sql/parts/query/common/constants';
|
||||
import * as WorkbenchUtils from 'sql/workbench/common/sqlWorkbenchUtils';
|
||||
|
||||
interface IEditorInputLabel {
|
||||
name: string;
|
||||
@@ -80,7 +83,9 @@ export class TabsTitleControl extends TitleControl {
|
||||
@IWindowsService private windowsService: IWindowsService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IFileService private fileService: IFileService,
|
||||
@IWorkspacesService private workspacesService: IWorkspacesService
|
||||
@IWorkspacesService private workspacesService: IWorkspacesService,
|
||||
// {{SQL CARBON EDIT}} -- Display the editor's tab color
|
||||
@IWorkspaceConfigurationService private workspaceConfigurationService: IWorkspaceConfigurationService
|
||||
) {
|
||||
super(contextMenuService, instantiationService, editorService, editorGroupService, contextKeyService, keybindingService, telemetryService, messageService, menuService, quickOpenService, themeService);
|
||||
|
||||
@@ -245,6 +250,17 @@ export class TabsTitleControl extends TitleControl {
|
||||
element.style.outlineColor = activeContrastBorderColor;
|
||||
element.style.outlineOffset = null;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} -- Display the editor's tab color
|
||||
if (isTab) {
|
||||
const tabContainer = this.tabsContainer.children[index];
|
||||
if (tabContainer instanceof HTMLElement) {
|
||||
let editor = this.context.getEditor(index);
|
||||
if (editor) {
|
||||
this.setEditorTabColor(editor, tabContainer, isActiveTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public allowDragging(element: HTMLElement): boolean {
|
||||
@@ -335,18 +351,7 @@ export class TabsTitleControl extends TitleControl {
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} -- Display the editor's tab color
|
||||
let sqlEditor = editor as any;
|
||||
if (sqlEditor.tabColor && this.themeService.getTheme().type !== HIGH_CONTRAST) {
|
||||
tabContainer.style.borderTopColor = sqlEditor.tabColor;
|
||||
tabContainer.style.borderTopWidth = isTabActive ? '2px' : '1px';
|
||||
let backgroundColor = Color.Format.CSS.parseHex(sqlEditor.tabColor);
|
||||
if (backgroundColor) {
|
||||
tabContainer.style.backgroundColor = backgroundColor.transparent(isTabActive ? 0.3 : 0.2).toString();
|
||||
}
|
||||
} else {
|
||||
tabContainer.style.borderTopColor = '';
|
||||
tabContainer.style.borderTopWidth = '';
|
||||
}
|
||||
this.setEditorTabColor(editor, tabContainer, isTabActive);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -862,6 +867,26 @@ export class TabsTitleControl extends TitleControl {
|
||||
|
||||
return !isCopy || source.id === target.id;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} -- Display the editor's tab color
|
||||
private setEditorTabColor(editor: IEditorInput, tabContainer: HTMLElement, isTabActive: boolean) {
|
||||
let sqlEditor = editor as any;
|
||||
let tabColorMode = WorkbenchUtils.getSqlConfigValue<string>(this.workspaceConfigurationService, 'tabColorMode');
|
||||
if (tabColorMode === QueryConstants.tabColorModeOff || (tabColorMode !== QueryConstants.tabColorModeBorder && tabColorMode !== QueryConstants.tabColorModeFill)
|
||||
|| this.themeService.getTheme().type === HIGH_CONTRAST || !sqlEditor.tabColor) {
|
||||
tabContainer.style.borderTopColor = '';
|
||||
tabContainer.style.borderTopWidth = '';
|
||||
return;
|
||||
}
|
||||
tabContainer.style.borderTopColor = sqlEditor.tabColor;
|
||||
tabContainer.style.borderTopWidth = isTabActive ? '3px' : '2px';
|
||||
if (tabColorMode === QueryConstants.tabColorModeFill) {
|
||||
let backgroundColor = Color.Format.CSS.parseHex(sqlEditor.tabColor);
|
||||
if (backgroundColor) {
|
||||
tabContainer.style.backgroundColor = backgroundColor.transparent(isTabActive ? 0.5 : 0.2).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TabActionRunner extends ActionRunner {
|
||||
|
||||
@@ -17,6 +17,10 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { Position, Direction } from 'vs/platform/editor/common/editor';
|
||||
import { ResourceMap } from 'vs/base/common/map';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||
import * as CustomInputConverter from 'sql/parts/common/customInputConverter';
|
||||
|
||||
export interface EditorCloseEvent extends IEditorCloseEvent {
|
||||
editor: EditorInput;
|
||||
}
|
||||
@@ -643,7 +647,14 @@ export class EditorGroup implements IEditorGroup {
|
||||
let serializableEditors: EditorInput[] = [];
|
||||
let serializedEditors: ISerializedEditorInput[] = [];
|
||||
let serializablePreviewIndex: number;
|
||||
this.editors.forEach(e => {
|
||||
// {{SQL CARBON EDIT}}
|
||||
let editors = this.editors.map(e => {
|
||||
if (e instanceof QueryInput) {
|
||||
return e.sql;
|
||||
}
|
||||
return e;
|
||||
});
|
||||
editors.forEach(e => {
|
||||
let factory = registry.getEditorInputFactory(e.getTypeId());
|
||||
if (factory) {
|
||||
let value = factory.serialize(e);
|
||||
@@ -658,7 +669,14 @@ export class EditorGroup implements IEditorGroup {
|
||||
}
|
||||
});
|
||||
|
||||
const serializableMru = this.mru.map(e => this.indexOf(e, serializableEditors)).filter(i => i >= 0);
|
||||
// {{SQL CARBON EDIT}}
|
||||
let mru = this.mru.map(e => {
|
||||
if (e instanceof QueryInput) {
|
||||
return e.sql;
|
||||
}
|
||||
return e;
|
||||
});
|
||||
const serializableMru = mru.map(e => this.indexOf(e, serializableEditors)).filter(i => i >= 0);
|
||||
|
||||
return {
|
||||
label: this.label,
|
||||
@@ -680,7 +698,8 @@ export class EditorGroup implements IEditorGroup {
|
||||
this.hookEditorListeners(editor);
|
||||
this.updateResourceMap(editor, false /* add */);
|
||||
|
||||
return editor;
|
||||
// {{SQL CARBON EDIT}}
|
||||
return CustomInputConverter.convertEditorInput(editor, undefined, this.instantiationService);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -267,7 +267,7 @@ configurationRegistry.registerConfiguration({
|
||||
'files.hotExit': {
|
||||
'type': 'string',
|
||||
'enum': [HotExitConfiguration.OFF, HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE],
|
||||
'default': HotExitConfiguration.ON_EXIT,
|
||||
'default': HotExitConfiguration.OFF,
|
||||
'enumDescriptions': [
|
||||
nls.localize('hotExit.off', 'Disable hot exit.'),
|
||||
nls.localize('hotExit.onExit', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu). All windows with backups will be restored upon next launch.'),
|
||||
|
||||
Reference in New Issue
Block a user