-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
22,807 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": ["--extensionDevelopmentPath=${workspaceRoot}"], | ||
"outFiles": ["${workspaceFolder}/out/**/*.js"], | ||
"preLaunchTask": "npm: compile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"editor.insertSpaces": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Cat Customs - Custom Editor API Samples | ||
|
||
![Paw draw editor ](documentation/example.png) | ||
|
||
Demonstrates VS Code's [custom editor API](https://code.visualstudio.com/api/extension-guides/custom-editors) using two custom editors: | ||
|
||
- Mongo JSON — Uses the finalized custom text editor api to provide a custom editor for `.mongodb.json` files (which are just json files) | ||
- Paw Draw - Uses the binary custom editor api to provide a custom editor for `.pawdraw` files (which are just png files with a different file extension). | ||
|
||
## VS Code API | ||
|
||
### `vscode` module | ||
|
||
- [`window.registerCustomEditorProvider`](https://code.visualstudio.com/api/references/vscode-api#window.registerCustomEditorProvider) | ||
- [`CustomTextEditor`](https://code.visualstudio.com/api/references/vscode-api#CustomTextEditor) | ||
- [`CustomEditor`](https://code.visualstudio.com/api/references/vscode-api#CustomEditor) | ||
|
||
## Running the example | ||
|
||
- Open this example in VS Code 1.46+ | ||
- `npm install` | ||
- `npm run watch` or `npm run compile` | ||
- `F5` to start debugging | ||
|
||
Open the example files from the `exampleFiles` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* ESLint configuration for the project. | ||
* | ||
* See https://eslint.style and https://typescript-eslint.io for additional linting options. | ||
*/ | ||
// @ts-check | ||
import js from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import stylistic from '@stylistic/eslint-plugin'; | ||
|
||
export default tseslint.config( | ||
{ | ||
ignores: ['out', 'media'], | ||
}, | ||
js.configs.recommended, | ||
...tseslint.configs.recommended, | ||
...tseslint.configs.stylistic, | ||
{ | ||
plugins: { | ||
'@stylistic': stylistic, | ||
}, | ||
rules: { | ||
curly: 'warn', | ||
'@stylistic/semi': ['warn', 'always'], | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
}, | ||
} | ||
); |
128 changes: 128 additions & 0 deletions
128
poc-mongo-json-visualizer/examples/small-example.mongodb.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
[ | ||
{ | ||
"_id": "6744698295384c46e1b91d1a", | ||
"item": "abc", | ||
"price": 10, | ||
"quantity": 3, | ||
"date": "2014-03-01T08:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d1b", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d1c", | ||
"item": "xyz", | ||
"price": 5, | ||
"quantity": 10, | ||
"date": "2014-03-15T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d1d", | ||
"item": "xyz", | ||
"price": 5, | ||
"quantity": 20, | ||
"date": "2014-04-04T11:21:39.736Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d1e", | ||
"item": "abc", | ||
"price": 10, | ||
"quantity": 10, | ||
"date": "2014-04-04T21:23:13.331Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d1f", | ||
"item": "def", | ||
"price": 7.5, | ||
"quantity": 5, | ||
"date": "2015-06-04T05:08:13.000Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d20", | ||
"item": "def", | ||
"price": 7.5, | ||
"quantity": 10, | ||
"date": "2015-09-10T08:43:00.000Z" | ||
}, | ||
{ | ||
"_id": "6744698295384c46e1b91d21", | ||
"item": "abc", | ||
"price": 10, | ||
"quantity": 5, | ||
"date": "2016-02-06T20:20:13.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a7", | ||
"item": "abc", | ||
"price": 10, | ||
"quantity": 2, | ||
"date": "2014-03-01T08:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
}, | ||
{ | ||
"_id": "674469c2d096d8e63c3b58a8", | ||
"item": "jkl", | ||
"price": 20, | ||
"quantity": 1, | ||
"date": "2014-03-01T09:00:00.000Z" | ||
} | ||
] |
Oops, something went wrong.