Index: src/DeltaShell/DeltaShell.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/DeltaShell/DeltaShell.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs (.../ShowProjectExplorerCommand.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/DeltaShell/DeltaShell.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs (.../ShowProjectExplorerCommand.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -5,26 +5,14 @@ { public class ShowProjectExplorerCommand : Command, IGuiCommand { - protected override void OnExecute(params object[] arguments) + public override bool Enabled { - var view = ProjectExplorerGuiPlugin.Instance.ProjectExplorer; - var active = Gui.ToolWindowViews.Contains(view); - - if (active) + get { - Gui.ToolWindowViews.Remove(view); + return true; } - else - { - ProjectExplorerGuiPlugin.Instance.InitializeProjectTreeView(); - } } - public override bool Enabled - { - get { return true; } - } - public override bool Checked { get @@ -37,7 +25,22 @@ return Gui.ToolWindowViews.Contains(ProjectExplorerGuiPlugin.Instance.ProjectExplorer); } } - + public IGui Gui { get; set; } + + protected override void OnExecute(params object[] arguments) + { + var view = ProjectExplorerGuiPlugin.Instance.ProjectExplorer; + var active = Gui.ToolWindowViews.Contains(view); + + if (active) + { + Gui.ToolWindowViews.Remove(view); + } + else + { + ProjectExplorerGuiPlugin.Instance.InitializeProjectTreeView(); + } + } } } \ No newline at end of file