Skip to content

Commit ed48a69

Browse files
authored
Merge pull request #93 from jpogran/GH-92-context-menu
(GH-92) Context Menu actions for existing commands
2 parents 0b68056 + 50086bf commit ed48a69

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

client/CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ All notable changes to the "vscode-puppet" extension will be documented in this
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7-
<!--
87
## Unreleased
98

10-
Add unreleased changes here
11-
-->
9+
- Added context menus for Puppet Resource and Nodegraph preview
1210

1311
## 0.4.6 - 2017-06-29
1412

client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Our validation uses [puppet-lint](https://github.com/rodjek/puppet-lint) to vali
5555

5656
You can import existing resources directly using `puppet resource`
5757

58-
1. Open the command palette (`Ctrl+Shift+P`)
58+
1. Open the command palette (`Ctrl+Shift+P`) or right click on a puppet file and select the menu entry
5959

6060
2. Type `puppet resource` and press enter
6161

@@ -65,7 +65,7 @@ You can import existing resources directly using `puppet resource`
6565

6666
You can preview the [node graph](https://puppet.com/blog/visualize-your-infrastructure-models) of a manifest while you edit your Puppet Code.
6767

68-
1. Open the command palette (`Ctrl+Shift+P`)
68+
1. Open the command palette (`Ctrl+Shift+P`) or right click on a puppet file and select the menu entry
6969

7070
2. Type `puppet open node`.. and press enter
7171

client/package.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
{
7575
"command": "extension.puppetResource",
7676
"category": "Puppet",
77-
"title": "Resource",
77+
"title": "Puppet Resource",
7878
"when": "editorTextFocus && editorLangId == 'puppet'"
7979
},
8080
{
@@ -87,6 +87,28 @@
8787
}
8888
}
8989
],
90+
"menus": {
91+
"editor/title": [
92+
{
93+
"when": "resourceLangId == 'puppet'",
94+
"command": "extension.puppetShowNodeGraphToSide",
95+
"alt": "extension.puppetShowNodeGraphToSide"
96+
}
97+
],
98+
"editor/context": [
99+
{
100+
"when": "resourceLangId == 'puppet'",
101+
"command": "extension.puppetShowNodeGraphToSide",
102+
"alt": "extension.puppetShowNodeGraphToSide"
103+
},
104+
{
105+
"when": "resourceLangId == 'puppet'",
106+
"command": "extension.puppetResource",
107+
"alt": "extension.puppetResource",
108+
"group": ""
109+
}
110+
]
111+
},
90112
"configurationDefaults": {
91113
"files.encoding": "utf8",
92114
"files.associations": [

0 commit comments

Comments
 (0)