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–85 unchanged (85 lines)
86 else if (PatternOptionBuilder.FILE_VALUE == clazz)
87 {
88 return createFile(str);
89 }
90 else if (PatternOptionBuilder.EXISTING_FILE_VALUE == clazz)
91 {
92 return createFile(str);
93 }
94 else if (PatternOptionBuilder.FILES_VALUE == clazz)
95 {
96 return createFiles(str);
97 }
98 else if (PatternOptionBuilder.URL_VALUE == clazz)
…lines 99–227 unchanged (129 lines)
228 * Returns the opened FileInputStream represented by <code>str</code>.
229 *
230 * @param str the file location
231 * @return The file input stream represented by <code>str</code>.
232 * @throws ParseException if the file is not exist or not readable
233 */
234
235 /**
236 * Returns the File[] represented by <code>str</code>.
237 * <p>
238 * This method is not yet implemented and always throws an
239 * {@link UnsupportedOperationException}.
240 *
…lines 241–252 unchanged (12 lines)

After

…lines 1–85 unchanged (85 lines)
86 else if (PatternOptionBuilder.FILE_VALUE == clazz)
87 {
88 return createFile(str);
89 }
90 else if (PatternOptionBuilder.EXISTING_FILE_VALUE == clazz)
91 {
92 return openFile(str);
93 }
94 else if (PatternOptionBuilder.FILES_VALUE == clazz)
95 {
96 return createFiles(str);
97 }
98 else if (PatternOptionBuilder.URL_VALUE == clazz)
…lines 99–227 unchanged (129 lines)
228 * Returns the opened FileInputStream represented by <code>str</code>.
229 *
230 * @param str the file location
231 * @return The file input stream represented by <code>str</code>.
232 * @throws ParseException if the file is not exist or not readable
233 */
234 public static FileInputStream openFile(String str) throws ParseException
235 {
236 try
237 {
238 return new FileInputStream(str);
239 }
240 catch (FileNotFoundException e)
241 {
242 throw new ParseException("Unable to find file: " + str);
243 }
244 }
245
246 /**
247 * Returns the File[] represented by <code>str</code>.
248 * <p>
249 * This method is not yet implemented and always throws an
250 * {@link UnsupportedOperationException}.
…lines 251–263 unchanged (13 lines)

Before

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileNotFoundException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
block_comment "/**\n * This is a temporary implementation. TypeHandler will "...
class_declaration
modifiers
public "public"
class "class"
identifier "TypeHandler"
class_body
{ "{"
block_comment "/**\n * Returns the <code>Object</code> of type <code>obj"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns the <code>Object</code> of type <code>cla"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "Object"
identifier "createValue"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "String"
identifier "str"
, ","
formal_parameter
modifiers
final "final"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "clazz"
) ")"
throws
throws "throws"
type_identifier "ParseException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "STRING_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
identifier "str"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "OBJECT_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createObject"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "NUMBER_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createNumber"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "DATE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createDate"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "CLASS_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createClass"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "EXISTING_FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement (+57 nodes collapsed)
} "}"
block_comment "/**\n * Create an Object from the classname and empty co"...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Create a number from a String. If a . is present,"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Returns the class whose name is <code>classname</"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns the date represented by <code>str</code>."...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Returns the URL represented by <code>str</code>.\n"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Returns the File represented by <code>str</code>."...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the opened FileInputStream represented by"...
block_comment "/**\n * Returns the File[] represented by <code>str</code"...
method_declaration (+36 nodes collapsed)
} "}"

After

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileNotFoundException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
block_comment "/**\n * This is a temporary implementation. TypeHandler will "...
class_declaration
modifiers
public "public"
class "class"
identifier "TypeHandler"
class_body
{ "{"
block_comment "/**\n * Returns the <code>Object</code> of type <code>obj"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns the <code>Object</code> of type <code>cla"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "Object"
identifier "createValue"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "String"
identifier "str"
, ","
formal_parameter
modifiers
final "final"
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
identifier "clazz"
) ")"
throws
throws "throws"
type_identifier "ParseException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "STRING_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
identifier "str"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "OBJECT_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createObject"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "NUMBER_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createNumber"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "DATE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createDate"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "CLASS_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createClass"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "createFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "EXISTING_FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "openFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement (+57 nodes collapsed)
} "}"
block_comment "/**\n * Create an Object from the classname and empty co"...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Create a number from a String. If a . is present,"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Returns the class whose name is <code>classname</"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns the date represented by <code>str</code>."...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Returns the URL represented by <code>str</code>.\n"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Returns the File represented by <code>str</code>."...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the opened FileInputStream represented by"...
method_declaration
modifiers
public "public"
static "static"
type_identifier "FileInputStream"
identifier "openFile"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "str"
) ")"
throws
throws "throws"
type_identifier "ParseException"
block
{ "{"
try_statement
try "try"
block
{ "{"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "FileInputStream"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
catch_clause
catch "catch"
( "("
catch_formal_parameter
catch_type
type_identifier "FileNotFoundException"
identifier "e"
) ")"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "ParseException"
argument_list
( "("
binary_expression
string_literal
" "\""
string_fragment "Unable to find file: "
" "\""
+ "+"
identifier "str"
) ")"
; ";"
} "}"
} "}"
block_comment "/**\n * Returns the File[] represented by <code>str</code"...
method_declaration (+36 nodes collapsed)
} "}"