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–101 unchanged (101 lines)
102 _currInputProcessed += _origBufferLen;
103
104 // Also need to adjust row start, to work as if it extended into the past wrt new buffer
105 _currInputRowStart = start - (_inputEnd - _currInputRowStart);
106
107 // And then update buffer settings
108 _inputBuffer = buf;
109 _inputPtr = start;
110 _inputEnd = end;
111 _origBufferLen = end - start;
112 }
113
114 @Override
…lines 115–2865 unchanged (2751 lines)

After

…lines 1–101 unchanged (101 lines)
102 _currInputProcessed += _origBufferLen;
103
104 // Also need to adjust row start, to work as if it extended into the past wrt new buffer
105 _currInputRowStart = start - (_inputEnd - _currInputRowStart);
106
107 // And then update buffer settings
108 _currBufferStart = start;
109 _inputBuffer = buf;
110 _inputPtr = start;
111 _inputEnd = end;
112 _origBufferLen = end - start;
113 }
114
…lines 115–2866 unchanged (2752 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "json"
. "."
identifier "async"
; ";"
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 "OutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "async"
. "."
identifier "ByteArrayFeeder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "async"
. "."
identifier "NonBlockingInputFeeder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "io"
. "."
identifier "CharTypes"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "io"
. "."
identifier "IOContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "sym"
. "."
identifier "ByteQuadsCanonicalizer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "util"
. "."
identifier "VersionUtil"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "NonBlockingJsonParser"
superclass
extends "extends"
type_identifier "NonBlockingJsonParserBase"
super_interfaces
implements "implements"
type_list
type_identifier "ByteArrayFeeder"
class_body
{ "{"
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
line_comment "// This is the main input-code lookup table, fetched eagerly"
field_declaration (+22 nodes collapsed)
line_comment "// Latin1 encoding is not supported, but we do use 8-bit sub"...
line_comment "// pre-processing task, to simplify first pass, keep it fast"...
field_declaration (+22 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * This buffer is actually provided via {@link NonBl"...
field_declaration
modifiers
protected "protected"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "_inputBuffer"
= "="
identifier "NO_BYTES"
; ";"
block_comment "/**\n * In addition to current buffer pointer, and end po"...
field_declaration
modifiers
protected "protected"
integral_type
int "int"
variable_declarator
identifier "_origBufferLen"
; ";"
line_comment "// And from ParserBase:"
line_comment "// protected int _inputPtr;"
line_comment "// protected int _inputEnd;"
block_comment "/*\n /****************************************************"...
constructor_declaration (+33 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "ByteArrayFeeder"
identifier "getNonBlockingInputFeeder"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
method_declaration (+30 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "feedInput"
formal_parameters (+21 nodes collapsed)
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// Must not have remaining input"
if_statement (+28 nodes collapsed)
if_statement (+27 nodes collapsed)
line_comment "// and shouldn't have been marked as end-of-input"
if_statement
if "if"
parenthesized_expression
( "("
identifier "_endOfInput"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "_reportError"
argument_list
( "("
string_literal
" "\""
string_fragment "Already closed, can not feed more input"
" "\""
) ")"
; ";"
} "}"
line_comment "// Time to update pointers first"
expression_statement
assignment_expression
identifier "_currInputProcessed"
+= "+="
identifier "_origBufferLen"
; ";"
line_comment "// Also need to adjust row start, to work as if it extended "...
expression_statement
assignment_expression
identifier "_currInputRowStart"
= "="
binary_expression
identifier "start"
- "-"
parenthesized_expression
( "("
binary_expression
identifier "_inputEnd"
- "-"
identifier "_currInputRowStart"
) ")"
; ";"
line_comment "// And then update buffer settings"
expression_statement
assignment_expression
identifier "_inputBuffer"
= "="
identifier "buf"
; ";"
expression_statement
assignment_expression
identifier "_inputPtr"
= "="
identifier "start"
; ";"
expression_statement
assignment_expression
identifier "_inputEnd"
= "="
identifier "end"
; ";"
expression_statement
assignment_expression
identifier "_origBufferLen"
= "="
binary_expression
identifier "end"
- "-"
identifier "start"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "endOfInput"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "_endOfInput"
= "="
true "true"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/* Implementing these methods efficiently for non-blocking c"...
line_comment "// public boolean nextFieldName(SerializableString str) t"...
line_comment "// public String nextTextValue() throws IOException"
line_comment "// public int nextIntValue(int defaultValue) throws IOExc"...
line_comment "// public long nextLongValue(long defaultValue) throws IO"...
line_comment "// public Boolean nextBooleanValue() throws IOException"
method_declaration (+62 nodes collapsed)
line_comment "// Should never be called: can not be implemented quite as e"...
line_comment "// due to non-blocking behavior"
method_declaration (+31 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+288 nodes collapsed)
block_comment "/**\n * Method called when decoding of a token has been s"...
method_declaration (+880 nodes collapsed)
block_comment "/**\n * Method similar to {@link #_finishToken}, but call"...
method_declaration (+375 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+233 nodes collapsed)
method_declaration (+178 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that handles initial token type recognitio"...
method_declaration (+178 nodes collapsed)
method_declaration (+403 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method called to detect type of a value to"...
method_declaration (+319 nodes collapsed)
block_comment "/**\n * Helper method called to parse token that is eithe"...
method_declaration (+588 nodes collapsed)
block_comment "/**\n * Helper method called to detect type of a value to"...
method_declaration (+465 nodes collapsed)
block_comment "/* Method called when we have already gotten a comma (i.e. n"...
method_declaration (+362 nodes collapsed)
method_declaration (+211 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+158 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+209 nodes collapsed)
method_declaration (+177 nodes collapsed)
method_declaration (+233 nodes collapsed)
method_declaration (+178 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+208 nodes collapsed)
method_declaration (+193 nodes collapsed)
method_declaration (+193 nodes collapsed)
method_declaration (+210 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+233 nodes collapsed)
method_declaration (+86 nodes collapsed)
method_declaration (+137 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+50 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+367 nodes collapsed)
method_declaration (+526 nodes collapsed)
method_declaration (+304 nodes collapsed)
method_declaration (+172 nodes collapsed)
method_declaration (+384 nodes collapsed)
method_declaration (+414 nodes collapsed)
method_declaration (+303 nodes collapsed)
method_declaration (+714 nodes collapsed)
method_declaration (+351 nodes collapsed)
method_declaration (+334 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+442 nodes collapsed)
method_declaration (+381 nodes collapsed)
method_declaration (+368 nodes collapsed)
block_comment "/**\n * Slower parsing method which is generally branched"...
method_declaration (+821 nodes collapsed)
block_comment "/**\n * Method called when we see non-white space charact"...
method_declaration (+244 nodes collapsed)
block_comment "/**\n * Parsing of optionally supported non-standard \"unq"...
method_declaration (+364 nodes collapsed)
method_declaration (+792 nodes collapsed)
method_declaration (+419 nodes collapsed)
method_declaration (+379 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+244 nodes collapsed)
method_declaration (+785 nodes collapsed)
method_declaration (+244 nodes collapsed)
method_declaration (+795 nodes collapsed)
method_declaration (+354 nodes collapsed)
method_declaration (+207 nodes collapsed)
line_comment "// @return Character value <b>minus 0x10000</c>; this so tha"...
line_comment "// can readily expand it to actual surrogates"
method_declaration (+378 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+61 nodes collapsed)
method_declaration (+400 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+81 nodes collapsed)
method_declaration (+138 nodes collapsed)
line_comment "// @return Character value <b>minus 0x10000</c>; this so tha"...
line_comment "// can readily expand it to actual surrogates"
method_declaration (+201 nodes collapsed)
block_comment "/*\n /****************************************************"...
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "json"
. "."
identifier "async"
; ";"
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 "OutputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "async"
. "."
identifier "ByteArrayFeeder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "async"
. "."
identifier "NonBlockingInputFeeder"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "io"
. "."
identifier "CharTypes"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "io"
. "."
identifier "IOContext"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "sym"
. "."
identifier "ByteQuadsCanonicalizer"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "util"
. "."
identifier "VersionUtil"
; ";"
class_declaration
modifiers
public "public"
class "class"
identifier "NonBlockingJsonParser"
superclass
extends "extends"
type_identifier "NonBlockingJsonParserBase"
super_interfaces
implements "implements"
type_list
type_identifier "ByteArrayFeeder"
class_body
{ "{"
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+31 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
field_declaration (+21 nodes collapsed)
line_comment "// This is the main input-code lookup table, fetched eagerly"
field_declaration (+22 nodes collapsed)
line_comment "// Latin1 encoding is not supported, but we do use 8-bit sub"...
line_comment "// pre-processing task, to simplify first pass, keep it fast"...
field_declaration (+22 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * This buffer is actually provided via {@link NonBl"...
field_declaration
modifiers
protected "protected"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
variable_declarator
identifier "_inputBuffer"
= "="
identifier "NO_BYTES"
; ";"
block_comment "/**\n * In addition to current buffer pointer, and end po"...
field_declaration
modifiers
protected "protected"
integral_type
int "int"
variable_declarator
identifier "_origBufferLen"
; ";"
line_comment "// And from ParserBase:"
line_comment "// protected int _inputPtr;"
line_comment "// protected int _inputEnd;"
block_comment "/*\n /****************************************************"...
constructor_declaration (+33 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "ByteArrayFeeder"
identifier "getNonBlockingInputFeeder"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
method_declaration (+30 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "feedInput"
formal_parameters (+21 nodes collapsed)
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
line_comment "// Must not have remaining input"
if_statement (+28 nodes collapsed)
if_statement (+27 nodes collapsed)
line_comment "// and shouldn't have been marked as end-of-input"
if_statement
if "if"
parenthesized_expression
( "("
identifier "_endOfInput"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "_reportError"
argument_list
( "("
string_literal
" "\""
string_fragment "Already closed, can not feed more input"
" "\""
) ")"
; ";"
} "}"
line_comment "// Time to update pointers first"
expression_statement
assignment_expression
identifier "_currInputProcessed"
+= "+="
identifier "_origBufferLen"
; ";"
line_comment "// Also need to adjust row start, to work as if it extended "...
expression_statement
assignment_expression
identifier "_currInputRowStart"
= "="
binary_expression
identifier "start"
- "-"
parenthesized_expression
( "("
binary_expression
identifier "_inputEnd"
- "-"
identifier "_currInputRowStart"
) ")"
; ";"
line_comment "// And then update buffer settings"
expression_statement
assignment_expression
identifier "_currBufferStart"
= "="
identifier "start"
; ";"
expression_statement
assignment_expression
identifier "_inputBuffer"
= "="
identifier "buf"
; ";"
expression_statement
assignment_expression
identifier "_inputPtr"
= "="
identifier "start"
; ";"
expression_statement
assignment_expression
identifier "_inputEnd"
= "="
identifier "end"
; ";"
expression_statement
assignment_expression
identifier "_origBufferLen"
= "="
binary_expression
identifier "end"
- "-"
identifier "start"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
void_type "void"
identifier "endOfInput"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "_endOfInput"
= "="
true "true"
; ";"
} "}"
block_comment "/*\n /****************************************************"...
block_comment "/* Implementing these methods efficiently for non-blocking c"...
line_comment "// public boolean nextFieldName(SerializableString str) t"...
line_comment "// public String nextTextValue() throws IOException"
line_comment "// public int nextIntValue(int defaultValue) throws IOExc"...
line_comment "// public long nextLongValue(long defaultValue) throws IO"...
line_comment "// public Boolean nextBooleanValue() throws IOException"
method_declaration (+62 nodes collapsed)
line_comment "// Should never be called: can not be implemented quite as e"...
line_comment "// due to non-blocking behavior"
method_declaration (+31 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+288 nodes collapsed)
block_comment "/**\n * Method called when decoding of a token has been s"...
method_declaration (+880 nodes collapsed)
block_comment "/**\n * Method similar to {@link #_finishToken}, but call"...
method_declaration (+375 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+233 nodes collapsed)
method_declaration (+178 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Method that handles initial token type recognitio"...
method_declaration (+178 nodes collapsed)
method_declaration (+403 nodes collapsed)
block_comment "/*\n /****************************************************"...
block_comment "/**\n * Helper method called to detect type of a value to"...
method_declaration (+319 nodes collapsed)
block_comment "/**\n * Helper method called to parse token that is eithe"...
method_declaration (+588 nodes collapsed)
block_comment "/**\n * Helper method called to detect type of a value to"...
method_declaration (+465 nodes collapsed)
block_comment "/* Method called when we have already gotten a comma (i.e. n"...
method_declaration (+362 nodes collapsed)
method_declaration (+211 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+158 nodes collapsed)
method_declaration (+168 nodes collapsed)
method_declaration (+209 nodes collapsed)
method_declaration (+177 nodes collapsed)
method_declaration (+233 nodes collapsed)
method_declaration (+178 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+208 nodes collapsed)
method_declaration (+193 nodes collapsed)
method_declaration (+193 nodes collapsed)
method_declaration (+210 nodes collapsed)
method_declaration (+76 nodes collapsed)
method_declaration (+233 nodes collapsed)
method_declaration (+86 nodes collapsed)
method_declaration (+137 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+50 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+367 nodes collapsed)
method_declaration (+526 nodes collapsed)
method_declaration (+304 nodes collapsed)
method_declaration (+172 nodes collapsed)
method_declaration (+384 nodes collapsed)
method_declaration (+414 nodes collapsed)
method_declaration (+303 nodes collapsed)
method_declaration (+714 nodes collapsed)
method_declaration (+351 nodes collapsed)
method_declaration (+334 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+442 nodes collapsed)
method_declaration (+381 nodes collapsed)
method_declaration (+368 nodes collapsed)
block_comment "/**\n * Slower parsing method which is generally branched"...
method_declaration (+821 nodes collapsed)
block_comment "/**\n * Method called when we see non-white space charact"...
method_declaration (+244 nodes collapsed)
block_comment "/**\n * Parsing of optionally supported non-standard \"unq"...
method_declaration (+364 nodes collapsed)
method_declaration (+792 nodes collapsed)
method_declaration (+419 nodes collapsed)
method_declaration (+379 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+244 nodes collapsed)
method_declaration (+785 nodes collapsed)
method_declaration (+244 nodes collapsed)
method_declaration (+795 nodes collapsed)
method_declaration (+354 nodes collapsed)
method_declaration (+207 nodes collapsed)
line_comment "// @return Character value <b>minus 0x10000</c>; this so tha"...
line_comment "// can readily expand it to actual surrogates"
method_declaration (+378 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+61 nodes collapsed)
method_declaration (+400 nodes collapsed)
block_comment "/*\n /****************************************************"...
method_declaration (+81 nodes collapsed)
method_declaration (+138 nodes collapsed)
line_comment "// @return Character value <b>minus 0x10000</c>; this so tha"...
line_comment "// can readily expand it to actual surrogates"
method_declaration (+201 nodes collapsed)
block_comment "/*\n /****************************************************"...
} "}"