Index: Core/Common/src/Core.Common.Gui/IDocumentViewController.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IDocumentViewController.cs (.../IDocumentViewController.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IDocumentViewController.cs (.../IDocumentViewController.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -42,24 +42,18 @@ IView ActiveView { get; } /// - /// Gets all document views currently opened in the gui. + /// Gets all document views currently opened in the user interface. /// IViewList DocumentViews { get; } /// - /// Resolves document views + /// Gets the object responsible for finding a view registered to visualize a data object. /// IViewResolver DocumentViewsResolver { get; } /// - /// Suspends view removal on item delete. Useful to avoid unnecessary checks (faster item removal). + /// Update the tool tip for every view currently open. /// - bool IsViewRemoveOnItemDeleteSuspended { get; set; } - - /// - /// 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(); } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/IGui.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -40,8 +40,7 @@ { /// /// Object responsible for retrieving the instance - /// for a given data object and wrapping that in a - /// for the application to be used. + /// for a given data object for the application to use. /// IPropertyResolver PropertyResolver { get; } @@ -51,24 +50,25 @@ ApplicationCore ApplicationCore { get; } /// - /// Gets or sets the current storage. + /// Gets or sets the current project storage. /// IStoreProject Storage { get; } /// - /// Runs gui. Internally it runs , initializes all user interface components, including - /// those loaded from plugins. After that it creates and shows main window. + /// Runs the user interface, causing all user interface components to initialize, + /// loading plugins and displaying the main window. /// void Run(); /// - /// Runs gui and opens a given project in gui.ApplicationCore. + /// Runs the user interface, causing all user interface components to initialize, + /// loading plugins, opening a saved project and displaying the main window. /// /// Path to the project to be opened. void Run(string projectPath); /// - /// Exits gui by user request. + /// Terminates the application. /// void Exit(); } Index: Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs (.../IGuiPluginsHost.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IGuiPluginsHost.cs (.../IGuiPluginsHost.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections; using System.Collections.Generic; using Core.Common.Controls.TreeView; @@ -28,7 +27,7 @@ namespace Core.Common.Gui { /// - /// Interface describing the object that hosts all the leaded graphical user interface + /// Interface describing the object that hosts all the loaded graphical user interface /// plugins of the application. /// public interface IGuiPluginsHost @@ -39,15 +38,7 @@ IList Plugins { get; } /// - /// Returns GuiPlugin for a given type. - /// TODO: a bit too implicit method, to be removed. - /// - /// Any type loaded from plugin. - /// Plugin gui associated with a given type - GuiPlugin GetPluginGuiForType(Type type); - - /// - /// Queries the plugins to get all data with view definitions recursively given a + /// Queries the plugins to get all data with view definitions recursively, given a /// piece of hierarchical data. /// /// The root data object. @@ -57,7 +48,6 @@ /// /// Retrieves all the defined on the configured plugins. /// - /// An of which are configured in . IEnumerable GetTreeNodeInfos(); } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/IMainWindowController.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IMainWindowController.cs (.../IMainWindowController.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IMainWindowController.cs (.../IMainWindowController.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -24,7 +24,7 @@ namespace Core.Common.Gui { /// - /// Interface that declare member that allow for the controlling the main window of + /// Interface that declare members that allow for the controlling the main window of /// the application. /// public interface IMainWindowController Index: Core/Common/src/Core.Common.Gui/IProjectOwner.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IProjectOwner.cs (.../IProjectOwner.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IProjectOwner.cs (.../IProjectOwner.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -26,7 +26,7 @@ namespace Core.Common.Gui { /// - /// Interface declaring members related to owning an . + /// Interface declaring members related to owning a . /// public interface IProjectOwner { Index: Core/Common/src/Core.Common.Gui/IToolViewController.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/IToolViewController.cs (.../IToolViewController.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/IToolViewController.cs (.../IToolViewController.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -30,15 +30,16 @@ public interface IToolViewController { /// - /// Gets view manager used to handle tool windows. + /// Gets the collection of opened tool views. /// IViewList ToolWindowViews { get; } /// /// Checks whether a tool window of type is open. /// /// The type of tool window to check for. - /// true if a tool window of type is open, false otherwise. + /// true if a tool window of type is open, + /// false otherwise. bool IsToolWindowOpen(); /// Index: Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (.../ObjectProperties.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (.../ObjectProperties.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -24,8 +24,9 @@ namespace Core.Common.Gui.PropertyBag { /// - /// Base class for object properties with data of type + /// Base class for object properties with data of type . /// + /// Type of . public class ObjectProperties : IObjectProperties { protected T data; Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs =================================================================== diff -u -r67980a5c3c5cb71c185278e849b123e7f92990eb -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 67980a5c3c5cb71c185278e849b123e7f92990eb) +++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -969,23 +969,6 @@ public IList Plugins { get; private set; } - public GuiPlugin GetPluginGuiForType(Type type) - { - foreach (var plugin in Plugins) - { - Type[] pluginTypes = plugin.GetType().Assembly.GetTypes(); - foreach (Type pluginType in pluginTypes) - { - if (pluginType == type) - { - return plugin; - } - } - } - - return null; - } - public IEnumerable GetAllDataWithViewDefinitionsRecursively(object rootDataObject) { var resultSet = new HashSet(); Index: Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs (.../IApplicationSelection.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/Selection/IApplicationSelection.cs (.../IApplicationSelection.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -29,14 +29,12 @@ public interface IApplicationSelection { /// - /// Gets or sets current selected object(s). Visibility of the menus, toolbars and - /// other controls should be updated when selected object is changed. Default - /// implementation will also show it in the PropertyGrid. + /// Gets or sets current selected object(s) within the application. /// object Selection { get; set; } /// - /// Fired when user changes selection by clicking on it or by setting it using property. + /// Fired when the application's selection has been changed. /// event EventHandler SelectionChanged; } Index: Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs (.../ItemEventArgs.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/Selection/ItemEventArgs.cs (.../ItemEventArgs.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -24,15 +24,22 @@ namespace Core.Common.Gui.Selection { /// - /// Used by IGui.SelectionChanged. + /// Event arguments used when notifying selection changes on application level. /// public class SelectedItemChangedEventArgs : EventArgs { + /// + /// Initializes a new instance of the class. + /// + /// The newly selected object. public SelectedItemChangedEventArgs(object item) { Item = item; } + /// + /// Gets the item that has been selected. + /// public object Item { get; private set; } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Theme/ColorThemeExtensions.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/Theme/ColorThemeExtensions.cs (.../ColorThemeExtensions.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/Theme/ColorThemeExtensions.cs (.../ColorThemeExtensions.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -25,7 +25,7 @@ namespace Core.Common.Gui.Theme { /// - /// Extension methods for the class + /// Extension methods for the enum. /// public static class ColorThemeExtensions { Index: Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs =================================================================== diff -u -r4512af7782ee31b36941bb280b54d9da2953dd71 -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs (.../ViewPropertyEditor.cs) (revision 4512af7782ee31b36941bb280b54d9da2953dd71) +++ Core/Common/src/Core.Common.Gui/ViewPropertyEditor.cs (.../ViewPropertyEditor.cs) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -24,17 +24,20 @@ using System.Drawing.Design; using Core.Common.Gui.Commands; +using Core.Common.Gui.PropertyBag; namespace Core.Common.Gui { /// + /// /// Use this type in combination with the Editor Attribute on properties in property classes which you want to /// edit with a Ringtoets view. - /// + /// + /// /// The property grid will display an ellipsis button (...). Clicking on the button will open the default view /// for the data object in the central tabbed document area of Ringtoets. The view will remain open until /// closed by the user and is not modal. - /// + /// /// /// /// Usage (for example): @@ -50,7 +53,11 @@ /// public class ViewPropertyEditor : UITypeEditor { - public static IViewCommands ViewCommands { get; set; } //static: injected in RingtoetsGui + /// + /// Gets or sets the view commands. + /// + /// Value should be injected before can be accessed by user. + public static IViewCommands ViewCommands { get; set; } public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { Index: Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj =================================================================== diff -u -r67980a5c3c5cb71c185278e849b123e7f92990eb -r0ae715fe2b16306e4147fed9749bae67ce186168 --- Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision 67980a5c3c5cb71c185278e849b123e7f92990eb) +++ Core/Common/test/Core.Common.Gui.Test/Core.Common.Gui.Test.csproj (.../Core.Common.Gui.Test.csproj) (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -111,7 +111,6 @@ - @@ -145,14 +144,17 @@ Resources.resx + - + + + Fisheye: Tag 0ae715fe2b16306e4147fed9749bae67ce186168 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/ExpandableArrayConverterTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -0,0 +1,56 @@ +using System.ComponentModel; +using System.Reflection; + +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Reflection; + +using NUnit.Framework; + +namespace Core.Common.Gui.Test.PropertyBag +{ + [TestFixture] + public class ObjectPropertiesTest + { + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var properties = new ObjectProperties(); + + // Assert + Assert.IsInstanceOf(properties); + Assert.IsNull(properties.Data); + } + + [Test] + public void Data_SetValue_GetNewlySetValue() + { + // Setup + var properties = new ObjectProperties(); + + const string text = "text"; + + // Call + properties.Data = text; + + // Assert + Assert.AreEqual(text, properties.Data); + } + + [Test] + public void Data_IsNotBrowseable() + { + // Setup + var properties = new ObjectProperties(); + + string dataPropertyName = TypeUtils.GetMemberName>(p => p.Data); + PropertyInfo propertyInfo = properties.GetType().GetProperty(dataPropertyName); + + // Call + object[] attributes = propertyInfo.GetCustomAttributes(typeof(BrowsableAttribute), true); + + // Assert + CollectionAssert.Contains(attributes, BrowsableAttribute.No); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Selection/SelectedItemChangedEventArgsTest.cs (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -0,0 +1,26 @@ +using System; + +using Core.Common.Gui.Selection; + +using NUnit.Framework; + +namespace Core.Common.Gui.Test.Selection +{ + [TestFixture] + public class SelectedItemChangedEventArgsTest + { + [Test] + public void ParameteredConstructor_ExpectedValues() + { + // Setup + var selectedObject = new object(); + + // Call + var eventArgs = new SelectedItemChangedEventArgs(selectedObject); + + // Assert + Assert.IsInstanceOf(eventArgs); + Assert.AreSame(selectedObject, eventArgs.Item); + } + } +} \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Settings/SettingsHelperTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/Settings/SettingsHelperTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/Settings/SettingsHelperTest.cs (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -0,0 +1,41 @@ +using Core.Common.Gui.Settings; +using Core.Common.Utils.Reflection; + +using NUnit.Framework; + +namespace Core.Common.Gui.Test.Settings +{ + [TestFixture] + public class SettingsHelperTest + { + [Test] + public void ApplicationName_ReturnProductNameOfExecutingAssebly() + { + // Call + var settings = SettingsHelper.ApplicationName; + + // Assert + Assert.AreEqual(AssemblyUtils.GetExecutingAssemblyInfo().Product, settings); + } + + [Test] + public void ApplicationVersion_ReturnVersionOfExecutingAssebly() + { + // Call + var settings = SettingsHelper.ApplicationVersion; + + // Assert + Assert.AreEqual(AssemblyUtils.GetExecutingAssemblyInfo().Version, settings); + } + + [Test] + public void ApplicationCompany_ReturnCompanyOfExecutingAssebly() + { + // Call + var settings = SettingsHelper.ApplicationCompany; + + // Assert + Assert.AreEqual(AssemblyUtils.GetExecutingAssemblyInfo().Company, settings); + } + } +} \ No newline at end of file Fisheye: Tag 0ae715fe2b16306e4147fed9749bae67ce186168 refers to a dead (removed) revision in file `Core/Common/test/Core.Common.Gui.Test/SettingsHelperTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs =================================================================== diff -u --- Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs (revision 0) +++ Core/Common/test/Core.Common.Gui.Test/ViewPropertyEditorTest.cs (revision 0ae715fe2b16306e4147fed9749bae67ce186168) @@ -0,0 +1,66 @@ +using System.Drawing.Design; + +using Core.Common.Gui.Commands; + +using NUnit.Framework; + +using Rhino.Mocks; + +namespace Core.Common.Gui.Test +{ + [TestFixture] + public class ViewPropertyEditorTest + { + [Test] + public void DefaultConstructor_ExpectedValues() + { + // Call + var editor = new ViewPropertyEditor(); + + // Assert + Assert.IsInstanceOf(editor); + } + + [Test] + public void GetEditStyle_Always_ReturnModal() + { + // Setup + var editor = new ViewPropertyEditor(); + + // Call + UITypeEditorEditStyle style = editor.GetEditStyle(); + + // Assert + Assert.AreEqual(UITypeEditorEditStyle.Modal, style); + } + + [Test] + public void EditValue_Always_OpenViewForData() + { + // Setup + var editor = new ViewPropertyEditor(); + var data = new object(); + + var mocks = new MockRepository(); + var commandsMock = mocks.StrictMock(); + commandsMock.Expect(c => c.OpenView(data)); + mocks.ReplayAll(); + + var originalValue = ViewPropertyEditor.ViewCommands; + try + { + ViewPropertyEditor.ViewCommands = commandsMock; + + // Call + editor.EditValue(null, null, data); + + // Assert + mocks.VerifyAll(); // Expect 'OpenView' to be called. + } + finally + { + ViewPropertyEditor.ViewCommands = originalValue; + } + } + } +} \ No newline at end of file