How to customize the code generated in VE [message #120569] |
Wed, 15 March 2006 11:41 |
Eclipse User |
|
|
|
Originally posted by: shobanaramaswamy.yahoo.co.in
Hi All,
A default code is generated when a component drag and drop is done from
the component palette.
Something like this
/**
* This method initializes text Field
*
* @return java.awt.TextField
*/
private TextField getTextField() {
if (textField == null) {
textField = new TextField();
textField.setBounds(new java.awt.Rectangle(123,16,45,20));
}
return textField;
}
I want to add few default properties to the code generated when a
component is dragged and dropped on to the container on the free form
Like setting a color to that component. Can any body help me in this
regard?
Thank You and Regards
Shobana
|
|
|
Re: How to customize the code generated in VE [message #120582 is a reply to message #120569] |
Wed, 15 March 2006 14:14 |
Eclipse User |
|
|
|
Originally posted by: markus.wawra.shark-soft.com
I could change the code by editing the template
\templates\org\eclipse\ve\internal\java\codegen\jjet\util\De faultMethodTemplate.javajet
in org.eclipse.ve.java.core. But that's not a proper way.
Regards,
Markus
|
|
|
Re: How to customize the code generated in VE [message #120608 is a reply to message #120582] |
Wed, 15 March 2006 14:36 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Actually that is the "proper" way. :-) We never really thought this
through. Way back in the beginning that was how we were going to allow
this. But there where so many things that we needed to do that we never
got around to really thinking this out and realizing that it should not
be through modifying the template in the plugin. But that is all there
is at this time.
Markus wrote:
> I could change the code by editing the template
> \templates\org\eclipse\ve\internal\java\codegen\jjet\util\De faultMethodTemplate.javajet
>
>
> in org.eclipse.ve.java.core. But that's not a proper way.
>
> Regards,
> Markus
>
--
Thanks,
Rich Kulp
|
|
|
Re: How to customize the code generated in VE [message #120681 is a reply to message #120608] |
Thu, 16 March 2006 11:34 |
Eclipse User |
|
|
|
Originally posted by: shobanaramaswamy.yahoo.co.in
Hi Rich & Markus,
Thanks for the reply.
I have a plug-in in which I have created some customized widgets. Only
for those widgets, I want to customize the code generation not for all the
components in VE component palette. Can u please help me.
Thank You and Regards
Shobana.R
|
|
|
|
Re: How to customize the code generated in VE [message #612315 is a reply to message #120582] |
Wed, 15 March 2006 14:36 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Actually that is the "proper" way. :-) We never really thought this
through. Way back in the beginning that was how we were going to allow
this. But there where so many things that we needed to do that we never
got around to really thinking this out and realizing that it should not
be through modifying the template in the plugin. But that is all there
is at this time.
Markus wrote:
> I could change the code by editing the template
> \templates\org\eclipse\ve\internal\java\codegen\jjet\util\De faultMethodTemplate.javajet
>
>
> in org.eclipse.ve.java.core. But that's not a proper way.
>
> Regards,
> Markus
>
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.03564 seconds