Skip to content

Commit

Permalink
[Compiler/View] Add refresh button (Samsung#446)
Browse files Browse the repository at this point in the history
* [Compiler/View] Add refresh button

This commit adds refresh button and related command.

ONE-vscode-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>

* Update media/icon/light/refresh.svg

Co-authored-by: Hyun Sik Yoon <[email protected]>

* Add origin image address

ONE-vscode-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>

Co-authored-by: Hyun Sik Yoon <[email protected]>
  • Loading branch information
jyoungyun and hyunsik-yoon authored Apr 8, 2022
1 parent e6c515a commit f59f670
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 0 deletions.
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,28 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------

# https://github.com/microsoft/vscode-icons
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
8 changes: 8 additions & 0 deletions media/icon/dark/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions media/icon/light/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
"category": "ONE",
"_comment": "Call this when compiling compilable model(e.g., *.tflite, *.onnx, etc.)"
},
{
"command": "onevscode.refresh-compiler",
"title": "Refresh",
"category": "ONE",
"icon": {
"light": "media/icon/light/refresh.svg",
"dark": "media/icon/dark/refresh.svg"
}
},
{
"command": "onevscode.build",
"title": "build",
Expand Down Expand Up @@ -84,6 +93,13 @@
"command": "onevscode.show-compile-webview",
"when": "resourceExtname in onevscode.compilableExtList || resourcePath in onevscode.compilableDirList"
}
],
"view/title": [
{
"command": "onevscode.refresh-compiler",
"when": "view == CompilerToolchainView",
"group": "navigation"
}
]
},
"configuration": {
Expand Down
6 changes: 6 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ export function activate(context: vscode.ExtensionContext) {

setGlobalContext();

// ONE view
let refreshCompiler = vscode.commands.registerCommand('onevscode.refresh-compiler', () => {
console.log('refresh-compiler: NYI');
});
context.subscriptions.push(refreshCompiler);

// show compilation page
let compileWebView = vscode.commands.registerCommand('onevscode.show-compile-webview', () => {
CompilePanel.render(context.extensionUri);
Expand Down

0 comments on commit f59f670

Please sign in to comment.