What is that? The output from JavaClassSource.toString()?
Always use Roaster.format() to format the output appropriately.
Hi George, thanks for reply.
Is the output of the body data, when I use the getMethod. Suppose this
JavaClassSource classOrigin = Roaster.parse()
it deletes the original format of the code parsed previously
If you call JavaClassSource.toUnformattedString() it should keep your original format.
the problem I have is that I need to use the getMethods, because I need to merge two classes into one. So, I have the class A with some methods, and class B with some other methods, and I need to create a class C with the methods in A and B into a single one.
Right, do you have a specific code format that you would like to use?
Try setting that up in Eclipse, export as a Properties file and use that in the Roaster.format() signature.
Do you have the method body code formatted appropriately when Method.getBody() is called?
Basically my main issue now is just this new line crop that I'm facing, when getBody is called, \n\n from original string is converted to \n.
I could try the way you're suggesting me, but I think the problem will remain. I need to reuse the styles from classes A and B. If for example these classes contains methods with statements that have empty lines, not sure if this file format could help me. (because of the issue of \n\n converted to \n).
thanks for the help