Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » MWE JavaBeautifier differs from oAW Version(?)
MWE JavaBeautifier differs from oAW Version(?) [message #372499] Wed, 29 July 2009 09:26 Go to next message
Ludwig Straub is currently offline Ludwig StraubFriend
Messages: 14
Registered: July 2009
Junior Member
While migrating from oaw4 to mwe, I came across a change in the behaviour
of the org.eclipse.xpand2.output.JavaBeautifier class.

In order to be flexible within my different projects that all use the same
workflow, I am using some parameters to specify different options.

One of the parameters is the configuration file that has to be used by the
JavaBeautifier.

In oaw4, I achieved, that the default formatting behaviour should be used
by simply specifying an empty string as configuration file for the
postprocessor.
In mwe, I would have to skip the entire attribute "configFile".
If I pass an empty string (or an invalid file name) to that attribute,
error messages occur and no formatting is done at all.

Viewing the source of JavaBeautifier, I see that the default values are
only set, if
* either the attribute is skipped
* or the file is empty

If the filename is en empty string or simply invalid, the class displays
error messages that the java files contain invalid java code.

In my opinion, the "invalid configuration file" behaviour should be
identical to the "no configuration file at all" behaviour.

I just want to ask, if this change in behaviour is intended or not.
(I for myself would prefer to have back the "old" one. ;-))

My "workaround" currently is, that I created a completely empty file I'm
using as reference each time I want the default behaviour.
Re: MWE JavaBeautifier differs from oAW Version(?) [message #468259 is a reply to message #372499] Tue, 04 August 2009 18:08 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Ludwig,

it seems that this is a "migration-bug".
It's related to Xpand.
Could you please file a bug report?

Thanks,
Sven

Ludwig Straub schrieb:
> While migrating from oaw4 to mwe, I came across a change in the
> behaviour of the org.eclipse.xpand2.output.JavaBeautifier class.
>
> In order to be flexible within my different projects that all use the
> same workflow, I am using some parameters to specify different options.
>
> One of the parameters is the configuration file that has to be used by
> the JavaBeautifier.
>
> In oaw4, I achieved, that the default formatting behaviour should be
> used by simply specifying an empty string as configuration file for the
> postprocessor.
> In mwe, I would have to skip the entire attribute "configFile".
> If I pass an empty string (or an invalid file name) to that attribute,
> error messages occur and no formatting is done at all.
>
> Viewing the source of JavaBeautifier, I see that the default values are
> only set, if
> * either the attribute is skipped
> * or the file is empty
>
> If the filename is en empty string or simply invalid, the class displays
> error messages that the java files contain invalid java code.
>
> In my opinion, the "invalid configuration file" behaviour should be
> identical to the "no configuration file at all" behaviour.
>
> I just want to ask, if this change in behaviour is intended or not.
> (I for myself would prefer to have back the "old" one. ;-))
>
> My "workaround" currently is, that I created a completely empty file I'm
> using as reference each time I want the default behaviour.
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: MWE JavaBeautifier differs from oAW Version(?) [message #621299 is a reply to message #372499] Tue, 04 August 2009 18:08 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Ludwig,

it seems that this is a "migration-bug".
It's related to Xpand.
Could you please file a bug report?

Thanks,
Sven

Ludwig Straub schrieb:
> While migrating from oaw4 to mwe, I came across a change in the
> behaviour of the org.eclipse.xpand2.output.JavaBeautifier class.
>
> In order to be flexible within my different projects that all use the
> same workflow, I am using some parameters to specify different options.
>
> One of the parameters is the configuration file that has to be used by
> the JavaBeautifier.
>
> In oaw4, I achieved, that the default formatting behaviour should be
> used by simply specifying an empty string as configuration file for the
> postprocessor.
> In mwe, I would have to skip the entire attribute "configFile".
> If I pass an empty string (or an invalid file name) to that attribute,
> error messages occur and no formatting is done at all.
>
> Viewing the source of JavaBeautifier, I see that the default values are
> only set, if
> * either the attribute is skipped
> * or the file is empty
>
> If the filename is en empty string or simply invalid, the class displays
> error messages that the java files contain invalid java code.
>
> In my opinion, the "invalid configuration file" behaviour should be
> identical to the "no configuration file at all" behaviour.
>
> I just want to ask, if this change in behaviour is intended or not.
> (I for myself would prefer to have back the "old" one. ;-))
>
> My "workaround" currently is, that I created a completely empty file I'm
> using as reference each time I want the default behaviour.
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Previous Topic:MWE Interim Update issue
Next Topic:[EMF Compare] Graphical visualization of the differences?
Goto Forum:
  


Current Time: Sun Feb 25 16:52:55 GMT 2024

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

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

Back to the top