From 107a162370b356b96aa1ed909377795c01ca9069 Mon Sep 17 00:00:00 2001 From: Thorsten Muerell Date: Tue, 14 Nov 2017 00:46:10 +0100 Subject: [PATCH] Added commit and rollback --- images/commit.svg | 54 +++++++++++++++++++++++++++++++++++++ images/commit_inverse.svg | 10 +++++++ images/rollback.svg | 51 +++++++++++++++++++++++++++++++++++ images/rollback_inverse.svg | 7 +++++ package.json | 30 ++++++++++++++++++--- src/extension.ts | 5 ++++ 6 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 images/commit.svg create mode 100644 images/commit_inverse.svg create mode 100644 images/rollback.svg create mode 100644 images/rollback_inverse.svg diff --git a/images/commit.svg b/images/commit.svg new file mode 100644 index 0000000..01c2309 --- /dev/null +++ b/images/commit.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/commit_inverse.svg b/images/commit_inverse.svg new file mode 100644 index 0000000..deecd80 --- /dev/null +++ b/images/commit_inverse.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/images/rollback.svg b/images/rollback.svg new file mode 100644 index 0000000..6e7f7e7 --- /dev/null +++ b/images/rollback.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/images/rollback_inverse.svg b/images/rollback_inverse.svg new file mode 100644 index 0000000..5eadcb6 --- /dev/null +++ b/images/rollback_inverse.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/package.json b/package.json index 5d6f484..2dfb6d8 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,23 @@ }, { "command": "frog.commit", - "title": "Frog: Commits the current transaction" + "title": "Frog: Commits the current transaction", + "icon": { + "light": "images/commit.svg", + "dark": "images/commit_inverse.svg" + } }, { "command": "frog.rollback", - "title": "Frog: Rollbacks" + "title": "Frog: Rollbacks", + "icon": { + "light": "images/rollback.svg", + "dark": "images/rollback_inverse.svg" + } + }, + { + "command": "frog.checkConnection", + "title": "Frog: Checks the connection" }, { "command": "frog.selectConnection", @@ -55,7 +67,6 @@ "key": "ctrl+alt+c", "mac": "ctrl+alt+c" } - ], "views": { "explorer": [ @@ -83,6 +94,19 @@ "path": "./syntaxes/frog-runner.tmLanguage" } ], + "menus": { + "editor/title": [ + { + "command": "frog.commit", + "group": "navigation" + }, + { + "command": "frog.rollback", + "group": "navigation" + } + + ] + }, "configuration": { "type": "object", "title": "Frog configuration", diff --git a/src/extension.ts b/src/extension.ts index 493ab3d..55c43db 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -59,6 +59,11 @@ export function activate(context: vscode.ExtensionContext) { }); context.subscriptions.push(disposable); + disposable = vscode.commands.registerCommand('frog.checkConnection', () => { + sessionManager.execute("select 1 from dual", 1); + }); + context.subscriptions.push(disposable); + function changeSession(node: ConnectionNode) { sessionManager.currentConnection = node; }