diff options
author | Vincent Lorenzo | 2017-09-25 12:45:06 +0000 |
---|---|---|
committer | Vincent Lorenzo | 2017-09-28 09:03:04 +0000 |
commit | db25fb0b02cb55a5f4c65f473b8f5c24e5a213bd (patch) | |
tree | c3970917b07d9239a5e1ba18a78a8b2a988161fa /tests/junit | |
parent | e7fdb50ef6edc591f4a46e0954b7d2de255823cc (diff) | |
download | org.eclipse.papyrus-db25fb0b02cb55a5f4c65f473b8f5c24e5a213bd.tar.gz org.eclipse.papyrus-db25fb0b02cb55a5f4c65f473b8f5c24e5a213bd.tar.xz org.eclipse.papyrus-db25fb0b02cb55a5f4c65f473b8f5c24e5a213bd.zip |
Bug 522721: [Table][Matrix] New Matrix Framework must provide JUnit Tests
Change-Id: I47ed56d65a5ab9cb0e9244f62b0f6ba1097aaf46
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'tests/junit')
34 files changed, 1881 insertions, 0 deletions
diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.classpath b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.classpath new file mode 100755 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.project b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.project new file mode 100755 index 00000000000..8fcb8f89ae7 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.uml.nattable.matrix.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> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 00000000000..b3aa6d60f94 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 +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_annotation=0 +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_method_declaration=0 +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_resources_in_try=80 +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.alignment_for_union_type_in_multicatch=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_lambda_body=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=260 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +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.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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_try=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_lambda_arrow=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_try=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_semicolon_in_try_resources=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.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +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=260 +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=5 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100755 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,68 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=false +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=false +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup.use_type_arguments=false +cleanup_profile=_Papyrus +cleanup_settings_version=2 +eclipse.preferences.version=1 +formatter_profile=_Papyrus +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100755 index 00000000000..23fb95e120f --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,98 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=Enabled +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Warning +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/META-INF/MANIFEST.MF new file mode 100755 index 00000000000..c1d18c8db32 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: org.eclipse.papyrus.uml.nattable.matrix.tests +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.junit;bundle-version="[4.12.0,5.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="[2.1.0,3.0.0)", + org.eclipse.papyrus.infra.emf;bundle-version="[3.0.0,4.0.0)", + org.eclipse.uml2.uml;bundle-version="[5.3.0,6.0.0)", + org.eclipse.papyrus.uml.expressions;bundle-version="[1.0.0,2.0.0)", + org.eclipse.papyrus.infra.emf.expressions;bundle-version="[1.0.0,2.0.0)", + org.eclipse.gef;bundle-version="[3.11.0,4.0.0)" +Bundle-Activator: org.eclipse.papyrus.uml.nattable.matrix.tests.Activator diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/OSGI-INF/l10n/bundle.properties new file mode 100755 index 00000000000..96fb03b1eda --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.uml.nattable.matrix.tests +Bundle-Vendor = Eclipse Modeling Project +Bundle-Name = Papyrus UML NatTable Matrix Tests
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/about.html b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/about.html new file mode 100755 index 00000000000..bbf2bd6aac7 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/about.html @@ -0,0 +1,28 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> +<title>About</title> +</head> +<body lang="EN-US"> +<h2>About This Content</h2> + +<p>January 30, 2017</p> +<h3>License</h3> + +<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>. +For purposes of the EPL, "Program" will mean the Content.</p> + +<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p> + +</body> +</html>
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/build.properties b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/build.properties new file mode 100755 index 00000000000..0a42deef36d --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + OSGI-INF/,\ + about.html,\ + resources/ +src.includes = about.html diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/pom.xml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/pom.xml new file mode 100755 index 00000000000..8e187870ab8 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/pom.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.uml.nattable.main.test</artifactId> + <version>1.2.0-SNAPSHOT</version> + </parent> + <groupId>org.eclipse.papyrus.tests</groupId> + <artifactId>org.eclipse.papyrus.uml.nattable.matrix.tests</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> + <description>This plugin provides the specific code used to managed UML Table Matrix</description> +</project> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.di new file mode 100755 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.notation new file mode 100755 index 00000000000..ca3bf9f8f3d --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.notation @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattablecelleditor="http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablerepresentation="http://www.eclipse.org/papyrus/infra/nattable/representation" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattablewrapper="http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:umlexpressions="http://www.eclipse.org/papyrus/umlexpressions" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor http://www.eclipse.org/papyrus/nattable/model#//nattablecelleditor http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper http://www.eclipse.org/papyrus/nattable/model#//nattablewrapper"> +</xmi:XMI> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.uml new file mode 100755 index 00000000000..531c482d420 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/createMatrixDependencyTests/create_matrix.uml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_aPgZwEhrEeeIJpBAUcD0BQ" name="open_matrix"> + <packagedElement xmi:type="uml:Class" xmi:id="_d4pqsEhrEeeIJpBAUcD0BQ" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_eT8fkEhrEeeIJpBAUcD0BQ" name="Class2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_egefsEhrEeeIJpBAUcD0BQ" name="Class3"/> + <packagedElement xmi:type="uml:Class" xmi:id="_eq9RYEhrEeeIJpBAUcD0BQ" name="Class4"/> + <packagedElement xmi:type="uml:Class" xmi:id="_kO2-0EhrEeeIJpBAUcD0BQ" name="Class5"/> + <packagedElement xmi:type="uml:Class" xmi:id="_k1W-IEhrEeeIJpBAUcD0BQ" name="Class6"/> + <packagedElement xmi:type="uml:Class" xmi:id="_wGsvgEhrEeeIJpBAUcD0BQ" name="Class7"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_xyKLwEhrEeeIJpBAUcD0BQ" client="_d4pqsEhrEeeIJpBAUcD0BQ" supplier="_eT8fkEhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_yUigEEhrEeeIJpBAUcD0BQ" client="_egefsEhrEeeIJpBAUcD0BQ" supplier="_eq9RYEhrEeeIJpBAUcD0BQ _kO2-0EhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_2T8U4EhrEeeIJpBAUcD0BQ" client="_k1W-IEhrEeeIJpBAUcD0BQ" supplier="_wGsvgEhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_3I18kEhrEeeIJpBAUcD0BQ" client="_k1W-IEhrEeeIJpBAUcD0BQ" supplier="_wGsvgEhrEeeIJpBAUcD0BQ"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.di new file mode 100755 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.notation new file mode 100755 index 00000000000..1585d02fba2 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.notation @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattablecelleditor="http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablerepresentation="http://www.eclipse.org/papyrus/infra/nattable/representation" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattablewrapper="http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:umlexpressions="http://www.eclipse.org/papyrus/umlexpressions" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor http://www.eclipse.org/papyrus/nattable/model#//nattablecelleditor http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper http://www.eclipse.org/papyrus/nattable/model#//nattablewrapper"> + <nattable:Table xmi:id="_aQ5g4EhrEeeIJpBAUcD0BQ" name="MatrixOfRelationships" currentRowAxisProvider="_aQ5g40hrEeeIJpBAUcD0BQ" currentColumnAxisProvider="_aQ5g4khrEeeIJpBAUcD0BQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_aQ79IEhrEeeIJpBAUcD0BQ" source="http://www.eclipse.org/papyrus/infra/nattable/version"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_aQ79IUhrEeeIJpBAUcD0BQ" key="version" value="1.3.0"/> + </eAnnotations> + <styles xmi:type="nattablestyle:IntListValueStyle" xmi:id="_aQ5g4UhrEeeIJpBAUcD0BQ" name="hiddenCategoriesByDepth"> + <intListValue>1</intListValue> + </styles> + <context xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + <owner xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + <prototype xmi:type="nattablerepresentation:PapyrusTable" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_d4-QwCT-EeedRqoTe_1ZiA"/> + <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#/"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_aQ5g4khrEeeIJpBAUcD0BQ" description="This axis provider manages the columns, according to the wanted hierarchy" name="HierarchicalColumnsAxisManager" disconnectSlave="true"> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_8Yuh0EhrEeeIJpBAUcD0BQ"> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </sources> + </columnAxisProvidersHistory> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_aQ5g40hrEeeIJpBAUcD0BQ" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowAxisManager" disconnectSlave="true"> + <axis xmi:type="nattableaxis:EObjectTreeItemAxis" xmi:id="_72LOYEhrEeeIJpBAUcD0BQ"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </axis> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_72KAQEhrEeeIJpBAUcD0BQ"> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </sources> + </rowAxisProvidersHistory> + <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_6EToIEhrEeeIJpBAUcD0BQ" indexStyle="NUMERIC"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_6EToIUhrEeeIJpBAUcD0BQ"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_6EToIkhrEeeIJpBAUcD0BQ" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_6EToI0hrEeeIJpBAUcD0BQ" alias=""> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + <filterRule xmi:type="umlexpressions:IsTypeOfExpression" xmi:id="_6EUPMEhrEeeIJpBAUcD0BQ" name=""> + <umlEClass xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </filterRule> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_6EToJEhrEeeIJpBAUcD0BQ" localHeaderLabelConfiguration="_6EToIUhrEeeIJpBAUcD0BQ" localSpecificConfigurations="_6EToIkhrEeeIJpBAUcD0BQ"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localRowHeaderAxisConfiguration> + <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_7W-J4EhrEeeIJpBAUcD0BQ"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_7W-J4UhrEeeIJpBAUcD0BQ"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_7W-J4khrEeeIJpBAUcD0BQ" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_7W-J40hrEeeIJpBAUcD0BQ"> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + <filterRule xmi:type="umlexpressions:IsTypeOfExpression" xmi:id="_7XJwEEhrEeeIJpBAUcD0BQ" name=""> + <umlEClass xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </filterRule> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_7W-J5EhrEeeIJpBAUcD0BQ" localHeaderLabelConfiguration="_7W-J4UhrEeeIJpBAUcD0BQ" localSpecificConfigurations="_7W-J4khrEeeIJpBAUcD0BQ"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localColumnHeaderAxisConfiguration> + <ownedCellEditorConfigurations xmi:type="nattablecelleditor:GenericRelationshipMatrixCellEditorConfiguration" xmi:id="_aQ5g5EhrEeeIJpBAUcD0BQ" cellEditorId="GenericRelationshipMatrixEditorConfiguration"> + <editedElement xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/> + </ownedCellEditorConfigurations> + </nattable:Table> + <nattable:Table xmi:id="_qqt3oFymEeenisH0-0NwUA" name="MatrixOfRelationships" currentRowAxisProvider="_qqt3o1ymEeenisH0-0NwUA" currentColumnAxisProvider="_qqt3olymEeenisH0-0NwUA" tableKindId="org.eclipse.papyrus.uml.table.matrix"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qqvFwFymEeenisH0-0NwUA" source="http://www.eclipse.org/papyrus/infra/nattable/version"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qqvFwVymEeenisH0-0NwUA" key="version" value="1.3.0"/> + </eAnnotations> + <styles xmi:type="nattablestyle:IntListValueStyle" xmi:id="_qqt3oVymEeenisH0-0NwUA" name="hiddenCategoriesByDepth"> + <intListValue>1</intListValue> + </styles> + <context xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + <owner xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#/"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_qqt3olymEeenisH0-0NwUA" description="This axis provider manages the columns, according to the wanted hierarchy" name="HierarchicalColumnsAxisManager" disconnectSlave="true"> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_EO9G4FynEeenisH0-0NwUA"> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </sources> + </columnAxisProvidersHistory> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_qqt3o1ymEeenisH0-0NwUA" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowAxisManager" disconnectSlave="true"> + <axis xmi:type="nattableaxis:EObjectTreeItemAxis" xmi:id="_DYVn8FynEeenisH0-0NwUA"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </axis> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_DYVA4FynEeenisH0-0NwUA"> + <element xmi:type="uml:Model" href="open_matrix.uml#_aPgZwEhrEeeIJpBAUcD0BQ"/> + </sources> + </rowAxisProvidersHistory> + <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_HFDKQFynEeenisH0-0NwUA" indexStyle="NUMERIC"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_HFDKQVynEeenisH0-0NwUA"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_HFDKQlynEeenisH0-0NwUA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_HFDKQ1ynEeenisH0-0NwUA" alias=""> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + <filterRule xmi:type="umlexpressions:IsTypeOfExpression" xmi:id="_HFDxUFynEeenisH0-0NwUA" name=""> + <umlEClass xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </filterRule> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_HFDKRFynEeenisH0-0NwUA" localHeaderLabelConfiguration="_HFDKQVynEeenisH0-0NwUA" localSpecificConfigurations="_HFDKQlynEeenisH0-0NwUA"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localRowHeaderAxisConfiguration> + <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_IlzyYFynEeenisH0-0NwUA"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_IlzyYVynEeenisH0-0NwUA"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_IlzyYlynEeenisH0-0NwUA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_IlzyY1ynEeenisH0-0NwUA"> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + <filterRule xmi:type="umlexpressions:IsTypeOfExpression" xmi:id="_Il1AgFynEeenisH0-0NwUA" name=""> + <umlEClass xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </filterRule> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_IlzyZFynEeenisH0-0NwUA" localHeaderLabelConfiguration="_IlzyYVynEeenisH0-0NwUA" localSpecificConfigurations="_IlzyYlynEeenisH0-0NwUA"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localColumnHeaderAxisConfiguration> + <ownedCellEditorConfigurations xmi:type="nattablecelleditor:GenericRelationshipMatrixCellEditorConfiguration" xmi:id="_qqt3pFymEeenisH0-0NwUA" cellEditorId="GenericRelationshipMatrixEditorConfiguration"> + <editedElement xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/> + </ownedCellEditorConfigurations> + </nattable:Table> +</xmi:XMI> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.txt new file mode 100755 index 00000000000..64666c7fe8b --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.txt @@ -0,0 +1,8 @@ +false false false false false false false +false true false false false false false +false false false false false false false +false false false >2 ends >2 ends false false +false false false false false false false +false false false false false false false +false false false false false false >1 link +false false false false false false false
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.uml new file mode 100755 index 00000000000..531c482d420 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/openDependencyMatrixTests/open_matrix.uml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_aPgZwEhrEeeIJpBAUcD0BQ" name="open_matrix"> + <packagedElement xmi:type="uml:Class" xmi:id="_d4pqsEhrEeeIJpBAUcD0BQ" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_eT8fkEhrEeeIJpBAUcD0BQ" name="Class2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_egefsEhrEeeIJpBAUcD0BQ" name="Class3"/> + <packagedElement xmi:type="uml:Class" xmi:id="_eq9RYEhrEeeIJpBAUcD0BQ" name="Class4"/> + <packagedElement xmi:type="uml:Class" xmi:id="_kO2-0EhrEeeIJpBAUcD0BQ" name="Class5"/> + <packagedElement xmi:type="uml:Class" xmi:id="_k1W-IEhrEeeIJpBAUcD0BQ" name="Class6"/> + <packagedElement xmi:type="uml:Class" xmi:id="_wGsvgEhrEeeIJpBAUcD0BQ" name="Class7"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_xyKLwEhrEeeIJpBAUcD0BQ" client="_d4pqsEhrEeeIJpBAUcD0BQ" supplier="_eT8fkEhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_yUigEEhrEeeIJpBAUcD0BQ" client="_egefsEhrEeeIJpBAUcD0BQ" supplier="_eq9RYEhrEeeIJpBAUcD0BQ _kO2-0EhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_2T8U4EhrEeeIJpBAUcD0BQ" client="_k1W-IEhrEeeIJpBAUcD0BQ" supplier="_wGsvgEhrEeeIJpBAUcD0BQ"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_3I18kEhrEeeIJpBAUcD0BQ" client="_k1W-IEhrEeeIJpBAUcD0BQ" supplier="_wGsvgEhrEeeIJpBAUcD0BQ"/> +</uml:Model> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.di new file mode 100755 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.notation new file mode 100755 index 00000000000..eb7c71db38f --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.notation @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.2" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattablecelleditor="http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattablewrapper="http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmlns:umlexpressions="http://www.eclipse.org/papyrus/umlexpressions" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor http://www.eclipse.org/papyrus/nattable/model#//nattablecelleditor http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper http://www.eclipse.org/papyrus/nattable/model#//nattablewrapper" xmi:id="_38EaQJ-UEee0h-nVQzWobg" name="Relationship Generic Matrix" currentRowAxisProvider="_38EaQ5-UEee0h-nVQzWobg" currentColumnAxisProvider="_38EaQp-UEee0h-nVQzWobg" tableKindId="org.eclipse.papyrus.uml.table.matrix"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_38EaRZ-UEee0h-nVQzWobg" source="http://www.eclipse.org/papyrus/infra/nattable/version"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_38EaRp-UEee0h-nVQzWobg" key="version" value="1.3.0"/> + </eAnnotations> + <styles xmi:type="nattablestyle:IntListValueStyle" xmi:id="_38EaQZ-UEee0h-nVQzWobg" name="hiddenCategoriesByDepth"> + <intListValue>1</intListValue> + </styles> + <context xmi:type="uml:Model" href="updateTableContentsAfterRowsSourceChange.uml#_363gYJ-UEee0h-nVQzWobg"/> + <owner xmi:type="uml:Model" href="updateTableContentsAfterRowsSourceChange.uml#_363gYJ-UEee0h-nVQzWobg"/> + <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#/"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_38EaQp-UEee0h-nVQzWobg" description="This axis provider manages the columns, according to the wanted hierarchy" name="HierarchicalColumnsAxisManager" disconnectSlave="true"> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_D_48AJ-WEeevr48NX92ywA"> + <element xmi:type="uml:Class" href="updateTableContentsAfterRowsSourceChange.uml#_1nesAJ-VEeevr48NX92ywA"/> + </sources> + </columnAxisProvidersHistory> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_38EaQ5-UEee0h-nVQzWobg" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowAxisManager" disconnectSlave="true"> + <axis xmi:type="nattableaxis:EObjectTreeItemAxis" xmi:id="_bFLR0aHhEeeeFectslfIYQ"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="uml:Package" href="updateTableContentsAfterRowsSourceChange.uml#_dYmtMJ-VEeevr48NX92ywA"/> + </axis> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_bFL44aHhEeeeFectslfIYQ"> + <element xmi:type="uml:Package" href="updateTableContentsAfterRowsSourceChange.uml#_dYmtMJ-VEeevr48NX92ywA"/> + </sources> + </rowAxisProvidersHistory> + <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_JcjZAJ-WEeevr48NX92ywA" indexStyle="NUMERIC"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_JcjZAZ-WEeevr48NX92ywA"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_JcjZAp-WEeevr48NX92ywA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JcjZA5-WEeevr48NX92ywA" alias=""> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + <filterRule xmi:type="umlexpressions:IsTypeOfExpression" xmi:id="_JcjZBZ-WEeevr48NX92ywA" name="IsTypeOfClass"> + <umlEClass xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/> + </filterRule> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_JcjZBJ-WEeevr48NX92ywA" localHeaderLabelConfiguration="_JcjZAZ-WEeevr48NX92ywA" localSpecificConfigurations="_JcjZAp-WEeevr48NX92ywA"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localRowHeaderAxisConfiguration> + <ownedCellEditorConfigurations xmi:type="nattablecelleditor:GenericRelationshipMatrixCellEditorConfiguration" xmi:id="_38EaRJ-UEee0h-nVQzWobg" cellEditorId="GenericRelationshipMatrixEditorConfiguration"> + <editedElement xmi:type="elementtypesconfigurations:MetamodelTypeConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations#org.eclipse.papyrus.uml.Dependency"/> + </ownedCellEditorConfigurations> +</nattable:Table> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.uml new file mode 100755 index 00000000000..bdafc4bb6f6 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.uml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_363gYJ-UEee0h-nVQzWobg" name="updateTableContentsAfterRowsSourceChange"> + <packageImport xmi:id="_4FYHQJ-UEee0h-nVQzWobg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Package" xmi:id="_dYmtMJ-VEeevr48NX92ywA" name="Package1_RowsSource"> + <packagedElement xmi:type="uml:Class" xmi:id="_gFrXcJ-VEeevr48NX92ywA" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_gobfMJ-VEeevr48NX92ywA" name="Class2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_gusfQJ-VEeevr48NX92ywA" name="Class3"/> + <packagedElement xmi:type="uml:Class" xmi:id="_g5R-oJ-VEeevr48NX92ywA" name="Class4"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_GBqmgJ-WEeevr48NX92ywA" client="_gFrXcJ-VEeevr48NX92ywA" supplier="_-7X5QJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_GpBhcJ-WEeevr48NX92ywA" client="_gusfQJ-VEeevr48NX92ywA" supplier="__cCWUJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_G1YicJ-WEeevr48NX92ywA" client="_g5R-oJ-VEeevr48NX92ywA" supplier="__lAFEJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_fRrcwJ-XEeevr48NX92ywA" client="_gobfMJ-VEeevr48NX92ywA" supplier="__bI-cJ-VEeevr48NX92ywA"/> + </packagedElement> + <packagedElement xmi:type="uml:Package" xmi:id="_eCSjYJ-VEeevr48NX92ywA" name="Package2_RowsSource"> + <packagedElement xmi:type="uml:Class" xmi:id="_YJPP4J-WEeevr48NX92ywA" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_YJPP4Z-WEeevr48NX92ywA" name="Class2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_YJPP4p-WEeevr48NX92ywA" name="Class3"/> + <packagedElement xmi:type="uml:Class" xmi:id="_YJPP45-WEeevr48NX92ywA" name="Class4"/> + <packagedElement xmi:type="uml:Class" xmi:id="_PWiOsJ-XEeevr48NX92ywA" name="Class5"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_YuG3gJ-WEeevr48NX92ywA" client="_YJPP45-WEeevr48NX92ywA" supplier="_-7X5QJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_Y3e18J-WEeevr48NX92ywA" client="_YJPP4p-WEeevr48NX92ywA" supplier="__bI-cJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_ZB6kUJ-WEeevr48NX92ywA" client="_YJPP4Z-WEeevr48NX92ywA" supplier="__cCWUJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_ZOwGcJ-WEeevr48NX92ywA" client="_YJPP4J-WEeevr48NX92ywA" supplier="__lAFEJ-VEeevr48NX92ywA"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_TGB_QJ-XEeevr48NX92ywA" client="_PWiOsJ-XEeevr48NX92ywA" supplier="_-7X5QJ-VEeevr48NX92ywA"/> + </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_1nesAJ-VEeevr48NX92ywA" name="Package3_ColumnsSource"> + <nestedClassifier xmi:type="uml:Signal" xmi:id="_-7X5QJ-VEeevr48NX92ywA" name="Signal1"/> + <nestedClassifier xmi:type="uml:Signal" xmi:id="__bI-cJ-VEeevr48NX92ywA" name="Signal2"/> + <nestedClassifier xmi:type="uml:Signal" xmi:id="__cCWUJ-VEeevr48NX92ywA" name="Signal3"/> + <nestedClassifier xmi:type="uml:Signal" xmi:id="__lAFEJ-VEeevr48NX92ywA" name="Signal4"/> + </packagedElement> +</uml:Model> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AndPackage2ASource.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AndPackage2ASource.txt new file mode 100755 index 00000000000..c9e045383eb --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AndPackage2ASource.txt @@ -0,0 +1,12 @@ +false false false false +false false false false +true false false false +false true false false +false false true false +false false false true +false false false false +false false false true +false false true false +false true false false +true false false false +true false false false
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AsSource.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AsSource.txt new file mode 100755 index 00000000000..70e7a11033b --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package1AsSource.txt @@ -0,0 +1,5 @@ +false false false false +true false false false +false true false false +false false true false +false false false true
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package2AsSource.txt b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package2AsSource.txt new file mode 100755 index 00000000000..6ec53772116 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange_Package2AsSource.txt @@ -0,0 +1,6 @@ +false false false false +false false false true +false false true false +false true false false +true false false false +true false false false
\ No newline at end of file diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.di b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.di new file mode 100755 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.notation b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.notation new file mode 100755 index 00000000000..bed046d829b --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.notation @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattablecelleditor="http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattablewrapper="http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablecelleditor http://www.eclipse.org/papyrus/nattable/model#//nattablecelleditor http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider http://www.eclipse.org/papyrus/nattable/model#//nattablelabelprovider http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle http://www.eclipse.org/papyrus/nattable/model#//nattablestyle http://www.eclipse.org/papyrus/nattable/model/table/nattablewrapper http://www.eclipse.org/papyrus/nattable/model#//nattablewrapper" xmi:id="_U7I0sFzFEeenisH0-0NwUA" description="This matrix is already preconfigured with required local rox header and local column header" name="MatrixOfRelationships" currentRowAxisProvider="_U7I0s1zFEeenisH0-0NwUA" currentColumnAxisProvider="_U7I0slzFEeenisH0-0NwUA" tableKindId="org.eclipse.papyrus.uml.table.matrix"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_U7I0tVzFEeenisH0-0NwUA" source="http://www.eclipse.org/papyrus/infra/nattable/version"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U7I0tlzFEeenisH0-0NwUA" key="version" value="1.3.0"/> + </eAnnotations> + <styles xmi:type="nattablestyle:IntListValueStyle" xmi:id="_U7I0sVzFEeenisH0-0NwUA" name="hiddenCategoriesByDepth"> + <intListValue>1</intListValue> + </styles> + <context xmi:type="uml:Model" href="updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml#_U7DVIFzFEeenisH0-0NwUA"/> + <owner xmi:type="uml:Model" href="updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml#_U7DVIFzFEeenisH0-0NwUA"/> + <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#/"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_U7I0slzFEeenisH0-0NwUA" description="This axis provider manages the columns, according to the wanted hierarchy" name="HierarchicalColumnsAxisManager" disconnectSlave="true"> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_hWI80FzFEeenisH0-0NwUA"> + <element xmi:type="uml:Model" href="updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml#_U7DVIFzFEeenisH0-0NwUA"/> + </sources> + </columnAxisProvidersHistory> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_U7I0s1zFEeenisH0-0NwUA" description="This axis provider manages the rows, according to the wanted hierarchy" name="HierarchicalRowAxisManager" disconnectSlave="true"> + <axis xmi:type="nattableaxis:EObjectTreeItemAxis" xmi:id="_g-rfEVzFEeenisH0-0NwUA"> + <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + <element xmi:type="uml:Model" href="updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml#_U7DVIFzFEeenisH0-0NwUA"/> + </axis> + <sources xmi:type="nattablewrapper:EObjectWrapper" xmi:id="_g-rfEFzFEeenisH0-0NwUA"> + <element xmi:type="uml:Model" href="updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml#_U7DVIFzFEeenisH0-0NwUA"/> + </sources> + </rowAxisProvidersHistory> + <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_v8Q4sFzFEeenisH0-0NwUA" indexStyle="NUMERIC"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_v8Q4sVzFEeenisH0-0NwUA"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_v8Q4slzFEeenisH0-0NwUA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_v8Q4s1zFEeenisH0-0NwUA" alias=""> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_v8Q4tFzFEeenisH0-0NwUA" localHeaderLabelConfiguration="_v8Q4sVzFEeenisH0-0NwUA" localSpecificConfigurations="_v8Q4slzFEeenisH0-0NwUA"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localRowHeaderAxisConfiguration> + <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_wvUtUFzFEeenisH0-0NwUA"> + <ownedLabelConfigurations xmi:type="nattablelabelprovider:ObjectLabelProviderConfiguration" xmi:id="_wvUtUVzFEeenisH0-0NwUA"/> + <ownedAxisConfigurations xmi:type="nattableaxisconfiguration:TreeFillingConfiguration" xmi:id="_wvUtUlzFEeenisH0-0NwUA" depth="1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider"> + <axisUsedAsAxisProvider xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_wvUtU1zFEeenisH0-0NwUA"> + <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/> + </axisUsedAsAxisProvider> + <labelProvider xmi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.1"/> + </ownedAxisConfigurations> + <axisManagerConfigurations xmi:type="nattableaxisconfiguration:AxisManagerConfiguration" xmi:id="_wvUtVFzFEeenisH0-0NwUA" localHeaderLabelConfiguration="_wvUtUVzFEeenisH0-0NwUA" localSpecificConfigurations="_wvUtUlzFEeenisH0-0NwUA"> + <axisManager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.matrix/configs/generic_matrix_of_relationships.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> + </axisManagerConfigurations> + </localColumnHeaderAxisConfiguration> + <ownedCellEditorConfigurations xmi:type="nattablecelleditor:GenericRelationshipMatrixCellEditorConfiguration" xmi:id="_U7I0tFzFEeenisH0-0NwUA" cellEditorId="GenericRelationshipMatrixEditorConfiguration"/> +</nattable:Table> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml new file mode 100755 index 00000000000..4592da5ef43 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.uml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_U7DVIFzFEeenisH0-0NwUA" name="updateTableContentsAfterExpressionChanges"> + <packagedElement xmi:type="uml:Class" xmi:id="_XAQuIFzFEeenisH0-0NwUA" name="Class1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_Xp4S4FzFEeenisH0-0NwUA" name="Class2"/> + <packagedElement xmi:type="uml:Class" xmi:id="_Xyli8FzFEeenisH0-0NwUA" name="Class3"/> + <packagedElement xmi:type="uml:Interface" xmi:id="_bEqXsFzFEeenisH0-0NwUA" name="Interface1"/> + <packagedElement xmi:type="uml:Interface" xmi:id="_cAXyAFzFEeenisH0-0NwUA" name="Interface2"/> + <packagedElement xmi:type="uml:Interface" xmi:id="_dl3wMFzFEeenisH0-0NwUA" name="Interface3"/> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_y2ljcF2DEeeLe5VHr2qfqQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_y2omwF2DEeeLe5VHr2qfqQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/> + </profileApplication> +</uml:Model> diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/Activator.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/Activator.java new file mode 100755 index 00000000000..f318f34ff5f --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/Activator.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.nattable.matrix.tests; + +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.nattable.matrix.tests"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + public static LogHelper log; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + log = new LogHelper(this); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AbstractTableTest.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AbstractTableTest.java new file mode 100755 index 00000000000..cb262b022f1 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AbstractTableTest.java @@ -0,0 +1,222 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; + +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.nebula.widgets.nattable.NatTable; +import org.eclipse.nebula.widgets.nattable.grid.GridRegion; +import org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer; +import org.eclipse.nebula.widgets.nattable.layer.LabelStack; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; +import org.eclipse.papyrus.infra.core.services.ServicesRegistry; +import org.eclipse.papyrus.infra.core.utils.ServiceUtils; +import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject; +import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor; +import org.eclipse.papyrus.infra.nattable.common.modelresource.PapyrusNattableModel; +import org.eclipse.papyrus.infra.nattable.export.file.PapyrusFileExportCommandHandler; +import org.eclipse.papyrus.infra.nattable.export.file.PapyrusFileExporter; +import org.eclipse.papyrus.infra.nattable.export.file.command.PapyrusFileExportCommand; +import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; +import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager; +import org.eclipse.papyrus.infra.nattable.menu.MenuUtils; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration; +import org.eclipse.papyrus.infra.nattable.style.configattribute.PapyrusExportConfigAttributes; +import org.eclipse.papyrus.infra.nattable.tree.CollapseAndExpandActionsEnum; +import org.eclipse.papyrus.infra.nattable.utils.TableHelper; +import org.eclipse.papyrus.infra.tools.util.FileUtils; +import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; +import org.eclipse.papyrus.uml.nattable.matrix.tests.Activator; +import org.junit.Assert; +import org.junit.Rule; + +/** + * + * Abstract class used for the table JUnit tests + */ +public abstract class AbstractTableTest extends AbstractPapyrusTest { + + /** + * The editor fixture + */ + @Rule + public final PapyrusEditorFixture fixture = new PapyrusEditorFixture(); + + /** + * the nattable editor + */ + protected NatTableEditor editor; + + /** + * the nattable widget + */ + protected NatTable natTable; + + /** + * the tree table manager + */ + protected TreeNattableModelManager manager; + + /** + * the initialization of the classes before executing the JUnit testsS + */ + public void initTest() { + this.manager = (TreeNattableModelManager) fixture.getActiveTableManager(); + this.natTable = (NatTable) this.manager.getAdapter(NatTable.class); + manager.doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null); + fixture.flushDisplayEvents(); + Assert.assertTrue(null != this.manager); + Assert.assertTrue(null != this.natTable); + registerNattableWidgetInEclipseContext(manager, new LabelStack(GridRegion.BODY)); + } + + /** + * This method register the nattable widget in the eclipse context, to be able to get is in the the setEnable(Objet) of the handlers + * + * @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler.getCurrentNattableModelManager() + * @param manager + * the nattable manager + */ + protected void registerNattableWidgetInEclipseContext(INattableModelManager manager, LabelStack regionLabels) { + MenuUtils.registerNatTableWidgetInEclipseContext(manager, regionLabels); + } + + + /** + * Create a model identifying the editor. This model will be saved with the sash. + * + * @param view + * The view context of the table. + * @throws Exception + * The exception. + */ + protected void createAndOpenEditorTable(final EObject tableContext, final TableConfiguration tableConfiguration, final String tableName) throws Exception { + final ServicesRegistry serviceRegistry = ServiceUtilsForEObject.getInstance().getServiceRegistry(tableContext); + final ModelSet modelSet = ServiceUtils.getInstance().getModelSet(serviceRegistry); + Assert.assertNotNull(tableConfiguration); + + final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry); + domain.getCommandStack().execute(new RecordingCommand(domain) { + @Override + protected void doExecute() { + Table editorModel; + try { + final String name = (tableName != null && !tableName.isEmpty()) ? tableName : tableConfiguration.getName(); + editorModel = TableHelper.createTable(tableConfiguration, tableContext, name, ""); + // Save the model in the associated resource + final PapyrusNattableModel model = (PapyrusNattableModel) modelSet.getModelChecked(PapyrusNattableModel.MODEL_ID); + model.addPapyrusTable(editorModel); + + // Get the manager allowing to add/open new editor. + final IPageManager pageMngr = ServiceUtils.getInstance().getService(IPageManager.class, serviceRegistry); + pageMngr.openPage(editorModel); + } catch (Exception e) { + Activator.log.error(e); + } + } + }); + } + + + /** + * This allows to check the table content comparing the table content with file content. + * + * @param treeManager + * The tree nattable model manager. + * @param suffixFileName + * The suffix of the file to check. + * @throws Exception + * The caught exception. + */ + protected void checkTableContent(final TreeNattableModelManager treeManager, final String suffixFileName) throws Exception { + treeManager.doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null); + final NatTable natTable = (NatTable) treeManager.getAdapter(NatTable.class); + this.fixture.flushDisplayEvents(); + + // Unregister and register the papyrus file export to manage it without the shell + final GridLayer gridLayer = treeManager.getGridLayer(); + gridLayer.unregisterCommandHandler(PapyrusFileExportCommand.class); + gridLayer.registerCommandHandler(new PapyrusFileExportCommandHandler(gridLayer.getBodyLayer(), false)); + + // Modify the config attribute of the file export to use the file name without the shell + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + final String wsFolder = workspace.getRoot().getLocation().toFile().getPath().toString(); + final String contentFile = wsFolder + "\\content.txt"; //$NON-NLS-1$ + natTable.getConfigRegistry().unregisterConfigAttribute(PapyrusExportConfigAttributes.SIMPLE_FILE_EXPORTER); + natTable.getConfigRegistry().registerConfigAttribute(PapyrusExportConfigAttributes.SIMPLE_FILE_EXPORTER, new PapyrusFileExporter(contentFile)); + treeManager.exportToFile(); + + final StringBuilder content = new StringBuilder(); + final List<String> allLines = Files.readAllLines(Paths.get(contentFile)); + for (int index = 0; index < allLines.size(); index++) { + content.append(allLines.get(index)); + if (index < allLines.size() - 1) { + content.append(FileUtils.getSystemPropertyLineSeparator()); + } + } + + final String str = getWantedString(getSuffixStateFileName(treeManager, suffixFileName)); + // we check than the contents of the clipboard (so the displayed table) is the same than the wanted result + Assert.assertEquals("The clipboard must be equals to string which one it is filled", str, content.toString()); //$NON-NLS-1$ + } + + /** + * Get the file name corresponding to the model with the suffix in parameter. + * + * @param treeManager + * The tree nattable model manager. + * @param suffixFileName + * The suffix of the file to get. + * @return The file name corresponding + */ + protected String getSuffixStateFileName(final TreeNattableModelManager treeManager, final String suffixFileName) { + URI uri = treeManager.getTable().eResource().getURI(); + uri = uri.trimFileExtension(); + final StringBuffer buffer = new StringBuffer(uri.lastSegment()); + buffer.append(suffixFileName); + buffer.append(FileUtils.DOT_STRING); + buffer.append(FileUtils.TEXT_EXTENSION); + return buffer.toString(); + } + + /** + * Get the string content from a file. + * + * @param fileName + * a file name + * @return + * the text stored in the file associated to this test + */ + protected String getWantedString(final String fileName) { + return FileUtils.getStringFromPlatformFile(Activator.PLUGIN_ID, getSourcePath(), fileName, FileUtils.getSystemPropertyLineSeparator());// $NON-NLS-1$ + } + + /** + * Return the source path of the text file used as expected result of the table contents + */ + protected abstract String getSourcePath(); + +} + diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AllTests.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AllTests.java new file mode 100755 index 00000000000..47dc8abc62e --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/AllTests.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.junit.runner.RunWith; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(ClassificationSuite.class) +@SuiteClasses({ + OpenDependencyMatrixTest.class, + CreateMatrixTableTests.class, + UpdateTableAfterEditingRowSourceTest.class, + UpdateTableContentsAfterExpressionChangeWithLocalHeaderPreconfiguredTests.class +}) +public class AllTests { + // JUnit 4 test suite + +} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/CreateMatrixTableTests.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/CreateMatrixTableTests.java new file mode 100755 index 00000000000..91235d68249 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/CreateMatrixTableTests.java @@ -0,0 +1,136 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager; +import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager; +import org.eclipse.papyrus.infra.nattable.model.nattable.Table; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectTreeItemAxis; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.NattableaxisFactory; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.IMasterAxisProvider; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattablewrapper.EObjectWrapper; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattablewrapper.NattablewrapperFactory; +import org.eclipse.papyrus.infra.nattable.nattableconfiguration.NattableConfigurationRegistry; +import org.eclipse.papyrus.infra.nattable.tree.CollapseAndExpandActionsEnum; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.uml2.uml.Package; +import org.junit.Assert; +import org.junit.Test; + +/** + * + * + */ +@PluginResource("resources/createMatrixDependencyTests/create_matrix.di") +public class CreateMatrixTableTests extends AbstractTableTest { + + /** + * the number of classes in the tested model + */ + private static final int NB_CLASSES = 7; + + /** + * The number of dependencies in the model + */ + private static final int NB_DEPENDENCIES = 4; + + /** + * the number of columns in the tested matrix + */ + private static final int NB_COLUMNS = NB_CLASSES; + + /** + * the number of rows in the tested matrix + */ + private static final int NB_ROWS = NB_CLASSES + 2; // +1 for the context package and +1 for the TreeFillingConfiguration + + /** + * the name of the created matrix + */ + private static final String CREATED_MATRIX_NAME = "NewMatrix"; //$NON-NLS-1$ + + /** + * the kind of the created matrix + */ + private static final String MATRIX_TABLE_TYPE = "UMLGenericMatrixOfRelationships"; //$NON-NLS-1$ + + /** + * @see org.eclipse.papyrus.uml.nattable.matrix.tests.tests.AbstractTableTest#getSourcePath() + * + * @return + */ + @Override + protected String getSourcePath() { + return "resources/createMatrixDependencyTests/"; //$NON-NLS-1$ + } + + /** + * This test try to create an empty matrix, then it configure its sources for rows and columns and check them + * + * @throws Exception + */ + @Test + public void testCreateANewMatrix() throws Exception { + final Package root = this.fixture.getModel(); + TableConfiguration configuration = NattableConfigurationRegistry.INSTANCE.getConfiguration(MATRIX_TABLE_TYPE); + createAndOpenEditorTable(root, configuration, CREATED_MATRIX_NAME); + final INattableModelManager manager = fixture.getActiveTableManager(); + Assert.assertNotNull("The created matrix has not be open", manager); //$NON-NLS-1$ + final Table table = manager.getTable(); + Assert.assertEquals("The current table is not the expected one", CREATED_MATRIX_NAME, manager.getTable().getName()); //$NON-NLS-1$ + final List<Object> rowElementsList = manager.getRowElementsList(); + final List<Object> columnElementsList = manager.getColumnElementsList(); + Assert.assertEquals("There are rows just after the matrix creation.", 0, rowElementsList.size()); //$NON-NLS-1$ + Assert.assertEquals("There are columns just after the matrix creation.", 0, columnElementsList.size()); //$NON-NLS-1$ + + RecordingCommand rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + EObjectWrapper rowSourceWrapper = NattablewrapperFactory.eINSTANCE.createEObjectWrapper(); + rowSourceWrapper.setElement(root); + + EObjectWrapper columnSourceWrapper = NattablewrapperFactory.eINSTANCE.createEObjectWrapper(); + columnSourceWrapper.setElement(root); + + // add rows + ((IMasterAxisProvider) table.getCurrentRowAxisProvider()).getSources().add(rowSourceWrapper); + EObjectTreeItemAxis axis = NattableaxisFactory.eINSTANCE.createEObjectTreeItemAxis(); + axis.setElement(root); + final Command tmp = manager.getAddRowElementCommand(Collections.singleton(root)); + tmp.execute(); + + + // add columns + ((IMasterAxisProvider) table.getCurrentColumnAxisProvider()).getSources().add(columnSourceWrapper); + + + } + }; + + fixture.getEditingDomain().getCommandStack().execute(rc); + + ((TreeNattableModelManager) manager).doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null); + fixture.flushDisplayEvents(); + Assert.assertEquals("The number of rows is not the expected one.", NB_ROWS + NB_DEPENDENCIES, rowElementsList.size()); //$NON-NLS-1$ + Assert.assertEquals("The number of columns is not the expected one.", NB_COLUMNS + NB_DEPENDENCIES, columnElementsList.size()); //$NON-NLS-1$ + } + +} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/OpenDependencyMatrixTest.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/OpenDependencyMatrixTest.java new file mode 100755 index 00000000000..1dcf1532c9e --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/OpenDependencyMatrixTest.java @@ -0,0 +1,80 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import java.util.List; + +import org.eclipse.papyrus.junit.utils.rules.ActiveTable; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.junit.Assert; +import org.junit.Test; + +/** + * + * This class checks an existing matrix after opening it. + * + */ +@PluginResource("resources/openDependencyMatrixTests/open_matrix.di") +public class OpenDependencyMatrixTest extends AbstractTableTest { + + /** + * the number of classes in the tested model + */ + private static final int NB_CLASSES = 7; + + /** + * the number of columns in the tested matrix + */ + private static final int NB_COLUMNS = NB_CLASSES; + + /** + * the number of rows in the tested matrix + */ + private static final int NB_ROWS = NB_CLASSES + 2; // +1 for the context package and +1 for the TreeFillingConfiguration + + /** + * + * @see org.eclipse.papyrus.uml.nattable.matrix.tests.tests.AbstractTableTest#getSourcePath() + * + * @return + */ + protected String getSourcePath() { + return "resources/openDependencyMatrixTests/"; //$NON-NLS-1$ + } + + /** + * This JUnit tests check the opening of an existing matrix + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void testOpeningMatrix() { + initTest(); + final List<Object> rowElementsList = this.manager.getRowElementsList(); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of rows is not the expected one.", NB_ROWS, rowElementsList.size()); //$NON-NLS-1$ + Assert.assertEquals("The number of columns is not the expected one.", NB_COLUMNS, columnElementsList.size()); //$NON-NLS-1$ + } + + /** + * This JUnit tests check the opening of an existing matrix + * + * @throws Exception + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void testMatrixContents() throws Exception { + initTest(); + checkTableContent(manager, "");// no suffix here //$NON-NLS-1$ + } +} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableAfterEditingRowSourceTest.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableAfterEditingRowSourceTest.java new file mode 100755 index 00000000000..003914394b7 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableAfterEditingRowSourceTest.java @@ -0,0 +1,140 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.papyrus.infra.nattable.manager.table.IMatrixTableWidgetManager; +import org.eclipse.papyrus.infra.nattable.tree.CollapseAndExpandActionsEnum; +import org.eclipse.papyrus.junit.framework.classification.InvalidTest; +import org.eclipse.papyrus.junit.utils.rules.ActiveTable; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.uml2.uml.NamedElement; +import org.junit.Assert; +import org.junit.Test; + +/** + * This class tests the update of an existing table after editing the row sources + */ +@PluginResource("resources/updateTableContentsAfterRowsSourceChangeTests/updateTableContentsAfterRowsSourceChange.di") +public class UpdateTableAfterEditingRowSourceTest extends AbstractTableTest { + + private static final int NB_CLASSES_IN_PACKAGE1_ROWS_SOURCES = 4; + + private static final int NB_CLASSES_IN_PACKAGE2_ROWS_SOURCES = 5; + + private static final int NB_COLUMNS = 4; + + private NamedElement package1_Rows_Sources; + + private NamedElement package2_Rows_Sources; + + private static final String PACKAGE1_ROWS_SOURCES_NAME = "Package1_RowsSource"; //$NON-NLS-1$ + + private static final String PACKAGE2_ROWS_SOURCES_NAME = "Package2_RowsSource"; //$NON-NLS-1$ + + /** + * @see org.eclipse.papyrus.uml.nattable.matrix.tests.tests.AbstractTableTest#getSourcePath() + * + * @return + */ + @Override + protected String getSourcePath() { + return "updateTableContentsAfterRowsSourceChangeTests"; //$NON-NLS-1$ + } + + /** + * This JUnit tests check the opening of an existing matrix + */ + @Test + @ActiveTable("Relationship Generic Matrix") + public void testOpeningMatrix() { + initTest(); + final List<Object> rowElementsList = this.manager.getRowElementsList(); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of rows is not the expected one.", NB_CLASSES_IN_PACKAGE1_ROWS_SOURCES + 1 + 1, rowElementsList.size()); //$NON-NLS-1$ //+1 for tree filling + for the root package + Assert.assertEquals("The number of columns is not the expected one.", NB_COLUMNS, columnElementsList.size()); //$NON-NLS-1$ + } + + /** + * @see org.eclipse.papyrus.uml.nattable.matrix.tests.tests.AbstractTableTest#initTest() + * + */ + @Override + public void initTest() { + super.initTest(); + this.package1_Rows_Sources = this.fixture.getModel().getMember(PACKAGE1_ROWS_SOURCES_NAME); + this.package2_Rows_Sources = this.fixture.getModel().getMember(PACKAGE2_ROWS_SOURCES_NAME); + Assert.assertNotNull(this.package1_Rows_Sources); + Assert.assertNotNull(this.package2_Rows_Sources); + + } + + + /** + * This JUnit tests check the opening of an existing matrix + * + * @throws Exception + */ + @Test + @ActiveTable("Relationship Generic Matrix") + @InvalidTest // file not found + public void testMatrixContents() throws Exception { + initTest(); + + // file is not found... I don't know why + checkTableContent(manager, "_Package1AsSource"); //$NON-NLS-1$ + } + + /** + * This JUnit tests check the opening of an existing matrix + * + * @throws Exception + */ + @Test + @ActiveTable("Relationship Generic Matrix") + @InvalidTest // not finish to write + public void testMatrixRemovingAllRowSources() throws Exception { + initTest(); + IMatrixTableWidgetManager matrixManager = (IMatrixTableWidgetManager) manager; + matrixManager.removeRowSources(Collections.singleton(this.package1_Rows_Sources)); + // TODO : check there are no source wrapper + // TODO : check there are no ITreeItemAxis stored for the rows + + // + UNDO/Redo and check + } + + /** + * This JUnit tests check the opening of an existing matrix + * + * @throws Exception + */ + @Test + @ActiveTable("Relationship Generic Matrix") + @InvalidTest //// not finish to write + public void testMatrixAddPackage2AsSourceRowSources() throws Exception { + initTest(); + IMatrixTableWidgetManager matrixManager = (IMatrixTableWidgetManager) manager; + matrixManager.removeRowSources(Collections.singleton(this.package2_Rows_Sources)); + // TODO : check source wrapper contains P1 and P2 + // TODO : check ITreeItemAxis contains P1 and P2 + + manager.doCollapseExpandAction(CollapseAndExpandActionsEnum.EXPAND_ALL, null); + checkTableContent(manager, "_Package1AndPackage2ASource"); //$NON-NLS-1$ + + // + UNDO/Redo and check + } + +} diff --git a/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableContentsAfterExpressionChangeWithLocalHeaderPreconfiguredTests.java b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableContentsAfterExpressionChangeWithLocalHeaderPreconfiguredTests.java new file mode 100755 index 00000000000..b1fcd5fab45 --- /dev/null +++ b/tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.matrix.tests/src/org/eclipse/papyrus/uml/nattable/matrix/tests/tests/UpdateTableContentsAfterExpressionChangeWithLocalHeaderPreconfiguredTests.java @@ -0,0 +1,308 @@ +/***************************************************************************** + * Copyright (c) 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Vincent Lorenzo (CEA LIST) - vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.nattable.matrix.tests.tests; + +import java.util.List; + +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.papyrus.infra.emf.expressions.booleanexpressions.BooleanExpressionsFactory; +import org.eclipse.papyrus.infra.emf.expressions.booleanexpressions.LiteralFalseExpression; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AbstractHeaderAxisConfiguration; +import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration; +import org.eclipse.papyrus.infra.nattable.utils.AxisUtils; +import org.eclipse.papyrus.infra.nattable.utils.HeaderAxisConfigurationManagementUtils; +import org.eclipse.papyrus.junit.framework.classification.InvalidTest; +import org.eclipse.papyrus.junit.utils.rules.ActiveTable; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.expressions.umlexpressions.HasAppliedStereotypesExpression; +import org.eclipse.papyrus.uml.expressions.umlexpressions.IsTypeOfExpression; +import org.eclipse.papyrus.uml.expressions.umlexpressions.UMLExpressionsFactory; +import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Stereotype; +import org.eclipse.uml2.uml.UMLPackage; +import org.junit.Assert; +import org.junit.Test; + +/** + * + * This class checks an existing matrix after opening it. The table is already preconfigured with the required local columns header configuration. + * + */ +@PluginResource("resources/updateTableContentsTests/updateTableContentsAfterExpressionChangeWithExistingLocalHeader.di") +public class UpdateTableContentsAfterExpressionChangeWithLocalHeaderPreconfiguredTests extends AbstractTableTest { + + /** + * the number of classes in the tested model + */ + private static final int NB_CLASSES = 3; + + /** + * the number of interfaces in the tested model + */ + private static final int NB_INTERFACE = 3; + + /** + * the number of columns in the tested matrix + */ + private static final int NB_COLUMNS = NB_CLASSES + NB_INTERFACE + 1; // +1 for applied profile + + /** + * the number of rows in the tested matrix + */ + private static final int NB_ROWS = NB_CLASSES + NB_INTERFACE + 1 + 2; // +1 for the applied profile +1 for the context package and +1 for the TreeFillingConfiguration + + + private static final String STEREOTYPE_QUALIFIED_NAME = "StandardProfile::Metaclass"; + + /** + * + * @see org.eclipse.papyrus.uml.nattable.matrix.tests.tests.AbstractTableTest#getSourcePath() + * + * @return + */ + protected String getSourcePath() { + return "resources/updateTableContentsTests/"; //$NON-NLS-1$ + } + + /** + * This JUnit tests check the opening of the matrix just after opening it + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void testOpeningMatrix() { + initTest(); + final List<Object> rowElementsList = this.manager.getRowElementsList(); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of rows is not the expected one.", NB_ROWS, rowElementsList.size()); //$NON-NLS-1$ + Assert.assertEquals("The number of columns is not the expected one.", NB_COLUMNS, columnElementsList.size()); //$NON-NLS-1$ + } + + + /** + * This tests apply a filter expression on column and play undo/redo + * + * @throws Exception + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void settingAColumnExpressionTest() throws Exception { + initTest(); + RecordingCommand rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + final IsTypeOfExpression expression = UMLExpressionsFactory.eINSTANCE.createIsTypeOfExpression(); + expression.setUmlEClass(UMLPackage.eINSTANCE.getClass_()); + + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + conf.setFilterRule(expression); + } + }; + this.fixture.execute(rc); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + this.fixture.undo(); + Assert.assertEquals("The number of columns is not the expected one.", NB_COLUMNS, columnElementsList.size()); //$NON-NLS-1$ + + this.fixture.redo(); + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + } + + /** + * This tests apply a filter expression on column, then reedit the filter rule and play undo/redo + * + * @throws Exception + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void settingAColumnExpressionThenEditingItTest() throws Exception { + initTest(); + RecordingCommand rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + final IsTypeOfExpression expression = UMLExpressionsFactory.eINSTANCE.createIsTypeOfExpression(); + expression.setUmlEClass(UMLPackage.eINSTANCE.getClass_()); + + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + conf.setFilterRule(expression); + } + }; + + // we filter on UML::Class + this.fixture.execute(rc); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + // we filter on UML::Interface + rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + ((IsTypeOfExpression) conf.getFilterRule()).setUmlEClass(UMLPackage.eINSTANCE.getInterface()); + } + }; + this.fixture.execute(rc); + Assert.assertEquals("The number of columns is not the expected one.", NB_INTERFACE, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Interface", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Interface); //$NON-NLS-1$ + } + + + this.fixture.undo();// we filter on UML::Class + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + + this.fixture.redo();// we filter on UML::Interface + Assert.assertEquals("The number of columns is not the expected one.", NB_INTERFACE, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Interface", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Interface); //$NON-NLS-1$ + } + + } + + + /** + * This tests apply a filter expression on column, then replace the filter rule rule and play undo/redo + * + * @throws Exception + */ + @Test + @ActiveTable("MatrixOfRelationships") + public void settingAColumnExpressionThenReplacingItTest() throws Exception { + initTest(); + RecordingCommand rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + final IsTypeOfExpression expression = UMLExpressionsFactory.eINSTANCE.createIsTypeOfExpression(); + expression.setUmlEClass(UMLPackage.eINSTANCE.getClass_()); + + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + conf.setFilterRule(expression); + } + }; + + // we filter on UML::Class + this.fixture.execute(rc); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + // all columns must be removed + rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + final LiteralFalseExpression expression = BooleanExpressionsFactory.eINSTANCE.createLiteralFalseExpression(); + conf.setFilterRule(expression); + } + }; + this.fixture.execute(rc); + Assert.assertEquals("The number of columns is not the expected one.", 0, columnElementsList.size()); //$NON-NLS-1$ + + + this.fixture.undo();// we filter on UML::Class + Assert.assertEquals("The number of columns is not the expected one.", NB_CLASSES, columnElementsList.size()); //$NON-NLS-1$ + for (Object current : columnElementsList) { + Assert.assertTrue("One of the displayed column is not a UML Class", AxisUtils.getRepresentedElement(current) instanceof org.eclipse.uml2.uml.Class); //$NON-NLS-1$ + } + + + this.fixture.redo();// // all columns must be removed + Assert.assertEquals("The number of columns is not the expected one.", 0, columnElementsList.size()); //$NON-NLS-1$ + } + + + /** + * This tests apply a filter expression on column, then replace the filter rule rule and play undo/redo + * + * @throws Exception + */ + @Test + @ActiveTable("MatrixOfRelationships") + @InvalidTest + public void settingAColumnExpressionRequiringToListenAllChangesTest() throws Exception { + initTest(); + RecordingCommand rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + final HasAppliedStereotypesExpression expression = UMLExpressionsFactory.eINSTANCE.createHasAppliedStereotypesExpression(); + + AbstractHeaderAxisConfiguration ahac = HeaderAxisConfigurationManagementUtils.getColumnAbstractHeaderAxisInTable(manager.getTable()); + TreeFillingConfiguration conf = (TreeFillingConfiguration) ahac.getOwnedAxisConfigurations().get(0); + conf.setFilterRule(expression); + } + }; + + // we filter on UML::Class + this.fixture.execute(rc); + final List<Object> columnElementsList = this.manager.getColumnElementsList(); + Assert.assertEquals("The number of columns is not the expected one.", 0, columnElementsList.size()); //$NON-NLS-1$ + + + NamedElement class1 = this.fixture.getModel().getMember("Class1"); + + Stereotype applicableStereotype = class1.getApplicableStereotype(STEREOTYPE_QUALIFIED_NAME); + Assert.assertNotNull("The stereotype required for the test is not found", applicableStereotype); + + + // all columns must be removed + rc = new RecordingCommand(this.fixture.getEditingDomain()) { + + @Override + protected void doExecute() { + class1.applyStereotype(applicableStereotype); + } + }; + this.fixture.execute(rc); + + Assert.assertNotNull("The stereotype required for the JUnit has not been applied", class1.getAppliedStereotype(STEREOTYPE_QUALIFIED_NAME)); + + Assert.assertEquals("The number of columns is not the expected one.", 1, columnElementsList.size()); //$NON-NLS-1$ + + + this.fixture.undo();// we filter on UML::Class + Assert.assertEquals("The number of columns is not the expected one.", 0, columnElementsList.size()); //$NON-NLS-1$ + + + + this.fixture.redo();// // all columns must be removed + Assert.assertEquals("The number of columns is not the expected one.", 1, columnElementsList.size()); //$NON-NLS-1$ + } +} diff --git a/tests/junit/plugins/uml/nattable/pom.xml b/tests/junit/plugins/uml/nattable/pom.xml index fc84d099206..df6c46886b4 100755 --- a/tests/junit/plugins/uml/nattable/pom.xml +++ b/tests/junit/plugins/uml/nattable/pom.xml @@ -23,6 +23,7 @@ <module>org.eclipse.papyrus.uml.nattable.stereotype.display.tests</module> <module>org.eclipse.papyrus.uml.nattable.stereotyped.elements.tests</module> <module>org.eclipse.papyrus.uml.nattable.tests</module> + <module>org.eclipse.papyrus.uml.nattable.matrix.tests</module> </modules> </project>
\ No newline at end of file |