From c9b38375f308bcafdd62a8b5a170c33848c6c2f2 Mon Sep 17 00:00:00 2001 From: Vincent Lorenzo Date: Thu, 16 May 2019 15:50:18 +0200 Subject: Bug 546904: Papyrus must provide a tool to be able to create EAnnotation Change-Id: Ia0fa8e2a0997339989dfbb263a5e2afce24fa7af Signed-off-by: Vincent Lorenzo --- .../feature.xml | 9 + .../.classpath | 7 + .../org.eclipse.papyrus.toolsmiths.ecore/.project | 28 ++ .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 297 +++++++++++++++++++++ .../.settings/org.eclipse.jdt.ui.prefs | 127 +++++++++ .../.settings/org.eclipse.pde.api.tools.prefs | 104 ++++++++ .../META-INF/MANIFEST.MF | 20 ++ .../OSGI-INF/l10n/bundle.properties | 15 ++ .../about.html | 28 ++ .../build.properties | 22 ++ .../documentation/EcoreToolsmiths.mediawiki | 25 ++ .../icons/EAnnotation.gif | Bin 0 -> 554 bytes .../icons/EStringToStringMapEntry.gif | Bin 0 -> 213 bytes .../plugin.xml | 61 +++++ .../org.eclipse.papyrus.toolsmiths.ecore/pom.xml | 13 + .../resources/EAnnotationCustom.custom | 119 +++++++++ .../papyrus/toolsmiths/ecore/Activator.java | 58 ++++ .../CreateEAnnotationDetailsEntryHandler.java | 109 ++++++++ .../handlers/CreateEAnnotationHandler.java | 105 ++++++++ .../internal/properties/EcorePropertySection.java | 113 ++++++++ .../properties/EcorePropertySectionFilter.java | 45 ++++ .../internal/properties/EcorePropertySource.java | 49 ++++ .../internal/queries/GetContainedEAnnotations.java | 53 ++++ .../internal/queries/GetEAnnotationIconQuery.java | 45 ++++ .../internal/queries/GetEAnnotationLabelQuery.java | 47 ++++ .../queries/GetEAnnotationParentQuery.java | 45 ++++ .../queries/GetVisibleReferencesQuery.java | 49 ++++ .../queries/IsEAnnotationContainerQuery.java | 48 ++++ .../org.eclipse.papyrus.toolsmiths.ecore/usecases | 6 + plugins/toolsmiths/pom.xml | 1 + 32 files changed, 1652 insertions(+) create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.classpath create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.project create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.resources.prefs create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.runtime.prefs create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.core.prefs create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.ui.prefs create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.pde.api.tools.prefs create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/META-INF/MANIFEST.MF create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/OSGI-INF/l10n/bundle.properties create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/about.html create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/build.properties create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/documentation/EcoreToolsmiths.mediawiki create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EAnnotation.gif create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EStringToStringMapEntry.gif create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/plugin.xml create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/pom.xml create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/resources/EAnnotationCustom.custom create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/Activator.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationDetailsEntryHandler.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationHandler.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySection.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySectionFilter.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySource.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetContainedEAnnotations.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationIconQuery.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationLabelQuery.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationParentQuery.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetVisibleReferencesQuery.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/IsEAnnotationContainerQuery.java create mode 100755 plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/usecases diff --git a/features/papyrus-toolsmiths-features/org.eclipse.papyrus.toolsmiths.feature/feature.xml b/features/papyrus-toolsmiths-features/org.eclipse.papyrus.toolsmiths.feature/feature.xml index 0808b5f6b6c..161a54ac5a9 100644 --- a/features/papyrus-toolsmiths-features/org.eclipse.papyrus.toolsmiths.feature/feature.xml +++ b/features/papyrus-toolsmiths-features/org.eclipse.papyrus.toolsmiths.feature/feature.xml @@ -93,6 +93,15 @@ unpack="false"/> + + + + + + + + + + diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.project b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.project new file mode 100755 index 00000000000..18ad7be5735 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.project @@ -0,0 +1,28 @@ + + + org.eclipse.papyrus.toolsmiths.ecore + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.resources.prefs b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.resources.prefs new file mode 100755 index 00000000000..896a9a53a53 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 \ No newline at end of file diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.runtime.prefs b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.runtime.prefs new file mode 100755 index 00000000000..5a0ad22d2a7 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.core.prefs b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 00000000000..74c6d08d7e4 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,297 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +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/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.ui.prefs b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.ui.prefs new file mode 100755 index 00000000000..1a3bd02c047 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,127 @@ +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 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +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= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.pde.api.tools.prefs b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.pde.api.tools.prefs new file mode 100755 index 00000000000..b2260f87129 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +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=Warning +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Warning +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_FIELD=Warning +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=Warning +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=Warning +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_DEFAULT_METHOD=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 +changed_execution_env=Warning +eclipse.preferences.version=1 +incompatible_api_component_version=Warning +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Error +incompatible_api_component_version_report_minor_without_api_change=Error +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/META-INF/MANIFEST.MF b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/META-INF/MANIFEST.MF new file mode 100755 index 00000000000..3f3ba67480b --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: org.eclipse.papyrus.toolsmiths.ecore;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.eclipse.papyrus.toolsmiths.ecore.Activator +Bundle-Vendor: %Bundle-Vendor +Require-Bundle: org.eclipse.ui;bundle-version="[3.0.0,4.0.0)", + org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)", + org.eclipse.papyrus.emf.facet.util.emf.core;bundle-version="[1.2.0,2.0.0)", + org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="[2.0.0,3.0.0)", + org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="[1.4.0,2.0.0)", + org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="[3.1.0,4.0.0)", + org.eclipse.ui.views.properties.tabbed;bundle-version="[3.8.400,4.0.0)", + org.eclipse.emf.edit.ui;bundle-version="[2.16.0,3.0.0)", + org.eclipse.papyrus.infra.emf;bundle-version="[3.0.0,4.0.0)", + org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Automatic-Module-Name: org.eclipse.papyrus.toolsmiths.ecore +Bundle-ActivationPolicy: lazy diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/OSGI-INF/l10n/bundle.properties b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/OSGI-INF/l10n/bundle.properties new file mode 100755 index 00000000000..a9b07f70c90 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,15 @@ +# Copyright (c) 2019 CEA LIST. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + +#Properties file for org.eclipse.papyrus.toolsmiths.ecore +Bundle-Vendor = Eclipse Modeling Project +Bundle-Name = Papyrus Ecore Toolsmiths \ No newline at end of file diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/about.html b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/about.html new file mode 100755 index 00000000000..ef2872f2845 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/about.html @@ -0,0 +1,28 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

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 2.0 ("EPL"). A copy of the EPL is available +at https://www.eclipse.org/legal/epl-2.0/. +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/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/build.properties b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/build.properties new file mode 100755 index 00000000000..b0a25411e71 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/build.properties @@ -0,0 +1,22 @@ +# Copyright (c) 2019 CEA LIST. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + resources/,\ + about.html,\ + OSGI-INF/ +src.includes = about.html diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/documentation/EcoreToolsmiths.mediawiki b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/documentation/EcoreToolsmiths.mediawiki new file mode 100755 index 00000000000..f1faa05b4ee --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/documentation/EcoreToolsmiths.mediawiki @@ -0,0 +1,25 @@ +=Papyrus Ecore Toolsmiths= +This plugin has been developed to improve the developer experience for UML2Ecore user. +The Ecore models allows to add EAnnotation to EObject to define more precisely the expected generation. +This plugin provides ModelExplorer customization to display the EAnnotation and their Details Entries (custom file EAnnotationCustom, not loaded by default). +This plugin provides the basic EMF property view to edit EAnnotation and Detail Entry elements. +The ModelExplorer View provides command to create EAnnotation and Detail Entry objects. + +==Example of usage== +*generate the java body of a UML Operation +** Create an EAnnotation owned by the UML Operation and edit its features +***''source:'' '''http://www.eclipse.org/emf/2002/GenModel''' +***''reference:'' nothing to do +**Create a Detail Entry +***''key'': '''body''' +***''value'': '''your java code''' + +*define a specific editor for the EMF property view to edit a given feature +** Create an EAnnotation owned by the UML Property +***''source:'' '''http://www.eclipse.org/emf/2002/GenModel''' +***''reference:'' nothing to do +**Create a Detail Entry +***''key'': '''propertyEditorFactory''' +***''value'': your own unique String '''editor://documentstructuretemplate/EReferenceBodySectionPartTemplate/EReference/''' +**In the generated edit plugin, contribute to the extension point '''org.eclipse.emf.edit.propertyEditorFactories''', registering your own factory, associated to the string defined as value of the key '''propertyEditorFactory''' in the EAnnotation + \ No newline at end of file diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EAnnotation.gif b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EAnnotation.gif new file mode 100755 index 00000000000..0df81a30b2d Binary files /dev/null and b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EAnnotation.gif differ diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EStringToStringMapEntry.gif b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EStringToStringMapEntry.gif new file mode 100755 index 00000000000..97aad290e64 Binary files /dev/null and b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/icons/EStringToStringMapEntry.gif differ diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/plugin.xml b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/plugin.xml new file mode 100755 index 00000000000..2289eaf9963 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/plugin.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/pom.xml b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/pom.xml new file mode 100755 index 00000000000..67337486a88 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/pom.xml @@ -0,0 +1,13 @@ + + + 4.0.0 + + org.eclipse.papyrus + org.eclipse.papyrus-toolsmiths + 0.0.1-SNAPSHOT + + org.eclipse.papyrus.toolsmiths.ecore + 1.0.0-SNAPSHOT + eclipse-plugin + diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/resources/EAnnotationCustom.custom b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/resources/EAnnotationCustom.custom new file mode 100755 index 00000000000..cf8a3acd02b --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/resources/EAnnotationCustom.custom @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/Activator.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/Activator.java new file mode 100755 index 00000000000..4826116df80 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/Activator.java @@ -0,0 +1,58 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.ecore; + +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.toolsmiths.ecore"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @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/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationDetailsEntryHandler.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationDetailsEntryHandler.java new file mode 100755 index 00000000000..76300d58c1b --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationDetailsEntryHandler.java @@ -0,0 +1,109 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.ui.util.SelectionHelper; + +/** + * This handler allows to create Details Entry for a selected EAnnotation + */ +public class CreateEAnnotationDetailsEntryHandler extends AbstractHandler { + + /** + * the editing domain to use + */ + private TransactionalEditingDomain domain; + + /** + * the selected EAnnotation + */ + private EAnnotation selectedEAnnotation; + + + /** + * + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + * + * @param event + * @return + * @throws ExecutionException + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + final EObject detailsMap = EcoreFactory.eINSTANCE.create(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY); + final Command cmd = AddCommand.create(this.domain, this.selectedEAnnotation, EcorePackage.eINSTANCE.getEAnnotation_Details(), detailsMap); + + if (cmd.canExecute()) { + domain.getCommandStack().execute(cmd); + } + return null; + } + + + /** + * + * @return + * the selected EAnnotation, or null + */ + private EAnnotation getSelectedEAnnotation() { + this.selectedEAnnotation = null; + final Object firstSelectedElement = SelectionHelper.getCurrentStructuredSelection().getFirstElement(); + if (null != firstSelectedElement) { + final EObject current = EMFHelper.getEObject(firstSelectedElement); + if (current instanceof EAnnotation) { + this.selectedEAnnotation = (EAnnotation) current; + } + } + return this.selectedEAnnotation; + } + + /** + * + * @return + * the editing domain, or null + */ + private TransactionalEditingDomain getEditingDomain() { + this.domain = null; + if (null != this.selectedEAnnotation) { + return this.domain = TransactionUtil.getEditingDomain(this.selectedEAnnotation); + } + return this.domain; + } + + /** + * + * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object) + * + * @param evaluationContext + */ + @Override + public void setEnabled(Object evaluationContext) { + setBaseEnabled(null != getSelectedEAnnotation() && null != getEditingDomain()); + } + +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationHandler.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationHandler.java new file mode 100755 index 00000000000..dd81a8d0cd7 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/handlers/CreateEAnnotationHandler.java @@ -0,0 +1,105 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.transaction.util.TransactionUtil; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.ui.util.SelectionHelper; + +/** + * This handler allows to create an EAnnotation inside the selected EObject + */ +public class CreateEAnnotationHandler extends AbstractHandler { + + /** + * the editing domain to use + */ + private TransactionalEditingDomain domain; + + /** + * the selected eobject + */ + private EObject selectedEObject; + + + /** + * + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + * + * @param event + * @return + * @throws ExecutionException + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + final EAnnotation createdEAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + final Command cmd = AddCommand.create(this.domain, this.selectedEObject, EcorePackage.eINSTANCE.getEModelElement_EAnnotations(), createdEAnnotation); + + if (cmd.canExecute()) { + domain.getCommandStack().execute(cmd); + } + return null; + } + + + /** + * + * @return + * the selected EObject or null + */ + private EObject getSelectedEObject() { + this.selectedEObject = null; + final Object firstSelectedElement = SelectionHelper.getCurrentStructuredSelection().getFirstElement(); + if (null != firstSelectedElement) { + this.selectedEObject = EMFHelper.getEObject(firstSelectedElement); + } + return this.selectedEObject; + } + + /** + * + * @return + * the editing domain to use or null + */ + private TransactionalEditingDomain getEditingDomain() { + this.domain = null; + if (null != this.selectedEObject) { + return this.domain = TransactionUtil.getEditingDomain(this.selectedEObject); + } + return this.domain; + } + + /** + * + * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object) + * + * @param evaluationContext + */ + @Override + public void setEnabled(Object evaluationContext) { + setBaseEnabled(null != getSelectedEObject() && null != getEditingDomain()); + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySection.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySection.java new file mode 100755 index 00000000000..1f9b6d53ed7 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySection.java @@ -0,0 +1,113 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.properties; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory.Descriptor.Registry; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.PropertySource; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.views.properties.IPropertySource; +import org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection; + +/** + * This class provides the section for the elements coming from the Ecore metamodel (and filtered by {@link EcorePropertySectionFilter} + */ +public class EcorePropertySection extends AdvancedPropertySection { + + /** + * + * Constructor. + * + */ + public EcorePropertySection() { + super(); + } + + /** + * @see org.eclipse.ui.views.properties.tabbed.AdvancedPropertySection#setInput(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + * + * @param part + * @param selection + */ + @Override + public final void setInput(final IWorkbenchPart part, final ISelection selection) { + if (selection instanceof IStructuredSelection) { + final Object object = ((IStructuredSelection) selection).getFirstElement(); + + // we get the real selected element + final EObject selectedElement = EMFHelper.getEObject(object); + if (null != selectedElement) { + final Registry registry = ComposedAdapterFactory.Descriptor.Registry.INSTANCE; + final Collection types = new ArrayList<>(); + types.add(selectedElement.eClass().getEPackage()); + types.add(IItemPropertySource.class); + + + // we look for the adapter factory registered for the metamodel of the object we want to edit + final Descriptor descriptor = registry.getDescriptor(types); + final AdapterFactory adapterFactory = descriptor.createAdapterFactory(); + this.page.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory) { + + /** + * @see org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider#createPropertySource(java.lang.Object, org.eclipse.emf.edit.provider.IItemPropertySource) + * + * @param object + * @param itemPropertySource + * @return + */ + @Override + protected IPropertySource createPropertySource(final Object object, final IItemPropertySource itemPropertySource) { + return EcorePropertySection.this.createPropertySource(object, itemPropertySource); + } + }); + super.setInput(part, new StructuredSelection(selectedElement)); + return; + } + } + + this.page.setPropertySourceProvider(null); + super.setInput(part, selection); + } + + + /** + * + * @param object + * an objectS + * @param itemPropertySource + * the item property source + * @return + * the created {@link IPropertySource} + */ + public IPropertySource createPropertySource(final Object object, final IItemPropertySource itemPropertySource) { + return new PropertySource(object, itemPropertySource); + } + + + +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySectionFilter.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySectionFilter.java new file mode 100755 index 00000000000..a1731c09ad6 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySectionFilter.java @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.properties; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.jface.viewers.IFilter; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; + +/** + * This class allows to activate the contributed property view only for element coming from {@link EcorePackage} + */ +public class EcorePropertySectionFilter implements IFilter { + + /** + * + * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object) + * + * @param toTest + * @return + */ + @Override + public boolean select(Object toTest) { + final EObject elem = EMFHelper.getEObject(toTest); + if (elem != null) { + boolean result = elem.eClass().getEPackage() == EcorePackage.eINSTANCE; + return result; + } + return false; + } + +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySource.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySource.java new file mode 100755 index 00000000000..82b0f2b0a9a --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/properties/EcorePropertySource.java @@ -0,0 +1,49 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.properties; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.ui.provider.PropertyDescriptor; +import org.eclipse.emf.edit.ui.provider.PropertySource; +import org.eclipse.ui.views.properties.IPropertyDescriptor; + +/** + * The {@link PropertySource} used to provide a better edition way for some properties of the DocumentStructureTemplate metamodel + */ +public class EcorePropertySource extends PropertySource { + + /** + * Constructor. + * + * @param object + * @param itemPropertySource + */ + public EcorePropertySource(final Object object, final IItemPropertySource itemPropertySource) { + super(object, itemPropertySource); + } + + /** + * @see org.eclipse.emf.edit.ui.provider.PropertySource#createPropertyDescriptor(org.eclipse.emf.edit.provider.IItemPropertyDescriptor) + * + * @param itemPropertyDescriptor + * @return + */ + @Override + protected IPropertyDescriptor createPropertyDescriptor(final IItemPropertyDescriptor itemPropertyDescriptor) { + return new PropertyDescriptor(this.object, itemPropertyDescriptor); + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetContainedEAnnotations.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetContainedEAnnotations.java new file mode 100755 index 00000000000..fdc16270550 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetContainedEAnnotations.java @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to retrieve the collection of all contained {@link EAnnotation}. + * + */ +public class GetContainedEAnnotations implements IJavaQuery2> { + + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param source + * @param parameterValues + * @param facetManager + * @return + * Sthe collection of all contained {@link EAnnotation}. + * @throws DerivedTypedElementException + */ + @Override + public Collection evaluate(EObject source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException { + if (source instanceof EModelElement) { + return ((EModelElement) source).getEAnnotations(); + } + + return Collections.emptyList(); + } + +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationIconQuery.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationIconQuery.java new file mode 100755 index 00000000000..09f6a509e2c --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationIconQuery.java @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage; +import org.eclipse.papyrus.emf.facet.custom.ui.ImageUtils; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to retrieve the path to the icon of the {@link EAnnotation} + * + */ +public class GetEAnnotationIconQuery implements IJavaQuery2 { + + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param context + * @param parameterValues + * @param facetManager + * @return + * the icon + * @throws DerivedTypedElementException + */ + @Override + public IImage evaluate(final EAnnotation context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException { + return ImageUtils.wrap("platform:/plugin/org.eclipse.emf.ecore.edit/icons/full/obj16/EAnnotation.gif"); //$NON-NLS-1$ + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationLabelQuery.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationLabelQuery.java new file mode 100755 index 00000000000..95cd0d34510 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationLabelQuery.java @@ -0,0 +1,47 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to retrieve the label of the {@link EAnnotation} + * + */ +public class GetEAnnotationLabelQuery implements IJavaQuery2 { + + /** + * + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param context + * @param parameterValues + * @param facetManager + * @return + * @throws DerivedTypedElementException + */ + @Override + public String evaluate(final EAnnotation context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException { + if (context.getSource() == null || context.getSource().isEmpty()) { + return "Source not yet defined"; //$NON-NLS-1$ + } + return context.getSource(); + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationParentQuery.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationParentQuery.java new file mode 100755 index 00000000000..24f268798ae --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetEAnnotationParentQuery.java @@ -0,0 +1,45 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to retrieve the graphical container of the {@link EAnnotation}. + * + */ +public class GetEAnnotationParentQuery implements IJavaQuery2 { + + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param context + * @param parameterValues + * @param facetManager + * @return + * the graphical container of an {@link EAnnotation}. + * @throws DerivedTypedElementException + */ + @Override + public EObject evaluate(final EAnnotation context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException { + return context.eContainer(); + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetVisibleReferencesQuery.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetVisibleReferencesQuery.java new file mode 100755 index 00000000000..14e681f0c5b --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/GetVisibleReferencesQuery.java @@ -0,0 +1,49 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to retrieve the visible references of {@link EAnnotation}. + * + */ +public class GetVisibleReferencesQuery implements IJavaQuery2> { + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param context + * @param parameterValues + * @param facetManager + * @return + * return empty list of visible references. + * @throws DerivedTypedElementException + */ + @Override + public List evaluate(final EAnnotation context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException { + final List visibleRef = new ArrayList<>(); + visibleRef.add(EcorePackage.eINSTANCE.getEAnnotation_Details()); + return visibleRef; + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/IsEAnnotationContainerQuery.java b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/IsEAnnotationContainerQuery.java new file mode 100755 index 00000000000..d364ed2584b --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/src/org/eclipse/papyrus/toolsmiths/ecore/internal/queries/IsEAnnotationContainerQuery.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2019 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.toolsmiths.ecore.internal.queries; + +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EModelElement; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; + +/** + * Query to test if the selected element is an {@link EAnnotation} container. + * + */ +public class IsEAnnotationContainerQuery implements IJavaQuery2 { + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param context + * @param parameterValues + * @param facetManager + * @return + * true if the selection is a, EAnnotation container + * @throws DerivedTypedElementException + */ + @Override + public Boolean evaluate(final EObject context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException { + if (context instanceof EAnnotation) { + return false; + } + return context instanceof EModelElement && ((EModelElement) context).getEAnnotations().size() > 0; + } +} diff --git a/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/usecases b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/usecases new file mode 100755 index 00000000000..65c8811bd45 --- /dev/null +++ b/plugins/toolsmiths/org.eclipse.papyrus.toolsmiths.ecore/usecases @@ -0,0 +1,6 @@ +Requirement_001: Papyrus Toolsmiths must allow to display EAnnotation in the ModelExplorer. +Requirement_002: Papyrus Toolsmiths must allow to display EAnnotation's Details Entries in the ModelExplorer. +Requirement_003: Papyrus Toolsmiths must allow to create EAnnotation in the ModelExplorer. +Requirement_004: Papyrus Toolsmiths must allow to create EAnnotation's Detail Entry in the ModelExplorer. +Requirement_005: Papyrus Toolsmiths must provide a Property View for EAnnotation. +Requirement_006: Papyrus Toolsmiths must provide a Property View for EAnnotation's Details Entry. \ No newline at end of file diff --git a/plugins/toolsmiths/pom.xml b/plugins/toolsmiths/pom.xml index 4862a450c78..4a49e7d89fd 100644 --- a/plugins/toolsmiths/pom.xml +++ b/plugins/toolsmiths/pom.xml @@ -19,6 +19,7 @@ org.eclipse.papyrus.toolsmiths org.eclipse.papyrus.toolsmiths.palette + org.eclipse.papyrus.toolsmiths.ecore org.eclipse.papyrus.toolsmiths.expressions profilemigration -- cgit v1.2.3