Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style?
Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #127556] Wed, 05 July 2006 04:06 Go to next message
Khalid Zubair is currently offline Khalid ZubairFriend
Messages: 2
Registered: July 2009
Junior Member
Some of my classes are (surprisingly) editable in VE.
JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.

Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Re: Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #127596 is a reply to message #127556] Wed, 05 July 2006 13:43 Go to previous message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Khalid,

The VE does look in the jbInit() blocks and works for the most part with
JBuilder classes. The main issue is the JBuilder statements that start
with a call getContentPane(). The VE does not work with these
statements. The way to fix this is to declare a new JPanel, use the
setContentPane() method to set it as the class's content pane, then
replace all the getContentPane() calls in the class with references to
your JPanel. For example, change getContentPane().add(myJButton); to
contentPane.add(myJButton); That should resolve most problems with the
VE opening classes designed with JBuilder.

There is no automatic refactoring of JBuilder style code to VE style.
If you wanted to write one, it'd be a great contribution to the VE project.

Hope this helps,
- Jeff


Khalid Zubair wrote:
> Some of my classes are (surprisingly) editable in VE.
> JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.
>
> Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Re: Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #613450 is a reply to message #127556] Wed, 05 July 2006 13:43 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Khalid,

The VE does look in the jbInit() blocks and works for the most part with
JBuilder classes. The main issue is the JBuilder statements that start
with a call getContentPane(). The VE does not work with these
statements. The way to fix this is to declare a new JPanel, use the
setContentPane() method to set it as the class's content pane, then
replace all the getContentPane() calls in the class with references to
your JPanel. For example, change getContentPane().add(myJButton); to
contentPane.add(myJButton); That should resolve most problems with the
VE opening classes designed with JBuilder.

There is no automatic refactoring of JBuilder style code to VE style.
If you wanted to write one, it'd be a great contribution to the VE project.

Hope this helps,
- Jeff


Khalid Zubair wrote:
> Some of my classes are (surprisingly) editable in VE.
> JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.
>
> Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Previous Topic:IllegalStateException recovery
Next Topic:Project file will not open
Goto Forum:
  


Current Time: Fri Apr 26 08:55:34 GMT 2024

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

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

Back to the top