mirror of https://github.com/dspinellis/UMLGraph
Compare commits
6 Commits
master
...
umlgraph_N
| Author | SHA1 | Date |
|---|---|---|
|
|
0be56514c2 | |
|
|
ec287b1e8f | |
|
|
f79248364e | |
|
|
34a34d6d27 | |
|
|
68f112c4ac | |
|
|
a133341bd7 |
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.umlgraph.engine.tests</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
#Thu Dec 13 22:43:12 PST 2007
|
||||
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=0
|
||||
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=insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
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=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=80
|
||||
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=mixed
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=8
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#Thu Dec 13 22:43:12 PST 2007
|
||||
eclipse.preferences.version=1
|
||||
formatter_profile=org.eclipse.jdt.ui.default.sun_profile
|
||||
formatter_settings_version=11
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Tests Plug-in
|
||||
Bundle-SymbolicName: org.umlgraph.engine.tests
|
||||
Bundle-Version: 1.0.0
|
||||
Require-Bundle: org.junit,
|
||||
org.umlgraph.engine
|
||||
Export-Package: org.umlgraph.engine.tests
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package org.umlgraph.engine.tests;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
public class AllTests {
|
||||
public static Test suite() {
|
||||
TestSuite allTests = new TestSuite(AllTests.class.getName());
|
||||
allTests.addTest(SettingKeyTests.suite());
|
||||
allTests.addTest(SettingTests.suite());
|
||||
return allTests;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package org.umlgraph.engine.tests;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.umlgraph.settings.SettingKey;
|
||||
|
||||
public class SettingKeyTests extends TestCase {
|
||||
public SettingKeyTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void testRoot() {
|
||||
SettingKey key = new SettingKey("/");
|
||||
assertNull(key.getOptionName());
|
||||
assertNotNull(key.getNodePath());
|
||||
assertEquals(0, key.getNodePath().length);
|
||||
}
|
||||
|
||||
public void testRootOption() {
|
||||
SettingKey key = new SettingKey("@option1");
|
||||
assertEquals("option1", key.getOptionName());
|
||||
assertNotNull(key.getNodePath());
|
||||
assertEquals(0, key.getNodePath().length);
|
||||
}
|
||||
|
||||
public void testFirstLevel() {
|
||||
SettingKey key = new SettingKey("context1");
|
||||
assertNull(key.getOptionName());
|
||||
assertEquals(1, key.getNodePath().length);
|
||||
assertEquals("context1", key.getNodePath()[0]);
|
||||
}
|
||||
|
||||
public void testFirstLevelOption() {
|
||||
SettingKey key = new SettingKey("context1/@option1");
|
||||
assertEquals("option1", key.getOptionName());
|
||||
assertEquals(1, key.getNodePath().length);
|
||||
assertEquals("context1", key.getNodePath()[0]);
|
||||
}
|
||||
|
||||
public void testSecondLevel() {
|
||||
SettingKey key = new SettingKey("context1/context2");
|
||||
assertNull(key.getOptionName());
|
||||
assertEquals(2, key.getNodePath().length);
|
||||
assertEquals("context1", key.getNodePath()[0]);
|
||||
assertEquals("context2", key.getNodePath()[1]);
|
||||
}
|
||||
|
||||
public void testSecondLevelOption() {
|
||||
SettingKey key = new SettingKey("context1/context2/@option1");
|
||||
assertEquals("option1", key.getOptionName());
|
||||
assertEquals(2, key.getNodePath().length);
|
||||
assertEquals("context1", key.getNodePath()[0]);
|
||||
assertEquals("context2", key.getNodePath()[1]);
|
||||
}
|
||||
|
||||
public void testVariations() {
|
||||
assertEquals(new SettingKey(""),new SettingKey("/"));
|
||||
assertEquals(new SettingKey("context1"),new SettingKey("/context1"));
|
||||
assertEquals(new SettingKey("context1@option1"),new SettingKey("/context1/@option1"));
|
||||
assertEquals(new SettingKey("context1@option1"),new SettingKey("context1/@option1"));
|
||||
assertEquals(new SettingKey("context1@option1"),new SettingKey("/context1@option1"));
|
||||
assertEquals(new SettingKey("context1@option1"),new SettingKey("/context1/@option1"));
|
||||
assertFalse(new SettingKey("context1").equals(new SettingKey("context2")));
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite(SettingKeyTests.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,242 @@
|
|||
package org.umlgraph.engine.tests;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
import org.umlgraph.settings.Settings;
|
||||
|
||||
public class SettingTests extends TestCase {
|
||||
public static class TestBasicDefinitions implements SettingDefinitions {
|
||||
public static String option1;
|
||||
public static String option2;
|
||||
public static Boolean option3;
|
||||
}
|
||||
|
||||
public static class TestDefault implements SettingDefinitions {
|
||||
public static String option1 = "bar";
|
||||
public static Boolean option2 = true;
|
||||
public static Integer option3 = 52;
|
||||
}
|
||||
|
||||
public static class TestFallbackDefinitions implements SettingDefinitions {
|
||||
public static String option1;
|
||||
public static String option2;
|
||||
public static Boolean option3;
|
||||
public static Integer option4;
|
||||
}
|
||||
|
||||
public static class TestRemovalDefinitions implements SettingDefinitions {
|
||||
public static String option1 = "bar";
|
||||
public static String option2;
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
return new TestSuite(SettingTests.class);
|
||||
}
|
||||
|
||||
public SettingTests(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void testBasicFallback() {
|
||||
Settings root = new Settings(TestFallbackDefinitions.class);
|
||||
root.set("@option2", "foo");
|
||||
root.set("@option3", Boolean.TRUE);
|
||||
root.set("context1/@option3", Boolean.FALSE);
|
||||
root.set("context1/@option4", 42);
|
||||
root.set("context1/context2/@option1", "zoo");
|
||||
root.set("context1/context2/@option2", "bar");
|
||||
root.set("context1/context2/@option3", Boolean.TRUE);
|
||||
|
||||
assertNull(root.get("@option1"));
|
||||
assertNull(root.get("context1/@option1"));
|
||||
assertEquals("zoo", root.get("context1/context2/@option1"));
|
||||
|
||||
assertEquals("foo", root.get("@option2"));
|
||||
assertEquals("foo", root.get("context1/@option2"));
|
||||
assertEquals("bar", root.get("context1/context2@option2"));
|
||||
|
||||
assertEquals(Boolean.TRUE, root.get("@option3"));
|
||||
assertEquals(Boolean.FALSE, root.get("context1/@option3"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1/context2@option3"));
|
||||
|
||||
assertEquals(null, root.get("@option4"));
|
||||
assertEquals(42, root.get("context1/@option4"));
|
||||
assertEquals(42, root.get("context1/context2@option4"));
|
||||
}
|
||||
|
||||
public void testContextCreation() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
Settings context1 = root.node("context1");
|
||||
assertNotNull(context1);
|
||||
Settings context2 = root.node("context1/context2");
|
||||
assertNotNull(context2);
|
||||
Settings context3 = root.node("context1/context3");
|
||||
assertNotNull(context3);
|
||||
|
||||
assertTrue(root.nodeExists(""));
|
||||
assertTrue(root.nodeExists("/"));
|
||||
assertTrue(root.nodeExists("context1"));
|
||||
assertTrue(root.nodeExists("context1/context2"));
|
||||
assertFalse(root.nodeExists("context2"));
|
||||
assertTrue(root.nodeExists("context1/context3"));
|
||||
}
|
||||
|
||||
public void testContextCreationByOption() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
root.set("@option1", "foo");
|
||||
root.set("context1@option2", "bar");
|
||||
root.set("context1/context2@option3", true);
|
||||
|
||||
assertTrue(root.nodeExists(""));
|
||||
assertTrue(root.nodeExists("/"));
|
||||
assertTrue(root.nodeExists("context1"));
|
||||
assertTrue(root.nodeExists("context1/context2"));
|
||||
assertFalse(root.nodeExists("context2"));
|
||||
}
|
||||
|
||||
public void testDefault() {
|
||||
Settings root = new Settings(TestDefault.class);
|
||||
root.set("@option1", "foo");
|
||||
root.set("@option3", 42);
|
||||
|
||||
assertEquals("foo", root.get("@option1"));
|
||||
assertEquals(Boolean.TRUE, root.get("@option2"));
|
||||
assertEquals(42, root.get("@option3"));
|
||||
root.set("@option3", null);
|
||||
assertEquals(52, root.get("@option3"));
|
||||
}
|
||||
|
||||
public void testDefaultCancellation() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
root.set("@option2", "foo");
|
||||
root.set("context1/@option3", Boolean.FALSE);
|
||||
root.set("context1/context2/@option1", "zoo");
|
||||
root.set("context1/context2/@option2", "bar");
|
||||
root.set("context1/context2/@option3", Boolean.TRUE);
|
||||
|
||||
assertNull(root.get("@option1"));
|
||||
assertNull(root.get("context1/@option1"));
|
||||
assertEquals("zoo", root.get("context1/context2/@option1"));
|
||||
|
||||
assertEquals("foo", root.get("@option2"));
|
||||
assertEquals("foo", root.get("context1/@option2"));
|
||||
assertEquals("bar", root.get("context1/context2@option2"));
|
||||
|
||||
assertEquals(null, root.get("@option3"));
|
||||
assertEquals(Boolean.FALSE, root.get("context1/@option3"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1/context2@option3"));
|
||||
}
|
||||
|
||||
public void testDefaultFirstLevel() {
|
||||
Settings root = new Settings(TestDefault.class);
|
||||
root.set("context1@option1", "foo");
|
||||
root.set("context1@option3", 42);
|
||||
|
||||
assertEquals("foo", root.get("context1@option1"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1@option2"));
|
||||
assertEquals(42, root.get("context1@option3"));
|
||||
}
|
||||
|
||||
public void testDefaultSecondLevel() {
|
||||
Settings root = new Settings(TestDefault.class);
|
||||
root.set("context1/context2@option1", "foo");
|
||||
root.set("context1/context2@option3", 42);
|
||||
|
||||
assertEquals("foo", root.get("context1/context2@option1"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1/context2@option2"));
|
||||
assertEquals(42, root.get("context1/context2@option3"));
|
||||
}
|
||||
|
||||
public void testFallbackWithDefaults() {
|
||||
Settings root = new Settings(TestDefault.class);
|
||||
root.set("@option1", "zoo");
|
||||
|
||||
assertEquals("zoo", root.get("context1@option1"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1@option2"));
|
||||
assertNull(root.get("context1@option1", false));
|
||||
|
||||
root.set("@option1", null);
|
||||
assertEquals("bar", root.get("context1/context2@option1"));
|
||||
assertEquals(Boolean.TRUE, root.get("context1/context@option2"));
|
||||
}
|
||||
|
||||
public void testFirstLevel() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
root.set("context1@option2", "foo");
|
||||
root.set("context1@option3", Boolean.TRUE);
|
||||
|
||||
assertNull(root.get("context1@option1"));
|
||||
assertEquals("foo", root.get("context1@option2"));
|
||||
assertTrue(root.<Boolean> get("context1@option3"));
|
||||
}
|
||||
|
||||
public void testParenting() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
Settings context1 = root.node("context1");
|
||||
Settings context2 = root.node("context1/context2");
|
||||
Settings context3 = root.node("context1/context3");
|
||||
|
||||
assertNull(root.getParent());
|
||||
assertSame(root, context1.getParent());
|
||||
assertSame(context1, context2.getParent());
|
||||
assertSame(context1, context3.getParent());
|
||||
}
|
||||
|
||||
public void testRemoval() {
|
||||
Settings root = new Settings(TestRemovalDefinitions.class);
|
||||
root.set("@option1", "foo");
|
||||
root.set("@option2", "zoo");
|
||||
assertEquals("foo", root.get("@option1"));
|
||||
assertEquals("zoo", root.get("@option2"));
|
||||
|
||||
root.set("@option1", null);
|
||||
root.set("@option2", null);
|
||||
assertEquals("bar", root.get("@option1"));
|
||||
assertNull(root.get("@option2"));
|
||||
}
|
||||
|
||||
public void testRoot() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
root.set("@option2", "foo");
|
||||
root.set("@option3", Boolean.TRUE);
|
||||
|
||||
assertNull(root.get("@option1"));
|
||||
assertEquals("foo", root.get("@option2"));
|
||||
assertTrue(root.<Boolean> get("@option3"));
|
||||
}
|
||||
|
||||
public void testSecondLevel() {
|
||||
Settings root = new Settings(TestBasicDefinitions.class);
|
||||
root.set("context1/context2/@option2", "foo");
|
||||
root.set("context1/context2/@option3", Boolean.TRUE);
|
||||
|
||||
assertNull(root.get("context1/context2/@option1"));
|
||||
assertEquals("foo", root.get("context1/context2/@option2"));
|
||||
assertTrue(root.<Boolean> get("context1/context2/@option3"));
|
||||
}
|
||||
|
||||
public void testSetToDefault() {
|
||||
Settings root = new Settings(TestDefault.class);
|
||||
root.set("@option1", "foo");
|
||||
|
||||
root.set("context1/@option1", "zoo");
|
||||
root.set("context1/@option2", Boolean.TRUE);
|
||||
|
||||
assertEquals("zoo", root.get("context1/context2@option1"));
|
||||
root.setToDefault("context1/context2@option1");
|
||||
assertEquals("bar", root.get("context1/context2@option1"));
|
||||
|
||||
assertEquals(true, root.get("context1/context2@option2"));
|
||||
// clear default value
|
||||
TestDefault.option2 = null;
|
||||
try {
|
||||
root.setToDefault("context1/context2@option2");
|
||||
fail("should have failed");
|
||||
} catch (IllegalStateException ise) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.umlgraph.engine</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
#Thu Dec 13 19:54:43 PST 2007
|
||||
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=0
|
||||
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=insert
|
||||
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||
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=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=80
|
||||
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=4
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#Thu Dec 13 19:54:43 PST 2007
|
||||
eclipse.preferences.version=1
|
||||
formatter_profile=_umlgraph
|
||||
formatter_settings_version=11
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: UMLGraph
|
||||
Bundle-SymbolicName: org.umlgraph.engine
|
||||
Bundle-Version: 5.0.0.qualifier
|
||||
Bundle-Vendor: umlgraph.org
|
||||
Require-Bundle: org.umlgraph.settings;visibility:=reexport
|
||||
Export-Package: org.umlgraph.engine
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Constants for class diagram options.
|
||||
*/
|
||||
public class ClassDiagramOptions implements SettingDefinitions {
|
||||
/**
|
||||
* Produce fully-qualified class names.
|
||||
*/
|
||||
public static boolean classDiagramQualifiedNames;
|
||||
|
||||
/**
|
||||
* When using qualified class names, put the package name in the line after the class name, in order to reduce the width of class nodes.
|
||||
*/
|
||||
public static boolean classDiagramPostfixQualifiedNames;
|
||||
|
||||
/**
|
||||
* Try to automatically infer dependencies between classes by inspecting operation and attribute types. See the class diagram inference chapter for more details. Disabled by default.
|
||||
*/
|
||||
public static boolean classDiagramInferDependency;
|
||||
|
||||
/**
|
||||
* Try to automatically infer association relationships between classes by inspecting attribute types. See the class diagram inference chapter for further details. Disabled by default.
|
||||
*/
|
||||
public static boolean classDiagramInferUsage;
|
||||
|
||||
/**
|
||||
* The type of relationship inferred when -inferrel is activated. Defaults to "navassoc" (see the class modelling chapter for a list of relationship types).
|
||||
*/
|
||||
public static String classDiagramInferAssociationType;
|
||||
|
||||
/**
|
||||
* Specifies the lowest visibility level of elements used to infer dependencies among classes. Possible values are private, package, protected, public, in this order. The default value is private. Use higher levels to limit the number of inferred dependencies.
|
||||
*/
|
||||
public static String classDiagramInferDependencyVisibility;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Constants for class options.
|
||||
*/
|
||||
public class ClassOptions implements SettingDefinitions {
|
||||
/**
|
||||
* Specify the font name to use inside abstract class nodes (String).
|
||||
*/
|
||||
public static String classAbstractFontName;
|
||||
|
||||
/**
|
||||
* Specify the font name to use for the class names (String).
|
||||
*/
|
||||
public static String classNameFontName;
|
||||
|
||||
/**
|
||||
* Specify the font name use for the class name of abstract classes
|
||||
* (String).
|
||||
*/
|
||||
public static String classAbstractNameFontName;
|
||||
/**
|
||||
* Specify the font size to use for the class names (int).
|
||||
*/
|
||||
public static int classNameFontSize;
|
||||
|
||||
/**
|
||||
* Show class attributes (boolean).
|
||||
*/
|
||||
public static boolean classShowAttributes;
|
||||
/**
|
||||
* Show class operations (Java methods)
|
||||
*/
|
||||
public static boolean classShowOperations;
|
||||
|
||||
/**
|
||||
* Adorn class elements according to their visibility (private, public, protected, package) (boolean).
|
||||
*/
|
||||
public static boolean classShowVisibility;
|
||||
|
||||
/**
|
||||
* Add type information to attributes and operations (boolean)
|
||||
*/
|
||||
public static boolean classFeatureTypes;
|
||||
|
||||
/**
|
||||
* For enumerations, also show the values they can take. (boolean)
|
||||
*/
|
||||
public static boolean classShowEnumValues;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Generic constants for options applicable to all types of UML diagrams.
|
||||
*/
|
||||
public class DiagramOptions implements SettingDefinitions {
|
||||
|
||||
/**
|
||||
* Layout the graph in the horizontal direction (boolean).
|
||||
*/
|
||||
public static boolean diagramHorizontal;
|
||||
|
||||
/**
|
||||
* Specify the graph's background color.
|
||||
*/
|
||||
public static String diagramBackgroundColor;
|
||||
|
||||
/**
|
||||
* Specify entities to hide from the graph. Matching is done using a
|
||||
* non-anchored regular match. For instance, "-hide (Big|\.)Widget" would
|
||||
* hide "com.foo.widgets.Widget" and "com.foo.widgets.BigWidget". Can also
|
||||
* be used without arguments, in this case it will hide everything (useful
|
||||
* in the context of views to selectively unhide some portions of the graph,
|
||||
* see the view chapter for further details).
|
||||
*/
|
||||
// TODO String hide();
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Constants for edge options.
|
||||
*/
|
||||
public class EdgeOptions implements SettingDefinitions {
|
||||
/**
|
||||
* Specify the font name to use for edge labels (String).
|
||||
*/
|
||||
public static String edgeFontName;
|
||||
/**
|
||||
* Specify the font size to use for edge labels (int).
|
||||
*/
|
||||
public static int edgeFontSize;
|
||||
/**
|
||||
* Specify the font color to use for edge labels (String).
|
||||
*/
|
||||
public static String edgeFontColor;
|
||||
/**
|
||||
* Specify the color for drawing edges.
|
||||
*/
|
||||
public static String edgeColor;
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Node options.
|
||||
*/
|
||||
public class NodeOptions implements SettingDefinitions {
|
||||
/**
|
||||
* Specify the color to use to fill the shapes (String).
|
||||
*/
|
||||
public static String nodeFillColor;
|
||||
|
||||
/**
|
||||
* Specify the font name to use inside nodes (String).
|
||||
*/
|
||||
public static String nodeFontName;
|
||||
|
||||
/**
|
||||
* Specify the font size to use inside nodes (int).
|
||||
*/
|
||||
public static int nodeFontSize;
|
||||
|
||||
/**
|
||||
* Specify the font name to use for the tags (String).
|
||||
*/
|
||||
public static String nodeTagFontName;
|
||||
/**
|
||||
* Specify the font size to use for the tags (int).
|
||||
*/
|
||||
public static int nodeTagFontSize;
|
||||
|
||||
/**
|
||||
* Specify the font color to use inside nodes (String).
|
||||
*/
|
||||
public static String nodeFontColor;
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* (C) Copyright 2002-2008 Diomidis Spinellis
|
||||
* (C) Copyright 2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
package org.umlgraph.engine;
|
||||
|
||||
import org.umlgraph.settings.SettingDefinitions;
|
||||
|
||||
/**
|
||||
* Constants for package options.
|
||||
*/
|
||||
public class PackageOptions implements SettingDefinitions {
|
||||
|
||||
/**
|
||||
* Specify the font name to use for the package names (used only when the
|
||||
* package name is postfixed, see -postfixpackage).
|
||||
*/
|
||||
public static String packageNameFontName;
|
||||
|
||||
/**
|
||||
* Specify the font size to use for the package names (used only when it
|
||||
* package name is postfixed, see -postfixpackage).
|
||||
*/
|
||||
public static int packageNameFontSize;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.umlgraph.settings</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Settings
|
||||
Bundle-SymbolicName: org.umlgraph.settings
|
||||
Bundle-Version: 5.1.0.qualifier
|
||||
Bundle-Vendor: umlgraph.org
|
||||
Export-Package: org.umlgraph.settings
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* (C) Copyright 2007-2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
package org.umlgraph.settings;
|
||||
|
||||
/**
|
||||
* A tag interface for classes defining settings.
|
||||
* The contract for SettingDefinitions implementors is:
|
||||
* <ul>
|
||||
* <li>Classes implementing this interface must be public</li>
|
||||
* <li>Each option must be declared as a public static field of a non-primitive type</li>
|
||||
* <li>Default values can be defined using Java's field initialization,
|
||||
* or by value assignment</li>
|
||||
* <li>Names of fields
|
||||
* are expected to be unique across all different definition classes used
|
||||
* in the same Setting node hierarchy.</li>
|
||||
* </ul>
|
||||
*/
|
||||
public interface SettingDefinitions {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* (C) Copyright 2007-2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
package org.umlgraph.settings;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* A key for accessing a specific setting.
|
||||
*
|
||||
*/
|
||||
public class SettingKey {
|
||||
private static final String PATH_DELIMITER = "/";
|
||||
private static final String OPTION_DELIMITER = "@";
|
||||
private static final String[] EMPTY_CONTEXT_PATH = {};
|
||||
|
||||
private String[] nodePath;
|
||||
private String optionName;
|
||||
|
||||
public SettingKey(String[] nodePath, String optionName) {
|
||||
this.nodePath = nodePath;
|
||||
this.optionName = optionName;
|
||||
}
|
||||
|
||||
public SettingKey(String stringKey) {
|
||||
int atIndex = stringKey.indexOf(OPTION_DELIMITER);
|
||||
if (atIndex >= 0) {
|
||||
if (atIndex == stringKey.length() - 1)
|
||||
throw new IllegalArgumentException("argument: " + stringKey);
|
||||
optionName = stringKey.substring(atIndex + 1);
|
||||
if (atIndex == 0) {
|
||||
nodePath = EMPTY_CONTEXT_PATH;
|
||||
return;
|
||||
}
|
||||
}
|
||||
String nodePathStr = atIndex < 0 ? stringKey : stringKey.substring(0,
|
||||
atIndex);
|
||||
StringTokenizer pathSegmenter = new StringTokenizer(nodePathStr,
|
||||
PATH_DELIMITER);
|
||||
nodePath = new String[pathSegmenter.countTokens()];
|
||||
int i = 0;
|
||||
while (pathSegmenter.hasMoreTokens())
|
||||
nodePath[i++] = pathSegmenter.nextToken();
|
||||
}
|
||||
|
||||
public String[] getNodePath() {
|
||||
return nodePath;
|
||||
}
|
||||
|
||||
public boolean isRoot() {
|
||||
return nodePath.length == 0;
|
||||
}
|
||||
|
||||
public boolean hasOptionName() {
|
||||
return optionName != null;
|
||||
}
|
||||
|
||||
public String getOptionName() {
|
||||
return optionName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((optionName == null) ? 0 : optionName.hashCode());
|
||||
result = prime * result + Arrays.hashCode(nodePath);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
final SettingKey other = (SettingKey) obj;
|
||||
if (optionName == null) {
|
||||
if (other.optionName != null)
|
||||
return false;
|
||||
} else if (!optionName.equals(other.optionName))
|
||||
return false;
|
||||
if (!Arrays.equals(nodePath, other.nodePath))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer result = new StringBuffer(PATH_DELIMITER);
|
||||
for (int i = 0; i < nodePath.length; i++) {
|
||||
result.append(nodePath[i]);
|
||||
result.append(PATH_DELIMITER);
|
||||
}
|
||||
if (hasOptionName()) {
|
||||
result.append(OPTION_DELIMITER);
|
||||
result.append(optionName);
|
||||
}
|
||||
return result.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,376 @@
|
|||
/*
|
||||
* (C) Copyright 2007-2008 Abstratt Technologies
|
||||
*
|
||||
* Permission to use, copy, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted,
|
||||
* provided that the above copyright notice appear in all copies and that
|
||||
* both that copyright notice and this permission notice appear in
|
||||
* supporting documentation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
package org.umlgraph.settings;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A typed hierarchic preference mechanism that takes advantage of generics for
|
||||
* providing a simpler protocol.
|
||||
*
|
||||
* Features:
|
||||
* <ul>
|
||||
* <li>default values</li>
|
||||
* <li>contexts are hierarchic, option value lookup falls back to parent if
|
||||
* option is not found at the current level</li>
|
||||
* <li> the set of available options is defined at compile time and trying to
|
||||
* set an unknown option value causes an exception. </li>
|
||||
* <li> options are typed, so an attempt at setting them with the wrong value
|
||||
* type causes an exception </li>
|
||||
* </ul>
|
||||
* Non-features:
|
||||
* <ul>
|
||||
* <li> persistence </li>
|
||||
* </ul>
|
||||
*/
|
||||
public class Settings {
|
||||
|
||||
/*
|
||||
* The setting definitions for this setting node hierarchy (only set for the
|
||||
* root node). The definitions only define the available options and the
|
||||
* expected types.
|
||||
*/
|
||||
private Class<? extends SettingDefinitions>[] definitions;
|
||||
|
||||
/*
|
||||
* The child setting nodes.
|
||||
*/
|
||||
private Map<String, Settings> children = new HashMap<String, Settings>();
|
||||
|
||||
/*
|
||||
* The setting values defined for this setting node.
|
||||
*/
|
||||
private Map<String, Object> values = new HashMap<String, Object>();
|
||||
|
||||
private Settings parent;
|
||||
|
||||
/**
|
||||
* Constructs a root settings object.
|
||||
*
|
||||
* @param definitions
|
||||
* the setting definition classes
|
||||
*/
|
||||
public Settings(Class<? extends SettingDefinitions>... definitions) {
|
||||
if (definitions.length == 0)
|
||||
throw new IllegalArgumentException("no definitions provided");
|
||||
this.definitions = definitions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a child setting node.
|
||||
*
|
||||
* @param parent
|
||||
* the parent node, never <code>null</code>
|
||||
*/
|
||||
private Settings(Settings parent) {
|
||||
assert parent != null;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the setting node corresponding to the given path. If the node
|
||||
* does not exist, returns a new empty node.
|
||||
*
|
||||
* @param path
|
||||
* the setting node path
|
||||
* @return the setting node corresponding to the given path
|
||||
*/
|
||||
public Settings node(String[] path) {
|
||||
return createNode(path, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the setting node corresponding to the given path. If the node
|
||||
* does not exist, returns a new empty node.
|
||||
*
|
||||
* @param path
|
||||
* the setting node path
|
||||
* @return the setting node corresponding to the given path
|
||||
*/
|
||||
public Settings node(String path) {
|
||||
return node(new SettingKey(path).getNodePath());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a setting node under the given path, or returns the existing one.
|
||||
*/
|
||||
private Settings createNode(String[] path, int start) {
|
||||
if (path.length == start)
|
||||
return this;
|
||||
Settings found = children.get(path[start]);
|
||||
if (found == null)
|
||||
children.put(path[start], found = new Settings(this));
|
||||
if (start == path.length - 1)
|
||||
return found;
|
||||
return found.createNode(path, start + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given node exists.
|
||||
*/
|
||||
public boolean nodeExists(String[] path) {
|
||||
return existingNode(path) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given node exists.
|
||||
*/
|
||||
public boolean nodeExists(String path) {
|
||||
return nodeExists(new SettingKey(path).getNodePath());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an existing setting node corresponding to the given path.
|
||||
*
|
||||
* @param path
|
||||
* the setting path
|
||||
* @return the settings object, or <code>null</code>
|
||||
*/
|
||||
public Settings existingNode(String[] segments) {
|
||||
Settings current = this;
|
||||
for (String segment : segments) {
|
||||
current = current.children.get(segment);
|
||||
if (current == null)
|
||||
return null;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an existing node corresponding to the given path, or
|
||||
* <code>null</code> if none exists.
|
||||
*
|
||||
* @param path
|
||||
* the path of the node to look for
|
||||
* @return the node found, or <code>null</code>
|
||||
*/
|
||||
public Settings existingNode(String path) {
|
||||
return existingNode(new SettingKey(path).getNodePath());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the option corresponding to the given key. If
|
||||
* acceptDefault is <code>true</code> and a value for the option does not
|
||||
* exist, returns the default value. Otherwise, returns <code>null</code>.
|
||||
*
|
||||
* @param key
|
||||
* the option key
|
||||
* @param acceptDefault
|
||||
* whether a default value should be returned
|
||||
* @return the value for the given key, or <code>null</code>
|
||||
*/
|
||||
public <T> T get(SettingKey key, boolean acceptDefault) {
|
||||
if (!isDefined(key.getOptionName()))
|
||||
throw new IllegalArgumentException("unknown setting: "
|
||||
+ key.getOptionName());
|
||||
if (!acceptDefault) {
|
||||
Settings node = existingNode(key.getNodePath());
|
||||
return node == null ? null : (T) node.values.get(key
|
||||
.getOptionName());
|
||||
}
|
||||
Settings node = lastExistingNode(key.getNodePath(), 0);
|
||||
return node.searchValue(key.getOptionName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value for the option with the given name. Falls back to the
|
||||
* default value, if one is defined.
|
||||
*
|
||||
* @param optionName
|
||||
* the option to search a value for
|
||||
* @return the value for the given option, or <code>null</code>
|
||||
*/
|
||||
private <T> T searchValue(String optionName) {
|
||||
T ownValue = (T) values.get(optionName);
|
||||
if (ownValue != null)
|
||||
return ownValue;
|
||||
return (T) (parent == null ? getDefaultValue(optionName) : parent
|
||||
.searchValue(optionName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given option name is defined for this setting node
|
||||
* hierarchy.
|
||||
*
|
||||
* @param optionName
|
||||
* the option name
|
||||
* @return <code>true</code> if an option with the given name is defined,
|
||||
* <code>false</code> otherwise
|
||||
*/
|
||||
private boolean isDefined(String optionName) {
|
||||
return findOptionField(optionName) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default value for the given option, or <code>null</code> if
|
||||
* a default value is not defined.
|
||||
*
|
||||
* @param optionName
|
||||
* @return the default value, or <code>null</code>
|
||||
*/
|
||||
private <T> T getDefaultValue(String optionName) {
|
||||
Field field = findOptionField(optionName);
|
||||
if (field == null)
|
||||
throw new IllegalArgumentException(
|
||||
"unknown setting or undefined default: " + optionName);
|
||||
try {
|
||||
return (T) field.get(null);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new IllegalArgumentException("unknown setting: " + optionName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the field corresponding to the given option name.
|
||||
*
|
||||
* @param optionName
|
||||
* @return
|
||||
*/
|
||||
private Field findOptionField(String optionName) {
|
||||
if (parent != null)
|
||||
return parent.findOptionField(optionName);
|
||||
for (Class<? extends SettingDefinitions> definitionClass : definitions)
|
||||
try {
|
||||
Field field = definitionClass.getDeclaredField(optionName);
|
||||
if (!field.getType().isPrimitive()
|
||||
&& Modifier.isStatic(field.getModifiers()))
|
||||
return field;
|
||||
} catch (NoSuchFieldException e) {
|
||||
// keep looking...
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last existing node for the given node path.
|
||||
*
|
||||
* @param nodePath
|
||||
* node path
|
||||
* @param start
|
||||
* starting level
|
||||
* @return the last existing node
|
||||
*/
|
||||
private Settings lastExistingNode(String[] nodePath, int start) {
|
||||
if (start == nodePath.length)
|
||||
return this;
|
||||
Settings immediateChild = children.get(nodePath[start]);
|
||||
return immediateChild == null ? this : immediateChild.lastExistingNode(
|
||||
nodePath, start + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the option corresponding to the given path. If
|
||||
* acceptDefault is <code>true</code> and a value for the option does not
|
||||
* exist, returns the default value. Otherwise, returns <code>null</code>.
|
||||
* This is just a convenience method for {@link #get(SettingKey, boolean)}.
|
||||
*
|
||||
* @param path
|
||||
* the option path
|
||||
* @param acceptDefault
|
||||
* whether a default value should be returned
|
||||
* @return the value for the given path, or <code>null</code>
|
||||
*/
|
||||
|
||||
public <T> T get(String path, boolean acceptDefault) {
|
||||
return get(new SettingKey(path), acceptDefault);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the option corresponding to the given path (falls
|
||||
* back to a default value, if one is defined). This is just a convenience
|
||||
* method for {@link #get(SettingKey, boolean)}.
|
||||
*
|
||||
* @param path
|
||||
* the option path
|
||||
* @return the value for the given path, or <code>null</code>
|
||||
*/
|
||||
public <T> T get(String path) {
|
||||
return get(new SettingKey(path), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value for the given option (or clears it).
|
||||
*
|
||||
* @param key
|
||||
* the option key
|
||||
* @param value
|
||||
* the new value, or <code>null</code>
|
||||
*/
|
||||
public <T> void set(SettingKey key, T value) {
|
||||
if (!isDefined(key.getOptionName()))
|
||||
throw new IllegalArgumentException("unknown setting: " + key);
|
||||
if (value == null) {
|
||||
Settings node = existingNode(key.getNodePath());
|
||||
if (node != null)
|
||||
node.values.remove(key.getOptionName());
|
||||
} else {
|
||||
Field field = findOptionField(key.getOptionName());
|
||||
if (!field.getType().isAssignableFrom(value.getClass()))
|
||||
throw new ClassCastException(value.getClass().getName());
|
||||
Settings node = createNode(key.getNodePath(), 0);
|
||||
node.values.put(key.getOptionName(), value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the given option (or clears it).
|
||||
*
|
||||
* @param path
|
||||
* the option path
|
||||
* @param value
|
||||
* the new value, or <code>null</code>
|
||||
*/
|
||||
public <T> void set(String path, T value) {
|
||||
set(new SettingKey(path), value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the given option to the default value.
|
||||
*
|
||||
* @param path
|
||||
* the option path
|
||||
*/
|
||||
public <T> void setToDefault(String path) {
|
||||
setToDefault(new SettingKey(path));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the given option to the default value.
|
||||
*
|
||||
* @param settingKey
|
||||
* the key to set to default
|
||||
*/
|
||||
public <T> void setToDefault(SettingKey key) {
|
||||
Object defaultValue = getDefaultValue(key.getOptionName());
|
||||
if (defaultValue == null)
|
||||
throw new IllegalStateException("no default value for " + key);
|
||||
set(key, defaultValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the parent settings, or <code>null</code> if this is a root
|
||||
* setting.
|
||||
*
|
||||
* @return the parent settings, or <code>null</code>
|
||||
*/
|
||||
public Settings getParent() {
|
||||
return parent;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue