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–426 unchanged (426 lines)
427
428 WarningLevel wLevel = flags.warning_level;
429 wLevel.setOptionsForWarningLevel(options);
430 for (FormattingOption formattingOption : flags.formatting) {
431 formattingOption.applyToOptions(options);
432 }
433 if (flags.process_closure_primitives) {
434 options.closurePass = true;
435 }
436
437 initOptionsFromFlags(options);
438 return options;
439 }
440
441 @Override
…lines 442–486 unchanged (45 lines)

After

…lines 1–426 unchanged (426 lines)
427
428 WarningLevel wLevel = flags.warning_level;
429 wLevel.setOptionsForWarningLevel(options);
430 for (FormattingOption formattingOption : flags.formatting) {
431 formattingOption.applyToOptions(options);
432 }
433
434 options.closurePass = flags.process_closure_primitives;
435 initOptionsFromFlags(options);
436 return options;
437 }
438
439 @Override
440 protected Compiler createCompiler() {
441 return new Compiler(getErrorPrintStream());
…lines 442–484 unchanged (43 lines)

Before

program
block_comment "/*\n * Copyright 2009 Google Inc.\n *\n * Licensed under the Ap"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "io"
. "."
identifier "LimitInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "CmdLineException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "CmdLineParser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "Option"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "OptionDef"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "OptionHandler"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "Parameters"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "Setter"
; ";"
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 "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "PrintStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Matcher"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Pattern"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipInputStream"
; ";"
block_comment "/**\n * CommandLineRunner translates flags into Java API call"...
class_declaration
modifiers
public "public"
class "class"
identifier "CommandLineRunner"
superclass
extends "extends"
generic_type
type_identifier "AbstractCommandLineRunner"
type_arguments
< "<"
type_identifier "Compiler"
, ","
type_identifier "CompilerOptions"
> ">"
class_body
{ "{"
class_declaration (+1847 nodes collapsed)
block_comment "/**\n * Set of options that can be used with the --formatti"...
enum_declaration (+94 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "Flags"
variable_declarator
identifier "flags"
= "="
object_creation_expression
new "new"
type_identifier "Flags"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Create a new command-line runner. You should only n"...
constructor_declaration (+39 nodes collapsed)
constructor_declaration (+47 nodes collapsed)
method_declaration (+590 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
type_identifier "CompilerOptions"
identifier "createOptions"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
type_identifier "CompilerOptions"
variable_declarator
identifier "options"
= "="
object_creation_expression
new "new"
type_identifier "CompilerOptions"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setCodingConvention"
argument_list
( "("
object_creation_expression
new "new"
type_identifier "ClosureCodingConvention"
argument_list
( "("
) ")"
) ")"
; ";"
local_variable_declaration
type_identifier "CompilationLevel"
variable_declarator
identifier "level"
= "="
field_access
identifier "flags"
. "."
identifier "compilation_level"
; ";"
expression_statement
method_invocation
identifier "level"
. "."
identifier "setOptionsForCompilationLevel"
argument_list
( "("
identifier "options"
) ")"
; ";"
if_statement (+22 nodes collapsed)
local_variable_declaration
type_identifier "WarningLevel"
variable_declarator
identifier "wLevel"
= "="
field_access
identifier "flags"
. "."
identifier "warning_level"
; ";"
expression_statement
method_invocation
identifier "wLevel"
. "."
identifier "setOptionsForWarningLevel"
argument_list
( "("
identifier "options"
) ")"
; ";"
enhanced_for_statement (+24 nodes collapsed)
if_statement
if "if"
parenthesized_expression
( "("
field_access
identifier "flags"
. "."
identifier "process_closure_primitives"
) ")"
block
{ "{"
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "closurePass"
= "="
true "true"
; ";"
} "}"
expression_statement
method_invocation
identifier "initOptionsFromFlags"
argument_list
( "("
identifier "options"
) ")"
; ";"
return_statement
return "return"
identifier "options"
; ";"
} "}"
method_declaration (+28 nodes collapsed)
method_declaration (+94 nodes collapsed)
block_comment "/**\n * @return a mutable list\n * @throws IOException\n "...
method_declaration (+151 nodes collapsed)
block_comment "/**\n * Runs the Compiler. Exits cleanly in the event of an"...
method_declaration (+65 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Copyright 2009 Google Inc.\n *\n * Licensed under the Ap"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "jscomp"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Lists"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "Sets"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "io"
. "."
identifier "LimitInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "CmdLineException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "CmdLineParser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "Option"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "OptionDef"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "OptionHandler"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "Parameters"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "kohsuke"
. "."
identifier "args4j"
. "."
identifier "spi"
. "."
identifier "Setter"
; ";"
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 "io"
. "."
identifier "InputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "PrintStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "logging"
. "."
identifier "Level"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Matcher"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "regex"
. "."
identifier "Pattern"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipEntry"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "zip"
. "."
identifier "ZipInputStream"
; ";"
block_comment "/**\n * CommandLineRunner translates flags into Java API call"...
class_declaration
modifiers
public "public"
class "class"
identifier "CommandLineRunner"
superclass
extends "extends"
generic_type
type_identifier "AbstractCommandLineRunner"
type_arguments
< "<"
type_identifier "Compiler"
, ","
type_identifier "CompilerOptions"
> ">"
class_body
{ "{"
class_declaration (+1847 nodes collapsed)
block_comment "/**\n * Set of options that can be used with the --formatti"...
enum_declaration (+94 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
type_identifier "Flags"
variable_declarator
identifier "flags"
= "="
object_creation_expression
new "new"
type_identifier "Flags"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * Create a new command-line runner. You should only n"...
constructor_declaration (+39 nodes collapsed)
constructor_declaration (+47 nodes collapsed)
method_declaration (+590 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
type_identifier "CompilerOptions"
identifier "createOptions"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration
type_identifier "CompilerOptions"
variable_declarator
identifier "options"
= "="
object_creation_expression
new "new"
type_identifier "CompilerOptions"
argument_list
( "("
) ")"
; ";"
expression_statement
method_invocation
identifier "options"
. "."
identifier "setCodingConvention"
argument_list
( "("
object_creation_expression
new "new"
type_identifier "ClosureCodingConvention"
argument_list
( "("
) ")"
) ")"
; ";"
local_variable_declaration
type_identifier "CompilationLevel"
variable_declarator
identifier "level"
= "="
field_access
identifier "flags"
. "."
identifier "compilation_level"
; ";"
expression_statement
method_invocation
identifier "level"
. "."
identifier "setOptionsForCompilationLevel"
argument_list
( "("
identifier "options"
) ")"
; ";"
if_statement (+22 nodes collapsed)
local_variable_declaration
type_identifier "WarningLevel"
variable_declarator
identifier "wLevel"
= "="
field_access
identifier "flags"
. "."
identifier "warning_level"
; ";"
expression_statement
method_invocation
identifier "wLevel"
. "."
identifier "setOptionsForWarningLevel"
argument_list
( "("
identifier "options"
) ")"
; ";"
enhanced_for_statement (+24 nodes collapsed)
expression_statement
assignment_expression
field_access
identifier "options"
. "."
identifier "closurePass"
= "="
field_access
identifier "flags"
. "."
identifier "process_closure_primitives"
; ";"
expression_statement
method_invocation
identifier "initOptionsFromFlags"
argument_list
( "("
identifier "options"
) ")"
; ";"
return_statement
return "return"
identifier "options"
; ";"
} "}"
method_declaration (+28 nodes collapsed)
method_declaration (+94 nodes collapsed)
block_comment "/**\n * @return a mutable list\n * @throws IOException\n "...
method_declaration (+151 nodes collapsed)
block_comment "/**\n * Runs the Compiler. Exits cleanly in the event of an"...
method_declaration (+65 nodes collapsed)
} "}"