wakmod doesn't change tabs to spaces

27 views
Skip to first unread message

jll...@gmail.com

unread,
Aug 31, 2014, 2:59:04 AM8/31/14
to wal...@googlegroups.com
Hi,

As I told you in my last thread, in some situations walkmod (or the eclipse's formatter ^^) doesn't replace tabs by spaces and it replaces spaces by tabs.

I have modified the test to show you the problem:
@Test
public void testSpacesInsteadOfTabs() throws Exception {
EclipseWriter ew = new EclipseWriter();
VisitorContext ctx = new VisitorContext();
File outputDir = new File("src/test/output");
outputDir.mkdirs();
File output = new File(outputDir, "Foo.java");

ctx.put(AbstractWalker.ORIGINAL_FILE_KEY, output);

ew.write("\t public class Foo {\n\t\tint a = 0;\n int b = 0;}", ctx);

ew.close();

String code = FileUtil.readEntirely(output);

output.delete();
outputDir.delete();
Assert.assertFalse(code.contains("\t"));

}
Maybe I'm not understanding the behavior and it's not a problem.

Thanks,

walkmod

unread,
Aug 31, 2014, 5:43:25 PM8/31/14
to wal...@googlegroups.com, jll...@gmail.com
Perfect! 

I will take a look! If it is a bug of the eclipse formatter, I will try upgrading the eclipse dependencies. Thanks for your feedback! It is much appreciated :)

walkmod

unread,
Sep 2, 2014, 1:27:53 AM9/2/14
to wal...@googlegroups.com, jll...@gmail.com
Hi,

Yes, I have reproduced the error. It seems a bug of the eclipse formatter. We used the same version than the maven-java-formatter-plugin and they have the same issue reported.


I will  upgrade the eclipse formatter  because it also was a pending issue for us. 

walkmod

unread,
Sep 10, 2014, 1:47:16 PM9/10/14
to wal...@googlegroups.com, jll...@gmail.com
Hi, 

I have solved the issue in trunk! It was a walkmod bug :P (it was my fault making a copy paste from another project). Your test is working now. I will deploy a version as soon as possible.

Sorry for the waiting time.

walkmod

unread,
Sep 10, 2014, 3:50:33 PM9/10/14
to wal...@googlegroups.com, jll...@gmail.com
Uploaded. 

Thus, if you try now to run walkmod, it should work.

jll...@gmail.com

unread,
Sep 11, 2014, 3:58:17 AM9/11/14
to wal...@googlegroups.com, jll...@gmail.com
Thanks! Great!

I'll tell if I find another issue ;-)
Reply all
Reply to author
Forward
0 new messages