Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs (revision 0) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsWaveConditionsCalculationHelper.cs (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -0,0 +1,78 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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; +using System.Collections.Generic; +using System.Linq; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Forms.Helpers; +using Ringtoets.GrassCoverErosionOutwards.Data; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.GrassCoverErosionOutwards.Forms +{ + /// + /// Class holds methods to help views when dealing with + /// + public static class GrassCoverErosionOutwardsWaveConditionsCalculationHelper + { + /// + /// Adds based on the + /// in the . + /// + /// Locations to base the calculation upon. + /// The list to update. + /// Throw when any input parameter is null. + public static void AddCalculationsFromLocations(IEnumerable locations, + IList calculations) + { + if (locations == null) + { + throw new ArgumentNullException("locations"); + } + if (calculations == null) + { + throw new ArgumentNullException("calculations"); + } + foreach (var calculation in locations.Select(location => CreateStabilityStoneCoverWaveConditionsCalculation(location, calculations))) + { + calculations.Add(calculation); + } + } + + private static ICalculationBase CreateStabilityStoneCoverWaveConditionsCalculation( + HydraulicBoundaryLocation hydraulicBoundaryLocation, + IEnumerable calculations) + { + var nameBase = hydraulicBoundaryLocation.Name; + var name = NamingHelper.GetUniqueName(calculations, nameBase, c => c.Name); + + return new GrassCoverErosionOutwardsWaveConditionsCalculation + { + Name = name, + InputParameters = + { + HydraulicBoundaryLocation = hydraulicBoundaryLocation + } + }; + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj =================================================================== diff -u -rd689ea05c1014eb4d51b927e11eb6c48255f0a47 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.csproj) (revision d689ea05c1014eb4d51b927e11eb6c48255f0a47) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Ringtoets.GrassCoverErosionOutwards.Forms.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.csproj) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -45,6 +45,7 @@ Properties\GlobalAssembly.cs + @@ -114,6 +115,11 @@ Ringtoets.HydraRing.Data False + + {87c2c553-c0bc-40bf-b1ea-b83bff357f27} + Ringtoets.Revetment.Data + False + {E7225477-577F-4A17-B7EC-6721158E1543} Ringtoets.GrassCoverErosionOutwards.Data Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -rd689ea05c1014eb4d51b927e11eb6c48255f0a47 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision d689ea05c1014eb4d51b927e11eb6c48255f0a47) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -35,12 +35,14 @@ using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Forms; using Ringtoets.Common.Forms.GuiServices; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; using Ringtoets.Common.IO; using Ringtoets.GrassCoverErosionOutwards.Data; +using Ringtoets.GrassCoverErosionOutwards.Forms; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; using Ringtoets.GrassCoverErosionOutwards.Forms.Views; @@ -107,7 +109,7 @@ FailureMechanismDisabledContextMenuStrip); yield return RingtoetsTreeNodeInfoFactory.CreateCalculationGroupContextTreeNodeInfo( - WaveConditionsCalculationGroupChildNodeObjects, + WaveConditionsCalculationGroupChildenNodeObjects, WaveConditionsCalculationGroupContextMenuStrip, WaveConditionsCalculationGroupContextOnNodeRemoved); @@ -415,7 +417,7 @@ #region GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext TreeNodeInfo - private object[] WaveConditionsCalculationGroupChildNodeObjects(GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext nodeData) + private object[] WaveConditionsCalculationGroupChildenNodeObjects(GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext nodeData) { var childNodeObjects = new List(); @@ -453,6 +455,13 @@ var builder = new RingtoetsContextMenuBuilder(Gui.Get(nodeData, treeViewControl)); var isNestedGroup = parentData is GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext; + StrictContextMenuItem generateCalculationsItem = CreateGenerateWaveConditionsCalculationsItem(nodeData); + + if (!isNestedGroup) + { + builder.AddCustomItem(generateCalculationsItem); + } + builder.AddExportItem() .AddSeparator() .AddCreateCalculationGroupItem(group) @@ -488,6 +497,46 @@ .Build(); } + private StrictContextMenuItem CreateGenerateWaveConditionsCalculationsItem(GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext nodeData) + { + HydraulicBoundaryDatabase hydraulicBoundaryDatabase = nodeData.AssessmentSection.HydraulicBoundaryDatabase; + bool locationsAvailable = hydraulicBoundaryDatabase != null && hydraulicBoundaryDatabase.Locations.Any(); + + string grassCoverErosionOutwardsWaveConditionsCalculationGroupContextToolTip = locationsAvailable + ? RingtoetsCommonFormsResources.CalculationGroup_CreateGenerateHydraulicBoundaryCalculationsItem_ToolTip + : RingtoetsCommonFormsResources.CalculationGroup_No_HRD_To_Generate_ToolTip; + + return new StrictContextMenuItem(RingtoetsCommonFormsResources.CalculationsGroup_Generate_calculations, + grassCoverErosionOutwardsWaveConditionsCalculationGroupContextToolTip, + RingtoetsCommonFormsResources.GenerateScenariosIcon, + (sender, args) => { ShowHydraulicBoundaryLocationSelectionDialog(nodeData); }) + { + Enabled = locationsAvailable + }; + } + + private void ShowHydraulicBoundaryLocationSelectionDialog(GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext nodeData) + { + using (var dialog = new HydraulicBoundaryLocationSelectionDialog(Gui.MainWindow, nodeData.AssessmentSection.HydraulicBoundaryDatabase.Locations)) + { + dialog.ShowDialog(); + + if (dialog.SelectedItems.Any()) + { + GenerateGrassCoverErosionOutwardsWaveConditionsCalculations(dialog.SelectedItems, nodeData.WrappedData.Children); + nodeData.NotifyObservers(); + } + } + } + + private static void GenerateGrassCoverErosionOutwardsWaveConditionsCalculations(IEnumerable hydraulicBoundaryLocations, + IList calculationCollection) + { + GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations( + hydraulicBoundaryLocations, + calculationCollection); + } + private void AddWaveConditionsCalculation(GrassCoverErosionOutwardsWaveConditionsCalculationGroupContext nodeData) { var calculation = new GrassCoverErosionOutwardsWaveConditionsCalculation Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/GrassCoverErosionOutwardsWaveConditionsCalculationHelperTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/GrassCoverErosionOutwardsWaveConditionsCalculationHelperTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/GrassCoverErosionOutwardsWaveConditionsCalculationHelperTest.cs (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -0,0 +1,135 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using Ringtoets.Common.Data.Calculation; +using Ringtoets.GrassCoverErosionOutwards.Data; +using Ringtoets.HydraRing.Data; + +namespace Ringtoets.GrassCoverErosionOutwards.Forms.Test +{ + [TestFixture] + public class GrassCoverErosionOutwardsWaveConditionsCalculationHelperTest + { + [Test] + public void AddCalculationsFromLocations_LocationsIsNull_ThrowsArgumentNullException() + { + // Setup + var calculations = new List(); + + // Call + TestDelegate test = () => GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations(null, calculations); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("locations", paramName); + } + + [Test] + public void AddCalculationsFromLocations_CalculationsIsNull_ThrowsArgumentNullException() + { + // Setup + var locations = Enumerable.Empty(); + + // Call + TestDelegate test = () => GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations(locations, null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("calculations", paramName); + } + + [Test] + public void AddCalculationsFromLocations_EmptyCollections_ReturnsEmptyList() + { + // Setup + var locations = Enumerable.Empty(); + var calculationBases = new List(); + + // Call + GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations(locations, calculationBases); + + // Assert + CollectionAssert.IsEmpty(calculationBases); + } + + [Test] + public void AddCalculationsFromLocations_MultipleCalculationsEmptyCalculationBase_ReturnsUniquelyNamedCalculations() + { + // Setup + const string name = "name"; + var locations = new[] + { + new HydraulicBoundaryLocation(1, name, 1, 1), + new HydraulicBoundaryLocation(2, name, 2, 2) + }; + var calculationBases = new List(); + + // Call + GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations(locations, calculationBases); + + // Assert + Assert.AreEqual(2, calculationBases.Count); + var firstCalculation = (GrassCoverErosionOutwardsWaveConditionsCalculation) calculationBases.First(); + Assert.AreEqual(name, firstCalculation.Name); + Assert.AreEqual(locations[0], firstCalculation.InputParameters.HydraulicBoundaryLocation); + + var secondCalculation = (GrassCoverErosionOutwardsWaveConditionsCalculation) calculationBases.ElementAt(1); + Assert.AreEqual(string.Format("{0} (1)", name), secondCalculation.Name); + Assert.AreSame(locations[1], secondCalculation.InputParameters.HydraulicBoundaryLocation); + } + + [Test] + public void AddCalculationsFromLocations_MultipleCalculationsAndDuplicateNameInCalculationBase_ReturnsUniquelyNamedCalculations() + { + // Setup + const string name = "name"; + var locations = new[] + { + new HydraulicBoundaryLocation(1, name, 1, 1), + new HydraulicBoundaryLocation(2, name, 2, 2) + }; + var calculationBases = new List + { + new GrassCoverErosionOutwardsWaveConditionsCalculation + { + Name = name + } + }; + + // Call + GrassCoverErosionOutwardsWaveConditionsCalculationHelper.AddCalculationsFromLocations(locations, calculationBases); + + // Assert + Assert.AreEqual(3, calculationBases.Count); + var firstCalculation = (GrassCoverErosionOutwardsWaveConditionsCalculation) calculationBases.ElementAt(1); + Assert.AreEqual(string.Format("{0} (1)", name), firstCalculation.Name); + Assert.AreEqual(locations[0], firstCalculation.InputParameters.HydraulicBoundaryLocation); + + var secondCalculation = (GrassCoverErosionOutwardsWaveConditionsCalculation) calculationBases.ElementAt(2); + Assert.AreEqual(string.Format("{0} (2)", name), secondCalculation.Name); + Assert.AreSame(locations[1], secondCalculation.InputParameters.HydraulicBoundaryLocation); + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj =================================================================== diff -u -ree395d64328db8f999b871e80491399a0a65e844 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision ee395d64328db8f999b871e80491399a0a65e844) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionOutwards.Forms.Test.csproj) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -62,6 +62,7 @@ Properties\GlobalAssembly.cs + Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r0f6049b15bcadf8de3a59c74e829f27bb725c013 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision 0f6049b15bcadf8de3a59c74e829f27bb725c013) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -57,28 +57,29 @@ [TestFixture] public class GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest : NUnitFormTest { - private const int contextMenuAddCalculationGroupIndexRootGroup = 2; - private const int contextMenuAddCalculationIndexRootGroup = 3; - private const int contextMenuRemoveAllChildrenIndexRootGroup = 5; - private const int contextMenuValidateAllIndexRootGroup = 7; - private const int contextMenuCalculateAllIndexRootGroup = 8; - private const int contextMenuClearOutputIndexRootGroup = 9; - private const int contextMenuExpandAllIndexRootGroup = 11; - private const int contextMenuCollapseAllIndexRootGroup = 12; - private const int contextMenuPropertiesIndexRootGroup = 14; + private const int contextMenuAddCalculationGroupIndexRootGroup = 3; + private const int contextMenuAddCalculationIndexRootGroup = 4; + private const int contextMenuRemoveAllChildrenIndexRootGroup = 6; + private const int contextMenuValidateAllIndexRootGroup = 8; + private const int contextMenuCalculateAllIndexRootGroup = 9; + private const int contextMenuClearOutputIndexRootGroup = 10; + private const int contextMenuExpandAllIndexRootGroup = 12; + private const int contextMenuCollapseAllIndexRootGroup = 13; + private const int contextMenuPropertiesIndexRootGroup = 15; private const int contextMenuAddCalculationGroupIndexNestedGroup = 2; private const int contextMenuAddCalculationIndexNestedGroup = 3; private const int contextMenuValidateAllIndexNestedGroup = 5; private const int contextMenuCalculateAllIndexNestedGroup = 6; private const int contextMenuClearOutputNestedGroupIndex = 7; + private const int customOnlyContextMenuAddGenerateCalculationsIndex = 0; private const int contextMenuValidateAllIndexNestedGroupNoCalculations = 4; private const int contextMenuCalculateAllIndexNestedGroupNoCalculations = 5; - private const int contextMenuRemoveAllInGroup = 4; + private const int contextMenuRemoveAllInGroup = 5; - private const int customOnlyContextMenuRemoveAllChildrenIndex = 4; + private const int customOnlyContextMenuRemoveAllChildrenIndex = 5; private MockRepository mocks; private GrassCoverErosionOutwardsPlugin plugin; @@ -353,7 +354,11 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(15, menu.Items.Count); + Assert.AreEqual(16, menu.Items.Count); + TestHelper.AssertContextMenuStripContainsItem(menu, customOnlyContextMenuAddGenerateCalculationsIndex, + "Genereer &berekeningen...", + "Er is geen hydraulische randvoorwaardendatabase beschikbaar om de randvoorwaardenberekeningen te genereren.", + RingtoetsCommonFormsResources.GenerateScenariosIcon, false); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddCalculationGroupIndexRootGroup, RingtoetsCommonFormsResources.CalculationGroup_Add_CalculationGroup, "Voeg een nieuwe berekeningsmap toe aan deze berekeningsmap.", @@ -401,11 +406,11 @@ false); CollectionAssert.AllItemsAreInstancesOfType(new[] { - menu.Items[1], - menu.Items[4], - menu.Items[6], - menu.Items[10], - menu.Items[13] + menu.Items[2], + menu.Items[5], + menu.Items[7], + menu.Items[11], + menu.Items[14] }, typeof(ToolStripSeparator)); } } @@ -454,7 +459,11 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(15, menu.Items.Count); + Assert.AreEqual(16, menu.Items.Count); + TestHelper.AssertContextMenuStripContainsItem(menu, customOnlyContextMenuAddGenerateCalculationsIndex, + "Genereer &berekeningen...", + "Genereer randvoorwaardenberekeningen.", + RingtoetsCommonFormsResources.GenerateScenariosIcon); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddCalculationGroupIndexRootGroup, RingtoetsCommonFormsResources.CalculationGroup_Add_CalculationGroup, "Voeg een nieuwe berekeningsmap toe aan deze berekeningsmap.", @@ -504,11 +513,11 @@ false); CollectionAssert.AllItemsAreInstancesOfType(new[] { - menu.Items[1], - menu.Items[4], - menu.Items[6], - menu.Items[10], - menu.Items[13] + menu.Items[2], + menu.Items[5], + menu.Items[7], + menu.Items[11], + menu.Items[14] }, typeof(ToolStripSeparator)); } } Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs =================================================================== diff -u -r0f6049b15bcadf8de3a59c74e829f27bb725c013 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision 0f6049b15bcadf8de3a59c74e829f27bb725c013) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -390,17 +390,18 @@ if (dialog.SelectedItems.Any()) { - GenerateStabilityStoneCoverCalculations(nodeData.WrappedData, dialog.SelectedItems); + GenerateStabilityStoneCoverCalculations(dialog.SelectedItems, nodeData.WrappedData.Children); nodeData.NotifyObservers(); } } } - private static void GenerateStabilityStoneCoverCalculations(CalculationGroup target, IEnumerable hydraulicBoundaryLocations) + private static void GenerateStabilityStoneCoverCalculations(IEnumerable hydraulicBoundaryLocations, + IList calculationCollection) { StabilityStoneCoverCalculationConfigurationHelper.AddCalculationsFromLocations( hydraulicBoundaryLocations, - target.Children); + calculationCollection); } private void AddWaveConditionsCalculation(StabilityStoneCoverWaveConditionsCalculationGroupContext nodeData) Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.cs =================================================================== diff -u -r8e0924d08a2377125c21114d088b6091bf1eb5fc -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.cs) (revision 8e0924d08a2377125c21114d088b6091bf1eb5fc) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.cs) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -42,8 +42,7 @@ /// The list to update. /// Throw when any input parameter is null. public static void AddCalculationsFromLocations(IEnumerable locations, - IList calculations - ) + IList calculations) { if (locations == null) { Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -r0f6049b15bcadf8de3a59c74e829f27bb725c013 -r7da3e50da60f27ba27ec7c97c860d8c0b92eb313 --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 0f6049b15bcadf8de3a59c74e829f27bb725c013) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 7da3e50da60f27ba27ec7c97c860d8c0b92eb313) @@ -352,7 +352,7 @@ if (assessmentSection.HydraulicBoundaryDatabase == null) { return RingtoetsCommonFormsResources.Plugin_AllDataAvailable_No_hydraulic_boundary_database_imported; - } + } string validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(assessmentSection.HydraulicBoundaryDatabase.FilePath); if (!string.IsNullOrEmpty(validationProblem)) @@ -370,8 +370,8 @@ bool locationsAvailable = hydraulicBoundaryDatabase != null && hydraulicBoundaryDatabase.Locations.Any(); string waveImpactAsphaltCoverWaveConditionsCalculationGroupContextToolTip = locationsAvailable - ? RingtoetsCommonFormsResources.CalculationGroup_CreateGenerateHydraulicBoundaryCalculationsItem_ToolTip - : RingtoetsCommonFormsResources.CalculationGroup_No_HRD_To_Generate_ToolTip; + ? RingtoetsCommonFormsResources.CalculationGroup_CreateGenerateHydraulicBoundaryCalculationsItem_ToolTip + : RingtoetsCommonFormsResources.CalculationGroup_No_HRD_To_Generate_ToolTip; return new StrictContextMenuItem(RingtoetsCommonFormsResources.CalculationsGroup_Generate_calculations, waveImpactAsphaltCoverWaveConditionsCalculationGroupContextToolTip, @@ -396,7 +396,8 @@ } } - private static void GenerateWaveImpactAsphaltCoverWaveConditionsCalculations(IEnumerable hydraulicBoundaryLocations, IList calculationCollection) + private static void GenerateWaveImpactAsphaltCoverWaveConditionsCalculations(IEnumerable hydraulicBoundaryLocations, + IList calculationCollection) { WaveImpactAsphaltCoverWaveConditionsCalculationConfigurationHelper.AddCalculationsFromLocations( hydraulicBoundaryLocations, @@ -420,8 +421,8 @@ foreach (WaveImpactAsphaltCoverWaveConditionsCalculation calculation in calculations) { WaveConditionsCalculationService.Instance.Validate(calculation.InputParameters, database, calculation.Name); - } } + } private void CalculateAll(CalculationGroup group, WaveImpactAsphaltCoverWaveConditionsCalculationGroupContext context) {