Index: Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs =================================================================== diff -u -r6271fb4c00844dcf8d401afe9a1b866ef07900d3 -r8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7 --- Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision 6271fb4c00844dcf8d401afe9a1b866ef07900d3) +++ Core/Common/src/Core.Common.Gui/Commands/GuiImportHandler.cs (.../GuiImportHandler.cs) (revision 8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7) @@ -84,7 +84,8 @@ Type targetType = target.GetType(); - return importInfos.Where(info => (info.DataType == targetType || targetType.Implements(info.DataType)) && info.IsEnabled(target)); + return importInfos.Where(info => (info.DataType == targetType || targetType.Implements(info.DataType)) + && (info.IsEnabled == null || info.IsEnabled(target))); } public void ImportOn(object target, IEnumerable supportedImportInfos) Index: Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs =================================================================== diff -u -rc7fa83c83ff880103fcdb2e87a3756adef4db597 -r8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7 --- Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision c7fa83c83ff880103fcdb2e87a3756adef4db597) +++ Core/Common/src/Core.Common.Gui/ContextMenu/GuiContextMenuItemFactory.cs (.../GuiContextMenuItemFactory.cs) (revision 8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7) @@ -197,7 +197,7 @@ importInfos = importInfos == null ? importCommandHandler.GetSupportedImportInfos(dataObject) - : importInfos.Where(info => info.IsEnabled(dataObject)).ToArray(); + : importInfos.Where(info => info.IsEnabled == null || info.IsEnabled(dataObject)).ToArray(); var importItem = new ToolStripMenuItem(text) { Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs =================================================================== diff -u -rc124e36768f6571d317cfcd5c5860b45086efaeb -r8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7 --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision c124e36768f6571d317cfcd5c5860b45086efaeb) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision 8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7) @@ -654,10 +654,7 @@ ImportInfo[] importInfos = hasImportersForNodeData ? new[] { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() } : new ImportInfo[0]; @@ -756,10 +753,7 @@ ImportInfo[] importInfos = hasImportersForNodeData ? new[] { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() } : new ImportInfo[0]; Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs =================================================================== diff -u -r245976332fcbd22a24b30ea2342683ca5577a16e -r8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7 --- Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision 245976332fcbd22a24b30ea2342683ca5577a16e) +++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/GuiContextMenuItemFactoryTest.cs (.../GuiContextMenuItemFactoryTest.cs) (revision 8e0856bca7d9689c4c09ff2c3008d6cad8c3bef7) @@ -465,10 +465,7 @@ ImportInfo[] importInfos = hasImportersForNodeData ? new[] { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() } : new ImportInfo[0]; @@ -504,10 +501,7 @@ ImportInfo[] importInfos = { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() }; importCommandHandler.Expect(ich => ich.ImportOn(nodeData, importInfos)); @@ -842,10 +836,7 @@ ImportInfo[] importInfos = hasImportersForNodeData ? new[] { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() } : new ImportInfo[0]; @@ -885,10 +876,7 @@ ImportInfo[] importInfos = { - new ImportInfo - { - IsEnabled = o => true - } + new ImportInfo() }; importCommandHandler.Expect(ich => ich.ImportOn(nodeData, importInfos));