Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » can I modify source code from other Java Editor to VE format especifications?
can I modify source code from other Java Editor to VE format especifications? [message #17209] Wed, 28 January 2004 15:11 Go to next message
David is currently offline DavidFriend
Messages: 34
Registered: July 2009
Member
Hi.

I've some thousands of java classes that are show correctly
by the Visual Editor but they don't follows the VE generated code style.

Basically, this classes have the instantiation and manipulations of the
visual objects (awt and swing) inside one 'init' method instead separate
methods.

Exists some plugin or tool to reformat the code to the VE patterns?

Many thanks.
Re: can I modify source code from other Java Editor to VE format especifications? [message #17758 is a reply to message #17209] Thu, 29 January 2004 11:17 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi David,

> I've some thousands of java classes that are show correctly
> by the Visual Editor but they don't follows the VE generated code style.
>
> Basically, this classes have the instantiation and manipulations of the
> visual objects (awt and swing) inside one 'init' method instead separate
> methods.

If the classes look OK, can you continue working with them OK ? The newly
generated code for additional JavaBeans may generate individual methods (as
opposed to use the existing init one) but apart from looking different is
this OK from a functional point of view ?

> Exists some plugin or tool to reformat the code to the VE patterns?

Not that I am aware of. However, rather than reformat the class it's our
intention to be able to read the class in its existing format without any
need for reformatting (which it sounds like we are able to do possibly in
your case). We also want to open up the rules by which source is generated,
so that people who want to modify the style of new source can fit it in with
whatever coding pattern they are comfortable with. I think (hope) that this
approach is prefrable to any kind of reformatting.

Best regards,

Joe Winchester
Re: can I modify source code from other Java Editor to VE format especifications? [message #17778 is a reply to message #17209] Mon, 02 February 2004 14:52 Go to previous message
Eclipse UserFriend
Originally posted by: mendelgili.netscape.net

David Díaz wrote:

> Hi.
>
> I've some thousands of java classes that are show correctly
> by the Visual Editor but they don't follows the VE generated code style.
>
> Basically, this classes have the instantiation and manipulations of the
> visual objects (awt and swing) inside one 'init' method instead separate
> methods.
>
> Exists some plugin or tool to reformat the code to the VE patterns?
>
> Many thanks.
>

VE uses a set of rules and templates to parse and generate source code.
The "Getter" style (PrefPage->Java->VisualEditor->PatternStyle) is
(currently) the only VE style. We are working to open up the extension
API for this.

The "Getter" style (rules/templates) works as following:

Every visual (Swing/AWT) bean, or any bean with a prefix of "ivj" will
be parsed.

Every parsed bean will need to have an initialization method (the only
method where property settings for that bean will be parsed).

An initialization method will be the one that instantiate the bean ...
e.g., ivjBean = new Bean();

A method may be the initalization method for more than one bean.

If the bean is an instance variable, and is instantiated with its
declaration e.g.,
Bean ivjBean = new Bean() ; (vs. the default generation pattern of
Bean ivjBean = null ;) The initalization method would be (if existed)
any of the methods that are listed in the
PrefPage->Java->VisualEditor->PatternStyle methods names (jbInit,
initComponents ....)


For that matter, once the bean/init method were parsed, VE will continue
to use them.
Re: can I modify source code from other Java Editor to VE format especifications? [message #579853 is a reply to message #17209] Thu, 29 January 2004 11:17 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi David,

> I've some thousands of java classes that are show correctly
> by the Visual Editor but they don't follows the VE generated code style.
>
> Basically, this classes have the instantiation and manipulations of the
> visual objects (awt and swing) inside one 'init' method instead separate
> methods.

If the classes look OK, can you continue working with them OK ? The newly
generated code for additional JavaBeans may generate individual methods (as
opposed to use the existing init one) but apart from looking different is
this OK from a functional point of view ?

> Exists some plugin or tool to reformat the code to the VE patterns?

Not that I am aware of. However, rather than reformat the class it's our
intention to be able to read the class in its existing format without any
need for reformatting (which it sounds like we are able to do possibly in
your case). We also want to open up the rules by which source is generated,
so that people who want to modify the style of new source can fit it in with
whatever coding pattern they are comfortable with. I think (hope) that this
approach is prefrable to any kind of reformatting.

Best regards,

Joe Winchester
Re: can I modify source code from other Java Editor to VE format especifications? [message #579962 is a reply to message #17209] Mon, 02 February 2004 14:52 Go to previous message
Gili Mendel is currently offline Gili MendelFriend
Messages: 338
Registered: July 2009
Senior Member
David Díaz wrote:

> Hi.
>
> I've some thousands of java classes that are show correctly
> by the Visual Editor but they don't follows the VE generated code style.
>
> Basically, this classes have the instantiation and manipulations of the
> visual objects (awt and swing) inside one 'init' method instead separate
> methods.
>
> Exists some plugin or tool to reformat the code to the VE patterns?
>
> Many thanks.
>

VE uses a set of rules and templates to parse and generate source code.
The "Getter" style (PrefPage->Java->VisualEditor->PatternStyle) is
(currently) the only VE style. We are working to open up the extension
API for this.

The "Getter" style (rules/templates) works as following:

Every visual (Swing/AWT) bean, or any bean with a prefix of "ivj" will
be parsed.

Every parsed bean will need to have an initialization method (the only
method where property settings for that bean will be parsed).

An initialization method will be the one that instantiate the bean ...
e.g., ivjBean = new Bean();

A method may be the initalization method for more than one bean.

If the bean is an instance variable, and is instantiated with its
declaration e.g.,
Bean ivjBean = new Bean() ; (vs. the default generation pattern of
Bean ivjBean = null ;) The initalization method would be (if existed)
any of the methods that are listed in the
PrefPage->Java->VisualEditor->PatternStyle methods names (jbInit,
initComponents ....)


For that matter, once the bean/init method were parsed, VE will continue
to use them.
Previous Topic:Ve on MACosx time frame
Next Topic:Disabled prerequisite plug-in....
Goto Forum:
  


Current Time: Sat Oct 19 17:35:16 GMT 2024

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

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

Back to the top