[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.ve] [Minor Patch] FormAttachmentBeanInfo

Patch to allow for adding Formattachment to Widgets. This isn't possible without my patch, but...

Some problems still exists:

1) When setting the offset the source is wrong, instead of "formData.left = formAttachment2;" it writes "formData.left(formAttachment);". I've tried to debug this behaviour with no success, yet!

2)There seems to be some problem when adding two attachments e.g. Top and Left attachment on a Button in a Shell where the source gets garbled. (Insertion point seems to be wrong).

Regards.



### Eclipse Workspace Patch 1.0
#P org.eclipse.ve.swt
Index: vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentBeanInfo.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ve/plugins/org.eclipse.ve.swt/vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentBeanInfo.java,v
retrieving revision 1.3
diff -u -r1.3 FormAttachmentBeanInfo.java
--- vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentBeanInfo.java 24 Aug 2005 23:52:53 -0000 1.3
+++ vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentBeanInfo.java 16 Apr 2009 17:30:42 -0000
@@ -46,8 +46,12 @@
SHORTDESCRIPTION, resbundle.getString("formattachment.numerator.Desc"), //$NON-NLS-1$
}),
createFieldPropertyDescriptor("offset", FormAttachment.class.getField("offset"), new Object[]{ //$NON-NLS-1$ //$NON-NLS-2$
- DISPLAYNAME, resbundle.getString("formattachment.offset"), //$NON-NLS-1$
- SHORTDESCRIPTION, resbundle.getString("formattachment.offset.Desc"), //$NON-NLS-1$
+ DISPLAYNAME, resbundle.getString("formattachment.offset"), //$NON-NLS-1$
+ SHORTDESCRIPTION, resbundle.getString("formattachment.offset.Desc"), //$NON-NLS-1$
+ }),
+ createFieldPropertyDescriptor("control", FormAttachment.class.getField("control"), new Object[]{ //$NON-NLS-1$ //$NON-NLS-2$
+ DISPLAYNAME, resbundle.getString("formattachment.control"), //$NON-NLS-1$
+ SHORTDESCRIPTION, resbundle.getString("formattachment.control.Desc"), //$NON-NLS-1$
}),
};
} catch (SecurityException e) {