Syntax highlighting for console
This commit is contained in:
@@ -143,18 +143,26 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
context.subscriptions.push(disposable, registration);
|
||||
|
||||
function changeSession(node: ConnectionNode) {
|
||||
currentConnection = node;
|
||||
statusBarItem.text = node.name;
|
||||
if (dbSession) {
|
||||
dbSession.stdin.end();
|
||||
dbSession = null;
|
||||
}
|
||||
}
|
||||
|
||||
vscode.commands.registerCommand('selectConnection', (node: ConnectionNode) => {
|
||||
vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
|
||||
.then( (selection) => {
|
||||
if (selection == 'Yes') {
|
||||
currentConnection = node;
|
||||
statusBarItem.text = node.name;
|
||||
if (dbSession) {
|
||||
dbSession.stdin.end();
|
||||
dbSession = null;
|
||||
if (!dbSession) {
|
||||
changeSession(node)
|
||||
} else {
|
||||
vscode.window.showInformationMessage(`You want to change the connection to '${node.name}'. Sure?`, 'Yes')
|
||||
.then( (selection) => {
|
||||
if (selection == 'Yes') {
|
||||
changeSession(node);
|
||||
}
|
||||
}
|
||||
}, (reason) => {})
|
||||
}, (reason) => {})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,30 @@
|
||||
<key>name</key>
|
||||
<string>string.quoted</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>Query successful.</string>
|
||||
<key>name</key>
|
||||
<string>keyword</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>Exception.*</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>Errors found:.*</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>^\d+:.*</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
Reference in New Issue
Block a user