switch to WALA code format.
No semantic change. git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3440 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
6868b753eb
commit
296a1684a1
|
@ -0,0 +1,266 @@
|
|||
#Mon Apr 13 09:57:37 EDT 2009
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
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
|
File diff suppressed because one or more lines are too long
|
@ -45,43 +45,45 @@ import org.osgi.framework.BundleContext;
|
|||
*/
|
||||
public class Activator extends Plugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.ibm.wala.cast.java.jdt";
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.ibm.wala.cast.java.jdt";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,44 +48,49 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
|
|||
import com.ibm.wala.util.debug.Assertions;
|
||||
|
||||
/**
|
||||
* This is a hack to get around the fact that AST.resolveWellKnownTypes() doesn't know
|
||||
* about some implicitly declared exceptions, such as ArithmeticException (implicitly
|
||||
* thrown in a division operation) and NullPointerException (implicitly thrown in a field
|
||||
* This is a hack to get around the fact that AST.resolveWellKnownTypes() doesn't know about some implicitly declared exceptions,
|
||||
* such as ArithmeticException (implicitly thrown in a division operation) and NullPointerException (implicitly thrown in a field
|
||||
* access). We need to know the lineage of these types to determine possible catch targets.
|
||||
*
|
||||
* @author evan
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class FakeExceptionTypeBinding implements ITypeBinding {
|
||||
|
||||
static public final FakeExceptionTypeBinding arithmetic = new FakeExceptionTypeBinding("Ljava/lang/ArithmeticException;");
|
||||
|
||||
static public final FakeExceptionTypeBinding nullPointer = new FakeExceptionTypeBinding("Ljava/lang/NullPointerException;");
|
||||
|
||||
static public final FakeExceptionTypeBinding classCast = new FakeExceptionTypeBinding("Ljava/lang/ClassCastException;");
|
||||
|
||||
static public final FakeExceptionTypeBinding noClassDef = new FakeExceptionTypeBinding("Ljava/lang/NoClassDefFoundError;");
|
||||
static public final FakeExceptionTypeBinding initException = new FakeExceptionTypeBinding("Ljava/lang/ExceptionInInitializerError;");
|
||||
|
||||
static public final FakeExceptionTypeBinding initException = new FakeExceptionTypeBinding(
|
||||
"Ljava/lang/ExceptionInInitializerError;");
|
||||
|
||||
static public final FakeExceptionTypeBinding outOfMemory = new FakeExceptionTypeBinding("Ljava/lang/OutOfMemoryError;");
|
||||
|
||||
|
||||
private final String exceptionBinaryName;
|
||||
|
||||
private FakeExceptionTypeBinding(String exceptionBinaryName) {
|
||||
this.exceptionBinaryName = exceptionBinaryName;
|
||||
}
|
||||
|
||||
|
||||
public boolean isAssignmentCompatible(ITypeBinding variableType) {
|
||||
Assertions.UNREACHABLE("FakeExceptionTypeBinding ");
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if ( o instanceof FakeExceptionTypeBinding )
|
||||
if (o instanceof FakeExceptionTypeBinding)
|
||||
return this == o;
|
||||
if ( o instanceof ITypeBinding )
|
||||
return ((ITypeBinding)o).getBinaryName().equals(exceptionBinaryName);
|
||||
if (o instanceof ITypeBinding)
|
||||
return ((ITypeBinding) o).getBinaryName().equals(exceptionBinaryName);
|
||||
return false;
|
||||
}
|
||||
|
||||
// --- rest not needed
|
||||
|
||||
|
||||
public ITypeBinding createArrayType(int dimension) {
|
||||
Assertions.UNREACHABLE("FakeExceptionTypeBinding createArrayType");
|
||||
return null;
|
||||
|
@ -294,23 +299,17 @@ public class FakeExceptionTypeBinding implements ITypeBinding {
|
|||
public boolean isSubTypeCompatible(ITypeBinding type) {
|
||||
String name = type.getBinaryName();
|
||||
if (exceptionBinaryName.endsWith("Error;")) {
|
||||
if ( name.equals("Ljava/lang/Throwable;") ||
|
||||
name.equals("Ljava/lang/Error;") ||
|
||||
name.equals(exceptionBinaryName) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name.equals("Ljava/lang/Throwable;") || name.equals("Ljava/lang/Error;") || name.equals(exceptionBinaryName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} else {
|
||||
if ( name.equals("Ljava/lang/Throwable;") ||
|
||||
name.equals("Ljava/lang/Exception;") ||
|
||||
name.equals("Ljava/lang/RuntimeException;") ||
|
||||
name.equals(exceptionBinaryName) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (name.equals("Ljava/lang/Throwable;") || name.equals("Ljava/lang/Exception;")
|
||||
|| name.equals("Ljava/lang/RuntimeException;") || name.equals(exceptionBinaryName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,10 +62,10 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
public class JDT2CAstUtils {
|
||||
public static Collection<CAstQualifier> mapModifiersToQualifiers(int modifiers, boolean isInterface) {
|
||||
Set<CAstQualifier> quals = new LinkedHashSet<CAstQualifier>();
|
||||
|
||||
|
||||
if (isInterface)
|
||||
quals.add(CAstQualifier.INTERFACE);
|
||||
|
||||
|
||||
if ((modifiers & Modifier.ABSTRACT) != 0)
|
||||
quals.add(CAstQualifier.ABSTRACT);
|
||||
if ((modifiers & Modifier.FINAL) != 0)
|
||||
|
@ -89,10 +89,10 @@ public class JDT2CAstUtils {
|
|||
quals.add(CAstQualifier.TRANSIENT);
|
||||
if ((modifiers & Modifier.VOLATILE) != 0)
|
||||
quals.add(CAstQualifier.VOLATILE);
|
||||
|
||||
|
||||
return quals;
|
||||
}
|
||||
|
||||
|
||||
public static CAstOperator mapAssignOperator(Operator op) {
|
||||
if (op == Assignment.Operator.PLUS_ASSIGN)
|
||||
return CAstOperator.OP_ADD;
|
||||
|
@ -131,12 +131,12 @@ public class JDT2CAstUtils {
|
|||
if (operator == InfixExpression.Operator.XOR)
|
||||
return CAstOperator.OP_BIT_XOR;
|
||||
|
||||
// TODO: shouldn't get here (conditional and handled differently); however should separate bitwise & logical '&' / '|', maybe.
|
||||
// TODO: shouldn't get here (conditional and handled differently); however should separate bitwise & logical '&' / '|', maybe.
|
||||
if (operator == InfixExpression.Operator.CONDITIONAL_AND)
|
||||
return CAstOperator.OP_REL_AND;
|
||||
if (operator == InfixExpression.Operator.CONDITIONAL_OR)
|
||||
return CAstOperator.OP_REL_OR;
|
||||
|
||||
|
||||
if (operator == InfixExpression.Operator.DIVIDE)
|
||||
return CAstOperator.OP_DIV;
|
||||
if (operator == InfixExpression.Operator.EQUALS)
|
||||
|
@ -168,8 +168,8 @@ public class JDT2CAstUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if type is char, byte, short, int, or long.
|
||||
* Return false otherwise (including boolean!)
|
||||
* Returns true if type is char, byte, short, int, or long. Return false otherwise (including boolean!)
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
|
@ -179,44 +179,44 @@ public class JDT2CAstUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* If isLongOrLess(type), returns Integer(0).
|
||||
* If a float or double, returns Double(0.0)
|
||||
* Otherwise (including boolean), returns CAstSymbol.NULL_DEFAULT_VALUE.
|
||||
* If isLongOrLess(type), returns Integer(0). If a float or double, returns Double(0.0) Otherwise (including boolean), returns
|
||||
* CAstSymbol.NULL_DEFAULT_VALUE.
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
*/
|
||||
public static Object defaultValueForType(ITypeBinding type) {
|
||||
if ( isLongOrLess(type) )
|
||||
if (isLongOrLess(type))
|
||||
return new Integer(0);
|
||||
else if (type.getBinaryName().equals("D") || type.getBinaryName().equals("F"))
|
||||
return new Double(0.0);
|
||||
else
|
||||
return CAstSymbol.NULL_DEFAULT_VALUE;
|
||||
}
|
||||
|
||||
|
||||
public static ITypeBinding promoteTypes(ITypeBinding t1, ITypeBinding t2, AST ast) {
|
||||
// JLS 5.6.2
|
||||
ITypeBinding doble = ast.resolveWellKnownType("double");
|
||||
if (t1.equals(doble) || t2.equals(doble) )
|
||||
return doble;
|
||||
ITypeBinding flotando = ast.resolveWellKnownType("float");
|
||||
if (t1.equals(flotando) || t2.equals(flotando) )
|
||||
return flotando;
|
||||
ITypeBinding largo = ast.resolveWellKnownType("long");
|
||||
if (t1.equals(largo) || t2.equals(largo) )
|
||||
return largo;
|
||||
return ast.resolveWellKnownType("int");
|
||||
if (t1.equals(doble) || t2.equals(doble))
|
||||
return doble;
|
||||
ITypeBinding flotando = ast.resolveWellKnownType("float");
|
||||
if (t1.equals(flotando) || t2.equals(flotando))
|
||||
return flotando;
|
||||
ITypeBinding largo = ast.resolveWellKnownType("long");
|
||||
if (t1.equals(largo) || t2.equals(largo))
|
||||
return largo;
|
||||
return ast.resolveWellKnownType("int");
|
||||
}
|
||||
|
||||
public static ITypeBinding getDeclaringClassOfNode(ASTNode n) {
|
||||
ASTNode current = n;
|
||||
while ( current != null ) {
|
||||
if (current instanceof TypeDeclaration )
|
||||
return ((TypeDeclaration)current).resolveBinding();
|
||||
else if ( current instanceof AnonymousClassDeclaration )
|
||||
return ((AnonymousClassDeclaration)current).resolveBinding();
|
||||
else if ( current instanceof EnumDeclaration )
|
||||
return ((EnumDeclaration)current).resolveBinding();
|
||||
while (current != null) {
|
||||
if (current instanceof TypeDeclaration)
|
||||
return ((TypeDeclaration) current).resolveBinding();
|
||||
else if (current instanceof AnonymousClassDeclaration)
|
||||
return ((AnonymousClassDeclaration) current).resolveBinding();
|
||||
else if (current instanceof EnumDeclaration)
|
||||
return ((EnumDeclaration) current).resolveBinding();
|
||||
current = current.getParent();
|
||||
}
|
||||
Assertions.UNREACHABLE("Couldn't find declaring class of node");
|
||||
|
@ -230,21 +230,21 @@ public class JDT2CAstUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* If a type variable, return the bound (getTypeVariablesBase()).
|
||||
* If a parameterized type, return the generic type.
|
||||
* If a type variable, return the bound (getTypeVariablesBase()). If a parameterized type, return the generic type.
|
||||
*
|
||||
* @param returnType
|
||||
* @param ast
|
||||
* @return
|
||||
*/
|
||||
public static ITypeBinding getErasedType(ITypeBinding returnType, AST ast) {
|
||||
if ( returnType.isTypeVariable() || returnType.isCapture() )
|
||||
if (returnType.isTypeVariable() || returnType.isCapture())
|
||||
return getTypesVariablesBase(returnType, ast);
|
||||
return returnType.getTypeDeclaration(); // Things like "Collection<? extends Bla>" are parameterized types...
|
||||
}
|
||||
|
||||
|
||||
public static ITypeBinding getTypesVariablesBase(ITypeBinding returnType, AST ast) {
|
||||
Assertions._assert(returnType.isTypeVariable() || returnType.isCapture());
|
||||
if ( returnType.getTypeBounds().length > 0 )
|
||||
if (returnType.getTypeBounds().length > 0)
|
||||
return returnType.getTypeBounds()[0]; // TODO: why is there more than one bound?
|
||||
else
|
||||
return ast.resolveWellKnownType("java.lang.Object");
|
||||
|
@ -277,26 +277,27 @@ public class JDT2CAstUtils {
|
|||
return null;
|
||||
}
|
||||
|
||||
private static void getMethodInClassOrSuperclass(IMethodBinding met, ITypeBinding klass, boolean superclassonly, HashMap<ITypeBinding, IMethodBinding> overridden) {
|
||||
if ( !superclassonly ) {
|
||||
for ( IMethodBinding ourmet: klass.getDeclaredMethods() )
|
||||
if ( met.isSubsignature(ourmet) && (met.getModifiers() & Modifier.PRIVATE) == 0) {
|
||||
overridden.put(ourmet.getMethodDeclaration().getReturnType(),ourmet.getMethodDeclaration());
|
||||
break; // there can only be one per class so don't bother looking for more
|
||||
private static void getMethodInClassOrSuperclass(IMethodBinding met, ITypeBinding klass, boolean superclassonly,
|
||||
HashMap<ITypeBinding, IMethodBinding> overridden) {
|
||||
if (!superclassonly) {
|
||||
for (IMethodBinding ourmet : klass.getDeclaredMethods())
|
||||
if (met.isSubsignature(ourmet) && (met.getModifiers() & Modifier.PRIVATE) == 0) {
|
||||
overridden.put(ourmet.getMethodDeclaration().getReturnType(), ourmet.getMethodDeclaration());
|
||||
break; // there can only be one per class so don't bother looking for more
|
||||
}
|
||||
}
|
||||
|
||||
for ( ITypeBinding iface: klass.getInterfaces() )
|
||||
|
||||
for (ITypeBinding iface : klass.getInterfaces())
|
||||
getMethodInClassOrSuperclass(met, iface, false, overridden);
|
||||
|
||||
|
||||
ITypeBinding superclass = klass.getSuperclass();
|
||||
if ( superclass != null )
|
||||
if (superclass != null)
|
||||
getMethodInClassOrSuperclass(met, superclass, false, overridden);
|
||||
}
|
||||
|
||||
public static Collection<IMethodBinding> getOverriddenMethod(IMethodBinding met) {
|
||||
HashMap<ITypeBinding,IMethodBinding> overridden = new HashMap<ITypeBinding,IMethodBinding>();
|
||||
if ( met == null )
|
||||
HashMap<ITypeBinding, IMethodBinding> overridden = new HashMap<ITypeBinding, IMethodBinding>();
|
||||
if (met == null)
|
||||
return null;
|
||||
getMethodInClassOrSuperclass(met, met.getDeclaringClass(), true, overridden);
|
||||
if (overridden.size() == 0)
|
||||
|
@ -305,18 +306,18 @@ public class JDT2CAstUtils {
|
|||
}
|
||||
|
||||
public static boolean sameSignatureAndReturnType(IMethodBinding met1, IMethodBinding met2) {
|
||||
if ( !met1.getReturnType().isEqualTo(met2.getReturnType()) )
|
||||
if (!met1.getReturnType().isEqualTo(met2.getReturnType()))
|
||||
return false;
|
||||
|
||||
|
||||
ITypeBinding[] params1 = met1.getParameterTypes();
|
||||
ITypeBinding[] params2 = met2.getParameterTypes();
|
||||
if ( params1.length != params2.length )
|
||||
if (params1.length != params2.length)
|
||||
return false;
|
||||
|
||||
for ( int i = 0; i < params1.length; i++ )
|
||||
if ( ! params1[i].isEqualTo(params2[i]) )
|
||||
|
||||
for (int i = 0; i < params1.length; i++)
|
||||
if (!params1[i].isEqualTo(params2[i]))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,11 +50,11 @@ import com.ibm.wala.types.ClassLoaderReference;
|
|||
|
||||
public class JDTClassLoaderFactory extends ClassLoaderFactoryImpl {
|
||||
|
||||
// /**
|
||||
// * A map from ClassLoaderReference to IRTranslatorExtension, so that source files
|
||||
// * in different languages are processed by the right kind of IRTranslatorExtension.
|
||||
// */
|
||||
// that's nice, but there's only one kind of IRTransatorExtension.
|
||||
// /**
|
||||
// * A map from ClassLoaderReference to IRTranslatorExtension, so that source files
|
||||
// * in different languages are processed by the right kind of IRTranslatorExtension.
|
||||
// */
|
||||
// that's nice, but there's only one kind of IRTransatorExtension.
|
||||
|
||||
public JDTClassLoaderFactory(SetOfClasses exclusions) {
|
||||
super(exclusions);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
* UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*/
|
||||
package com.ibm.wala.cast.java.translator.jdt;
|
||||
package com.ibm.wala.cast.java.translator.jdt;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -56,21 +56,24 @@ import com.ibm.wala.util.debug.Assertions;
|
|||
import com.ibm.wala.util.strings.Atom;
|
||||
|
||||
/**
|
||||
* Class responsible for mapping JDT type system objects representing types, methods and fields to the corresponding
|
||||
* WALA TypeReferences, MethodReferences and FieldReferences. Used during translation and by clients to help correlate
|
||||
* WALA analysis results to the various AST nodes.
|
||||
* Class responsible for mapping JDT type system objects representing types, methods and fields to the corresponding WALA
|
||||
* TypeReferences, MethodReferences and FieldReferences. Used during translation and by clients to help correlate WALA analysis
|
||||
* results to the various AST nodes.
|
||||
*
|
||||
* In English: keeps a hashtable of WALA "type references", "field references", etc. which describe types, fields, etc.
|
||||
* Creates these from their JDT equivalents and keeps the hashtable linking the two representations.
|
||||
* In English: keeps a hashtable of WALA "type references", "field references", etc. which describe types, fields, etc. Creates
|
||||
* these from their JDT equivalents and keeps the hashtable linking the two representations.
|
||||
*
|
||||
* @author rfuhrer
|
||||
*/
|
||||
public class JDTIdentityMapper {
|
||||
private final Map<String,TypeReference> fTypeMap = HashMapFactory.make();
|
||||
private final Map<String,FieldReference> fFieldMap= HashMapFactory.make();
|
||||
private final Map<String,MethodReference> fMethodMap= HashMapFactory.make();
|
||||
private final Map<String, TypeReference> fTypeMap = HashMapFactory.make();
|
||||
|
||||
private final Map<String, FieldReference> fFieldMap = HashMapFactory.make();
|
||||
|
||||
private final Map<String, MethodReference> fMethodMap = HashMapFactory.make();
|
||||
|
||||
private final ClassLoaderReference fClassLoaderRef; // TAGALONG
|
||||
|
||||
private final AST fAst;
|
||||
|
||||
public JDTIdentityMapper(ClassLoaderReference clr, AST ast) {
|
||||
|
@ -98,16 +101,15 @@ public class JDTIdentityMapper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Translates the given Polyglot type to a name suitable for use in a DOMO TypeReference (i.e. a bytecode-compliant
|
||||
* type name).
|
||||
* Translates the given Polyglot type to a name suitable for use in a DOMO TypeReference (i.e. a bytecode-compliant type name).
|
||||
*/
|
||||
public String typeToTypeID(ITypeBinding type) {
|
||||
if (type.isPrimitive())
|
||||
return type.getBinaryName();
|
||||
else if (type.isArray())
|
||||
// arrays' binary names in JDT are like "[Ljava.lang.String;"
|
||||
return type.getBinaryName().replace('.', '/').replace(";","");
|
||||
else if ( type.isLocal() || type.isAnonymous() )
|
||||
return type.getBinaryName().replace('.', '/').replace(";", "");
|
||||
else if (type.isLocal() || type.isAnonymous())
|
||||
return anonLocalTypeToTypeID(type);
|
||||
else if (type.isClass() || type.isEnum() || type.isInterface()) // in polyglot interfaces are classes too. not in JDT
|
||||
// class binary names in JDT are like "java.lang.String"
|
||||
|
@ -115,38 +117,36 @@ public class JDTIdentityMapper {
|
|||
else if (type.isTypeVariable()) {
|
||||
return typeToTypeID(JDT2CAstUtils.getTypesVariablesBase(type, fAst));
|
||||
}
|
||||
Assertions.UNREACHABLE("typeToTypeID() encountered the type " + type
|
||||
+ " that is neither primitive, array, nor class!");
|
||||
Assertions.UNREACHABLE("typeToTypeID() encountered the type " + type + " that is neither primitive, array, nor class!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public String anonLocalTypeToTypeID(ITypeBinding type) {
|
||||
String outerTypeID= typeToTypeID(type.getDeclaringClass());
|
||||
String outerTypeID = typeToTypeID(type.getDeclaringClass());
|
||||
|
||||
String metSelectorName;
|
||||
IMethodBinding metBinding = type.getDeclaringMethod();
|
||||
if ( metBinding == null ) // anonymous class declared in initializer or static initializer (rare case...)
|
||||
if (metBinding == null) // anonymous class declared in initializer or static initializer (rare case...)
|
||||
metSelectorName = "<init>";
|
||||
else
|
||||
metSelectorName = getMethodRef(metBinding).getSelector().toString();
|
||||
|
||||
String shortName= (type.isAnonymous()) ? JDT2CAstUtils.anonTypeName(type) : type.getName();
|
||||
|
||||
|
||||
String shortName = (type.isAnonymous()) ? JDT2CAstUtils.anonTypeName(type) : type.getName();
|
||||
|
||||
return outerTypeID + '/' + metSelectorName + '/' + shortName;
|
||||
}
|
||||
|
||||
|
||||
// FIELDS
|
||||
|
||||
|
||||
public FieldReference getFieldRef(IVariableBinding field) {
|
||||
if (!fFieldMap.containsKey(field.getKey())) {
|
||||
// create one
|
||||
ITypeBinding targetType= field.getDeclaringClass();
|
||||
TypeReference targetTypeRef= TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(targetType));
|
||||
ITypeBinding fieldType= field.getType();
|
||||
TypeReference fieldTypeRef= TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(fieldType));
|
||||
Atom fieldName= Atom.findOrCreateUnicodeAtom(field.getName());
|
||||
FieldReference ref= FieldReference.findOrCreate(targetTypeRef, fieldName, fieldTypeRef);
|
||||
ITypeBinding targetType = field.getDeclaringClass();
|
||||
TypeReference targetTypeRef = TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(targetType));
|
||||
ITypeBinding fieldType = field.getType();
|
||||
TypeReference fieldTypeRef = TypeReference.findOrCreate(fClassLoaderRef, typeToTypeID(fieldType));
|
||||
Atom fieldName = Atom.findOrCreateUnicodeAtom(field.getName());
|
||||
FieldReference ref = FieldReference.findOrCreate(targetTypeRef, fieldName, fieldTypeRef);
|
||||
|
||||
fFieldMap.put(field.getKey(), ref);
|
||||
return ref;
|
||||
|
@ -157,8 +157,8 @@ public class JDTIdentityMapper {
|
|||
public MethodReference fakeMethodRefNoArgs(String key, String typeID, String metName, String returnTypeID) {
|
||||
if (!fMethodMap.containsKey(key)) {
|
||||
// create one
|
||||
TypeName ownerType= TypeName.string2TypeName(typeID);
|
||||
TypeReference ownerTypeRef= TypeReference.findOrCreate(fClassLoaderRef, ownerType);
|
||||
TypeName ownerType = TypeName.string2TypeName(typeID);
|
||||
TypeReference ownerTypeRef = TypeReference.findOrCreate(fClassLoaderRef, ownerType);
|
||||
|
||||
// FAKE SELECTOR
|
||||
Atom name = Atom.findOrCreateUnicodeAtom(metName);
|
||||
|
@ -174,13 +174,13 @@ public class JDTIdentityMapper {
|
|||
}
|
||||
return fMethodMap.get(key);
|
||||
}
|
||||
|
||||
// METHODS
|
||||
|
||||
// METHODS
|
||||
public MethodReference getMethodRef(IMethodBinding met) {
|
||||
if (!fMethodMap.containsKey(met.getKey())) {
|
||||
// create one
|
||||
TypeName ownerType= TypeName.string2TypeName(typeToTypeID(met.getDeclaringClass()));
|
||||
TypeReference ownerTypeRef= TypeReference.findOrCreate(fClassLoaderRef, ownerType);
|
||||
TypeName ownerType = TypeName.string2TypeName(typeToTypeID(met.getDeclaringClass()));
|
||||
TypeReference ownerTypeRef = TypeReference.findOrCreate(fClassLoaderRef, ownerType);
|
||||
MethodReference ref = MethodReference.findOrCreate(ownerTypeRef, selectorForMethod(met));
|
||||
|
||||
fMethodMap.put(met.getKey(), ref);
|
||||
|
@ -188,7 +188,7 @@ public class JDTIdentityMapper {
|
|||
}
|
||||
return fMethodMap.get(met.getKey());
|
||||
}
|
||||
|
||||
|
||||
private Selector selectorForMethod(IMethodBinding met) {
|
||||
// TODO: have to handle default constructors?
|
||||
// TODO: generics...
|
||||
|
@ -198,21 +198,21 @@ public class JDTIdentityMapper {
|
|||
ITypeBinding[] formalTypes = met.getParameterTypes();
|
||||
|
||||
int length = formalTypes.length;
|
||||
|
||||
|
||||
// ENUMS: hidden name and ID in constructor
|
||||
if ( met.isConstructor() && met.getDeclaringClass().isEnum() )
|
||||
if (met.isConstructor() && met.getDeclaringClass().isEnum())
|
||||
length += 2;
|
||||
|
||||
|
||||
// Descriptor prefers null to an empty array
|
||||
if (length > 0) {
|
||||
argTypeNames = new TypeName[length];
|
||||
int i = 0;
|
||||
if ( met.isConstructor() && met.getDeclaringClass().isEnum() ) {
|
||||
if (met.isConstructor() && met.getDeclaringClass().isEnum()) {
|
||||
argTypeNames[0] = TypeName.string2TypeName(typeToTypeID(fAst.resolveWellKnownType("java.lang.String")));
|
||||
argTypeNames[1] = TypeName.string2TypeName(typeToTypeID(fAst.resolveWellKnownType("int")));
|
||||
i = 2;
|
||||
}
|
||||
for (ITypeBinding argType: formalTypes)
|
||||
for (ITypeBinding argType : formalTypes)
|
||||
argTypeNames[i++] = TypeName.string2TypeName(typeToTypeID(argType));
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -48,12 +48,12 @@ import com.ibm.wala.types.ClassLoaderReference;
|
|||
|
||||
public class JDTSourceLoaderImpl extends JavaSourceLoaderImpl {
|
||||
|
||||
public JDTSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, SetOfClasses exclusions,
|
||||
IClassHierarchy cha) throws IOException {
|
||||
super(loaderRef, parent, exclusions, cha);
|
||||
}
|
||||
public JDTSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, SetOfClasses exclusions, IClassHierarchy cha)
|
||||
throws IOException {
|
||||
super(loaderRef, parent, exclusions, cha);
|
||||
}
|
||||
|
||||
protected SourceModuleTranslator getTranslator() {
|
||||
return new JDTSourceModuleTranslator(cha.getScope(), this);
|
||||
}
|
||||
protected SourceModuleTranslator getTranslator() {
|
||||
return new JDTSourceModuleTranslator(cha.getScope(), this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,8 +65,9 @@ import com.ibm.wala.types.ClassLoaderReference;
|
|||
import com.ibm.wala.util.debug.Assertions;
|
||||
|
||||
/**
|
||||
* A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to
|
||||
* generate DOMO IR for the sources in the compile-time classpath.
|
||||
* A SourceModuleTranslator whose implementation of loadAllSources() uses the PolyglotFrontEnd pseudo-compiler to generate DOMO IR
|
||||
* for the sources in the compile-time classpath.
|
||||
*
|
||||
* @author rfuhrer
|
||||
*/
|
||||
// remove me comment: Jdt little-case = not OK, upper case = OK
|
||||
|
@ -105,31 +106,31 @@ public class JDTSourceModuleTranslator implements SourceModuleTranslator {
|
|||
cl = cl.getParent();
|
||||
}
|
||||
}
|
||||
|
||||
//Map options= javaProject.getOptions(true);
|
||||
//// turn all errors and warnings into ignore. The customizable set of compiler
|
||||
//// options only contains additional Eclipse options. The standard JDK compiler
|
||||
//// options can't be changed anyway.
|
||||
//for (Iterator iter= options.keySet().iterator(); iter.hasNext();) {
|
||||
// String key= (String)iter.next();
|
||||
// String value= (String)options.get(key);
|
||||
// if ("error".equals(value) || "warning".equals(value)) { //$NON-NLS-1$//$NON-NLS-2$
|
||||
// // System.out.println("Ignoring - " + key);
|
||||
// options.put(key, "ignore"); //$NON-NLS-1$
|
||||
// } else if ("enabled".equals(value)) {
|
||||
// // System.out.println(" - disabling " + key);
|
||||
// options.put(key, "disabled");
|
||||
// }
|
||||
//}
|
||||
//options.put(JavaCore.COMPILER_TASK_TAGS, "");
|
||||
//parser.setCompilerOptions(options);
|
||||
|
||||
// Map options= javaProject.getOptions(true);
|
||||
// // turn all errors and warnings into ignore. The customizable set of compiler
|
||||
// // options only contains additional Eclipse options. The standard JDK compiler
|
||||
// // options can't be changed anyway.
|
||||
// for (Iterator iter= options.keySet().iterator(); iter.hasNext();) {
|
||||
// String key= (String)iter.next();
|
||||
// String value= (String)options.get(key);
|
||||
// if ("error".equals(value) || "warning".equals(value)) { //$NON-NLS-1$//$NON-NLS-2$
|
||||
// // System.out.println("Ignoring - " + key);
|
||||
// options.put(key, "ignore"); //$NON-NLS-1$
|
||||
// } else if ("enabled".equals(value)) {
|
||||
// // System.out.println(" - disabling " + key);
|
||||
// options.put(key, "disabled");
|
||||
// }
|
||||
// }
|
||||
// options.put(JavaCore.COMPILER_TASK_TAGS, "");
|
||||
// parser.setCompilerOptions(options);
|
||||
|
||||
/*
|
||||
* Project -> AST code from org.eclipse.jdt.core.tests.performance
|
||||
* Project -> AST code from org.eclipse.jdt.core.tests.performance
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void loadAllSources(Set modules) {
|
||||
public void loadAllSources(Set modules) {
|
||||
// TODO: we might need one AST (-> "Object" class) for all files.
|
||||
// TODO: group by project and send 'em in
|
||||
JDTJava2CAstTranslator jdt2cast = new JDTJava2CAstTranslator(sourceLoader);
|
||||
|
@ -137,14 +138,13 @@ public void loadAllSources(Set modules) {
|
|||
|
||||
System.out.println(modules);
|
||||
|
||||
|
||||
// sort files into projects
|
||||
HashMap<IProject,ArrayList<ICompilationUnit>> projectsFiles = new HashMap<IProject,ArrayList<ICompilationUnit>>();
|
||||
for ( Object m: modules ) {
|
||||
// sort files into projects
|
||||
HashMap<IProject, ArrayList<ICompilationUnit>> projectsFiles = new HashMap<IProject, ArrayList<ICompilationUnit>>();
|
||||
for (Object m : modules) {
|
||||
Assertions._assert(m instanceof EclipseSourceFileModule, "Expecing EclipseSourceFileModule");
|
||||
EclipseSourceFileModule entry = (EclipseSourceFileModule) m;
|
||||
IProject proj = entry.getIFile().getProject();
|
||||
if ( ! projectsFiles.containsKey(proj) )
|
||||
if (!projectsFiles.containsKey(proj))
|
||||
projectsFiles.put(proj, new ArrayList<ICompilationUnit>());
|
||||
projectsFiles.get(proj).add(JavaCore.createCompilationUnitFrom(entry.getIFile()));
|
||||
}
|
||||
|
@ -152,32 +152,31 @@ public void loadAllSources(Set modules) {
|
|||
final ASTParser parser = ASTParser.newParser(AST.JLS3);
|
||||
parser.setResolveBindings(true);
|
||||
|
||||
for ( IProject proj: projectsFiles.keySet() ) {
|
||||
for (IProject proj : projectsFiles.keySet()) {
|
||||
parser.setProject(JavaCore.create(proj));
|
||||
ArrayList<ICompilationUnit> files = projectsFiles.get(proj);
|
||||
parser.createASTs(files.toArray(new ICompilationUnit[files.size()]), new String[0], new ASTRequestor() {
|
||||
public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
|
||||
|
||||
|
||||
try {
|
||||
java2ir.translate(ast, source.getUnderlyingResource().getLocation().toOSString());
|
||||
} catch (JavaModelException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
IProblem[] problems = ast.getProblems();
|
||||
int length = problems.length;
|
||||
if (length > 0) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
for (int i=0; i<length; i++) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
buffer.append(problems[i].getMessage());
|
||||
buffer.append('\n');
|
||||
}
|
||||
if ( length != 0 )
|
||||
System.err.println("Unexpected problems in "+source.getElementName()+buffer.toString());
|
||||
if (length != 0)
|
||||
System.err.println("Unexpected problems in " + source.getElementName() + buffer.toString());
|
||||
}
|
||||
}
|
||||
},
|
||||
null);
|
||||
}, null);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
// TODO: better way of getting type "ObjecT" that doesn't require us to keep AST? although this is similar to
|
||||
// polyglot.
|
||||
protected final AST fAst; // TAGALONG
|
||||
protected final JDTIdentityMapper fIdentityMapper; // TAGALONG
|
||||
|
||||
protected final JDTIdentityMapper fIdentityMapper; // TAGALONG
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -70,7 +70,7 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
}
|
||||
|
||||
public CAstType getCAstTypeFor(Object astType) {
|
||||
|
||||
|
||||
ITypeBinding jdtType = JDT2CAstUtils.getErasedType((ITypeBinding) astType, fAst);
|
||||
|
||||
CAstType type = super.getCAstTypeFor(astType); // check cache first
|
||||
|
@ -139,16 +139,16 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
private Collection<CAstType> fSuperTypes = null;
|
||||
|
||||
public String toString() {
|
||||
return super.toString() + ":" +getName();
|
||||
return super.toString() + ":" + getName();
|
||||
}
|
||||
|
||||
|
||||
public JdtJavaType(ITypeBinding type) {
|
||||
super();
|
||||
fType = type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return fIdentityMapper.getTypeRef(fType).getName().toString();
|
||||
return fIdentityMapper.getTypeRef(fType).getName().toString();
|
||||
}
|
||||
|
||||
public Collection getSupertypes() {
|
||||
|
@ -161,19 +161,20 @@ public class JDTTypeDictionary extends CAstTypeDictionaryImpl {
|
|||
private void buildSuperTypes() {
|
||||
// TODO this is a source entity, but it might actually be the root type
|
||||
// (Object), so assume # intfs + 1
|
||||
ITypeBinding superType = (fType.getSuperclass() == null) ? fAst.resolveWellKnownType("java.lang.Object") : fType.getSuperclass();
|
||||
ITypeBinding superType = (fType.getSuperclass() == null) ? fAst.resolveWellKnownType("java.lang.Object") : fType
|
||||
.getSuperclass();
|
||||
int N = fType.getInterfaces().length + 1;
|
||||
|
||||
fSuperTypes = new ArrayList<CAstType>(N);
|
||||
// Following assumes that noone can call getSupertypes() before we have
|
||||
// created CAstType's for every type in the program being analyzed.
|
||||
fSuperTypes.add(getCAstTypeFor(superType));
|
||||
for (ITypeBinding t: fType.getInterfaces() )
|
||||
for (ITypeBinding t : fType.getInterfaces())
|
||||
fSuperTypes.add(getCAstTypeFor(t));
|
||||
}
|
||||
|
||||
public Collection<CAstQualifier> getQualifiers() {
|
||||
return JDT2CAstUtils.mapModifiersToQualifiers(fType.getModifiers(),fType.isInterface());
|
||||
return JDT2CAstUtils.mapModifiersToQualifiers(fType.getModifiers(), fType.isInterface());
|
||||
}
|
||||
|
||||
public boolean isInterface() {
|
||||
|
|
Loading…
Reference in New Issue