From 0a97babc04b871af124a44e799c93af554657112 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Sep 2016 17:38:29 -0700 Subject: [PATCH 1/3] Add SendFeedback menu item for NTVS Adds a simple menu item to send feedback about ntvs. See #1252 for details Closes #1252 --- .../Nodejs/Commands/SendFeedbackCommand.cs | 32 +++++++++++++++++++ Nodejs/Product/Nodejs/Nodejs.csproj | 1 + Nodejs/Product/Nodejs/NodejsPackage.cs | 3 +- Nodejs/Product/Nodejs/NodejsTools.vsct | 8 +++++ Nodejs/Product/Nodejs/PkgCmdId.cs | 10 +++--- 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 Nodejs/Product/Nodejs/Commands/SendFeedbackCommand.cs diff --git a/Nodejs/Product/Nodejs/Commands/SendFeedbackCommand.cs b/Nodejs/Product/Nodejs/Commands/SendFeedbackCommand.cs new file mode 100644 index 000000000..2473caae8 --- /dev/null +++ b/Nodejs/Product/Nodejs/Commands/SendFeedbackCommand.cs @@ -0,0 +1,32 @@ +//*********************************************************// +// Copyright (c) Microsoft. All rights reserved. +// +// Apache 2.0 License +// +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//*********************************************************// + +using System; +using Microsoft.VisualStudioTools; +using System.Diagnostics; + +namespace Microsoft.NodejsTools.Commands { + internal sealed class SendFeedbackCommand : Command { + public override void DoCommand(object sender, EventArgs args) { + var uri = new Uri(@"https://aka.ms/ntvs-feedback"); + Process.Start(new ProcessStartInfo(uri.AbsoluteUri)); + } + + public override int CommandId { + get { return (int)PkgCmdId.cmdidSendFeedback; } + } + } +} diff --git a/Nodejs/Product/Nodejs/Nodejs.csproj b/Nodejs/Product/Nodejs/Nodejs.csproj index d52bbb1ff..2067e47bc 100644 --- a/Nodejs/Product/Nodejs/Nodejs.csproj +++ b/Nodejs/Product/Nodejs/Nodejs.csproj @@ -230,6 +230,7 @@ DiagnosticsForm.cs + diff --git a/Nodejs/Product/Nodejs/NodejsPackage.cs b/Nodejs/Product/Nodejs/NodejsPackage.cs index 516c9d297..5035912dc 100644 --- a/Nodejs/Product/Nodejs/NodejsPackage.cs +++ b/Nodejs/Product/Nodejs/NodejsPackage.cs @@ -215,7 +215,8 @@ protected override void Initialize() { new OpenRemoteDebugDocumentationCommand(), new SurveyNewsCommand(), new ImportWizardCommand(), - new DiagnosticsCommand(this) + new DiagnosticsCommand(this), + new SendFeedbackCommand() }; try { commands.Add(new AzureExplorerAttachDebuggerCommand()); diff --git a/Nodejs/Product/Nodejs/NodejsTools.vsct b/Nodejs/Product/Nodejs/NodejsTools.vsct index 9eed30a3f..750936812 100644 --- a/Nodejs/Product/Nodejs/NodejsTools.vsct +++ b/Nodejs/Product/Nodejs/NodejsTools.vsct @@ -91,6 +91,13 @@ DynamicVisibility If you do not want an image next to your command, remove the Icon node or set it to --> + + + + + +