Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–318 unchanged (318 lines)
319 *
320 * @throws IOException
321 * If an I/O error occurs
322 */
323 public void println() throws IOException {
324 final String recordSeparator = format.getRecordSeparator();
325 out.append(recordSeparator);
326 newRecord = true;
327 }
328
329 /**
330 * Prints a single line of delimiter separated values. The values will be quoted if needed. Quotes and newLine
331 * characters will be escaped.
332 *
…lines 333–429 unchanged (97 lines)

After

…lines 1–318 unchanged (318 lines)
319 *
320 * @throws IOException
321 * If an I/O error occurs
322 */
323 public void println() throws IOException {
324 final String recordSeparator = format.getRecordSeparator();
325 if (recordSeparator != null) {
326 out.append(recordSeparator);
327 }
328 newRecord = true;
329 }
330
331 /**
332 * Prints a single line of delimiter separated values. The values will be quoted if needed. Quotes and newLine
333 * characters will be escaped.
…lines 334–431 unchanged (98 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "COMMENT"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "CR"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "LF"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "SP"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Flushable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "sql"
. "."
identifier "ResultSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "sql"
. "."
identifier "SQLException"
; ";"
block_comment "/**\n * Prints values in a CSV format.\n *\n * @version $Id$\n *"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "CSVPrinter"
super_interfaces
implements "implements"
type_list
type_identifier "Flushable"
, ","
type_identifier "Closeable"
class_body
{ "{"
block_comment "/** The place that the values get written. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Appendable"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CSVFormat"
variable_declarator
identifier "format"
; ";"
block_comment "/** True if we just began a new record. */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "newRecord"
= "="
true "true"
; ";"
block_comment "/**\n * Creates a printer that will print values to the g"...
constructor_declaration (+81 nodes collapsed)
line_comment "// ======================================================"
line_comment "// printing implementation"
line_comment "// ======================================================"
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Flushes the underlying stream.\n *\n * @thr"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Prints the string as the next value on the line. "...
method_declaration (+107 nodes collapsed)
method_declaration (+151 nodes collapsed)
block_comment "/*\n * Note: must only be called if escaping is enabled, "...
method_declaration (+283 nodes collapsed)
block_comment "/*\n * Note: must only be called if quoting is enabled, o"...
line_comment "// the original object is needed so can check for Number"
method_declaration (+654 nodes collapsed)
block_comment "/**\n * Prints a comment on a new line among the delimite"...
method_declaration (+263 nodes collapsed)
block_comment "/**\n * Outputs the record separator.\n *\n * @thro"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "println"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "recordSeparator"
= "="
method_invocation
identifier "format"
. "."
identifier "getRecordSeparator"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "out"
. "."
identifier "append"
argument_list
( "("
identifier "recordSeparator"
) ")"
; ";"
expression_statement
assignment_expression
identifier "newRecord"
= "="
true "true"
; ";"
} "}"
block_comment "/**\n * Prints a single line of delimiter separated value"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Prints a single line of delimiter separated value"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given collection.\n "...
method_declaration (+119 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given array.\n *"...
method_declaration (+117 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given JDBC result s"...
method_declaration (+103 nodes collapsed)
block_comment "/**\n * Gets the target Appendable. \n * \n * @retu"...
method_declaration
modifiers
public "public"
type_identifier "Appendable"
identifier "getOut"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "out"
; ";"
} "}"
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "COMMENT"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "CR"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "LF"
; ";"
import_declaration
import "import"
static "static"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "csv"
. "."
identifier "Constants"
. "."
identifier "SP"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Closeable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Flushable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "sql"
. "."
identifier "ResultSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "sql"
. "."
identifier "SQLException"
; ";"
block_comment "/**\n * Prints values in a CSV format.\n *\n * @version $Id$\n *"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "CSVPrinter"
super_interfaces
implements "implements"
type_list
type_identifier "Flushable"
, ","
type_identifier "Closeable"
class_body
{ "{"
block_comment "/** The place that the values get written. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Appendable"
variable_declarator
identifier "out"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "CSVFormat"
variable_declarator
identifier "format"
; ";"
block_comment "/** True if we just began a new record. */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "newRecord"
= "="
true "true"
; ";"
block_comment "/**\n * Creates a printer that will print values to the g"...
constructor_declaration (+81 nodes collapsed)
line_comment "// ======================================================"
line_comment "// printing implementation"
line_comment "// ======================================================"
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Flushes the underlying stream.\n *\n * @thr"...
method_declaration (+42 nodes collapsed)
block_comment "/**\n * Prints the string as the next value on the line. "...
method_declaration (+107 nodes collapsed)
method_declaration (+151 nodes collapsed)
block_comment "/*\n * Note: must only be called if escaping is enabled, "...
method_declaration (+283 nodes collapsed)
block_comment "/*\n * Note: must only be called if quoting is enabled, o"...
line_comment "// the original object is needed so can check for Number"
method_declaration (+654 nodes collapsed)
block_comment "/**\n * Prints a comment on a new line among the delimite"...
method_declaration (+263 nodes collapsed)
block_comment "/**\n * Outputs the record separator.\n *\n * @thro"...
method_declaration
modifiers
public "public"
void_type "void"
identifier "println"
formal_parameters
( "("
) ")"
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
local_variable_declaration
modifiers
final "final"
type_identifier "String"
variable_declarator
identifier "recordSeparator"
= "="
method_invocation
identifier "format"
. "."
identifier "getRecordSeparator"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "recordSeparator"
!= "!="
null_literal "null"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "out"
. "."
identifier "append"
argument_list
( "("
identifier "recordSeparator"
) ")"
; ";"
} "}"
expression_statement
assignment_expression
identifier "newRecord"
= "="
true "true"
; ";"
} "}"
block_comment "/**\n * Prints a single line of delimiter separated value"...
method_declaration (+53 nodes collapsed)
block_comment "/**\n * Prints a single line of delimiter separated value"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given collection.\n "...
method_declaration (+119 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given array.\n *"...
method_declaration (+117 nodes collapsed)
block_comment "/**\n * Prints all the objects in the given JDBC result s"...
method_declaration (+103 nodes collapsed)
block_comment "/**\n * Gets the target Appendable. \n * \n * @retu"...
method_declaration
modifiers
public "public"
type_identifier "Appendable"
identifier "getOut"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "out"
; ";"
} "}"
} "}"