diff --git a/.gitignore b/.gitignore index 8c8220a..5fe00fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ out node_modules .vscode-test/ -.vsix +*.vsix diff --git a/README.md b/README.md index 1913d1f..661b40f 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,3 @@ -# frog README +# frog -This is the README for your extension "frog". After writing up a brief description, we recommend including the following sections. - -## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. - -## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. - -## Extension Settings - -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: enable/disable this extension -* `myExtension.thing`: set to `blah` to do something - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ------------------------------------------------------------------------------------------------------------ - -## Working with Markdown - -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on OSX or `Ctrl+\` on Windows and Linux) -* Toggle preview (`Shift+CMD+V` on OSX or `Shift+Ctrl+V` on Windows and Linux) -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (OSX) to see a list of Markdown snippets - -### For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** \ No newline at end of file +This is a better TOAD. \ No newline at end of file diff --git a/frog-runner.jar b/frog-runner.jar index e9a721b..cb6d37e 100644 Binary files a/frog-runner.jar and b/frog-runner.jar differ diff --git a/package.json b/package.json index 5920d1b..94c60a4 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "typescript": "^2.5.3", "vscode": "^1.1.5", "@types/node": "^7.0.43", - "@types/mocha": "^2.2.42" + "@types/mocha": "^2.2.42", + "text-table-formatter": "^0.1.0" } } \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 861d49a..fcbd19c 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -5,6 +5,7 @@ import * as vscode from 'vscode'; import { ConnectionProvider, ConnectionNode } from './connections' const { spawn } = require('child_process'); +const table = require('text-table'); const extensionName = "frog"; var dbSession = null; @@ -78,17 +79,21 @@ export function activate(context: vscode.ExtensionContext) { diagnosticCollection.set(document.uri, diagnostics); } } else { + const data = [] + data.push(json['columnDefinitions'].map((x) => x['name'])); for (let row of json["rows"]) { - myOutputChannel.append("--- ROW ---\n"); - for (let [index, value] of row["columns"].entries()) { - myOutputChannel.append(cd[index]['name'] + " " + value['value'] + "\n"); - } + data.push(row['columns'].map((x) => x['value'])); } + var t = table(data, { hsep: ' | '}); + myOutputChannel.append(t); + myOutputChannel.append("\n"); } myOutputChannel.append("-- " + new Date() + " -------------------------------\n"); outputBuffer = ""; - } catch (e) {} + } catch (e) { + console.log(e); + } }); dbSession.stderr.on('data', (data) => {