Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How to customize the code generated in VE
How to customize the code generated in VE [message #120569] Wed, 15 March 2006 11:41 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 #612313 is a reply to message #120569] Wed, 15 March 2006 14:14 Go to previous message
Markus is currently offline MarkusFriend
Messages: 52
Registered: July 2009
Member
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 #612315 is a reply to message #120582] Wed, 15 March 2006 14:36 Go to previous message
Eclipse UserFriend
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 #612321 is a reply to message #120608] Thu, 16 March 2006 11:34 Go to previous message
shobana is currently offline shobanaFriend
Messages: 13
Registered: July 2009
Junior Member
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
Previous Topic:Not seeing VE in eclipse
Next Topic:RootPaneCreationPolicy
Goto Forum:
  


Current Time: Thu Apr 25 15:33:44 GMT 2024

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

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

Back to the top