Added formatted tables
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
out
 | 
					out
 | 
				
			||||||
node_modules
 | 
					node_modules
 | 
				
			||||||
.vscode-test/
 | 
					.vscode-test/
 | 
				
			||||||
.vsix
 | 
					*.vsix
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										66
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										66
									
								
								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.
 | 
					This is a better TOAD.
 | 
				
			||||||
 | 
					 | 
				
			||||||
## 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!**
 | 
					 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								frog-runner.jar
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								frog-runner.jar
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -47,6 +47,7 @@
 | 
				
			|||||||
        "typescript": "^2.5.3",
 | 
					        "typescript": "^2.5.3",
 | 
				
			||||||
        "vscode": "^1.1.5",
 | 
					        "vscode": "^1.1.5",
 | 
				
			||||||
        "@types/node": "^7.0.43",
 | 
					        "@types/node": "^7.0.43",
 | 
				
			||||||
        "@types/mocha": "^2.2.42"
 | 
					        "@types/mocha": "^2.2.42",
 | 
				
			||||||
 | 
					        "text-table-formatter": "^0.1.0"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -5,6 +5,7 @@ import * as vscode from 'vscode';
 | 
				
			|||||||
import { ConnectionProvider, ConnectionNode } from './connections'
 | 
					import { ConnectionProvider, ConnectionNode } from './connections'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const { spawn } = require('child_process');
 | 
					const { spawn } = require('child_process');
 | 
				
			||||||
 | 
					const table = require('text-table');
 | 
				
			||||||
const extensionName = "frog";
 | 
					const extensionName = "frog";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var dbSession = null;
 | 
					var dbSession = null;
 | 
				
			||||||
@@ -78,17 +79,21 @@ export function activate(context: vscode.ExtensionContext) {
 | 
				
			|||||||
                            diagnosticCollection.set(document.uri, diagnostics);
 | 
					                            diagnosticCollection.set(document.uri, diagnostics);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        const data = []
 | 
				
			||||||
 | 
					                        data.push(json['columnDefinitions'].map((x) => x['name']));
 | 
				
			||||||
                        for (let row of json["rows"]) {
 | 
					                        for (let row of json["rows"]) {
 | 
				
			||||||
                            myOutputChannel.append("--- ROW ---\n");
 | 
					                            data.push(row['columns'].map((x) => x['value']));
 | 
				
			||||||
                            for (let [index, value] of row["columns"].entries()) {
 | 
					 | 
				
			||||||
                                myOutputChannel.append(cd[index]['name'] + "  " + value['value'] + "\n");
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					                        var t = table(data, { hsep: ' | '});
 | 
				
			||||||
 | 
					                        myOutputChannel.append(t);
 | 
				
			||||||
 | 
					                        myOutputChannel.append("\n");
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    myOutputChannel.append("-- " + new Date() + " -------------------------------\n");
 | 
					                    myOutputChannel.append("-- " + new Date() + " -------------------------------\n");
 | 
				
			||||||
                    outputBuffer = "";
 | 
					                    outputBuffer = "";
 | 
				
			||||||
                } catch (e) {}
 | 
					                } catch (e) {
 | 
				
			||||||
 | 
					                    console.log(e);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
              
 | 
					              
 | 
				
			||||||
            dbSession.stderr.on('data', (data) => {
 | 
					            dbSession.stderr.on('data', (data) => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user