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–464 unchanged (464 lines)
465 wLevel.setOptionsForWarningLevel(options);
466 for (FormattingOption formattingOption : flags.formatting) {
467 formattingOption.applyToOptions(options);
468 }
469
470 options.closurePass = flags.process_closure_primitives;
471 initOptionsFromFlags(options);
472 return options;
473 }
474
475 @Override
476 protected Compiler createCompiler() {
477 return new Compiler(getErrorPrintStream());
…lines 478–594 unchanged (117 lines)

After

…lines 1–464 unchanged (464 lines)
465 wLevel.setOptionsForWarningLevel(options);
466 for (FormattingOption formattingOption : flags.formatting) {
467 formattingOption.applyToOptions(options);
468 }
469
470 options.closurePass = flags.process_closure_primitives;
471 return options;
472 }
473
474 @Override
475 protected Compiler createCompiler() {
476 return new Compiler(getErrorPrintStream());
477 }
…lines 478–593 unchanged (116 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 "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "ImmutableList"
; ";"
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 "Maps"
; ";"
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 "Map"
; ";"
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 (+2007 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
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isConfigValid"
= "="
false "false"
; ";"
block_comment "/**\n * Create a new command-line runner. You should only n"...
constructor_declaration (+36 nodes collapsed)
constructor_declaration (+44 nodes collapsed)
method_declaration (+657 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)
line_comment "// The externs expected in externs.zip, in sorted order."
field_declaration (+206 nodes collapsed)
block_comment "/**\n * @return a mutable list\n * @throws IOException\n "...
method_declaration (+253 nodes collapsed)
block_comment "/**\n * @return Whether the configuration is valid.\n */"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "shouldRunCompiler"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "isConfigValid"
; ";"
} "}"
block_comment "/**\n * Runs the Compiler. Exits cleanly in the event of an"...
method_declaration (+72 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 "base"
. "."
identifier "Preconditions"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "ImmutableList"
; ";"
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 "Maps"
; ";"
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 "Map"
; ";"
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 (+2007 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
( "("
) ")"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isConfigValid"
= "="
false "false"
; ";"
block_comment "/**\n * Create a new command-line runner. You should only n"...
constructor_declaration (+36 nodes collapsed)
constructor_declaration (+44 nodes collapsed)
method_declaration (+657 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"
; ";"
return_statement
return "return"
identifier "options"
; ";"
} "}"
method_declaration (+28 nodes collapsed)
method_declaration (+94 nodes collapsed)
line_comment "// The externs expected in externs.zip, in sorted order."
field_declaration (+206 nodes collapsed)
block_comment "/**\n * @return a mutable list\n * @throws IOException\n "...
method_declaration (+253 nodes collapsed)
block_comment "/**\n * @return Whether the configuration is valid.\n */"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "shouldRunCompiler"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "isConfigValid"
; ";"
} "}"
block_comment "/**\n * Runs the Compiler. Exits cleanly in the event of an"...
method_declaration (+72 nodes collapsed)
} "}"