[MonoDevelop] Patch for a simple (bug? feature?) in stetic

ml ml at arsis.net
Sun Jun 11 13:57:53 EDT 2006


Case is as following stetic forces generating the code on every single
property in class

even when it is Read Only, which would probably be better fixed with
actually correcting discovery on IsWritable on some property.

Case not really taken in question is that some properties MUSTN'T be
touched in any way in code generation.

This patch provides with ability to set avoid-init and CodeGenerator
skips this property:

  <object label="Data Bin" type="Gtk.DataBindings.DataBin"
palette-category="container">
    <itemgroups>
      <itemgroup ref="Gtk.Widget" />
      <itemgroup label="DataBin Properties">
        <property name="InheritedDataSource" />
        <property name="DenyParentBoundaries" />
        <property name="InheritedBoundaryDataSource" />
        <property name="BoundaryMappings" />
        <property name="Adaptor" avoid-init="true" />
        <property name="DataSource" avoid-init="true" />
        <property name="BoundaryDataSource" avoid-init="true" />
      </itemgroup>
    </itemgroups>
    <signals>
      <itemgroup ref="Gtk.Widget" />
    </signals>
  </object>

Second thing I noticed, Control Groups in Widget Palette are hardcoded.
Is this the only option?

I'm implementing DataBindings for gtk widgets and it would be much more
sane approach where adaptable controls are separated from non-adaptable.
So far I just hardcoded Groups in Palette.cs like this

public Palette () : base (false, 0)
{
  groups = new Hashtable ();
  Registry.RegistryChanged += OnRegistryChanged;
  ShowGroup ("window", "Windows");
  ShowGroup ("widget", "Widgets");
  ShowGroup ("datawidget", "Data Widgets");
  ShowGroup ("container", "Containers");
  ShowGroup ("datacontainer", "Data Containers");
  //ShowGroup ("toolbaritem", "Toolbar Items");
  ShowGroup ("actions", "Actions");
}

My question is as follows, is there any better approach than hardcoding
in stetic?

m.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avoid-init.patch
Type: text/x-patch
Size: 3239 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060611/4c91a4dd/avoid-init.bin


More information about the Monodevelop-list mailing list