import-cleaner inserts line breaks at char 80

27 views
Skip to first unread message

abelr...@gmail.com

unread,
Mar 22, 2014, 11:27:59 AM3/22/14
to wal...@googlegroups.com
Hi,

I'm trying to integrate walkmod in a project and I see that the import-cleaner plugin inserts line breaks in the modified files.

For instance, when removing the Date import in the next example, the resulting file has a line break right after the opening braked of propOrder.


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import java.util.Date;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "http://com.stuff.here.com/Scope/Beans", propOrder = {"resultsNumber", "results"})
public class MyBeanResults {


Is there a way to avoid this?

walkmod

unread,
Mar 23, 2014, 9:46:36 AM3/23/14
to
Hi Abel,

Visitors do not write contents, only change the AST. Writers are the responsables to write the AST in a given format.

Having said that, by default, Walkmod writes the source files using the Eclipse formatter. So, changing the file formatter.xml (that appears in conf/formatter.xml of your walkmod installation directory) for your eclipse formatter configuration, or editing this one, is enough. 

Good luck! ;)

abelr...@gmail.com

unread,
Mar 26, 2014, 4:46:12 PM3/26/14
to wal...@googlegroups.com, abelr...@gmail.com

Thanks, I see in the XML that there's a rule for the line.

walkmod

unread,
Mar 26, 2014, 4:48:33 PM3/26/14
to wal...@googlegroups.com, abelr...@gmail.com
Great! :)
Reply all
Reply to author
Forward
0 new messages