Skip to content

Commit

Permalink
Context menus, translation beta feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kowalp committed Dec 2, 2022
1 parent 2044e15 commit c415941
Show file tree
Hide file tree
Showing 8 changed files with 728 additions and 21 deletions.
67 changes: 67 additions & 0 deletions images/translate_drk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions images/translate_lgt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions out/extension.js

Large diffs are not rendered by default.

40 changes: 32 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nucomp-mcnp",
"displayName": "MCNP Language Server",
"description": "MCNP input validation and editor services. Also supports plot and run scripts.",
"version": "0.0.11",
"version": "0.0.12",
"featureFlags": {
"usingNewPythonInterpreterPathApi": true,
"usingNewPythonInterpreterPathApiV2": true
Expand All @@ -26,7 +26,8 @@
"activationEvents": [
"onLanguage:mcnp",
"onCommand:nucomp-mcnp.run",
"onCommand:nucomp-mcnp.runPlotCommand"
"onCommand:nucomp-mcnp.runPlotCommand",
"onCommand:nucomp-mcnp.translateSerpent"
],
"main": "./out/extension",
"contributes": {
Expand All @@ -39,6 +40,14 @@
"dark": "./images/run-dark.svg"
}
},
{
"command": "nucomp-mcnp.translateSerpent",
"title": "MCNP: Translate to Serpent",
"icon": {
"light": "./images/translate_lgt.svg",
"dark": "./images/translate_drk.svg"
}
},
{
"command": "nucomp-mcnp.runPlotCommand",
"title": "MCNP: Plot Geometry",
Expand Down Expand Up @@ -75,12 +84,17 @@
{
"when": "!inOutput && config.nucomp-mcnp.showRunCommandInEditorContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.run",
"group": "navigation"
"group": "code-run"
},
{
"when": "!inOutput && config.nucomp-mcnp.showRunCommandInEditorContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.translateSerpent",
"group": "code-run"
},
{
"when": "!inOutput && config.nucomp-mcnp.showRunCommandInEditorContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.runPlotCommand",
"group": "navigation"
"group": "code-run"
},
{
"when": "inOutput && !config.nucomp-mcnp.runInTerminal",
Expand All @@ -92,12 +106,17 @@
{
"when": "config.nucomp-mcnp.showRunIconInEditorTitleMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.run",
"group": "navigation"
"group": "code-run"
},
{
"when": "config.nucomp-mcnp.showRunIconInEditorTitleMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.translateSerpent",
"group": "code-run"
},
{
"when": "config.nucomp-mcnp.showRunIconInEditorTitleMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.runPlotCommand",
"group": "navigation"
"group": "code-run"
}
],
"editor/title": [
Expand All @@ -111,12 +130,17 @@
{
"when": "!explorerResourceIsFolder && config.nucomp-mcnp.showRunCommandInExplorerContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.run",
"group": "navigation"
"group": "code-run"
},
{
"when": "!explorerResourceIsFolder && config.nucomp-mcnp.showRunCommandInExplorerContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.translateSerpent",
"group": "code-run"
},
{
"when": "!explorerResourceIsFolder && config.nucomp-mcnp.showRunCommandInExplorerContextMenu && resourceExtname == .mcnp",
"command": "nucomp-mcnp.runPlotCommand",
"group": "navigation"
"group": "code-run"
}
]
},
Expand Down
31 changes: 31 additions & 0 deletions src/codeManager.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c415941

Please sign in to comment.