diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs')
-rw-r--r-- | main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs b/main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs index ed2251cb31..3e62a685bb 100644 --- a/main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs +++ b/main/src/addins/AspNet/Commands/GoToControllerCommandHandler.cs @@ -40,8 +40,12 @@ namespace MonoDevelop.AspNet.Commands protected override void Update (CommandInfo info)
{
var doc = IdeApp.Workbench.ActiveDocument;
- AspNetAppProject project;
- if (doc == null || (project = doc.Project as AspNetAppProject) == null || !project.IsAspMvcProject) {
+ if (doc == null || doc.Project == null) {
+ info.Enabled = info.Visible = false;
+ return;
+ }
+ var aspFlavor = doc.Project.GetService<AspNetFlavor> ();
+ if (aspFlavor == null || !aspFlavor.IsAspMvcProject) {
info.Enabled = info.Visible = false;
return;
}
|