Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -r3340c93e5fd1ccd9b38c1c88cecbf06f0e3e02d6 -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 3340c93e5fd1ccd9b38c1c88cecbf06f0e3e02d6)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -129,6 +129,7 @@
+
Index: Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs
===================================================================
diff -u -reb73273a30dc772c8590009327612514f53ebd5f -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision eb73273a30dc772c8590009327612514f53ebd5f)
+++ Core/Common/src/Core.Common.Gui/GuiCommandHandler.cs (.../GuiCommandHandler.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -18,7 +18,7 @@
namespace Core.Common.Gui
{
- public class GuiCommandHandler : IGuiCommandHandler
+ public class GuiCommandHandler : IGuiCommandHandler, IProjectCommands
{
private static readonly ILog Log = LogManager.GetLogger(typeof(GuiCommandHandler));
Index: Core/Common/src/Core.Common.Gui/IGui.cs
===================================================================
diff -u -rc0d27d013180f7c062deb22400091807cbab2445 -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision c0d27d013180f7c062deb22400091807cbab2445)
+++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -55,6 +55,8 @@
IStorageCommands StorageCommands { get; }
+ IProjectCommands ProjectCommands { get; }
+
///
/// Gets commands.
///
Index: Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs
===================================================================
diff -u -rd0c45d1cb039e274f638638d5b3d6631c88c2228 -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision d0c45d1cb039e274f638638d5b3d6631c88c2228)
+++ Core/Common/src/Core.Common.Gui/IGuiCommandHandler.cs (.../IGuiCommandHandler.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -20,17 +20,7 @@
void RemoveAllViewsForItem(object dataObject);
///
- /// Presents the user with a dialog from which items can be selected and then created. The items are retrieved
- /// using the DataItemInfo objects of plugins. The item is NOT added to the project or wrapped in a DataItem.
///
- ///
- /// The predicate which must evaluate to true for an item type to be included in the list
- object AddNewChildItem(object parent, IEnumerable childItemTypes);
-
- void AddNewItem(object parent);
-
- ///
- ///
///
/// true if there is a default view for the current selection
bool CanOpenViewFor(object obj);
@@ -40,8 +30,6 @@
/// true if there are more supported views for the current selection
bool CanOpenSelectViewDialog();
- void AddItemToProject(object item);
-
///
/// Activates the propertyGrid toolbox
///
Index: Core/Common/src/Core.Common.Gui/IProjectCommands.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/IProjectCommands.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/IProjectCommands.cs (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace Core.Common.Gui
+{
+ public interface IProjectCommands
+ {
+ ///
+ /// Presents the user with a dialog from which items can be selected and then created. The items are retrieved
+ /// using the DataItemInfo objects of plugins. The item is NOT added to the project or wrapped in a DataItem.
+ ///
+ ///
+ /// The predicate which must evaluate to true for an item type to be included in the list
+ object AddNewChildItem(object parent, IEnumerable childItemTypes);
+
+ void AddNewItem(object parent);
+
+ void AddItemToProject(object item);
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs
===================================================================
diff -u -reb73273a30dc772c8590009327612514f53ebd5f -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision eb73273a30dc772c8590009327612514f53ebd5f)
+++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -197,6 +197,14 @@
}
}
+ public IProjectCommands ProjectCommands
+ {
+ get
+ {
+ return guiCommandHandler;
+ }
+ }
+
public IViewList DocumentViews
{
get
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/ProjectNodePresenter.cs
===================================================================
diff -u -r2f45fd13d134ed6bdfcdb0967d07516beb30409c -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/ProjectNodePresenter.cs (.../ProjectNodePresenter.cs) (revision 2f45fd13d134ed6bdfcdb0967d07516beb30409c)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/ProjectNodePresenter.cs (.../ProjectNodePresenter.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -14,7 +14,7 @@
public class ProjectNodePresenter : TreeViewNodePresenterBase
{
private readonly IContextMenuBuilderProvider contextMenuBuilderProvider;
- private readonly IGuiCommandHandler commandHandler;
+ private readonly IProjectCommands commandHandler;
///
/// Creates a new instance of , which uses the
@@ -25,7 +25,7 @@
/// to use for building a .
/// The to defer the add
/// item action to.
- public ProjectNodePresenter(IContextMenuBuilderProvider contextMenuBuilderProvider, IGuiCommandHandler commandHandler)
+ public ProjectNodePresenter(IContextMenuBuilderProvider contextMenuBuilderProvider, IProjectCommands commandHandler)
{
if (contextMenuBuilderProvider == null)
{
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs
===================================================================
diff -u -r0190b07aad429867b364655eacc3527dd813644a -r71db3f262f1e940ee15e561fe582a7895a10aa64
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision 0190b07aad429867b364655eacc3527dd813644a)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorerGuiPlugin.cs (.../ProjectExplorerGuiPlugin.cs) (revision 71db3f262f1e940ee15e561fe582a7895a10aa64)
@@ -41,7 +41,7 @@
///
public override IEnumerable GetProjectTreeViewNodePresenters()
{
- yield return new ProjectNodePresenter(Gui.ContextMenuProvider, Gui.CommandHandler);
+ yield return new ProjectNodePresenter(Gui.ContextMenuProvider, Gui.ProjectCommands);
}
public override IEnumerable