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–284 unchanged (284 lines)
285 }
286 }
287 } else if (that.isSubtype(this)) {
288 builder.addAlternate(that);
289 }
290 JSType result = builder.build();
291 if (result != null) {
292 return result;
293 } else if (this.isObject() && that.isObject()) {
294 return getNativeType(JSTypeNative.NO_OBJECT_TYPE);
295 } else {
296 return getNativeType(JSTypeNative.NO_TYPE);
297 }
…lines 298–499 unchanged (202 lines)

After

…lines 1–284 unchanged (284 lines)
285 }
286 }
287 } else if (that.isSubtype(this)) {
288 builder.addAlternate(that);
289 }
290 JSType result = builder.build();
291 if (!result.isNoType()) {
292 return result;
293 } else if (this.isObject() && that.isObject()) {
294 return getNativeType(JSTypeNative.NO_OBJECT_TYPE);
295 } else {
296 return getNativeType(JSTypeNative.NO_TYPE);
297 }
…lines 298–499 unchanged (202 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 (+23 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "ImmutableSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "ErrorReporter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "SortedSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TreeSet"
; ";"
block_comment "/**\n * The {@code UnionType} implements a common JavaScript "...
class_declaration
modifiers
public "public"
class "class"
identifier "UnionType"
superclass
extends "extends"
type_identifier "JSType"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
field_declaration
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "JSType"
> ">"
variable_declarator
identifier "alternates"
; ";"
block_comment "/**\n * Creates a union type.\n *\n * @param alternates t"...
constructor_declaration (+36 nodes collapsed)
block_comment "/**\n * Gets the alternate types of this union type.\n * @"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "Iterable"
type_arguments
< "<"
type_identifier "JSType"
> ">"
identifier "getAlternates"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "alternates"
; ";"
} "}"
method_declaration (+38 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
method_declaration (+135 nodes collapsed)
method_declaration (+71 nodes collapsed)
method_declaration (+50 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+94 nodes collapsed)
block_comment "/**\n * This predicate determines whether objects of this t"...
method_declaration (+48 nodes collapsed)
method_declaration (+48 nodes collapsed)
method_declaration (+87 nodes collapsed)
method_declaration
type_identifier "JSType"
identifier "meet"
formal_parameters
( "("
formal_parameter
type_identifier "JSType"
identifier "that"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "UnionTypeBuilder"
variable_declarator
identifier "builder"
= "="
object_creation_expression
new "new"
type_identifier "UnionTypeBuilder"
argument_list
( "("
identifier "registry"
) ")"
; ";"
enhanced_for_statement (+37 nodes collapsed)
if_statement (+86 nodes collapsed)
local_variable_declaration
type_identifier "JSType"
variable_declarator
identifier "result"
= "="
method_invocation
identifier "builder"
. "."
identifier "build"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "result"
!= "!="
null_literal "null"
) ")"
block
{ "{"
return_statement
return "return"
identifier "result"
; ";"
} "}"
else "else"
if_statement (+52 nodes collapsed)
} "}"
block_comment "/**\n * Two union types are equal if they have the same num"...
method_declaration (+62 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "isUnionType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+50 nodes collapsed)
block_comment "/**\n * A {@link UnionType} contains a given type (alternat"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns a more restricted union type than {@code th"...
method_declaration (+85 nodes collapsed)
method_declaration (+159 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+136 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 (+23 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "common"
. "."
identifier "collect"
. "."
identifier "ImmutableSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "google"
. "."
identifier "javascript"
. "."
identifier "rhino"
. "."
identifier "ErrorReporter"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Set"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "SortedSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "TreeSet"
; ";"
block_comment "/**\n * The {@code UnionType} implements a common JavaScript "...
class_declaration
modifiers
public "public"
class "class"
identifier "UnionType"
superclass
extends "extends"
type_identifier "JSType"
class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
field_declaration
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "JSType"
> ">"
variable_declarator
identifier "alternates"
; ";"
block_comment "/**\n * Creates a union type.\n *\n * @param alternates t"...
constructor_declaration (+36 nodes collapsed)
block_comment "/**\n * Gets the alternate types of this union type.\n * @"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "Iterable"
type_arguments
< "<"
type_identifier "JSType"
> ">"
identifier "getAlternates"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "alternates"
; ";"
} "}"
method_declaration (+38 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * This predicate is used to test whether a given type"...
method_declaration (+49 nodes collapsed)
method_declaration (+135 nodes collapsed)
method_declaration (+71 nodes collapsed)
method_declaration (+50 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+94 nodes collapsed)
block_comment "/**\n * This predicate determines whether objects of this t"...
method_declaration (+48 nodes collapsed)
method_declaration (+48 nodes collapsed)
method_declaration (+87 nodes collapsed)
method_declaration
type_identifier "JSType"
identifier "meet"
formal_parameters
( "("
formal_parameter
type_identifier "JSType"
identifier "that"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "UnionTypeBuilder"
variable_declarator
identifier "builder"
= "="
object_creation_expression
new "new"
type_identifier "UnionTypeBuilder"
argument_list
( "("
identifier "registry"
) ")"
; ";"
enhanced_for_statement (+37 nodes collapsed)
if_statement (+86 nodes collapsed)
local_variable_declaration
type_identifier "JSType"
variable_declarator
identifier "result"
= "="
method_invocation
identifier "builder"
. "."
identifier "build"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
method_invocation
identifier "result"
. "."
identifier "isNoType"
argument_list
( "("
) ")"
) ")"
block
{ "{"
return_statement
return "return"
identifier "result"
; ";"
} "}"
else "else"
if_statement (+52 nodes collapsed)
} "}"
block_comment "/**\n * Two union types are equal if they have the same num"...
method_declaration (+62 nodes collapsed)
method_declaration (+25 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "isUnionType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+50 nodes collapsed)
block_comment "/**\n * A {@link UnionType} contains a given type (alternat"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Returns a more restricted union type than {@code th"...
method_declaration (+85 nodes collapsed)
method_declaration (+159 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+148 nodes collapsed)
method_declaration (+38 nodes collapsed)
method_declaration (+136 nodes collapsed)
} "}"