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–94 unchanged (94 lines)
95 public FunctionBuilder withReturnType(JSType returnType) {
96 this.returnType = returnType;
97 return this;
98 }
99
100 /** Set the return type and whether it's inferred. */
101
102 /** Sets an inferred return type. */
103 public FunctionBuilder withInferredReturnType(JSType returnType) {
104 this.returnType = returnType;
105 this.inferredReturnType = true;
106 return this;
107 }
…lines 108–153 unchanged (46 lines)

After

…lines 1–94 unchanged (94 lines)
95 public FunctionBuilder withReturnType(JSType returnType) {
96 this.returnType = returnType;
97 return this;
98 }
99
100 /** Set the return type and whether it's inferred. */
101 public FunctionBuilder withReturnType(JSType returnType, boolean inferred) {
102 this.returnType = returnType;
103 this.inferredReturnType = inferred;
104 return this;
105 }
106
107 /** Sets an inferred return type. */
108 public FunctionBuilder withInferredReturnType(JSType returnType) {
109 this.returnType = returnType;
110 this.inferredReturnType = true;
111 return this;
…lines 112–158 unchanged (47 lines)

Before

program
block_comment "/*\n *\n * ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
block_comment "/**\n * A builder class for function and arrow types.\n *\n * I"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "FunctionBuilder"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "registry"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "name"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "sourceNode"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "parametersNode"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSType"
variable_declarator
identifier "returnType"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ObjectType"
variable_declarator
identifier "typeOfThis"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "templateTypeName"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "inferredReturnType"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isConstructor"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isNativeType"
= "="
false "false"
; ";"
constructor_declaration (+22 nodes collapsed)
block_comment "/** Set the name of the function type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the source node of the function type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the parameters of the function type from a FunctionP"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Set the parameters of the function type with a spec"...
method_declaration (+27 nodes collapsed)
block_comment "/** Set the return type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the return type and whether it's inferred. */"
block_comment "/** Sets an inferred return type. */"
method_declaration (+36 nodes collapsed)
block_comment "/** Set the \"this\" type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the template name. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Make this a constructor. */"
method_declaration (+24 nodes collapsed)
block_comment "/** Make this a native type. */"
method_declaration (+22 nodes collapsed)
block_comment "/** Copies all the information from another function type. *"...
method_declaration (+138 nodes collapsed)
block_comment "/** Construct a new function type. */"
method_declaration (+47 nodes collapsed)
} "}"

After

program
block_comment "/*\n *\n * ***** BEGIN LICENSE BLOCK *****\n * Version: MPL 1.1"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "jstype"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "Node"
; ";"
block_comment "/**\n * A builder class for function and arrow types.\n *\n * I"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "FunctionBuilder"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "registry"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "name"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "sourceNode"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "parametersNode"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSType"
variable_declarator
identifier "returnType"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "ObjectType"
variable_declarator
identifier "typeOfThis"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "templateTypeName"
= "="
null_literal "null"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "inferredReturnType"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isConstructor"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isNativeType"
= "="
false "false"
; ";"
constructor_declaration (+22 nodes collapsed)
block_comment "/** Set the name of the function type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the source node of the function type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the parameters of the function type from a FunctionP"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * Set the parameters of the function type with a spec"...
method_declaration (+27 nodes collapsed)
block_comment "/** Set the return type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the return type and whether it's inferred. */"
method_declaration
modifiers
public "public"
type_identifier "FunctionBuilder"
identifier "withReturnType"
formal_parameters
( "("
formal_parameter
type_identifier "JSType"
identifier "returnType"
, ","
formal_parameter
boolean_type "boolean"
identifier "inferred"
) ")"
block
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "returnType"
= "="
identifier "returnType"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "inferredReturnType"
= "="
identifier "inferred"
; ";"
return_statement
return "return"
this "this"
; ";"
} "}"
block_comment "/** Sets an inferred return type. */"
method_declaration (+36 nodes collapsed)
block_comment "/** Set the \"this\" type. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Set the template name. */"
method_declaration (+27 nodes collapsed)
block_comment "/** Make this a constructor. */"
method_declaration (+24 nodes collapsed)
block_comment "/** Make this a native type. */"
method_declaration (+22 nodes collapsed)
block_comment "/** Copies all the information from another function type. *"...
method_declaration (+138 nodes collapsed)
block_comment "/** Construct a new function type. */"
method_declaration (+47 nodes collapsed)
} "}"