Index: Core/Gui/src/Core.Gui/GuiCore.cs
===================================================================
diff -u -rbf3529d18a9692cc452f4c4e5502496f94df78eb -r614fb898c6cd2bb529e713623ae56c8a67b1cae9
--- Core/Gui/src/Core.Gui/GuiCore.cs (.../GuiCore.cs) (revision bf3529d18a9692cc452f4c4e5502496f94df78eb)
+++ Core/Gui/src/Core.Gui/GuiCore.cs (.../GuiCore.cs) (revision 614fb898c6cd2bb529e713623ae56c8a67b1cae9)
@@ -43,6 +43,7 @@
using Core.Gui.Forms.ViewHost;
using Core.Gui.Helpers;
using Core.Gui.Plugin;
+using Core.Gui.Plugin.Chart;
using Core.Gui.Plugin.Map;
using Core.Gui.Properties;
using Core.Gui.Settings;
@@ -483,6 +484,7 @@
DocumentViewController = new DocumentViewController(ViewHost, Plugins.SelectMany(p => p.GetViewInfos()), mainWindow);
PropertyResolver = new PropertyResolver(Plugins.SelectMany(p => p.GetPropertyInfos())
+ .Concat(ChartPropertyInfoFactory.Create())
.Concat(MapPropertyInfoFactory.Create()));
applicationFeatureCommands = new ApplicationFeatureCommandHandler(PropertyResolver, mainWindow);
Index: Core/Gui/src/Core.Gui/Plugin/Chart/ChartPropertyInfoFactory.cs
===================================================================
diff -u
--- Core/Gui/src/Core.Gui/Plugin/Chart/ChartPropertyInfoFactory.cs (revision 0)
+++ Core/Gui/src/Core.Gui/Plugin/Chart/ChartPropertyInfoFactory.cs (revision 614fb898c6cd2bb529e713623ae56c8a67b1cae9)
@@ -0,0 +1,48 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Collections.Generic;
+using Core.Components.Chart.Data;
+using Core.Gui.Forms.Chart;
+using Core.Gui.PropertyClasses.Chart;
+
+namespace Core.Gui.Plugin.Chart
+{
+ ///
+ /// Factory for creating objects for .
+ ///
+ public static class ChartPropertyInfoFactory
+ {
+ ///
+ /// Creates the objects.
+ ///
+ /// The creates objects.
+ public static IEnumerable Create()
+ {
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ yield return new PropertyInfo();
+ }
+ }
+}
\ No newline at end of file
Index: Core/Gui/src/Core.Gui/Plugin/Map/MapPropertyInfoFactory.cs
===================================================================
diff -u -rfa4af6aff7cfd67238db0daaef5560aa86ac9e3e -r614fb898c6cd2bb529e713623ae56c8a67b1cae9
--- Core/Gui/src/Core.Gui/Plugin/Map/MapPropertyInfoFactory.cs (.../MapPropertyInfoFactory.cs) (revision fa4af6aff7cfd67238db0daaef5560aa86ac9e3e)
+++ Core/Gui/src/Core.Gui/Plugin/Map/MapPropertyInfoFactory.cs (.../MapPropertyInfoFactory.cs) (revision 614fb898c6cd2bb529e713623ae56c8a67b1cae9)
@@ -63,6 +63,5 @@
MapDataContextHelper.GetParentsFromContext(context))
};
}
-
}
}
\ No newline at end of file
Index: Core/Gui/test/Core.Gui.Test/Plugin/Chart/ChartPropertyInfoFactoryTest.cs
===================================================================
diff -u
--- Core/Gui/test/Core.Gui.Test/Plugin/Chart/ChartPropertyInfoFactoryTest.cs (revision 0)
+++ Core/Gui/test/Core.Gui.Test/Plugin/Chart/ChartPropertyInfoFactoryTest.cs (revision 614fb898c6cd2bb529e713623ae56c8a67b1cae9)
@@ -0,0 +1,68 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using Core.Components.Chart.Data;
+using Core.Gui.Plugin;
+using Core.Gui.Plugin.Chart;
+using Core.Gui.PropertyClasses.Chart;
+using Core.Gui.TestUtil;
+using NUnit.Framework;
+
+namespace Core.Gui.Test.Plugin.Chart
+{
+ public class ChartPropertyInfoFactoryTest
+ {
+ [Test]
+ public void Create_Always_ReturnsPropertyInfos()
+ {
+ // Call
+ PropertyInfo[] propertyInfos = ChartPropertyInfoFactory.Create().ToArray();
+
+ // Assert
+ Assert.AreEqual(6, propertyInfos.Length);
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartDataCollection),
+ typeof(ChartDataCollectionProperties));
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartLineData),
+ typeof(ChartLineDataProperties));
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartAreaData),
+ typeof(ChartAreaDataProperties));
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartMultipleAreaData),
+ typeof(ChartMultipleAreaDataProperties));
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartMultipleLineData),
+ typeof(ChartMultipleLineDataProperties));
+
+ PluginTestHelper.AssertPropertyInfoDefined(
+ propertyInfos, typeof(ChartPointData),
+ typeof(ChartPointDataProperties));
+ }
+ }
+}
\ No newline at end of file
Index: Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs
===================================================================
diff -u -r985902680ffb75f3b9ee26b52725fe31916b6dec -r614fb898c6cd2bb529e713623ae56c8a67b1cae9
--- Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec)
+++ Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision 614fb898c6cd2bb529e713623ae56c8a67b1cae9)
@@ -53,16 +53,6 @@
activated = true;
}
- public override IEnumerable GetPropertyInfos()
- {
- yield return new PropertyInfo();
- yield return new PropertyInfo();
- yield return new PropertyInfo();
- yield return new PropertyInfo();
- yield return new PropertyInfo();
- yield return new PropertyInfo();
- }
-
protected override void Dispose(bool disposing)
{
if (activated && disposing)