-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 8f88675
Showing
15 changed files
with
2,221 additions
and
0 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,25 @@ | ||
{ | ||
"env": { | ||
"browser": false, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"no-const-assign": "warn", | ||
"no-this-before-super": "warn", | ||
"no-undef": "warn", | ||
"no-unreachable": "warn", | ||
"no-unused-vars": "warn", | ||
"constructor-super": "warn", | ||
"valid-typeof": "warn" | ||
} | ||
} |
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 @@ | ||
node_modules |
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,7 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the extensions.json format | ||
"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,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"] | ||
} | ||
] | ||
} |
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,8 @@ | ||
.vscode/** | ||
.vscode-test/** | ||
test/** | ||
.gitignore | ||
vsc-extension-quickstart.md | ||
**/jsconfig.json | ||
**/*.map | ||
**/.eslintrc.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,7 @@ | ||
# Change Log | ||
|
||
All notable changes to the "fxml-viewer" extension will be documented in this file. | ||
|
||
## [Unreleased] | ||
|
||
- Initial release |
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,34 @@ | ||
# FXML Viewer | ||
|
||
A vscode extension view FXML file in SceneBuilder | ||
|
||
## Features | ||
|
||
Unkown | ||
|
||
## Requirements | ||
|
||
You have to install ScenBuider | ||
|
||
## Extension Settings | ||
|
||
* `scencebuiler.home`: the path of SceneBuilder's exe file | ||
|
||
## Known Issues | ||
|
||
Calling out known issues can help limit users opening duplicate issues against your extension. | ||
|
||
## Release Notes | ||
|
||
### 1.0.0 | ||
|
||
Initial release of ... | ||
|
||
----------------------------------------------------------------------------------------------------------- | ||
|
||
## For more information | ||
|
||
* [Code](https://github.com/lzw-723/FXML-Viewer) | ||
* [LICENSE](http://www.wtfpl.net/) | ||
|
||
**Enjoy!** |
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,47 @@ | ||
const vscode = require('vscode'); | ||
const cp = require("child_process"); | ||
|
||
|
||
/** | ||
* @param {vscode.ExtensionContext} context | ||
*/ | ||
function activate(context) { | ||
|
||
console.log('Congratulations,extension "fxml-viewer" is now active!'); | ||
|
||
let disposable = vscode.commands.registerCommand('extension.openFXML', (event) => { | ||
if (getSceneBuilderHome()) { | ||
let fxmlPath = event.path; | ||
let sceneBuilderHome = getSceneBuilderHome(); | ||
viewFXML(fxmlPath, sceneBuilderHome); | ||
|
||
} | ||
else{ | ||
vscode.window.showErrorMessage('please set ScenceBuilder.Home'); | ||
} | ||
}); | ||
|
||
context.subscriptions.push(disposable); | ||
} | ||
exports.activate = activate; | ||
|
||
function getSceneBuilderHome() { | ||
return vscode.workspace.getConfiguration().get('scenebuilder.home'); | ||
} | ||
|
||
function viewFXML(filePath, exePath) { | ||
cp.execFile(exePath, [filePath], {}, (error, stdout, stderr) => { | ||
if (error) { | ||
console.log('exec error: ' + error); | ||
vscode.window.showErrorMessage("SceneBuilder couldn't opened!"); | ||
} | ||
}); | ||
} | ||
|
||
|
||
function deactivate() {} | ||
|
||
module.exports = { | ||
activate, | ||
deactivate | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", | ||
"checkJs": true, /* Typecheck .js files. */ | ||
"lib": [ | ||
"es6" | ||
] | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.