Skip to content

Commit

Permalink
Merge bcf58e8 into 0f52dfb
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist committed Jan 28, 2020
2 parents 0f52dfb + bcf58e8 commit 3caa561
Show file tree
Hide file tree
Showing 20 changed files with 855 additions and 180 deletions.
12 changes: 10 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ gulp.task('ext:lint', () => {
});

// Copy icons for OE
gulp.task('ext:copy-assets', (done) => {
gulp.task('ext:copy-OE-assets', (done) => {
return gulp.src([
config.paths.project.root + '/src/objectExplorer/objectTypes/*'
])
.pipe(gulp.dest('out/src/objectExplorer/objectTypes'));
});

// Copy icons for Query History
gulp.task('ext:copy-queryHistory-assets', (done) => {
return gulp.src([
config.paths.project.root + '/src/queryHistory/icons/*'
])
.pipe(gulp.dest('out/src/queryHistory/icons'));
});

// Compile source
gulp.task('ext:compile-src', (done) => {
return gulp.src([
Expand Down Expand Up @@ -208,7 +216,7 @@ gulp.task('ext:compile-tests', (done) => {

});

gulp.task('ext:compile', gulp.series('ext:compile-src', 'ext:compile-tests', 'ext:copy-assets'));
gulp.task('ext:compile', gulp.series('ext:compile-src', 'ext:compile-tests', 'ext:copy-OE-assets', 'ext:copy-queryHistory-assets'));

gulp.task('ext:copy-tests', () => {
return gulp.src(config.paths.project.root + '/test/resources/**/*')
Expand Down
2 changes: 1 addition & 1 deletion images/start.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion images/start_inverse.svg

This file was deleted.

2 changes: 1 addition & 1 deletion images/stop.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion images/stop_inverse.svg

This file was deleted.

15 changes: 15 additions & 0 deletions localization/xliff/enu/constants/localizedConstants.enu.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,24 @@
<trans-unit id="msgPromptFirewallRuleCreated">
<source xml:lang="en">Firewall rule successfully created.</source>
</trans-unit>
<trans-unit id="msgChooseQueryHistoryListing">
<source xml:lang="en">Choose Query History</source>
</trans-unit>
<trans-unit id="msgChooseQueryHistoryAction">
<source xml:lang="en">Choose An Action</source>
</trans-unit>
<trans-unit id="msgOpenQueryHistoryListing">
<source xml:lang="en">Open Query History</source>
</trans-unit>
<trans-unit id="msgRunQueryHistoryListing">
<source xml:lang="en">Run Query History</source>
</trans-unit>
<trans-unit id="msgInvalidIpAddress">
<source xml:lang="en">Invalid IP Address </source>
</trans-unit>
<trans-unit id="msgNoQueriesAvailable">
<source xml:lang="en">No Queries Available</source>
</trans-unit>
<trans-unit id="retryLabel">
<source xml:lang="en">Retry</source>
</trans-unit>
Expand Down
111 changes: 109 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@
{
"id": "objectExplorer",
"name": "%extension.connections%"
},
{
"id": "queryHistory",
"name": "%extension.queryHistory%",
"when": "config.mssql.enableQueryHistoryFeature"
}
]
},
Expand Down Expand Up @@ -204,6 +209,24 @@
"when": "view == objectExplorer",
"title": "%mssql.addObjectExplorer%",
"group": "navigation"
},
{
"command": "mssql.startQueryHistoryCapture",
"when": "view == queryHistory && config.mssql.enableQueryHistoryFeature && !config.mssql.enableQueryHistoryCapture",
"title": "%mssql.startQueryHistoryCapture%",
"group": "navigation"
},
{
"command": "mssql.pauseQueryHistoryCapture",
"when": "view == queryHistory && config.mssql.enableQueryHistoryFeature && config.mssql.enableQueryHistoryCapture",
"title": "%mssql.pauseQueryHistoryCapture%",
"group": "navigation"
},
{
"command": "mssql.clearAllQueryHistory",
"when": "view == queryHistory",
"title": "%mssql.clearAllQueryHistory%",
"group": "secondary"
}
],
"view/item/context": [
Expand Down Expand Up @@ -251,6 +274,21 @@
"command": "mssql.scriptAlter",
"when": "view == objectExplorer && viewItem =~ /^(AggregateFunction|PartitionFunction|ScalarValuedFunction|StoredProcedure|TableValuedFunction|View)$/",
"group": "MS_SQL@4"
},
{
"command": "mssql.openQueryHistory",
"when": "view == queryHistory && viewItem == queryHistoryNode",
"group": "MS_SQL@1"
},
{
"command": "mssql.runQueryHistory",
"when": "view == queryHistory && viewItem == queryHistoryNode",
"group": "MS_SQL@2"
},
{
"command": "mssql.deleteQueryHistory",
"when": "view == queryHistory && viewItem == queryHistoryNode",
"group": "MS_SQL@3"
}
],
"commandPalette": [
Expand Down Expand Up @@ -293,6 +331,14 @@
{
"command": "mssql.toggleSqlCmd",
"when": "editorFocus && editorLangId == 'sql'"
},
{
"command": "mssql.startQueryHistoryCapture",
"when": "config.mssql.enableQueryHistoryFeature && !config.mssql.enableQueryHistoryCapture"
},
{
"command": "mssql.pauseQueryHistoryCapture",
"when": "config.mssql.enableQueryHistoryFeature && config.mssql.enableQueryHistoryCapture"
}
]
},
Expand All @@ -303,7 +349,7 @@
"category": "MS SQL",
"icon": {
"light": "images/start.svg",
"dark": "images/start_inverse.svg"
"dark": "images/start.svg"
}
},
{
Expand All @@ -317,7 +363,7 @@
"category": "MS SQL",
"icon": {
"light": "images/stop.svg",
"dark": "images/stop_inverse.svg"
"dark": "images/stop.svg"
}
},
{
Expand Down Expand Up @@ -418,6 +464,49 @@
"command": "mssql.scriptAlter",
"title": "%mssql.scriptAlter%",
"group": "MS SQL"
},
{
"command": "mssql.openQueryHistory",
"title": "%mssql.openQueryHistory%",
"group": "MS SQL"
},
{
"command": "mssql.runQueryHistory",
"title": "%mssql.runQueryHistory%",
"group": "MS SQL"
},
{
"command": "mssql.deleteQueryHistory",
"title": "%mssql.deleteQueryHistory%",
"group": "MS SQL"
},
{
"command": "mssql.clearAllQueryHistory",
"title": "%mssql.clearAllQueryHistory%",
"group": "MS SQL"
},
{
"command": "mssql.startQueryHistoryCapture",
"title": "%mssql.startQueryHistoryCapture%",
"group": "MS SQL",
"icon": {
"light": "images/start.svg",
"dark": "images/start.svg"
}
},
{
"command": "mssql.pauseQueryHistoryCapture",
"title": "%mssql.pauseQueryHistoryCapture%",
"group": "MS SQL",
"icon": {
"light": "images/stop.svg",
"dark": "images/stop.svg"
}
},
{
"command": "mssql.commandPaletteQueryHistory",
"title": "%mssql.commandPaletteQueryHistory%",
"group": "MS SQL"
}
],
"keybindings": [
Expand Down Expand Up @@ -826,6 +915,24 @@
"default": false,
"description": "%mssql.persistQueryResultTabs%",
"scope": "window"
},
"mssql.queryHistoryLimit": {
"type": "number",
"default": 20,
"description": "%mssql.queryHistoryLimit%",
"scope": "window"
},
"mssql.enableQueryHistoryCapture": {
"type": "boolean",
"default": true,
"description": "%mssql.enableQueryHistoryCapture%",
"scope": "window"
},
"mssql.enableQueryHistoryFeature": {
"type": "boolean",
"default": true,
"description" : "%mssql.enableQueryHistoryFeature%",
"scope": "window"
}
}
}
Expand Down
13 changes: 12 additions & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@
"mssql.scriptDelete":"Script as Drop",
"mssql.scriptExecute":"Script as Execute",
"mssql.scriptAlter":"Script as Alter",
"mssql.openQueryHistory":"Open Query",
"mssql.runQueryHistory":"Run Query",
"mssql.deleteQueryHistory":"Delete",
"mssql.clearAllQueryHistory":"Clear All History",
"mssql.enableQueryHistoryCapture":"Enable Query History Capture",
"mssql.startQueryHistoryCapture":"Start Query History Capture",
"mssql.pauseQueryHistoryCapture":"Pause Query History Capture",
"mssql.commandPaletteQueryHistory":"Open Query History in Command Palette",
"mssql.removeObjectExplorerNode":"Remove",
"mssql.refreshObjectExplorerNode":"Refresh",
"extension.connections":"Connections",
"extension.queryHistory":"Query History",
"mssql.connect":"Connect",
"mssql.disconnect":"Disconnect",
"mssql.manageProfiles":"Manage Connection Profiles",
Expand Down Expand Up @@ -79,6 +88,8 @@
"mssql.intelliSense.enableErrorChecking":"Should IntelliSense error checking be enabled",
"mssql.intelliSense.enableSuggestions":"Should IntelliSense suggestions be enabled",
"mssql.intelliSense.enableQuickInfo":"Should IntelliSense quick info be enabled",
"mssql.enableQueryHistoryFeature":"Should Query History feature be enabled",
"mssql.intelliSense.lowerCaseSuggestions":"Should IntelliSense suggestions be lowercase",
"mssql.persistQueryResultTabs":"Should query result selections and scroll positions be saved when switching tabs (may impact performance)"
"mssql.persistQueryResultTabs":"Should query result selections and scroll positions be saved when switching tabs (may impact performance)",
"mssql.queryHistoryLimit":"Number of query history entries to show in the Query History view"
}
13 changes: 13 additions & 0 deletions src/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const extensionName = 'mssql';
export const extensionConfigSectionName = 'mssql';
export const mssqlProviderName = 'MSSQL';
export const noneProviderName = 'None';
export const objectExplorerId = 'objectExplorer';
export const queryHistory = 'queryHistory';
export const connectionApplicationName = 'vscode-mssql';
export const outputChannelName = 'MSSQL';
export const connectionConfigFilename = 'settings.json';
Expand All @@ -24,6 +26,14 @@ export const cmdChooseDatabase = 'mssql.chooseDatabase';
export const cmdChooseLanguageFlavor = 'mssql.chooseLanguageFlavor';
export const cmdShowReleaseNotes = 'mssql.showReleaseNotes';
export const cmdShowGettingStarted = 'mssql.showGettingStarted';
export const cmdRefreshQueryHistory = 'mssql.refreshQueryHistory';
export const cmdClearAllQueryHistory = 'mssql.clearAllQueryHistory';
export const cmdDeleteQueryHistory = 'mssql.deleteQueryHistory';
export const cmdOpenQueryHistory = 'mssql.openQueryHistory';
export const cmdRunQueryHistory = 'mssql.runQueryHistory';
export const cmdStartQueryHistory = 'mssql.startQueryHistoryCapture';
export const cmdPauseQueryHistory = 'mssql.pauseQueryHistoryCapture';
export const cmdCommandPaletteQueryHistory = 'mssql.commandPaletteQueryHistory';
export const cmdNewQuery = 'mssql.newQuery';
export const cmdManageConnectionProfiles = 'mssql.manageProfiles';
export const cmdRebuildIntelliSenseCache = 'mssql.rebuildIntelliSenseCache';
Expand Down Expand Up @@ -107,6 +117,9 @@ export const sqlToolsServiceDownloadUrlConfigKey = 'downloadUrl';
export const extConfigResultFontFamily = 'resultsFontFamily';
export const configApplyLocalization = 'applyLocalization';
export const configPersistQueryResultTabs = 'persistQueryResultTabs';
export const configQueryHistoryLimit = 'queryHistoryLimit';
export const configEnableQueryHistoryCapture = 'enableQueryHistoryCapture';
export const configEnableQueryHistoryFeature = 'enableQueryHistoryFeature';

// ToolsService Constants
export const serviceInstallingTo = 'Installing SQL tools service to';
Expand Down

0 comments on commit 3caa561

Please sign in to comment.