changes to Web source mapping to exploit rhino 1.7R3 source offsets
This commit is contained in:
parent
e0ef5d4844
commit
dfe06b8ff3
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="source"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/polyglot.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/java_cup.jar"/>
|
||||
<classpathentry kind="lib" path="lib/polyglot.jar"/>
|
||||
<classpathentry kind="lib" path="lib/java_cup.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
|
|
|
@ -1,263 +1,258 @@
|
|||
#Mon Apr 13 15:38:50 EDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=132
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=132
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
#Mon Apr 16 10:59:09 EDT 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
|
||||
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=132
|
||||
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
|
||||
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||
org.eclipse.jdt.core.formatter.lineSplit=132
|
||||
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
|
|
|
@ -8,5 +8,7 @@ Require-Bundle: com.ibm.wala.cast.js;bundle-version="1.0.0",
|
|||
com.ibm.wala.cast.js.rhino.test;bundle-version="1.0.0",
|
||||
com.ibm.wala.cast.js.test;bundle-version="1.0.0",
|
||||
com.ibm.wala.cast.test;bundle-version="1.0.0",
|
||||
com.ibm.wala.cast;bundle-version="1.0.0",
|
||||
com.ibm.wala.core.tests;bundle-version="1.1.3",
|
||||
com.ibm.wala.core;bundle-version="1.1.3"
|
||||
com.ibm.wala.core;bundle-version="1.1.3",
|
||||
org.junit;bundle-version="4.8.1"
|
||||
|
|
|
@ -14,6 +14,8 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.io.LineNumberReader;
|
||||
import java.io.StringReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
@ -32,10 +34,21 @@ import org.xml.sax.SAXException;
|
|||
import com.ibm.wala.cast.js.html.IHtmlCallback;
|
||||
import com.ibm.wala.cast.js.html.IHtmlParser;
|
||||
import com.ibm.wala.cast.js.html.ITag;
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.cast.tree.impl.LineNumberPosition;
|
||||
import com.ibm.wala.util.collections.Pair;
|
||||
|
||||
public class NuValidatorHtmlParser implements IHtmlParser {
|
||||
|
||||
public void parse(final InputStream reader, final IHtmlCallback handler, String fileName) {
|
||||
public void parse(final URL url, final InputStream reader, final IHtmlCallback handler, final String fileName) {
|
||||
URL xx = null;
|
||||
try {
|
||||
xx = new URL("file://" + fileName);
|
||||
} catch (MalformedURLException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
final URL localFileName = xx;
|
||||
|
||||
HtmlParser parser = new HtmlParser();
|
||||
parser.setXmlPolicy(XmlViolationPolicy.ALLOW);
|
||||
parser.setContentHandler(new ContentHandler() {
|
||||
|
@ -57,38 +70,46 @@ public class NuValidatorHtmlParser implements IHtmlParser {
|
|||
}
|
||||
|
||||
public void startElement(String uri, final String localName, String qName, final Attributes atts) throws SAXException {
|
||||
final int line = locator.getLineNumber();
|
||||
final Position line = new LineNumberPosition(url, localFileName, locator.getLineNumber());
|
||||
tags.push(new ITag() {
|
||||
|
||||
public String getName() {
|
||||
return localName;
|
||||
}
|
||||
|
||||
public String getAttributeByName(String name) {
|
||||
return atts.getValue(name);
|
||||
public Pair<String,Position> getAttributeByName(String name) {
|
||||
if (atts.getValue(name) != null) {
|
||||
return Pair.make(atts.getValue(name), line);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, String> getAllAttributes() {
|
||||
return new AbstractMap<String,String>() {
|
||||
private Set<Map.Entry<String,String>> es = null;
|
||||
public Map<String, Pair<String,Position>> getAllAttributes() {
|
||||
return new AbstractMap<String,Pair<String,Position>>() {
|
||||
private Set<Map.Entry<String,Pair<String,Position>>> es = null;
|
||||
|
||||
@Override
|
||||
public Set<java.util.Map.Entry<String, String>> entrySet() {
|
||||
public Set<java.util.Map.Entry<String, Pair<String,Position>>> entrySet() {
|
||||
if (es == null) {
|
||||
es = new HashSet<Map.Entry<String,String>>();
|
||||
es = new HashSet<Map.Entry<String,Pair<String,Position>>>();
|
||||
for(int i = 0; i < atts.getLength(); i++) {
|
||||
final int index = i;
|
||||
es.add(new Map.Entry<String,String>() {
|
||||
es.add(new Map.Entry<String,Pair<String,Position>>() {
|
||||
|
||||
public String getKey() {
|
||||
return atts.getLocalName(index);
|
||||
return atts.getLocalName(index).toLowerCase();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return atts.getValue(index);
|
||||
public Pair<String,Position> getValue() {
|
||||
if (atts.getValue(index) != null) {
|
||||
return Pair.make(atts.getValue(index), line);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String setValue(String value) {
|
||||
public Pair<String,Position> setValue(Pair<String,Position> value) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
});
|
||||
|
@ -99,10 +120,15 @@ public class NuValidatorHtmlParser implements IHtmlParser {
|
|||
};
|
||||
}
|
||||
|
||||
public int getStartingLineNum() {
|
||||
public Position getElementPosition() {
|
||||
return line;
|
||||
}
|
||||
|
||||
public Position getContentPosition() {
|
||||
return line;
|
||||
}
|
||||
});
|
||||
|
||||
handler.handleStartTag(tags.peek());
|
||||
}
|
||||
|
||||
|
@ -111,11 +137,11 @@ public class NuValidatorHtmlParser implements IHtmlParser {
|
|||
}
|
||||
|
||||
public void characters(char[] ch, int start, int length) throws SAXException {
|
||||
handler.handleText(locator.getLineNumber() - countLines(ch, start, length), new String(ch, start, length));
|
||||
handler.handleText(new LineNumberPosition(url, localFileName, locator.getLineNumber() - countLines(ch, start, length)), new String(ch, start, length));
|
||||
}
|
||||
|
||||
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
|
||||
handler.handleText(locator.getLineNumber(), new String(ch, start, length));
|
||||
handler.handleText(new LineNumberPosition(url, localFileName, locator.getLineNumber()), new String(ch, start, length));
|
||||
}
|
||||
|
||||
public void startDocument() throws SAXException {
|
||||
|
|
|
@ -89,7 +89,6 @@ import com.ibm.wala.cast.ir.translator.TranslatorToCAst.DoLoopTranslator;
|
|||
import com.ibm.wala.cast.js.html.MappedSourceModule;
|
||||
import com.ibm.wala.cast.js.ipa.callgraph.JSSSAPropagationCallGraphBuilder;
|
||||
import com.ibm.wala.cast.js.loader.JavaScriptLoader;
|
||||
import com.ibm.wala.cast.js.translator.JavaScriptTranslatorToCAst;
|
||||
import com.ibm.wala.cast.js.types.JavaScriptTypes;
|
||||
import com.ibm.wala.cast.tree.CAst;
|
||||
import com.ibm.wala.cast.tree.CAstControlFlowMap;
|
||||
|
@ -102,7 +101,6 @@ import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
|||
import com.ibm.wala.cast.tree.CAstType;
|
||||
import com.ibm.wala.cast.tree.impl.CAstOperator;
|
||||
import com.ibm.wala.cast.tree.impl.CAstSymbolImpl;
|
||||
import com.ibm.wala.cast.tree.impl.LineNumberPosition;
|
||||
import com.ibm.wala.classLoader.SourceModule;
|
||||
import com.ibm.wala.util.collections.EmptyIterator;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
|
@ -503,19 +501,24 @@ public class RhinoToAstTranslator {
|
|||
|
||||
return new ScriptOrFnEntity(n, subs, ast, map, pos, name);
|
||||
}
|
||||
|
||||
|
||||
private Position makePosition(AstNode n) {
|
||||
URL url = sourceModule.getURL();
|
||||
int line = n.getLineno();
|
||||
Position pos = new RangePosition(url, line, n.getAbsolutePosition(), n.getAbsolutePosition()+n.getLength());
|
||||
|
||||
if (sourceModule instanceof MappedSourceModule) {
|
||||
return ((MappedSourceModule) sourceModule).getMapping().getAssociatedFileAndLine(line);
|
||||
} else {
|
||||
return new LineNumberPosition(url, url, line);
|
||||
Position np = ((MappedSourceModule) sourceModule).getMapping().getIncludedPosition(pos);
|
||||
if (np != null) {
|
||||
return np;
|
||||
}
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
private void pushSourcePosition(WalkContext context, CAstNode n, Position p) {
|
||||
if (context.pos().getPosition(n) == null) {
|
||||
if (context.pos().getPosition(n) == null && !(n.getKind()==CAstNode.FUNCTION_EXPR || n.getKind()==CAstNode.FUNCTION_STMT)) {
|
||||
context.pos().setPosition(n, p);
|
||||
for(int i = 0; i < n.getChildCount(); i++) {
|
||||
pushSourcePosition(context, n.getChild(i), p);
|
||||
|
|
|
@ -259,9 +259,9 @@ public abstract class TestSimplePageCallGraphShape extends TestJSCallGraphShape
|
|||
}
|
||||
|
||||
private static final Object[][] sourceAssertionsForList = new Object[][] {
|
||||
new Object[]{ "suffix:update_display", "list.html", 9, 18 },
|
||||
new Object[]{ "suffix:update_with_item", "list.html", 14, 16 },
|
||||
new Object[]{ "suffix:add_item", "list.html", 20, 25 },
|
||||
new Object[]{ "suffix:update_display", "list.html#2", 4, 13 },
|
||||
new Object[]{ "suffix:update_with_item", "list.html#2", 9, 11 },
|
||||
new Object[]{ "suffix:add_item", "list.html#2", 15, 20 },
|
||||
new Object[]{ "suffix:collection", "pages/collection.js", 2, 14 },
|
||||
new Object[]{ "suffix:collection_add", "pages/collection.js", 7, 13 },
|
||||
new Object[]{ "suffix:forall_elt", "pages/collection.js", 9, 12 },
|
||||
|
@ -272,6 +272,7 @@ public abstract class TestSimplePageCallGraphShape extends TestJSCallGraphShape
|
|||
URL url = getClass().getClassLoader().getResource("pages/list.html");
|
||||
JSCFABuilder builder = JSCallGraphBuilderUtil.makeHTMLCGBuilder(url);
|
||||
CallGraph CG = builder.makeCallGraph(builder.getOptions());
|
||||
JSCallGraphBuilderUtil.AVOID_DUMP = false;
|
||||
JSCallGraphBuilderUtil.dumpCG(builder.getPointerAnalysis(), CG);
|
||||
verifySourceAssertions(CG, sourceAssertionsForList);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -11,13 +11,16 @@
|
|||
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
import com.ibm.wala.util.collections.Pair;
|
||||
|
||||
|
@ -45,9 +48,15 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
if (tag.getName().equalsIgnoreCase("FORM")) {
|
||||
forms.pop();
|
||||
}
|
||||
for(String v : tag.getAllAttributes().values()) {
|
||||
for(Entry<String,Pair<String, Position>> e : tag.getAllAttributes().entrySet()) {
|
||||
String a = e.getKey();
|
||||
String v = e.getValue().fst;
|
||||
if (v != null && v.startsWith("javascript:")) {
|
||||
entrypointRegion.println(v.substring(11), makePos(tag.getStartingLineNum(), tag));
|
||||
try {
|
||||
entrypointRegion.println(" " + v.substring(11), e.getValue().snd, new URL(tag.getElementPosition().getURL().toString() + "#" + a));
|
||||
} catch (MalformedURLException ex) {
|
||||
entrypointRegion.println(v.substring(11), e.getValue().snd, entrypointUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,16 +71,20 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
}
|
||||
|
||||
private void printlnIndented(String line, ITag relatedTag){
|
||||
printlnIndented(line, relatedTag==null? null: relatedTag.getElementPosition());
|
||||
}
|
||||
|
||||
private void printlnIndented(String line, Position pos){
|
||||
StringBuilder indentedLine = new StringBuilder();
|
||||
for (int i = 0 ; i < stack.size() ; i++){
|
||||
indentedLine.append(" ");
|
||||
}
|
||||
indentedLine.append(line);
|
||||
|
||||
if (relatedTag == null){
|
||||
if (pos == null){
|
||||
domRegion.println(indentedLine.toString());
|
||||
} else {
|
||||
domRegion.println(indentedLine.toString(), makePos(relatedTag.getStartingLineNum(), relatedTag));
|
||||
domRegion.println(indentedLine.toString(), pos, entrypointUrl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,16 +93,17 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
}
|
||||
|
||||
protected void writeElement(ITag tag, String cons, String varName){
|
||||
Map<String, Pair<String, Position>> attrs = tag.getAllAttributes();
|
||||
|
||||
printlnIndented("function make_" + varName + "(parent) {", tag);
|
||||
stack.push(varName);
|
||||
|
||||
printlnIndented("this.temp = " + cons + ";", tag);
|
||||
printlnIndented("this.temp(\"" + tag.getName() + "\");", tag);
|
||||
for (Map.Entry<String, String> e : tag.getAllAttributes().entrySet()){
|
||||
for (Map.Entry<String, Pair<String, Position>> e : attrs.entrySet()){
|
||||
String attr = e.getKey();
|
||||
String value = e.getValue();
|
||||
writeAttribute(tag, attr, value, "this", varName);
|
||||
String value = e.getValue().fst;
|
||||
writeAttribute(tag, e.getValue().snd, attr, value, "this", varName);
|
||||
}
|
||||
|
||||
if (tag.getName().equalsIgnoreCase("FORM")) {
|
||||
|
@ -97,15 +111,8 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
printlnIndented(" document.forms[document.formCount++] = this;", tag);
|
||||
printlnIndented(" var currentForm = this;", tag);
|
||||
} if (tag.getName().equalsIgnoreCase("INPUT")) {
|
||||
String prop = tag.getAttributeByName("NAME");
|
||||
if (prop == null) {
|
||||
prop = tag.getAttributeByName("name");
|
||||
}
|
||||
|
||||
String type = tag.getAttributeByName("TYPE");
|
||||
if (type == null) {
|
||||
type = tag.getAttributeByName("type");
|
||||
}
|
||||
String prop = attrs.get("name").fst;
|
||||
String type = attrs.get("type").fst;
|
||||
|
||||
if (type != null && prop != null) {
|
||||
if (type.equalsIgnoreCase("RADIO")) {
|
||||
|
@ -126,15 +133,15 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
printlnIndented("parent.appendChild(this);", tag);
|
||||
}
|
||||
|
||||
protected void writeAttribute(ITag tag, String attr, String value, String varName, String varName2) {
|
||||
protected void writeAttribute(ITag tag, Position pos, String attr, String value, String varName, String varName2) {
|
||||
writePortletAttribute(tag, attr, value, varName);
|
||||
writeEventAttribute(tag, attr, value, varName, varName2);
|
||||
writeEventAttribute(tag, pos, attr, value, varName, varName2);
|
||||
}
|
||||
|
||||
protected void writeEventAttribute(ITag tag, String attr, String value, String varName, String varName2){
|
||||
protected void writeEventAttribute(ITag tag, Position pos, String attr, String value, String varName, String varName2){
|
||||
if(attr.substring(0,2).equals("on")) {
|
||||
printlnIndented(varName + "." + attr + " = function " + tag.getName().toLowerCase() + "_" + attr + "(event) {" + value + "};", tag);
|
||||
entrypointRegion.println(varName2 + "." + attr + "(null);", makePos(tag.getStartingLineNum(), tag));
|
||||
entrypointRegion.println(varName2 + "." + attr + "(null);", tag.getElementPosition(), entrypointUrl);
|
||||
} else if (value != null) {
|
||||
if (value.indexOf('\'') > 0) {
|
||||
value = value.replaceAll("\\'", "\\\\'");
|
||||
|
@ -162,11 +169,11 @@ public class DefaultSourceExtractor extends DomLessSourceExtractor{
|
|||
}
|
||||
|
||||
protected void endElement(String name) {
|
||||
printlnIndented("};", null);
|
||||
printlnIndented("};", (Position)null);
|
||||
if (stack.isEmpty()) {
|
||||
printlnIndented("new make_" + name + "(document);\n\n", null);
|
||||
printlnIndented("new make_" + name + "(document);\n\n", (Position)null);
|
||||
} else {
|
||||
printlnIndented("new make_" + name + "(this);\n", null);
|
||||
printlnIndented("new make_" + name + "(this);\n", (Position)null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ import java.util.Set;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import com.ibm.wala.cast.js.html.jericho.JerichoHtmlParser;
|
||||
import com.ibm.wala.cast.tree.impl.LineNumberPosition;
|
||||
import com.ibm.wala.util.functions.Function;
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.util.collections.Pair;
|
||||
|
||||
|
||||
public class DomLessSourceExtractor extends JSSourceExtractor {
|
||||
|
@ -44,7 +44,8 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
|
||||
private ITag currentScriptTag;
|
||||
|
||||
private int counter = 0;
|
||||
private int nodeCounter = 0;
|
||||
private int scriptNodeCounter = 0;
|
||||
|
||||
public HtmlCallback(URL entrypointUrl, IUrlResolver urlResolver) {
|
||||
this.entrypointUrl = entrypointUrl;
|
||||
|
@ -54,18 +55,13 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
this.entrypointRegion = new SourceRegion();
|
||||
}
|
||||
|
||||
protected Function<Integer,IncludedPosition> makePos(int lineNumber, ITag governingTag) {
|
||||
protected Position makePos(int lineNumber, ITag governingTag) {
|
||||
return makePos(entrypointUrl, lineNumber, governingTag);
|
||||
}
|
||||
|
||||
protected Function<Integer,IncludedPosition> makePos(final URL url, final int lineNumber, ITag governingTag) {
|
||||
final LineNumberPosition includePos = new LineNumberPosition(entrypointUrl, entrypointUrl, governingTag.getStartingLineNum());
|
||||
return new Function<Integer,IncludedPosition>() {
|
||||
public IncludedPosition apply(Integer object) {
|
||||
return new IncludedLineNumberPosition(url, url, lineNumber + object.intValue(), includePos);
|
||||
}
|
||||
};
|
||||
}
|
||||
protected Position makePos(final URL url, final int lineNumber, ITag governingTag) {
|
||||
return governingTag.getElementPosition();
|
||||
}
|
||||
|
||||
public void handleEndTag(ITag tag) {
|
||||
if (tag.getName().equalsIgnoreCase("script")) {
|
||||
|
@ -74,14 +70,22 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void handleText(final int lineNumber, String text) {
|
||||
public void handleText(Position p, String text) {
|
||||
if (currentScriptTag != null) {
|
||||
if (text.startsWith("<![CDATA[")) {
|
||||
assert text.endsWith("]]>");
|
||||
text = text.substring(9, text.length()-11);
|
||||
}
|
||||
scriptRegion.println(text, makePos(lineNumber, currentScriptTag));
|
||||
|
||||
URL url = entrypointUrl;
|
||||
try {
|
||||
url = new URL(entrypointUrl, "#" + scriptNodeCounter);
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
scriptRegion.println(text, currentScriptTag.getContentPosition(), url);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,6 +94,7 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
handleScript(tag);
|
||||
assert currentScriptTag == null;
|
||||
currentScriptTag = tag;
|
||||
scriptNodeCounter++;
|
||||
}
|
||||
handleDOM(tag);
|
||||
}
|
||||
|
@ -103,44 +108,47 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
protected void handleDOM(ITag tag) {
|
||||
// Get the name of the modeling function either from the id attribute or a
|
||||
// running counter
|
||||
String idAttribute = tag.getAttributeByName("id");
|
||||
Pair<String,Position> idAttribute = tag.getAttributeByName("id");
|
||||
String funcName;
|
||||
if (idAttribute != null && LEGAL_JS_IDENTIFIER_REGEXP.matcher(idAttribute).matches()) {
|
||||
funcName = idAttribute;
|
||||
if (idAttribute != null && LEGAL_JS_IDENTIFIER_REGEXP.matcher(idAttribute.fst).matches()) {
|
||||
funcName = idAttribute.fst;
|
||||
} else {
|
||||
funcName = "node" + (counter++);
|
||||
funcName = "node" + (nodeCounter++);
|
||||
}
|
||||
handleDOM(tag, funcName);
|
||||
}
|
||||
|
||||
protected void handleDOM(ITag tag, String funcName) {
|
||||
Map<String, String> attributeSet = tag.getAllAttributes();
|
||||
for (Entry<String, String> a : attributeSet.entrySet()) {
|
||||
Map<String, Pair<String,Position>> attributeSet = tag.getAllAttributes();
|
||||
for (Entry<String, Pair<String, Position>> a : attributeSet.entrySet()) {
|
||||
handleAttribute(a, funcName, tag);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleAttribute(Entry<String, String> a, String funcName, ITag tag) {
|
||||
int lineNum = tag.getStartingLineNum();
|
||||
private void handleAttribute(Entry<String, Pair<String,Position>> a, String funcName, ITag tag) {
|
||||
URL url = entrypointUrl;
|
||||
try {
|
||||
url = new URL(entrypointUrl, "#" + tag.getElementPosition().getFirstOffset());
|
||||
} catch (MalformedURLException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
Position pos = a.getValue().snd;
|
||||
String attName = a.getKey();
|
||||
String attValue = a.getValue();
|
||||
String attValue = a.getValue().fst;
|
||||
if (attName.toLowerCase().startsWith("on") || (attValue != null && attValue.toLowerCase().startsWith("javascript:"))) {
|
||||
String fName = tag.getName().toLowerCase() + "_" + attName + "_" + funcName;
|
||||
String signatureLine = "function " + fName + "(event) {";
|
||||
domRegion.println(signatureLine, makePos(lineNum, tag));// Defines the function
|
||||
int offset = 0;
|
||||
for (String eventContentLine : extructJS(attValue)){
|
||||
domRegion.println("\t" + eventContentLine, makePos(lineNum + (offset++), tag));
|
||||
}
|
||||
domRegion.println("}", makePos(lineNum, tag));// Defines the function
|
||||
|
||||
entrypointRegion.println("\t" + fName + "(null);", makePos(lineNum, tag));// Run it
|
||||
// Defines the function
|
||||
domRegion.println(signatureLine + "\n" + extructJS(attValue) + "\n}", pos, url);
|
||||
// Run it
|
||||
entrypointRegion.println("\t" + fName + "(null);", pos, url);
|
||||
}
|
||||
}
|
||||
|
||||
private String[] extructJS(String attValue) {
|
||||
private String extructJS(String attValue) {
|
||||
if (attValue == null){
|
||||
return new String[] {};
|
||||
return "";
|
||||
}
|
||||
String content;
|
||||
if (attValue.toLowerCase().equals("javascript:")) {
|
||||
|
@ -149,17 +157,17 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
content = attValue;
|
||||
}
|
||||
|
||||
return content.split("\\n");
|
||||
return content;
|
||||
}
|
||||
|
||||
protected void handleScript(ITag tag) {
|
||||
|
||||
String value = tag.getAttributeByName("src");
|
||||
Pair<String,Position> value = tag.getAttributeByName("src");
|
||||
|
||||
try {
|
||||
if (value != null) {
|
||||
// script is out-of-line
|
||||
getScriptFromUrl(value, tag);
|
||||
getScriptFromUrl(value.fst, tag);
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
|
@ -176,13 +184,15 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
|
||||
InputStream scriptInputStream = scriptSrc.openConnection().getInputStream();
|
||||
try{
|
||||
int lineNum = 1;
|
||||
String line;
|
||||
BufferedReader scriptReader = new BufferedReader(new UnicodeReader(scriptInputStream, "UTF8"));
|
||||
|
||||
StringBuffer x = new StringBuffer();
|
||||
while ((line = scriptReader.readLine()) != null) {
|
||||
scriptRegion.println(line, makePos(scriptSrc, lineNum++, scriptTag));
|
||||
x.append(line).append("\n");
|
||||
}
|
||||
|
||||
scriptRegion.println(x.toString(), scriptTag.getElementPosition(), scriptSrc);
|
||||
|
||||
} finally {
|
||||
scriptInputStream.close();
|
||||
}
|
||||
|
@ -219,7 +229,7 @@ public class DomLessSourceExtractor extends JSSourceExtractor {
|
|||
|
||||
InputStream inputStreamReader = WebUtil.getStream(entrypointUrl);
|
||||
IGeneratorCallback htmlCallback = createHtmlCallback(entrypointUrl, urlResolver);
|
||||
htmlParser.parse(inputStreamReader, htmlCallback, entrypointUrl.getFile());
|
||||
htmlParser.parse(entrypointUrl, inputStreamReader, htmlCallback, entrypointUrl.getFile());
|
||||
|
||||
SourceRegion finalRegion = new SourceRegion();
|
||||
htmlCallback.writeToFinalRegion(finalRegion);
|
||||
|
|
|
@ -1,43 +1,17 @@
|
|||
/******************************************************************************
|
||||
* Copyright (c) 2002 - 2011 IBM Corporation.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
|
||||
/**
|
||||
* Maps line numbers to lines of other files (fileName + line).
|
||||
*/
|
||||
public class FileMapping{
|
||||
protected Map<Integer, IncludedPosition> lineNumberToFileAndLine = HashMapFactory.make();
|
||||
|
||||
/**
|
||||
* @param line
|
||||
* @return Null if no mapping for the given line.
|
||||
*/
|
||||
public IncludedPosition getAssociatedFileAndLine(int line){
|
||||
return lineNumberToFileAndLine.get(line);
|
||||
}
|
||||
|
||||
public void dump(PrintStream ps){
|
||||
Set<Integer> lines = new TreeSet<Integer>(lineNumberToFileAndLine.keySet());
|
||||
for (Integer line : lines){
|
||||
Position fnAndln = lineNumberToFileAndLine.get(line);
|
||||
ps.println(line + ": " + fnAndln);
|
||||
}
|
||||
}
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.io.PrintStream;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
|
||||
public interface FileMapping {
|
||||
|
||||
/**
|
||||
* @param line
|
||||
* @return Null if no mapping for the given line.
|
||||
*/
|
||||
public abstract IncludedPosition getIncludedPosition(Position line);
|
||||
|
||||
public abstract void dump(PrintStream ps);
|
||||
|
||||
}
|
|
@ -10,6 +10,8 @@
|
|||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -22,7 +24,7 @@ public interface IHtmlCallback {
|
|||
|
||||
void handleStartTag(ITag tag);
|
||||
|
||||
void handleText(int lineNumber, String text);
|
||||
void handleText(Position pos, String text);
|
||||
|
||||
void handleEndTag(ITag tag);
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
* @author danielk
|
||||
|
@ -25,6 +26,6 @@ public interface IHtmlParser {
|
|||
* @param callback
|
||||
* @param fileName
|
||||
*/
|
||||
public void parse(InputStream reader, IHtmlCallback callback, String fileName);
|
||||
public void parse(URL url, InputStream reader, IHtmlCallback callback, String fileName);
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,9 @@ package com.ibm.wala.cast.js.html;
|
|||
*****************************************************************************/
|
||||
import java.util.Map;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.util.collections.Pair;
|
||||
|
||||
/**
|
||||
* @author danielk
|
||||
* Data structure representing an HTML tag, with its attributes and content. Used by the HTML parser when calling the callback.
|
||||
|
@ -28,13 +31,15 @@ public interface ITag {
|
|||
* @param name
|
||||
* @return null if there is no such attribute
|
||||
*/
|
||||
public String getAttributeByName(String name);
|
||||
public Pair<String, Position> getAttributeByName(String name);
|
||||
|
||||
public Map<String, String> getAllAttributes();
|
||||
public Map<String, Pair<String, Position>> getAllAttributes();
|
||||
|
||||
/**
|
||||
* Returns the starting line number of the tag.
|
||||
* @return null if no known
|
||||
*/
|
||||
public int getStartingLineNum();
|
||||
public Position getElementPosition();
|
||||
|
||||
public Position getContentPosition();
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Copyright (c) 2002 - 2011 IBM Corporation.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.cast.tree.impl.LineNumberPosition;
|
||||
|
||||
public class IncludedLineNumberPosition extends LineNumberPosition implements IncludedPosition {
|
||||
private final Position includePosition;
|
||||
|
||||
public IncludedLineNumberPosition(URL url, URL localFile, int lineNumber, Position includePosition) {
|
||||
super(url, localFile, lineNumber);
|
||||
this.includePosition = includePosition;
|
||||
}
|
||||
|
||||
public Position getIncludePosition() {
|
||||
return includePosition;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return super.toString() + "(from " + includePosition +")";
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Copyright (c) 2002 - 2011 IBM Corporation.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
public class MutableFileMapping extends FileMapping {
|
||||
|
||||
void map(int line, IncludedPosition originalPos){
|
||||
lineNumberToFileAndLine.put(line, originalPos);
|
||||
}
|
||||
|
||||
}
|
|
@ -10,46 +10,45 @@
|
|||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.StringReader;
|
||||
import java.util.StringTokenizer;
|
||||
import java.net.URL;
|
||||
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.util.functions.Function;
|
||||
|
||||
public class SourceRegion {
|
||||
|
||||
private final StringBuilder source = new StringBuilder();
|
||||
private final MutableFileMapping fileMapping = new MutableFileMapping();
|
||||
private FileMapping fileMapping;
|
||||
private int currentLine = 1;
|
||||
|
||||
public SourceRegion() {
|
||||
}
|
||||
|
||||
public void print(String text, Function<Integer,IncludedPosition> originalPos){
|
||||
public void print(String text, Position originalPos, URL url){
|
||||
int startOffset = source.length();
|
||||
source.append(text);
|
||||
int ln = 0;
|
||||
int endOffset = source.length();
|
||||
|
||||
int numberOfLineDrops = getNumberOfLineDrops(text);
|
||||
if (originalPos != null){
|
||||
for (int i = 0; i < numberOfLineDrops; i++){
|
||||
fileMapping.map(currentLine++, originalPos.apply(ln++));
|
||||
|
||||
if (originalPos != null) {
|
||||
RangeFileMapping map = new RangeFileMapping(startOffset, endOffset, currentLine, currentLine+numberOfLineDrops, originalPos, url);
|
||||
if (fileMapping == null) {
|
||||
fileMapping = map;
|
||||
} else {
|
||||
fileMapping = new CompositeFileMapping(map, fileMapping);
|
||||
}
|
||||
if (! text.endsWith("\n")){ // avoid mapping one line too much
|
||||
fileMapping.map(currentLine, originalPos.apply(ln)); // required for handling text with no CRs.
|
||||
}
|
||||
} else {
|
||||
currentLine += numberOfLineDrops;
|
||||
}
|
||||
|
||||
currentLine += numberOfLineDrops;
|
||||
}
|
||||
|
||||
public void println(String text, Function<Integer,IncludedPosition> originalPos){
|
||||
print(text + "\n", originalPos);
|
||||
public void println(String text, Position originalPos, URL url){
|
||||
print(text + "\n", originalPos, url);
|
||||
}
|
||||
|
||||
public void print(String text){
|
||||
print(text, null);
|
||||
print(text, null, null);
|
||||
}
|
||||
|
||||
public void println(String text){
|
||||
|
@ -62,42 +61,27 @@ public class SourceRegion {
|
|||
}
|
||||
|
||||
public void write(SourceRegion otherRegion){
|
||||
BufferedReader br = new BufferedReader(new StringReader(otherRegion.source.toString()));
|
||||
int lineNum = 0;
|
||||
String line;
|
||||
try {
|
||||
while ((line = br.readLine()) != null){
|
||||
lineNum++;
|
||||
|
||||
IncludedPosition fileAndLine = otherRegion.fileMapping.getAssociatedFileAndLine(lineNum);
|
||||
if (fileAndLine!= null){
|
||||
fileMapping.map(currentLine, fileAndLine);
|
||||
}
|
||||
|
||||
this.println(line);
|
||||
int rangeStart = source.length();
|
||||
String text = otherRegion.source.toString();
|
||||
source.append(text);
|
||||
int rangeEnd = source.length();
|
||||
|
||||
int numberOfLineDrops = getNumberOfLineDrops(text);
|
||||
|
||||
if (otherRegion.fileMapping != null) {
|
||||
FileMapping map = new NestedRangeMapping(rangeStart, rangeEnd, currentLine, currentLine+numberOfLineDrops, otherRegion.fileMapping);
|
||||
if (fileMapping == null) {
|
||||
fileMapping = map;
|
||||
} else {
|
||||
fileMapping = new CompositeFileMapping(map, fileMapping);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
assert false;
|
||||
}
|
||||
|
||||
currentLine += numberOfLineDrops;
|
||||
}
|
||||
|
||||
public void dump(PrintStream ps){
|
||||
StringTokenizer st = new StringTokenizer(source.toString(),"\n");
|
||||
int lineNum = 0;
|
||||
while (st.hasMoreElements()){
|
||||
String line = (String) st.nextElement();
|
||||
lineNum++;
|
||||
|
||||
Position fileAndLine = fileMapping.getAssociatedFileAndLine(lineNum);
|
||||
if (fileAndLine!= null){
|
||||
ps.print(fileAndLine + "\t:");
|
||||
} else {
|
||||
ps.print("N/A \t\t:");
|
||||
}
|
||||
|
||||
ps.println(line);
|
||||
}
|
||||
ps.println(source.toString());
|
||||
}
|
||||
|
||||
private static int getNumberOfLineDrops(String text) {
|
||||
|
|
|
@ -12,6 +12,7 @@ package com.ibm.wala.cast.js.html.jericho;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -20,7 +21,6 @@ import net.htmlparser.jericho.Element;
|
|||
import net.htmlparser.jericho.LoggerProvider;
|
||||
import net.htmlparser.jericho.Source;
|
||||
|
||||
|
||||
import com.ibm.wala.cast.js.html.IHtmlCallback;
|
||||
import com.ibm.wala.cast.js.html.IHtmlParser;
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class JerichoHtmlParser implements IHtmlParser{
|
|||
Config.LoggerProvider = LoggerProvider.STDERR;
|
||||
}
|
||||
|
||||
public void parse(InputStream reader, IHtmlCallback callback, String fileName) {
|
||||
public void parse(URL url, InputStream reader, IHtmlCallback callback, String fileName) {
|
||||
Parser parser = new Parser(callback, fileName);
|
||||
Source src;
|
||||
try {
|
||||
|
@ -64,7 +64,7 @@ public class JerichoHtmlParser implements IHtmlParser{
|
|||
private void parse(Element root) {
|
||||
JerichoTag tag = new JerichoTag(root, fileName);
|
||||
handler.handleStartTag(tag);
|
||||
handler.handleText(tag.getStartingLineNum(), tag.getBodyText().snd);
|
||||
handler.handleText(tag.getElementPosition(), tag.getBodyText().snd);
|
||||
List<Element> childElements = root.getChildElements();
|
||||
for (Iterator<Element> nodeIterator = childElements.iterator(); nodeIterator.hasNext();) {
|
||||
Element child = nodeIterator.next();
|
||||
|
|
|
@ -10,14 +10,20 @@
|
|||
*****************************************************************************/
|
||||
package com.ibm.wala.cast.js.html.jericho;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
import net.htmlparser.jericho.Attributes;
|
||||
import net.htmlparser.jericho.Attribute;
|
||||
import net.htmlparser.jericho.Element;
|
||||
import net.htmlparser.jericho.Segment;
|
||||
|
||||
|
||||
import com.ibm.wala.cast.js.html.ITag;
|
||||
import com.ibm.wala.cast.tree.CAstSourcePositionMap.Position;
|
||||
import com.ibm.wala.cast.tree.impl.AbstractSourcePosition;
|
||||
import com.ibm.wala.util.collections.HashMapFactory;
|
||||
import com.ibm.wala.util.collections.Pair;
|
||||
|
||||
|
@ -29,24 +35,86 @@ public class JerichoTag implements ITag {
|
|||
|
||||
private final Element innerElement;
|
||||
private final String sourceFile;
|
||||
private Map<String, String> attributesMap;
|
||||
|
||||
private Map<String, Pair<String, Position>> allAttributes = null;
|
||||
|
||||
public JerichoTag(Element root, String sourceFile) {
|
||||
this.innerElement = root;
|
||||
Attributes attributes = innerElement.getStartTag().getAttributes();
|
||||
attributesMap = HashMapFactory.make();
|
||||
if (attributes != null) {
|
||||
attributesMap = attributes.populateMap(attributesMap, true);
|
||||
}
|
||||
this.sourceFile = sourceFile;
|
||||
}
|
||||
|
||||
public Map<String, String> getAllAttributes() {
|
||||
return attributesMap;
|
||||
private Position getPosition(final Segment e) {
|
||||
return new AbstractSourcePosition() {
|
||||
|
||||
@Override
|
||||
public int getFirstLine() {
|
||||
return e.getSource().getRowColumnVector(e.getBegin()).getRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLastLine() {
|
||||
return e.getSource().getRowColumnVector(e.getEnd()).getRow();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFirstCol() {
|
||||
return e.getSource().getRowColumnVector(e.getBegin()).getColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLastCol() {
|
||||
return e.getSource().getRowColumnVector(e.getEnd()).getColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFirstOffset() {
|
||||
return e.getBegin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLastOffset() {
|
||||
return e.getEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getURL() {
|
||||
try {
|
||||
return new URL("file://" + sourceFile);
|
||||
} catch (MalformedURLException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return new FileInputStream(sourceFile);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private Map<String, Pair<String, Position>> makeAllAttributes() {
|
||||
Map<String, Pair<String, Position>> result = HashMapFactory.make();
|
||||
if (innerElement.getStartTag().getAttributes() != null) {
|
||||
for (Attribute a : innerElement.getStartTag().getAttributes()) {
|
||||
result.put(
|
||||
a.getName().toLowerCase(),
|
||||
Pair.make(a.getValue(), getPosition(a.getValueSegment())));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getAttributeByName(String name) {
|
||||
return attributesMap.get(name.toLowerCase());
|
||||
public Map<String, Pair<String, Position>> getAllAttributes() {
|
||||
if (allAttributes == null) {
|
||||
allAttributes = makeAllAttributes();
|
||||
}
|
||||
return allAttributes;
|
||||
}
|
||||
|
||||
public Pair<String, Position> getAttributeByName(String name) {
|
||||
if (allAttributes == null) {
|
||||
allAttributes = makeAllAttributes();
|
||||
}
|
||||
return allAttributes.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
public Pair<Integer, String> getBodyText() {
|
||||
|
@ -68,8 +136,12 @@ public class JerichoTag implements ITag {
|
|||
public String toString() {
|
||||
return innerElement.toString();
|
||||
}
|
||||
|
||||
public int getStartingLineNum() {
|
||||
return innerElement.getSource().getRow(innerElement.getStartTag().getBegin());
|
||||
}
|
||||
|
||||
public Position getElementPosition() {
|
||||
return getPosition(innerElement);
|
||||
}
|
||||
|
||||
public Position getContentPosition() {
|
||||
return getPosition(innerElement.getContent());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,14 +51,14 @@ public abstract class TestCallGraphShape extends WalaTestCase {
|
|||
if (file.equalsIgnoreCase(fileName)) {
|
||||
if (pos.getFirstLine() >= (Integer) assertionData[j][2]
|
||||
&&
|
||||
pos.getLastLine() <= (Integer) assertionData[j][3]) {
|
||||
(pos.getLastLine() != -1? pos.getLastLine(): pos.getFirstLine()) <= (Integer) assertionData[j][3]) {
|
||||
System.err.println("found " + inst + " of " + M + " at expected position " + pos);
|
||||
continue insts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Assert.assertTrue("unexpected location " + pos + " for " + inst + " of " + M, false);
|
||||
Assert.assertTrue("unexpected location " + pos + " for " + inst + " of " + M + "\n" + N.getIR(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,11 +54,19 @@ public abstract class AbstractSourcePosition implements Position {
|
|||
|
||||
public String toString() {
|
||||
URL x = getURL();
|
||||
String xf = x.getPath();
|
||||
String xf = x.toString();
|
||||
if (xf.indexOf('/') >= 0) {
|
||||
xf = xf.substring(xf.lastIndexOf('/')+1);
|
||||
}
|
||||
return xf + "["+getFirstLine()+":"+getFirstCol()+"] -> ["+getLastLine()+":"+getLastCol()+"]";
|
||||
String pos;
|
||||
if (getFirstCol() != -1) {
|
||||
pos = "["+getFirstLine()+":"+getFirstCol()+"] -> ["+getLastLine()+":"+getLastCol()+"]";
|
||||
} else if (getFirstOffset() != -1) {
|
||||
pos = "[" + getFirstOffset() + "->" + getLastOffset() + "] (line " + getFirstLine() +")";
|
||||
} else {
|
||||
pos = "(line " + getFirstLine() +")";
|
||||
}
|
||||
return xf + " " + pos;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -135,6 +135,13 @@ public abstract class CAstVisitor<C extends CAstVisitor.Context> {
|
|||
* @param context a visitor-specific context
|
||||
*/
|
||||
public final void visitEntities(final CAstEntity n, C context, CAstVisitor<C> visitor) {
|
||||
Position restore = currentPosition;
|
||||
if (n.getPosition() != null) {
|
||||
currentPosition = n.getPosition();
|
||||
} else {
|
||||
currentPosition = null;
|
||||
}
|
||||
|
||||
if (visitor.enterEntity(n, context, visitor))
|
||||
return;
|
||||
switch (n.getKind()) {
|
||||
|
@ -213,6 +220,8 @@ public abstract class CAstVisitor<C extends CAstVisitor.Context> {
|
|||
}
|
||||
}
|
||||
visitor.postProcessEntity(n, context, visitor);
|
||||
|
||||
currentPosition = restore;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue