diff options
author | nosami <jasonimison@gmail.com> | 2019-11-21 23:48:58 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-11-24 04:26:52 +0300 |
commit | 5ab920d6da4e0e002a9394fa92a278c77e4d6b40 (patch) | |
tree | 2f255ffc736fb6956600ccbe9c9cf7564b15e03d /main | |
parent | 8b74440b8b469bec4a30b31cc735013bd61dc8a3 (diff) |
New Scaffolding should not appear on Dependencies node. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1024771
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Commands/ScaffoldCommandHandler.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Commands/ScaffoldCommandHandler.cs b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Commands/ScaffoldCommandHandler.cs index a80672262e..fd9cfe97b5 100644 --- a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Commands/ScaffoldCommandHandler.cs +++ b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.Commands/ScaffoldCommandHandler.cs @@ -49,8 +49,12 @@ namespace MonoDevelop.AspNetCore.Commands public void ScaffoldUpdate (CommandInfo info) { var project = CurrentNode.GetParentDataItem (typeof (DotNetProject), true) as DotNetProject; + info.Enabled = info.Visible = NodeIsFileOrFolder(CurrentNode) && IsAspNetCoreProject (project); + } - info.Enabled = info.Visible = IsAspNetCoreProject (project); + bool NodeIsFileOrFolder (ITreeNavigator node) + { + return node.DataItem is ProjectFile || node.DataItem is ProjectFolder; } bool IsAspNetCoreProject (Project project) |