Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » [Minor Patch] FormAttachmentBeanInfo
[Minor Patch] FormAttachmentBeanInfo [message #145911] Thu, 16 April 2009 17:43 Go to next message
Kenneth Styrberg is currently offline Kenneth StyrbergFriend
Messages: 9
Registered: July 2009
Junior Member
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/FormAttachme ntBeanInfo.java
============================================================ =======
RCS file:
/cvsroot/tools/org.eclipse.ve/plugins/org.eclipse.ve.swt/vm_ swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentB eanInfo.java,v
retrieving revision 1.3
diff -u -r1.3 FormAttachmentBeanInfo.java
---
vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.java
24 Aug 2005 23:52:53 -0000 1.3
+++
vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.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) {
Re: [Minor Patch] FormAttachmentBeanInfo [message #145921 is a reply to message #145911] Thu, 16 April 2009 21:49 Go to previous message
Kenneth Styrberg is currently offline Kenneth StyrbergFriend
Messages: 9
Registered: July 2009
Junior Member
In addition I also updated my source to use AST.JLS3, but no changes could be seen in code generation.

Can someone point me in some direction where I should start investigate?
Right now as I'm totally new into EMF, GEF and VE I still havn't grasped the concept on where all things happen
and in what order.

Regards.

Kenneth Styrberg skrev:
> 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/FormAttachme ntBeanInfo.java
> ============================================================ =======
> RCS file:
> /cvsroot/tools/org.eclipse.ve/plugins/org.eclipse.ve.swt/vm_ swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentB eanInfo.java,v
>
> retrieving revision 1.3
> diff -u -r1.3 FormAttachmentBeanInfo.java
> ---
> vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.java
> 24 Aug 2005 23:52:53 -0000 1.3
> +++
> vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.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) {
Re: [Minor Patch] FormAttachmentBeanInfo [message #617351 is a reply to message #145911] Thu, 16 April 2009 21:49 Go to previous message
Kenneth Styrberg is currently offline Kenneth StyrbergFriend
Messages: 9
Registered: July 2009
Junior Member
In addition I also updated my source to use AST.JLS3, but no changes could be seen in code generation.

Can someone point me in some direction where I should start investigate?
Right now as I'm totally new into EMF, GEF and VE I still havn't grasped the concept on where all things happen
and in what order.

Regards.

Kenneth Styrberg skrev:
> 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/FormAttachme ntBeanInfo.java
> ============================================================ =======
> RCS file:
> /cvsroot/tools/org.eclipse.ve/plugins/org.eclipse.ve.swt/vm_ swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachmentB eanInfo.java,v
>
> retrieving revision 1.3
> diff -u -r1.3 FormAttachmentBeanInfo.java
> ---
> vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.java
> 24 Aug 2005 23:52:53 -0000 1.3
> +++
> vm_swtbeaninfo/org/eclipse/swt/widgets/beaninfo/FormAttachme ntBeanInfo.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) {
Previous Topic:[Minor Patch] FormAttachmentBeanInfo
Next Topic:I can't create a Visual Class
Goto Forum:
  


Current Time: Mon Nov 20 21:23:51 GMT 2017

Powered by FUDForum. Page generated in 0.02235 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software