Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -rbdfdac3498b97ecf6bf04d53c581f557e7e87795 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision bdfdac3498b97ecf6bf04d53c581f557e7e87795) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -72,8 +72,8 @@ yield return new PropertyInfo { CreateInstance = context => new GrassCoverErosionOutwardsFailureMechanismProperties( - context.WrappedData, - new GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler()) + context.WrappedData, + new GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler()) }; yield return new PropertyInfo { @@ -247,8 +247,8 @@ Category = RingtoetsCommonFormsResources.Ringtoets_Category, Image = RingtoetsCommonFormsResources.PointShapefileIcon, CreateFileExporter = (context, filePath) => - new HydraulicBoundaryLocationsExporter(context.WrappedData, - filePath, Resources.DesignWaterLevel_Description, Resources.WaveHeight_Description), + new HydraulicBoundaryLocationsExporter(context.WrappedData, + filePath, Resources.DesignWaterLevel_Description, Resources.WaveHeight_Description), IsEnabled = context => context.WrappedData.Count > 0, FileFilter = RingtoetsCommonIoResources.DataTypeDisplayName_shape_file_filter }; @@ -652,9 +652,14 @@ builder.AddCreateCalculationGroupItem(group) .AddCreateCalculationItem(nodeData, AddWaveConditionsCalculation) - .AddSeparator() - .AddRenameItem() - .AddValidateAllCalculationsInGroupItem(nodeData, + .AddSeparator(); + + if (isNestedGroup) + { + builder.AddRenameItem(); + } + + builder.AddValidateAllCalculationsInGroupItem(nodeData, ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) .AddPerformAllCalculationsInGroupItem(group, nodeData, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf2f7d22ee59276f5df1f83fd409899bd895ea163 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision f2f7d22ee59276f5df1f83fd409899bd895ea163) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Plugin.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -55,13 +55,13 @@ private const int contextMenuAddGenerateCalculationsIndex = 2; private const int contextMenuAddCalculationGroupIndexRootGroup = 4; private const int contextMenuAddCalculationIndexRootGroup = 5; - private const int contextMenuValidateAllIndexRootGroup = 8; - private const int contextMenuCalculateAllIndexRootGroup = 9; - private const int contextMenuClearOutputIndexRootGroup = 11; - private const int contextMenuRemoveAllChildrenIndexRootGroup = 12; - private const int contextMenuCollapseAllIndexRootGroup = 14; - private const int contextMenuExpandAllIndexRootGroup = 15; - private const int contextMenuPropertiesIndexRootGroup = 17; + private const int contextMenuValidateAllIndexRootGroup = 7; + private const int contextMenuCalculateAllIndexRootGroup = 8; + private const int contextMenuClearOutputIndexRootGroup = 10; + private const int contextMenuRemoveAllChildrenIndexRootGroup = 11; + private const int contextMenuCollapseAllIndexRootGroup = 13; + private const int contextMenuExpandAllIndexRootGroup = 14; + private const int contextMenuPropertiesIndexRootGroup = 16; private const int contextMenuAddCalculationGroupIndexNestedGroup = 2; private const int contextMenuAddCalculationIndexNestedGroup = 3; @@ -361,7 +361,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, "Genereer &berekeningen...", "Er is geen hydraulische randvoorwaardendatabase beschikbaar om de randvoorwaardenberekeningen te genereren.", @@ -413,10 +413,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } } @@ -465,7 +464,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, "Genereer &berekeningen...", "Genereer randvoorwaardenberekeningen.", @@ -517,10 +516,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } } Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs =================================================================== diff -u -rbdfdac3498b97ecf6bf04d53c581f557e7e87795 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision bdfdac3498b97ecf6bf04d53c581f557e7e87795) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Plugin/StabilityStoneCoverPlugin.cs (.../StabilityStoneCoverPlugin.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -344,16 +344,20 @@ builder.AddCreateCalculationGroupItem(group) .AddCreateCalculationItem(nodeData, AddWaveConditionsCalculation) - .AddSeparator() - .AddRenameItem() - .AddValidateAllCalculationsInGroupItem(nodeData, + .AddSeparator(); + + if (isNestedGroup) + { + builder.AddRenameItem(); + } + + builder.AddValidateAllCalculationsInGroupItem(nodeData, ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) .AddPerformAllCalculationsInGroupItem(group, nodeData, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) .AddSeparator() .AddClearAllCalculationOutputInGroupItem(group); - if (isNestedGroup) { builder.AddDeleteItem(); Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf2f7d22ee59276f5df1f83fd409899bd895ea163 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision f2f7d22ee59276f5df1f83fd409899bd895ea163) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Plugin.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -57,19 +57,19 @@ private const int contextMenuAddGenerateCalculationsIndex = 2; private const int contextMenuAddCalculationGroupIndexRootGroup = 4; private const int contextMenuAddCalculationIndexRootGroup = 5; - private const int contextMenuValidateAllIndexRootGroup = 8; - private const int contextMenuCalculateAllIndexRootGroup = 9; - private const int contextMenuClearOutputIndexRootGroup = 11; - private const int contextMenuRemoveAllChildrenIndexRootGroup = 12; - private const int contextMenuCollapseAllIndexRootGroup = 14; - private const int contextMenuExpandAllIndexRootGroup = 15; - private const int contextMenuPropertiesIndexRootGroup = 17; + private const int contextMenuValidateAllIndexRootGroup = 7; + private const int contextMenuCalculateAllIndexRootGroup = 8; + private const int contextMenuClearOutputIndexRootGroup = 10; + private const int contextMenuRemoveAllChildrenIndexRootGroup = 11; + private const int contextMenuCollapseAllIndexRootGroup = 13; + private const int contextMenuExpandAllIndexRootGroup = 14; + private const int contextMenuPropertiesIndexRootGroup = 16; private const int contextMenuAddCalculationGroupIndexNestedGroup = 2; private const int contextMenuAddCalculationIndexNestedGroup = 3; private const int contextMenuValidateAllIndexNestedGroup = 6; private const int contextMenuCalculateAllIndexNestedGroup = 7; - private const int contextMenuClearOutputIndedxNestedGroup = 9; + private const int contextMenuClearOutputIndexNestedGroup = 9; private MockRepository mocks; private StabilityStoneCoverPlugin plugin; @@ -283,7 +283,7 @@ "Er zijn geen berekeningen om uit te voeren.", RingtoetsCommonFormsResources.CalculateAllIcon, false); - TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuClearOutputIndedxNestedGroup, + TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuClearOutputIndexNestedGroup, "&Wis alle uitvoer...", "Er zijn geen berekeningen met uitvoer om te wissen.", RingtoetsCommonFormsResources.ClearIcon, @@ -359,7 +359,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, RingtoetsCommonFormsResources.CalculationGroup_Generate_calculations, "Er is geen hydraulische randvoorwaardendatabase beschikbaar om de randvoorwaardenberekeningen te genereren.", @@ -411,10 +411,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } } @@ -463,7 +462,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, RingtoetsCommonFormsResources.CalculationGroup_Generate_calculations, "Genereer randvoorwaardenberekeningen.", @@ -515,10 +514,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } } @@ -853,7 +851,7 @@ using (ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, parentNodeData, treeViewControl)) { // Call - var clearAllOutputItem = contextMenu.Items[contextMenuClearOutputIndedxNestedGroup]; + var clearAllOutputItem = contextMenu.Items[contextMenuClearOutputIndexNestedGroup]; // Assert Assert.IsFalse(clearAllOutputItem.Enabled); @@ -904,7 +902,7 @@ using (ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, parentNodeData, treeViewControl)) { // Call - var clearAllOutputItem = contextMenu.Items[contextMenuClearOutputIndedxNestedGroup]; + var clearAllOutputItem = contextMenu.Items[contextMenuClearOutputIndexNestedGroup]; // Assert Assert.IsFalse(clearAllOutputItem.Enabled); @@ -985,7 +983,7 @@ using (ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, parentNodeData, treeViewControl)) { // Call - contextMenu.Items[contextMenuClearOutputIndedxNestedGroup].PerformClick(); + contextMenu.Items[contextMenuClearOutputIndexNestedGroup].PerformClick(); // Assert if (confirm) Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -rbdfdac3498b97ecf6bf04d53c581f557e7e87795 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision bdfdac3498b97ecf6bf04d53c581f557e7e87795) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -351,9 +351,14 @@ builder.AddCreateCalculationGroupItem(group) .AddCreateCalculationItem(nodeData, AddWaveConditionsCalculation) - .AddSeparator() - .AddRenameItem() - .AddValidateAllCalculationsInGroupItem(nodeData, + .AddSeparator(); + + if (isNestedGroup) + { + builder.AddRenameItem(); + } + + builder.AddValidateAllCalculationsInGroupItem(nodeData, ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) .AddPerformAllCalculationsInGroupItem(group, nodeData, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationGroup) Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf2f7d22ee59276f5df1f83fd409899bd895ea163 -rfc825a5843b4afaf40b941b39fe36c54aa342efd --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision f2f7d22ee59276f5df1f83fd409899bd895ea163) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Plugin.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationGroupContextTreeNodeInfoTest.cs) (revision fc825a5843b4afaf40b941b39fe36c54aa342efd) @@ -57,13 +57,13 @@ private const int contextMenuAddGenerateCalculationsIndex = 2; private const int contextMenuAddCalculationGroupIndexRootGroup = 4; private const int contextMenuAddCalculationIndexRootGroup = 5; - private const int contextMenuValidateAllIndexRootGroup = 8; - private const int contextMenuCalculateAllIndexRootGroup = 9; - private const int contextMenuClearOutputIndexRootGroup = 11; - private const int contextMenuRemoveAllChildrenIndexRootGroup = 12; - private const int contextMenuCollapseAllIndexRootGroup = 14; - private const int contextMenuExpandAllIndexRootGroup = 15; - private const int contextMenuPropertiesIndexRootGroup = 17; + private const int contextMenuValidateAllIndexRootGroup = 7; + private const int contextMenuCalculateAllIndexRootGroup = 8; + private const int contextMenuClearOutputIndexRootGroup = 10; + private const int contextMenuRemoveAllChildrenIndexRootGroup = 11; + private const int contextMenuCollapseAllIndexRootGroup = 13; + private const int contextMenuExpandAllIndexRootGroup = 14; + private const int contextMenuPropertiesIndexRootGroup = 16; private const int contextMenuAddCalculationGroupIndexNestedGroup = 2; private const int contextMenuAddCalculationIndexNestedGroup = 3; @@ -359,7 +359,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, "Genereer &berekeningen...", "Er is geen hydraulische randvoorwaardendatabase beschikbaar om de randvoorwaardenberekeningen te genereren.", @@ -411,10 +411,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } } @@ -463,7 +462,7 @@ using (ContextMenuStrip menu = info.ContextMenuStrip(nodeData, null, treeViewControl)) { // Assert - Assert.AreEqual(18, menu.Items.Count); + Assert.AreEqual(17, menu.Items.Count); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddGenerateCalculationsIndex, "Genereer &berekeningen...", "Genereer randvoorwaardenberekeningen.", @@ -516,10 +515,9 @@ { menu.Items[1], menu.Items[3], - menu.Items[6], - menu.Items[10], - menu.Items[13], - menu.Items[16] + menu.Items[9], + menu.Items[12], + menu.Items[15] }, typeof(ToolStripSeparator)); } }