From 4cb2981a4c989a031eb145291a8d7faf66308f56 Mon Sep 17 00:00:00 2001 From: Mickael ADAM Date: Tue, 21 Mar 2017 15:54:02 +0100 Subject: Bug 512343 - [Palette] Papyrus Palette framework should be refactored Change-Id: I4170f878f144bc9e47ed21f1f3beaeb53911a887 Signed-off-by: Mickael ADAM --- .../.classpath | 7 + .../.project | 34 +++ .../.settings/org.eclipse.jdt.core.prefs | 291 +++++++++++++++++++++ .../.settings/org.eclipse.jdt.ui.prefs | 68 +++++ .../.settings/org.eclipse.pde.api.tools.prefs | 98 +++++++ .../META-INF/MANIFEST.MF | 28 ++ .../OSGI-INF/l10n/bundle.properties | 3 + .../about.html | 28 ++ .../build.properties | 8 + ...infra.gmfdiag.paletteconfiguration.tests.launch | 43 +++ .../plugin.xml | 66 +++++ .../pom.xml | 14 + .../FakeProfile.elementtypesconfigurations | 14 + .../resources/FakeProfile.paletteconfiguration | 21 ++ .../resources/Model.di | 2 + .../resources/Model.notation | 9 + .../resources/Model.uml | 19 ++ .../resources/NoProfile.paletteconfiguration | 20 ++ .../TestPalette.elementtypesconfigurations | 14 + .../resources/TestPalette.paletteconfiguration | 21 ++ .../resources/TestPalette.profile.di | 2 + .../resources/TestPalette.profile.notation | 48 ++++ .../resources/TestPalette.profile.uml | 37 +++ .../paletteconfiguration/tests/Activator.java | 44 ++++ .../paletteconfiguration/tests/AllTests.java | 27 ++ ...g457712PaletteConfigurationRequiredProfile.java | 209 +++++++++++++++ .../tests/regression/ITestConstants.java | 23 ++ tests/junit/plugins/infra/gmfdiag/pom.xml | 1 + 28 files changed, 1199 insertions(+) create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.project create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.ui.prefs create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.pde.api.tools.prefs create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/OSGI-INF/l10n/bundle.properties create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/about.html create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/build.properties create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.launch create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/pom.xml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.di create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.notation create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.uml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.elementtypesconfigurations create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.di create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.notation create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.uml create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/Activator.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java create mode 100644 tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/ITestConstants.java (limited to 'tests/junit/plugins/infra/gmfdiag') diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath new file mode 100644 index 00000000000..098194ca4b7 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.project b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.project new file mode 100644 index 00000000000..eb8a80ec220 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..f08be2b06c4 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.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.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 +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/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.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= diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.pde.api.tools.prefs b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..23fb95e120f --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.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/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..1fb09395f0d --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources;bundle-version="3.8.0", + org.eclipse.papyrus.infra.types;bundle-version="[3.0.0,4.0.0)", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.8.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0", + org.eclipse.papyrus.uml.diagram.tests;bundle-version="[1.2.0,2.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="[2.0.100,3.0.0)", + org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)", + org.junit;bundle-version="4.11.0", + org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)", + org.eclipse.papyrus.editor;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core;bundle-version="1.1.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0", + org.eclipse.papyrus.uml.tools;bundle-version="1.1.0", + org.eclipse.papyrus.uml.extensionpoints, + org.eclipse.papyrus.infra.ui;bundle-version="1.2.0" +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.2.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-ManifestVersion: 2 +Bundle-Activator: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.Activator +Bundle-SymbolicName: org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..705aa1f0fda --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests +Bundle-Vendor = Eclipse Modeling Project +Bundle-Name = Palette Configuration Test Plug-in \ No newline at end of file diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/about.html b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/about.html new file mode 100644 index 00000000000..dd3c089a94c --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

November 14, 2008

+

License

+ +

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 http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

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 http://www.eclipse.org.

+ + + \ No newline at end of file diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/build.properties b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/build.properties new file mode 100644 index 00000000000..4b9649bd064 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.xml,\ + resources/,\ + OSGI-INF/ diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.launch b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.launch new file mode 100644 index 00000000000..88fbfac1fca --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.launch @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml new file mode 100644 index 00000000000..9aa04cfdce1 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/plugin.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/pom.xml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/pom.xml new file mode 100644 index 00000000000..8b01fe80878 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + org.eclipse.papyrus.tests + org.eclipse.papyrus.infra.gmfdiag.tests.releng + 0.0.1-SNAPSHOT + + org.eclipse.papyrus.tests + org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests + 1.2.0-SNAPSHOT + eclipse-plugin + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations new file mode 100644 index 00000000000..668634e270a --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.elementtypesconfigurations @@ -0,0 +1,14 @@ + + + + + + FakeProfile::FakeSto + + + + + FakeProfile + + + \ No newline at end of file diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration new file mode 100644 index 00000000000..1a3dc71a1bc --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/FakeProfile.paletteconfiguration @@ -0,0 +1,21 @@ + + + + + + + + FakeProfile + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.di @@ -0,0 +1,2 @@ + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.notation new file mode 100644 index 00000000000..221df6bc5c9 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.notation @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.uml new file mode 100644 index 00000000000..4404b42433a --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/Model.uml @@ -0,0 +1,19 @@ + + + + + + + +
+
+
+
+
+ + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration new file mode 100644 index 00000000000..3ee1221e7d3 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/NoProfile.paletteconfiguration @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.elementtypesconfigurations b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.elementtypesconfigurations new file mode 100644 index 00000000000..145ee50a19f --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.elementtypesconfigurations @@ -0,0 +1,14 @@ + + + + + + TestPaletteConfiguration::TPC_StoOnClass + + + + + TestPaletteConfiguration + + + \ No newline at end of file diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration new file mode 100644 index 00000000000..1098a113b82 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.paletteconfiguration @@ -0,0 +1,21 @@ + + + + + + + + TestPaletteConfiguration + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.di b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.di @@ -0,0 +1,2 @@ + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.notation b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.notation new file mode 100644 index 00000000000..d8cd4f19f60 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.notation @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.uml b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.uml new file mode 100644 index 00000000000..c2115e71fc9 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/resources/TestPalette.profile.uml @@ -0,0 +1,37 @@ + + + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/Activator.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/Activator.java new file mode 100644 index 00000000000..cd303723a6e --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/Activator.java @@ -0,0 +1,44 @@ +/***************************************************************************** + * 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: + * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and Implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + public final static String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests"; // //$NON-NLS-1$ + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + Activator.context = null; + } + + +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java new file mode 100644 index 00000000000..602307a42c3 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/AllTests.java @@ -0,0 +1,27 @@ +/***************************************************************************** + * Copyright (c) 2010 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: + * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests; + +import org.junit.runner.RunWith; +import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression.Bug457712PaletteConfigurationRequiredProfile; +import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite; +import org.junit.runners.Suite.SuiteClasses; + + +/** + * All tests for this fragment + */ +@RunWith(ClassificationSuite.class) +@SuiteClasses({ Bug457712PaletteConfigurationRequiredProfile.class, }) +public class AllTests { + +} diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java new file mode 100644 index 00000000000..132b90c4c65 --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/Bug457712PaletteConfigurationRequiredProfile.java @@ -0,0 +1,209 @@ +/***************************************************************************** + * Copyright (c) 2014 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: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.palette.PaletteDrawer; +import org.eclipse.gef.ui.palette.PaletteViewer; +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFlyOutPalette; +import org.eclipse.gmf.runtime.notation.Diagram; +import org.eclipse.papyrus.commands.ICreationCommand; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.resource.ModelUtils; +import org.eclipse.papyrus.infra.core.resource.NotFoundException; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.Activator; +import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor; +import org.eclipse.papyrus.junit.utils.EditorUtils; +import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils; +import org.eclipse.papyrus.junit.utils.rules.HouseKeeper; +import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand; +import org.eclipse.papyrus.uml.tools.model.UmlModel; +import org.eclipse.papyrus.uml.tools.model.UmlUtils; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; +import org.eclipse.uml2.uml.Model; +import org.eclipse.uml2.uml.Profile; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.osgi.framework.Bundle; + +/** + * Regression test for bug 457712 + */ +public class Bug457712PaletteConfigurationRequiredProfile implements ITestConstants { + + public static final String RESOURCES_FOLDER = "/resources/"; + + @ClassRule + public static HouseKeeper.Static houseKeeper = new HouseKeeper.Static(); + + protected static IProject createProject; + + protected static IMultiDiagramEditor openPapyrusEditor; + + protected static ModelSet modelset; + + protected static UmlModel umlIModel; + + protected static Model rootModel; + + protected static TransactionalEditingDomain transactionalEditingDomain; + + protected static IFile workspaceTestFile; + + private static IFile copyTestModel; + + private static Diagram classDiagram; + + private Profile testProfile; + + /** + * Init test class + */ + @BeforeClass + public static void initCreateElementTest() { + + // create Project + createProject = houseKeeper.createProject(BUG457712_PALETTE_CONFIGURATION); + + // import test model and profile + try { + Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID); + PapyrusProjectUtils.copyPapyrusModel(createProject, bundle, RESOURCES_FOLDER, "TestPalette.profile"); + copyTestModel = PapyrusProjectUtils.copyPapyrusModel(createProject, bundle, RESOURCES_FOLDER, "Model"); + } catch (CoreException e) { + fail(e.getMessage()); + } catch (IOException e) { + fail(e.getMessage()); + } + + // open project + Display.getDefault().syncExec(new Runnable() { + + public void run() { + try { + openPapyrusEditor = houseKeeper.cleanUpLater(EditorUtils.openPapyrusEditor(copyTestModel)); + } catch (PartInitException e) { + fail(e.getMessage()); + } + } + }); + + transactionalEditingDomain = (TransactionalEditingDomain) openPapyrusEditor.getAdapter(TransactionalEditingDomain.class); + assertTrue("Impossible to init editing domain", transactionalEditingDomain instanceof TransactionalEditingDomain); + + // retrieve UML model from this editor + try { + modelset = ModelUtils.getModelSetChecked(openPapyrusEditor.getServicesRegistry()); + umlIModel = UmlUtils.getUmlModel(modelset); + rootModel = (Model) umlIModel.lookupRoot(); + + Assert.assertNotNull("root model should not be null", rootModel); + + ICreationCommand command = new CreateClassDiagramCommand(); + classDiagram = command.createDiagram(modelset, null, "DiagramToTest"); + modelset.save(new NullProgressMonitor()); + + assertNotNull("There should be a class diagram for test", classDiagram); + + } catch (ServiceException e) { + fail(e.getMessage()); + } catch (NotFoundException e) { + fail(e.getMessage()); + } catch (ClassCastException e) { + fail(e.getMessage()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Test + public void testNoProfileApplied() { + // check the palette. tool to create a class with stereotype StoOnClass should not be present + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + // check with profile applied (it is already applied in the model). The drawer should be visible + checkPaletteDrawer("TestPaletteNodesDrawer", true); + checkPaletteDrawer("TestFakePaletteNodesDrawer", false); + checkPaletteDrawer("TestNoProfilePaletteNodesDrawer", true); + } + }); + + } + + protected void checkPaletteDrawer(String identifier, boolean isVisible) { + IEditorPart part = openPapyrusEditor.getActiveEditor(); + if (part instanceof DiagramEditorWithFlyOutPalette) { + PaletteViewer paletteViewer = (PaletteViewer) ((DiagramEditorWithFlyOutPalette) part).getAdapter(PaletteViewer.class); + assertNotNull("There should be a palette viewer on active editor", paletteViewer); + + // will do a shortcut here, only test if test drawer is active or not. This may be enhanced by testing the tool itself + List drawers = paletteViewer.getPaletteRoot().getChildren(); + boolean isDisplayed = false; + for (Object o : drawers) { + + if (o instanceof PaletteDrawer) { + // check it does not have id: TestPaletteNodesDrawer + if (identifier.equals(((PaletteDrawer) o).getId())) { + if (!isVisible) { + fail("the drawer for test palette should not be here as the profile TestPalette is not applied"); + } + isDisplayed = true; + } + } + + } + if (isVisible & !isDisplayed) { + fail("the drawer for test palette was not there whereas the profile TestPalette is applied"); + } + } else { + fail("impossible to adapt into a papyrus editor"); + } + + } + + /** + * @throws java.lang.Exception + */ + @Before + public void setUp() throws Exception { + } + + /** + * @throws java.lang.Exception + */ + @After + public void tearDown() throws Exception { + } + + +} \ No newline at end of file diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/ITestConstants.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/ITestConstants.java new file mode 100644 index 00000000000..f60cbe661ab --- /dev/null +++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests/src/org/eclipse/papyrus/infra/gmfdiag/paletteconfiguration/tests/regression/ITestConstants.java @@ -0,0 +1,23 @@ +/***************************************************************************** + * Copyright (c) 2014 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: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests.regression; + +/** + * Shared test constants + */ +public interface ITestConstants { + + public static final String BUG457712_PALETTE_CONFIGURATION = "Bug457712_PaletteConfiguration"; + + public static final String RESOURCES_FOLDER = "/resources/"; + +} diff --git a/tests/junit/plugins/infra/gmfdiag/pom.xml b/tests/junit/plugins/infra/gmfdiag/pom.xml index da6fe803d8e..87de5ca7104 100755 --- a/tests/junit/plugins/infra/gmfdiag/pom.xml +++ b/tests/junit/plugins/infra/gmfdiag/pom.xml @@ -21,6 +21,7 @@ org.eclipse.papyrus.infra.gmfdiag.welcome.tests org.eclipse.papyrus.infra.gmfdiag.css.tests org.eclipse.papyrus.infra.gmfdiag.menu.tests + org.eclipse.papyrus.infra.gmfdiag.paletteconfiguration.tests assistant -- cgit v1.2.3