Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeView.cs =================================================================== diff -u -rebe6e048a6c4e9146e883e19e213f41df96aabf1 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeView.cs (.../ITreeView.cs) (revision ebe6e048a6c4e9146e883e19e213f41df96aabf1) +++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/ITreeView.cs (.../ITreeView.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -14,6 +14,11 @@ /// event EventHandler SelectedNodeChanged; + /// + /// Event to notify observers of changes in the tree structure + /// + event EventHandler OnUpdate; + event Action BeforeWaitUntilAllEventsAreProcessed; /// Index: Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs =================================================================== diff -u -rebe6e048a6c4e9146e883e19e213f41df96aabf1 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs (.../TreeView.cs) (revision ebe6e048a6c4e9146e883e19e213f41df96aabf1) +++ Core/Common/src/Core.Common.Controls.Swf/TreeViewControls/TreeView.cs (.../TreeView.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -18,6 +18,7 @@ public class TreeView : System.Windows.Forms.TreeView, ITreeView { public event EventHandler SelectedNodeChanged; + public event EventHandler OnUpdate; public event Action BeforeWaitUntilAllEventsAreProcessed; @@ -284,9 +285,22 @@ if (controller != null) { controller.UpdateNode(treeNode, treeNode.Tag); + FireOnUpdateEvent(treeNode); } } + /// + /// Fires the OnUpdate event with the given . + /// + /// The to fire an update event for. + private void FireOnUpdateEvent(ITreeNode treeNode) + { + if (OnUpdate != null) + { + OnUpdate(treeNode, EventArgs.Empty); + } + } + public void RefreshChildNodes(ITreeNode treeNode) { if (controller != null) Index: Core/Common/src/Core.Common.Gui/IGui.cs =================================================================== diff -u -r0445e854de96c48aaa445849149d7cbc73ab8242 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 0445e854de96c48aaa445849149d7cbc73ab8242) +++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -149,6 +149,13 @@ /// void UpdateTitle(); + /// + /// Update the tool tip for every view currently open. Reasons for doing so + /// include the modification of the tree structure which is reflected in a tool tip. + /// + /// + void UpdateToolTips(); + #endregion #region Events Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs =================================================================== diff -u -r31595e2aa87c2cb7e23fb07cd3f04d219bfd15fd -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 31595e2aa87c2cb7e23fb07cd3f04d219bfd15fd) +++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -372,6 +372,14 @@ } } + public void UpdateToolTips() + { + foreach (var view in DocumentViews.AllViews) + { + SetToolTipForView(view); + } + } + protected virtual void Dispose(bool disposing) { if (disposing) Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs (.../ProjectExplorer.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectExplorer.cs (.../ProjectExplorer.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -33,6 +33,7 @@ treeViewPanel.Controls.Add(ProjectTreeView); gui.DocumentViews.ActiveViewChanged += DocumentViewsActiveViewChanged; + ProjectTreeView.TreeView.OnUpdate += (s,e) => gui.UpdateToolTips(); } public ProjectTreeView ProjectTreeView { get; private set; } Index: Core/Plugins/test/Core.Plugins.CommonTools.Test/TestViewList.cs =================================================================== diff -u -r41c77f9f36ae74a406fd382187426cc06d2b0200 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Core/Plugins/test/Core.Plugins.CommonTools.Test/TestViewList.cs (.../TestViewList.cs) (revision 41c77f9f36ae74a406fd382187426cc06d2b0200) +++ Core/Plugins/test/Core.Plugins.CommonTools.Test/TestViewList.cs (.../TestViewList.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -143,6 +143,11 @@ throw new NotImplementedException(); } + public void UpdateToolTips() + { + throw new NotImplementedException(); + } + public IEnumerable GetActiveViews() where T : class, IView { return views.OfType(); Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/NodePresenters/CategoryTreeFolderNodePresenterTest.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -rd37e350b3c62d61768313c57c2d8d8d05d22458a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/NodePresenters/CategoryTreeFolderNodePresenterTest.cs (.../CategoryTreeFolderNodePresenterTest.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/NodePresenters/CategoryTreeFolderNodePresenterTest.cs (.../CategoryTreeFolderNodePresenterTest.cs) (revision d37e350b3c62d61768313c57c2d8d8d05d22458a) @@ -1,8 +1,6 @@ using System; using System.Collections; using System.Drawing; - -using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; using Core.Common.Gui; using Core.Common.Gui.ContextMenu;