Formatter not leaving comment alone?
While hacking code, I had a temp commented out block, and the formatter did:
@@ -630,22 +625,11 @@ public class TwinCatWriter extends Writer {
}
/*
- @Override
- protected Box toBox(PlcTypeDecl typeDecl) {
- // Converts the type declaration to a textual representation in IEC 61131-3 syntax. The output is TwinCAT
- // specific, in that it implements a workaround for a bug in TwinCAT, where structs in type declarations
- // may not be terminated with a semicolon.
- CodeBox c = new MemoryCodeBox(INDENT);
- c.add("TYPE %s:", typeDecl.name);
- c.indent();
- if (typeDecl.type instanceof PlcStructType) {
- // Special TwinCAT workaround.
- c.add(toBox(typeDecl.type));
- } else {
- c.add(new HBox(toBox(typeDecl.type), ";"));
- }
- c.dedent();
- c.add("END_TYPE");
- return c;
- } */
+ * @Override protected Box toBox(PlcTypeDecl typeDecl) { // Converts the type declaration to a textual
+ * representation in IEC 61131-3 syntax. The output is TwinCAT // specific, in that it implements a workaround fo
r a
+ * bug in TwinCAT, where structs in type declarations // may not be terminated with a semicolon. CodeBox c = new
+ * MemoryCodeBox(INDENT); c.add("TYPE %s:", typeDecl.name); c.indent(); if (typeDecl.type instanceof PlcStructTyp
e)
+ * { // Special TwinCAT workaround. c.add(toBox(typeDecl.type)); } else { c.add(new HBox(toBox(typeDecl.type),
+ * ";")); } c.dedent(); c.add("END_TYPE"); return c; }
+ */
}
Wasn't the formatter supposed to leave that comment as-is ?