Browse Source

BindingNavigator now supported in the Python and Ruby forms designer.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5632 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Matt Ward 15 years ago
parent
commit
4afd92b074
  1. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj
  2. 22
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonControlFieldExpression.cs
  3. 2
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonDesignerLoader.cs
  4. 51
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonNameCreationService.cs
  5. 204
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadBindingNavigatorTestFixture.cs
  6. 105
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/NameCreationServiceTestFixture.cs
  7. 4
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs
  8. 2
      src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
  9. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs
  10. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs
  11. 1
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj
  12. 22
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyControlFieldExpression.cs
  13. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyDesignerLoader.cs
  14. 51
      src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyNameCreationService.cs
  15. 206
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/LoadBindingNavigatorTestFixture.cs
  16. 105
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/NameCreationServiceTestFixture.cs
  17. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/RubyDesignerLoaderTestFixture.cs
  18. 2
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/RubyBinding.Tests.csproj
  19. 1
      src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/MockDesignerLoaderHost.cs

1
src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj

@ -85,6 +85,7 @@ @@ -85,6 +85,7 @@
<Compile Include="Src\PythonModuleCompletionItems.cs" />
<Compile Include="Src\PythonModuleCompletionItemsFactory.cs" />
<Compile Include="Src\PythonImportResolver.cs" />
<Compile Include="Src\PythonNameCreationService.cs" />
<Compile Include="Src\PythonNamespaceResolver.cs" />
<Compile Include="Src\PythonResolverContext.cs" />
<Compile Include="Src\PythonStandardModuleMethodResolver.cs" />

22
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonControlFieldExpression.cs

@ -10,6 +10,7 @@ using System.Collections.Generic; @@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using IronPython.Compiler.Ast;
namespace ICSharpCode.PythonBinding
@ -468,17 +469,34 @@ namespace ICSharpCode.PythonBinding @@ -468,17 +469,34 @@ namespace ICSharpCode.PythonBinding
/// <summary>
/// Sets the value of a property on the component.
/// </summary>
static bool SetPropertyValue(object component, string name, object propertyValue)
bool SetPropertyValue(object component, string name, object propertyValue)
{
PropertyDescriptor property = GetProperty(component, name);
if (property != null) {
propertyValue = ConvertPropertyValue(property, propertyValue);
if (OverrideNameProperty(component, name)) {
propertyValue = variableName;
} else {
propertyValue = ConvertPropertyValue(property, propertyValue);
}
property.SetValue(component, propertyValue);
return true;
}
return false;
}
/// <summary>
/// Override the name property with the instance variable name when the component is a
/// ToolStripSeparator to support BindingNavigator separators using the same value for the
/// name property.
/// </summary>
bool OverrideNameProperty(object component, string property)
{
if (property == "Name") {
return component is ToolStripSeparator;
}
return false;
}
/// <summary>
/// Gets the component that this field refers to.
/// </summary>

2
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonDesignerLoader.cs

@ -45,7 +45,7 @@ namespace ICSharpCode.PythonBinding @@ -45,7 +45,7 @@ namespace ICSharpCode.PythonBinding
public override void BeginLoad(IDesignerLoaderHost host)
{
host.AddService(typeof(ComponentSerializationService), new CodeDomComponentSerializationService((IServiceProvider)host));
host.AddService(typeof(INameCreationService), new XmlDesignerLoader.NameCreationService(host));
host.AddService(typeof(INameCreationService), new PythonNameCreationService(host));
host.AddService(typeof(IDesignerSerializationService), new DesignerSerializationService(host));
ProjectResourceService projectResourceService = host.GetService(typeof(ProjectResourceService)) as ProjectResourceService;

51
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonNameCreationService.cs

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using ICSharpCode.FormsDesigner;
namespace ICSharpCode.PythonBinding
{
public class PythonNameCreationService : INameCreationService
{
IDesignerHost host;
XmlDesignerLoader.NameCreationService nameCreationService;
public PythonNameCreationService(IDesignerHost host)
{
this.host = host;
nameCreationService = new XmlDesignerLoader.NameCreationService(host);
}
public string CreateName(IContainer container, Type dataType)
{
return nameCreationService.CreateName(container, dataType);
}
public bool IsValidName(string name)
{
if (!nameCreationService.IsValidName(name)) {
return false;
}
if (host.Container != null) {
return host.Container.Components[name] == null;
}
return true;
}
public void ValidateName(string name)
{
if (!IsValidName(name)) {
throw new Exception("Invalid name " + name);
}
}
}
}

204
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/LoadBindingNavigatorTestFixture.cs

@ -0,0 +1,204 @@ @@ -0,0 +1,204 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Windows.Forms;
using ICSharpCode.PythonBinding;
using NUnit.Framework;
using PythonBinding.Tests.Utils;
namespace PythonBinding.Tests.Designer
{
/// <summary>
/// Tests that the designer load handles the Binding Navigator having separator toolstrips with the same Name
/// property text "bindingNavigatorSeparator"
/// </summary>
[TestFixture]
public class LoadBindingNavigatorTestFixture : LoadFormTestFixtureBase
{
public override string PythonCode {
get {
return
"class TestForm(System.Windows.Forms.Form):\r\n" +
" def InitializeComponent(self):\r\n" +
" self._components = System.ComponentModel.Container()\r\n" +
" resources = System.Resources.ResourceManager(\"PyWin.TestForm\", System.Reflection.Assembly.GetEntryAssembly())\r\n" +
" self._bindingNavigator1 = System.Windows.Forms.BindingNavigator(self._components)\r\n" +
" self._bindingNavigatorMoveFirstItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigatorMovePreviousItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigatorSeparator = System.Windows.Forms.ToolStripSeparator()\r\n" +
" self._bindingNavigatorPositionItem = System.Windows.Forms.ToolStripTextBox()\r\n" +
" self._bindingNavigatorCountItem = System.Windows.Forms.ToolStripLabel()\r\n" +
" self._bindingNavigatorSeparator1 = System.Windows.Forms.ToolStripSeparator()\r\n" +
" self._bindingNavigatorMoveNextItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigatorMoveLastItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigatorSeparator2 = System.Windows.Forms.ToolStripSeparator()\r\n" +
" self._bindingNavigatorAddNewItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigatorDeleteItem = System.Windows.Forms.ToolStripButton()\r\n" +
" self._bindingNavigator1.BeginInit()\r\n" +
" self._bindingNavigator1.SuspendLayout()\r\n" +
" self.SuspendLayout()\r\n" +
" # \r\n" +
" # bindingNavigator1\r\n" +
" # \r\n" +
" self._bindingNavigator1.AddNewItem = self._bindingNavigatorAddNewItem\r\n" +
" self._bindingNavigator1.CountItem = self._bindingNavigatorCountItem\r\n" +
" self._bindingNavigator1.DeleteItem = self._bindingNavigatorDeleteItem\r\n" +
" self._bindingNavigator1.Items.AddRange(System.Array[System.Windows.Forms.ToolStripItem](\r\n" +
" [self._bindingNavigatorMoveFirstItem,\r\n" +
" self._bindingNavigatorMovePreviousItem,\r\n" +
" self._bindingNavigatorSeparator,\r\n" +
" self._bindingNavigatorPositionItem,\r\n" +
" self._bindingNavigatorCountItem,\r\n" +
" self._bindingNavigatorSeparator1,\r\n" +
" self._bindingNavigatorMoveNextItem,\r\n" +
" self._bindingNavigatorMoveLastItem,\r\n" +
" self._bindingNavigatorSeparator2,\r\n" +
" self._bindingNavigatorAddNewItem,\r\n" +
" self._bindingNavigatorDeleteItem]))\r\n" +
" self._bindingNavigator1.Location = System.Drawing.Point(0, 0)\r\n" +
" self._bindingNavigator1.MoveFirstItem = self._bindingNavigatorMoveFirstItem\r\n" +
" self._bindingNavigator1.MoveLastItem = self._bindingNavigatorMoveLastItem\r\n" +
" self._bindingNavigator1.MoveNextItem = self._bindingNavigatorMoveNextItem\r\n" +
" self._bindingNavigator1.MovePreviousItem = self._bindingNavigatorMovePreviousItem\r\n" +
" self._bindingNavigator1.Name = \"bindingNavigator1\"\r\n" +
" self._bindingNavigator1.PositionItem = self._bindingNavigatorPositionItem\r\n" +
" self._bindingNavigator1.Size = System.Drawing.Size(284, 25)\r\n" +
" self._bindingNavigator1.TabIndex = 0\r\n" +
" self._bindingNavigator1.Text = \"bindingNavigator1\"\r\n" +
" # \r\n" +
" # bindingNavigatorMoveFirstItem\r\n" +
" # \r\n" +
" self._bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorMoveFirstItem.Image = resources.GetObject(\"bindingNavigatorMoveFirstItem.Image\")\r\n" +
" self._bindingNavigatorMoveFirstItem.Name = \"bindingNavigatorMoveFirstItem\"\r\n" +
" self._bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorMoveFirstItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorMoveFirstItem.Text = \"Move first\"\r\n" +
" # \r\n" +
" # bindingNavigatorMovePreviousItem\r\n" +
" # \r\n" +
" self._bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorMovePreviousItem.Image = resources.GetObject(\"bindingNavigatorMovePreviousItem.Image\")\r\n" +
" self._bindingNavigatorMovePreviousItem.Name = \"bindingNavigatorMovePreviousItem\"\r\n" +
" self._bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorMovePreviousItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorMovePreviousItem.Text = \"Move previous\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator\r\n" +
" # \r\n" +
" self._bindingNavigatorSeparator.Name = \"bindingNavigatorSeparator\"\r\n" +
" self._bindingNavigatorSeparator.Size = System.Drawing.Size(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorPositionItem\r\n" +
" # \r\n" +
" self._bindingNavigatorPositionItem.AccessibleName = \"Position\"\r\n" +
" self._bindingNavigatorPositionItem.AutoSize = False\r\n" +
" self._bindingNavigatorPositionItem.Name = \"bindingNavigatorPositionItem\"\r\n" +
" self._bindingNavigatorPositionItem.Size = System.Drawing.Size(50, 23)\r\n" +
" self._bindingNavigatorPositionItem.Text = \"0\"\r\n" +
" self._bindingNavigatorPositionItem.ToolTipText = \"Current position\"\r\n" +
" # \r\n" +
" # bindingNavigatorCountItem\r\n" +
" # \r\n" +
" self._bindingNavigatorCountItem.Name = \"bindingNavigatorCountItem\"\r\n" +
" self._bindingNavigatorCountItem.Size = System.Drawing.Size(35, 22)\r\n" +
" self._bindingNavigatorCountItem.Text = \"of {0}\"\r\n" +
" self._bindingNavigatorCountItem.ToolTipText = \"Total number of items\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator1\r\n" +
" # \r\n" +
" self._bindingNavigatorSeparator1.Name = \"bindingNavigatorSeparator\"\r\n" +
" self._bindingNavigatorSeparator1.Size = System.Drawing.Size(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorMoveNextItem\r\n" +
" # \r\n" +
" self._bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorMoveNextItem.Image = resources.GetObject(\"bindingNavigatorMoveNextItem.Image\")\r\n" +
" self._bindingNavigatorMoveNextItem.Name = \"bindingNavigatorMoveNextItem\"\r\n" +
" self._bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorMoveNextItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorMoveNextItem.Text = \"Move next\"\r\n" +
" # \r\n" +
" # bindingNavigatorMoveLastItem\r\n" +
" # \r\n" +
" self._bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorMoveLastItem.Image = resources.GetObject(\"bindingNavigatorMoveLastItem.Image\")\r\n" +
" self._bindingNavigatorMoveLastItem.Name = \"bindingNavigatorMoveLastItem\"\r\n" +
" self._bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorMoveLastItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorMoveLastItem.Text = \"Move last\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator2\r\n" +
" # \r\n" +
" self._bindingNavigatorSeparator2.Name = \"bindingNavigatorSeparator\"\r\n" +
" self._bindingNavigatorSeparator2.Size = System.Drawing.Size(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorAddNewItem\r\n" +
" # \r\n" +
" self._bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorAddNewItem.Image = resources.GetObject(\"bindingNavigatorAddNewItem.Image\")\r\n" +
" self._bindingNavigatorAddNewItem.Name = \"bindingNavigatorAddNewItem\"\r\n" +
" self._bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorAddNewItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorAddNewItem.Text = \"Add new\"\r\n" +
" # \r\n" +
" # bindingNavigatorDeleteItem\r\n" +
" # \r\n" +
" self._bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image\r\n" +
" self._bindingNavigatorDeleteItem.Image = resources.GetObject(\"bindingNavigatorDeleteItem.Image\")\r\n" +
" self._bindingNavigatorDeleteItem.Name = \"bindingNavigatorDeleteItem\"\r\n" +
" self._bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = True\r\n" +
" self._bindingNavigatorDeleteItem.Size = System.Drawing.Size(23, 22)\r\n" +
" self._bindingNavigatorDeleteItem.Text = \"Delete\"\r\n" +
" # \r\n" +
" # MainForm\r\n" +
" # \r\n" +
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.Controls.Add(self._bindingNavigator1)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Text = \"PyWin\"\r\n" +
" self._bindingNavigator1.EndInit()\r\n" +
" self._bindingNavigator1.ResumeLayout(False)\r\n" +
" self._bindingNavigator1.PerformLayout()\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()";
}
}
public CreatedInstance BindingNavigatorSeparator1Instance {
get { return ComponentCreator.CreatedInstances[8]; }
}
[Test]
public void BindingNavigatorSeparator1ComponentNameIsBindingNavigatorSeparator1()
{
Assert.AreEqual("bindingNavigatorSeparator1", BindingNavigatorSeparator1Instance.Name);
}
[Test]
public void BindingNavigatorSeparator1ComponentTypeIsToolStripSeparator()
{
Assert.AreEqual("System.Windows.Forms.ToolStripSeparator", BindingNavigatorSeparator1Instance.InstanceType.FullName);
}
[Test]
public void BindingNavigatorSeparator1SiteNameNameIsBindingNavigatorSeparator1()
{
ToolStripSeparator separator = BindingNavigatorSeparator1Instance.Object as ToolStripSeparator;
Assert.AreEqual("bindingNavigatorSeparator1", separator.Name);
}
}
}

105
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/NameCreationServiceTestFixture.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel.Design.Serialization;
using System.Windows.Forms;
using ICSharpCode.PythonBinding;
using NUnit.Framework;
using PythonBinding.Tests.Utils;
namespace PythonBinding.Tests.Designer
{
[TestFixture]
public class NameCreationServiceTestFixture
{
PythonNameCreationService nameCreationService;
MockDesignerLoaderHost host;
[SetUp]
public void Init()
{
host = new MockDesignerLoaderHost();
host.Container.Add(new Button(), "button1");
nameCreationService = new PythonNameCreationService(host);
}
[Test]
public void IsValidNameReturnsFalseIfComponentInContainerAlreadyUsesName()
{
Assert.IsFalse(nameCreationService.IsValidName("button1"));
}
[Test]
public void IsValidNameReturnsTrueIfNameNotInUse()
{
Assert.IsTrue(nameCreationService.IsValidName("unknown"));
}
[Test]
public void NullReferenceNotThrownWhenHostContainerIsNull()
{
host.Container = null;
Assert.IsTrue(nameCreationService.IsValidName("button1"));
}
[Test]
public void CreateNameReturnsTypeNameFollowedByNumberOne()
{
Assert.AreEqual("button1", nameCreationService.CreateName(null, typeof(Button)));
}
[Test]
public void CreateNameReturnsTypeNameFollowedByNumberTwoIfNameExistsInContainer()
{
Assert.AreEqual("button2", nameCreationService.CreateName(host.Container, typeof(Button)));
}
[Test]
public void ValidateNameThrowsExceptionIfNameExistsInContainer()
{
Exception ex = Assert.Throws<Exception>(delegate { nameCreationService.ValidateName("button1"); });
Assert.AreEqual("Invalid name button1", ex.Message);
}
[Test]
public void ValidateNameDoesNotThrowExceptionIfNameDoesNotExistInContainer()
{
Assert.DoesNotThrow(delegate { nameCreationService.ValidateName("button2"); });
}
[Test]
public void IsValidReturnsFalseWhenNameIsNull()
{
Assert.IsFalse(nameCreationService.IsValidName(null));
}
[Test]
public void IsValidReturnsFalseWhenNameIsEmptyString()
{
Assert.IsFalse(nameCreationService.IsValidName(String.Empty));
}
[Test]
public void IsValidReturnsFalseWhenNameContainsNonLetterOrDigit()
{
Assert.IsFalse(nameCreationService.IsValidName("a%b"));
}
[Test]
public void IsValidReturnsFalseWhenFirstCharacterOfNameIsNumber()
{
Assert.IsFalse(nameCreationService.IsValidName("1abc"));
}
[Test]
public void IsValidReturnsTrueWhenFirstCharacterOfNameIsUnderscore()
{
Assert.IsTrue(nameCreationService.IsValidName("_abc"));
}
}
}

4
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs

@ -98,7 +98,7 @@ namespace PythonBinding.Tests.Designer @@ -98,7 +98,7 @@ namespace PythonBinding.Tests.Designer
{
List<CreatedComponent> expectedCreatedComponents = new List<CreatedComponent>();
expectedCreatedComponents.Add(new CreatedComponent(typeof(Form).FullName, "MainForm", null));
Assert.AreEqual(expectedCreatedComponents, mockDesignerLoaderHost.CreatedComponents);
}
@ -112,7 +112,7 @@ namespace PythonBinding.Tests.Designer @@ -112,7 +112,7 @@ namespace PythonBinding.Tests.Designer
[Test]
public void NameCreationServiceCreated()
{
XmlDesignerLoader.NameCreationService service = mockDesignerLoaderHost.GetService(typeof(INameCreationService)) as XmlDesignerLoader.NameCreationService;
PythonNameCreationService service = mockDesignerLoaderHost.GetService(typeof(INameCreationService)) as PythonNameCreationService;
Assert.IsNotNull(service);
}

2
src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj

@ -263,6 +263,7 @@ @@ -263,6 +263,7 @@
<Compile Include="Designer\LoadAcceptButtonFormTestFixture.cs" />
<Compile Include="Designer\LoadAccessibleRoleTestFixture.cs" />
<Compile Include="Designer\LoadAnchorStylesFormTestFixture.cs" />
<Compile Include="Designer\LoadBindingNavigatorTestFixture.cs" />
<Compile Include="Designer\LoadButtonFlatAppearanceTestFixture.cs" />
<Compile Include="Designer\LoadColorFromArgbTestFixture.cs" />
<Compile Include="Designer\LoadControlEventHandlerTestFixture.cs" />
@ -293,6 +294,7 @@ @@ -293,6 +294,7 @@
<Compile Include="Designer\LoadUserControlWithDoublePropertyTestFixture.cs" />
<Compile Include="Designer\MergeFormTestFixture.cs" />
<Compile Include="Designer\MissingInitializeComponentMethodTestFixture.cs" />
<Compile Include="Designer\NameCreationServiceTestFixture.cs" />
<Compile Include="Designer\NoNewLineAfterInitializeComponentTestFixture.cs" />
<Compile Include="Designer\OneCompatibleMethodTestFixture.cs" />
<Compile Include="Designer\ProjectRootNamespacePassedToMergeTestFixture.cs" />

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs

@ -64,6 +64,7 @@ namespace PythonBinding.Tests.Utils @@ -64,6 +64,7 @@ namespace PythonBinding.Tests.Utils
public IContainer Container {
get { return container; }
set { container = value as Container; }
}
public IComponent RootComponent {

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs

@ -74,7 +74,6 @@ namespace PythonBinding.Tests.Utils @@ -74,7 +74,6 @@ namespace PythonBinding.Tests.Utils
public void ReferenceAssembly(AssemblyName name)
{
throw new NotImplementedException();
}
public string GetPathOfAssembly(AssemblyName name)

1
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/RubyBinding.csproj

@ -106,6 +106,7 @@ @@ -106,6 +106,7 @@
<Compile Include="Src\RubyFormsDesignerDisplayBinding.cs" />
<Compile Include="Src\RubyLanguageBinding.cs" />
<Compile Include="Src\RubyLanguageProperties.cs" />
<Compile Include="Src\RubyNameCreationService.cs" />
<Compile Include="Src\RubyOptionsPanel.cs" />
<Compile Include="Src\RubyOutputStream.cs" />
<Compile Include="Src\RubyParser.cs" />

22
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyControlFieldExpression.cs

@ -10,6 +10,7 @@ using System.Collections.Generic; @@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using IronRuby.Builtins;
using IronRuby.Compiler.Ast;
@ -561,17 +562,34 @@ namespace ICSharpCode.RubyBinding @@ -561,17 +562,34 @@ namespace ICSharpCode.RubyBinding
/// <summary>
/// Sets the value of a property on the component.
/// </summary>
static bool SetPropertyValue(object component, string name, object propertyValue)
bool SetPropertyValue(object component, string name, object propertyValue)
{
PropertyDescriptor property = GetProperty(component, name);
if (property != null) {
propertyValue = ConvertPropertyValue(property, propertyValue);
if (OverrideNameProperty(component, name)) {
propertyValue = variableName;
} else {
propertyValue = ConvertPropertyValue(property, propertyValue);
}
property.SetValue(component, propertyValue);
return true;
}
return false;
}
/// <summary>
/// Override the name property with the instance variable name when the component is a
/// ToolStripSeparator to support BindingNavigator separators using the same value for the
/// name property.
/// </summary>
bool OverrideNameProperty(object component, string property)
{
if (property == "Name") {
return component is ToolStripSeparator;
}
return false;
}
/// <summary>
/// Gets the component that this field refers to.
/// </summary>

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyDesignerLoader.cs

@ -45,7 +45,7 @@ namespace ICSharpCode.RubyBinding @@ -45,7 +45,7 @@ namespace ICSharpCode.RubyBinding
public override void BeginLoad(IDesignerLoaderHost host)
{
host.AddService(typeof(ComponentSerializationService), new CodeDomComponentSerializationService((IServiceProvider)host));
host.AddService(typeof(INameCreationService), new XmlDesignerLoader.NameCreationService(host));
host.AddService(typeof(INameCreationService), new RubyNameCreationService(host));
host.AddService(typeof(IDesignerSerializationService), new DesignerSerializationService(host));
ProjectResourceService projectResourceService = host.GetService(typeof(ProjectResourceService)) as ProjectResourceService;

51
src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyNameCreationService.cs

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using ICSharpCode.FormsDesigner;
namespace ICSharpCode.RubyBinding
{
public class RubyNameCreationService : INameCreationService
{
IDesignerHost host;
XmlDesignerLoader.NameCreationService nameCreationService;
public RubyNameCreationService(IDesignerHost host)
{
this.host = host;
nameCreationService = new XmlDesignerLoader.NameCreationService(host);
}
public string CreateName(IContainer container, Type dataType)
{
return nameCreationService.CreateName(container, dataType);
}
public bool IsValidName(string name)
{
if (!nameCreationService.IsValidName(name)) {
return false;
}
if (host.Container != null) {
return host.Container.Components[name] == null;
}
return true;
}
public void ValidateName(string name)
{
if (!IsValidName(name)) {
throw new Exception("Invalid name " + name);
}
}
}
}

206
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/LoadBindingNavigatorTestFixture.cs

@ -0,0 +1,206 @@ @@ -0,0 +1,206 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Windows.Forms;
using ICSharpCode.RubyBinding;
using NUnit.Framework;
using RubyBinding.Tests.Utils;
namespace RubyBinding.Tests.Designer
{
/// <summary>
/// Tests that the designer load handles the Binding Navigator having separator toolstrips with the same Name
/// property text "bindingNavigatorSeparator"
/// </summary>
[TestFixture]
public class LoadBindingNavigatorTestFixture : LoadFormTestFixtureBase
{
public override string RubyCode {
get {
return
"class TestForm < System::Windows::Forms::Form\r\n" +
" def InitializeComponent()\r\n" +
" @components = System::ComponentModel::Container.new()\r\n" +
" resources = System::Resources::ResourceManager.new(\"RubyWinFoo.MainForm\", System::Reflection::Assembly.GetEntryAssembly())\r\n" +
" @bindingNavigator1 = System::Windows::Forms::BindingNavigator.new(@components)\r\n" +
" @bindingNavigatorMoveFirstItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigatorMovePreviousItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigatorSeparator = System::Windows::Forms::ToolStripSeparator.new()\r\n" +
" @bindingNavigatorPositionItem = System::Windows::Forms::ToolStripTextBox.new()\r\n" +
" @bindingNavigatorCountItem = System::Windows::Forms::ToolStripLabel.new()\r\n" +
" @bindingNavigatorSeparator1 = System::Windows::Forms::ToolStripSeparator.new()\r\n" +
" @bindingNavigatorMoveNextItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigatorMoveLastItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigatorSeparator2 = System::Windows::Forms::ToolStripSeparator.new()\r\n" +
" @bindingNavigatorAddNewItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigatorDeleteItem = System::Windows::Forms::ToolStripButton.new()\r\n" +
" @bindingNavigator1.clr_member(System::ComponentModel::ISupportInitialize, :BeginInit).call()\r\n" +
" @bindingNavigator1.SuspendLayout()\r\n" +
" self.SuspendLayout()\r\n" +
" # \r\n" +
" # bindingNavigator1\r\n" +
" # \r\n" +
" @bindingNavigator1.AddNewItem = @bindingNavigatorAddNewItem\r\n" +
" @bindingNavigator1.CountItem = @bindingNavigatorCountItem\r\n" +
" @bindingNavigator1.DeleteItem = @bindingNavigatorDeleteItem\r\n" +
" @bindingNavigator1.Items.AddRange(System::Array[System::Windows::Forms::ToolStripItem].new(\r\n" +
" [@bindingNavigatorMoveFirstItem,\r\n" +
" @bindingNavigatorMovePreviousItem,\r\n" +
" @bindingNavigatorSeparator,\r\n" +
" @bindingNavigatorPositionItem,\r\n" +
" @bindingNavigatorCountItem,\r\n" +
" @bindingNavigatorSeparator1,\r\n" +
" @bindingNavigatorMoveNextItem,\r\n" +
" @bindingNavigatorMoveLastItem,\r\n" +
" @bindingNavigatorSeparator2,\r\n" +
" @bindingNavigatorAddNewItem,\r\n" +
" @bindingNavigatorDeleteItem]))\r\n" +
" @bindingNavigator1.Location = System::Drawing::Point.new(0, 0)\r\n" +
" @bindingNavigator1.MoveFirstItem = @bindingNavigatorMoveFirstItem\r\n" +
" @bindingNavigator1.MoveLastItem = @bindingNavigatorMoveLastItem\r\n" +
" @bindingNavigator1.MoveNextItem = @bindingNavigatorMoveNextItem\r\n" +
" @bindingNavigator1.MovePreviousItem = @bindingNavigatorMovePreviousItem\r\n" +
" @bindingNavigator1.Name = \"bindingNavigator1\"\r\n" +
" @bindingNavigator1.PositionItem = @bindingNavigatorPositionItem\r\n" +
" @bindingNavigator1.Size = System::Drawing::Size.new(343, 25)\r\n" +
" @bindingNavigator1.TabIndex = 0\r\n" +
" @bindingNavigator1.Text = \"bindingNavigator1\"\r\n" +
" # \r\n" +
" # bindingNavigatorMoveFirstItem\r\n" +
" # \r\n" +
" @bindingNavigatorMoveFirstItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorMoveFirstItem.Image = resources.GetObject(\"bindingNavigatorMoveFirstItem.Image\")\r\n" +
" @bindingNavigatorMoveFirstItem.Name = \"bindingNavigatorMoveFirstItem\"\r\n" +
" @bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorMoveFirstItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorMoveFirstItem.Text = \"Move first\"\r\n" +
" # \r\n" +
" # bindingNavigatorMovePreviousItem\r\n" +
" # \r\n" +
" @bindingNavigatorMovePreviousItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorMovePreviousItem.Image = resources.GetObject(\"bindingNavigatorMovePreviousItem.Image\")\r\n" +
" @bindingNavigatorMovePreviousItem.Name = \"bindingNavigatorMovePreviousItem\"\r\n" +
" @bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorMovePreviousItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorMovePreviousItem.Text = \"Move previous\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator\r\n" +
" # \r\n" +
" @bindingNavigatorSeparator.Name = \"bindingNavigatorSeparator\"\r\n" +
" @bindingNavigatorSeparator.Size = System::Drawing::Size.new(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorPositionItem\r\n" +
" # \r\n" +
" @bindingNavigatorPositionItem.AccessibleName = \"Position\"\r\n" +
" @bindingNavigatorPositionItem.AutoSize = false\r\n" +
" @bindingNavigatorPositionItem.Name = \"bindingNavigatorPositionItem\"\r\n" +
" @bindingNavigatorPositionItem.Size = System::Drawing::Size.new(50, 23)\r\n" +
" @bindingNavigatorPositionItem.Text = \"0\"\r\n" +
" @bindingNavigatorPositionItem.ToolTipText = \"Current position\"\r\n" +
" # \r\n" +
" # bindingNavigatorCountItem\r\n" +
" # \r\n" +
" @bindingNavigatorCountItem.Name = \"bindingNavigatorCountItem\"\r\n" +
" @bindingNavigatorCountItem.Size = System::Drawing::Size.new(35, 22)\r\n" +
" @bindingNavigatorCountItem.Text = \"of {0}\"\r\n" +
" @bindingNavigatorCountItem.ToolTipText = \"Total number of items\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator1\r\n" +
" # \r\n" +
" @bindingNavigatorSeparator1.Name = \"bindingNavigatorSeparator\"\r\n" +
" @bindingNavigatorSeparator1.Size = System::Drawing::Size.new(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorMoveNextItem\r\n" +
" # \r\n" +
" @bindingNavigatorMoveNextItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorMoveNextItem.Image = resources.GetObject(\"bindingNavigatorMoveNextItem.Image\")\r\n" +
" @bindingNavigatorMoveNextItem.Name = \"bindingNavigatorMoveNextItem\"\r\n" +
" @bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorMoveNextItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorMoveNextItem.Text = \"Move next\"\r\n" +
" # \r\n" +
" # bindingNavigatorMoveLastItem\r\n" +
" # \r\n" +
" @bindingNavigatorMoveLastItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorMoveLastItem.Image = resources.GetObject(\"bindingNavigatorMoveLastItem.Image\")\r\n" +
" @bindingNavigatorMoveLastItem.Name = \"bindingNavigatorMoveLastItem\"\r\n" +
" @bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorMoveLastItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorMoveLastItem.Text = \"Move last\"\r\n" +
" # \r\n" +
" # bindingNavigatorSeparator2\r\n" +
" # \r\n" +
" @bindingNavigatorSeparator2.Name = \"bindingNavigatorSeparator\"\r\n" +
" @bindingNavigatorSeparator2.Size = System::Drawing::Size.new(6, 25)\r\n" +
" # \r\n" +
" # bindingNavigatorAddNewItem\r\n" +
" # \r\n" +
" @bindingNavigatorAddNewItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorAddNewItem.Image = resources.GetObject(\"bindingNavigatorAddNewItem.Image\")\r\n" +
" @bindingNavigatorAddNewItem.Name = \"bindingNavigatorAddNewItem\"\r\n" +
" @bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorAddNewItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorAddNewItem.Text = \"Add new\"\r\n" +
" # \r\n" +
" # bindingNavigatorDeleteItem\r\n" +
" # \r\n" +
" @bindingNavigatorDeleteItem.DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle.Image\r\n" +
" @bindingNavigatorDeleteItem.Image = resources.GetObject(\"bindingNavigatorDeleteItem.Image\")\r\n" +
" @bindingNavigatorDeleteItem.Name = \"bindingNavigatorDeleteItem\"\r\n" +
" @bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true\r\n" +
" @bindingNavigatorDeleteItem.Size = System::Drawing::Size.new(23, 22)\r\n" +
" @bindingNavigatorDeleteItem.Text = \"Delete\"\r\n" +
" # \r\n" +
" # MainForm\r\n" +
" # \r\n" +
" self.ClientSize = System::Drawing::Size.new(343, 297)\r\n" +
" self.Controls.Add(@bindingNavigator1)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Text = \"RubyWinFoo\"\r\n" +
" @bindingNavigator1.clr_member(System::ComponentModel::ISupportInitialize, :EndInit).call()\r\n" +
" @bindingNavigator1.ResumeLayout(false)\r\n" +
" @bindingNavigator1.PerformLayout()\r\n" +
" self.ResumeLayout(false)\r\n" +
" self.PerformLayout()\r\n" +
" end\r\n" +
"end";
}
}
public CreatedInstance BindingNavigatorSeparator1Instance {
get { return ComponentCreator.CreatedInstances[8]; }
}
[Test]
public void BindingNavigatorSeparator1ComponentNameIsBindingNavigatorSeparator1()
{
Assert.AreEqual("bindingNavigatorSeparator1", BindingNavigatorSeparator1Instance.Name);
}
[Test]
public void BindingNavigatorSeparator1ComponentTypeIsToolStripSeparator()
{
Assert.AreEqual("System.Windows.Forms.ToolStripSeparator", BindingNavigatorSeparator1Instance.InstanceType.FullName);
}
[Test]
public void BindingNavigatorSeparator1SiteNameNameIsBindingNavigatorSeparator1()
{
ToolStripSeparator separator = BindingNavigatorSeparator1Instance.Object as ToolStripSeparator;
Assert.AreEqual("bindingNavigatorSeparator1", separator.Name);
}
}
}

105
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/NameCreationServiceTestFixture.cs

@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.ComponentModel.Design.Serialization;
using System.Windows.Forms;
using ICSharpCode.RubyBinding;
using NUnit.Framework;
using RubyBinding.Tests.Utils;
namespace RubyBinding.Tests.Designer
{
[TestFixture]
public class NameCreationServiceTestFixture
{
RubyNameCreationService nameCreationService;
MockDesignerLoaderHost host;
[SetUp]
public void Init()
{
host = new MockDesignerLoaderHost();
host.Container.Add(new Button(), "button1");
nameCreationService = new RubyNameCreationService(host);
}
[Test]
public void IsValidNameReturnsFalseIfComponentInContainerAlreadyUsesName()
{
Assert.IsFalse(nameCreationService.IsValidName("button1"));
}
[Test]
public void IsValidNameReturnsTrueIfNameNotInUse()
{
Assert.IsTrue(nameCreationService.IsValidName("unknown"));
}
[Test]
public void NullReferenceNotThrownWhenHostContainerIsNull()
{
host.Container = null;
Assert.IsTrue(nameCreationService.IsValidName("button1"));
}
[Test]
public void CreateNameReturnsTypeNameFollowedByNumberOne()
{
Assert.AreEqual("button1", nameCreationService.CreateName(null, typeof(Button)));
}
[Test]
public void CreateNameReturnsTypeNameFollowedByNumberTwoIfNameExistsInContainer()
{
Assert.AreEqual("button2", nameCreationService.CreateName(host.Container, typeof(Button)));
}
[Test]
public void ValidateNameThrowsExceptionIfNameExistsInContainer()
{
Exception ex = Assert.Throws<Exception>(delegate { nameCreationService.ValidateName("button1"); });
Assert.AreEqual("Invalid name button1", ex.Message);
}
[Test]
public void ValidateNameDoesNotThrowExceptionIfNameDoesNotExistInContainer()
{
Assert.DoesNotThrow(delegate { nameCreationService.ValidateName("button2"); });
}
[Test]
public void IsValidReturnsFalseWhenNameIsNull()
{
Assert.IsFalse(nameCreationService.IsValidName(null));
}
[Test]
public void IsValidReturnsFalseWhenNameIsEmptyString()
{
Assert.IsFalse(nameCreationService.IsValidName(String.Empty));
}
[Test]
public void IsValidReturnsFalseWhenNameContainsNonLetterOrDigit()
{
Assert.IsFalse(nameCreationService.IsValidName("a%b"));
}
[Test]
public void IsValidReturnsFalseWhenFirstCharacterOfNameIsNumber()
{
Assert.IsFalse(nameCreationService.IsValidName("1abc"));
}
[Test]
public void IsValidReturnsTrueWhenFirstCharacterOfNameIsUnderscore()
{
Assert.IsTrue(nameCreationService.IsValidName("_abc"));
}
}
}

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/RubyDesignerLoaderTestFixture.cs

@ -112,7 +112,7 @@ namespace RubyBinding.Tests.Designer @@ -112,7 +112,7 @@ namespace RubyBinding.Tests.Designer
[Test]
public void NameCreationServiceCreated()
{
XmlDesignerLoader.NameCreationService service = mockDesignerLoaderHost.GetService(typeof(INameCreationService)) as XmlDesignerLoader.NameCreationService;
RubyNameCreationService service = mockDesignerLoaderHost.GetService(typeof(INameCreationService)) as RubyNameCreationService;
Assert.IsNotNull(service);
}

2
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/RubyBinding.Tests.csproj

@ -255,6 +255,7 @@ @@ -255,6 +255,7 @@
<Compile Include="Designer\LoadAcceptButtonFormTestFixture.cs" />
<Compile Include="Designer\LoadAccessibleRoleTestFixture.cs" />
<Compile Include="Designer\LoadAnchorStylesTestFixture.cs" />
<Compile Include="Designer\LoadBindingNavigatorTestFixture.cs" />
<Compile Include="Designer\LoadButtonFlatAppearanceTestFixture.cs" />
<Compile Include="Designer\LoadColorFromArgbTestFixture.cs" />
<Compile Include="Designer\LoadControlEventHandlerTestFixture.cs" />
@ -285,6 +286,7 @@ @@ -285,6 +286,7 @@
<Compile Include="Designer\LoadUserControlWithDoublePropertyTestFixture.cs" />
<Compile Include="Designer\MergeFormTestFixture.cs" />
<Compile Include="Designer\MissingInitializeComponentMethodTestFixture.cs" />
<Compile Include="Designer\NameCreationServiceTestFixture.cs" />
<Compile Include="Designer\NoNewLineAfterInitializeComponentMethodTestFixture.cs" />
<Compile Include="Designer\NullGeneratorPassedToLoader.cs" />
<Compile Include="Designer\OneCompatibleMethodTestFixture.cs" />

1
src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/MockDesignerLoaderHost.cs

@ -64,6 +64,7 @@ namespace RubyBinding.Tests.Utils @@ -64,6 +64,7 @@ namespace RubyBinding.Tests.Utils
public IContainer Container {
get { return container; }
set { container = value as Container; }
}
public IComponent RootComponent {

Loading…
Cancel
Save