Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Custom Context Command for Solution Explorer Item #40

Closed
shaggygi opened this issue Jun 11, 2015 · 3 comments
Closed

Adding Custom Context Command for Solution Explorer Item #40

shaggygi opened this issue Jun 11, 2015 · 3 comments

Comments

@shaggygi
Copy link

How would you add a custom context command for a specific file/folder in the Solution Explorer? As an example, let's say I right-click a file named (MyScript.py). I would like a custom command to only be shown if it was a specific file name (or possibly specific extension) in my project.

@AArnott
Copy link
Member

AArnott commented Jun 11, 2015

  1. Define your custom command
  2. Export a command handler to handle it. When invoked, your extension will be fed info on what item(s) are selected when the user invokes the context menu and you'll then be able to determine whether your command should be visible, enabled, etc.

@AArnott AArnott closed this as completed Jun 11, 2015
@AArnott
Copy link
Member

AArnott commented Jun 11, 2015

Oops. Sorry about the broken link. I've repaired it inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants