Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.dev.types')
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/.classpath16
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/.project106
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/.settings/org.eclipse.jdt.core.prefs582
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/META-INF/MANIFEST.MF40
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/about.html56
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/plugin.properties28
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/plugin.xml318
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/pom.xml90
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/Activator.java164
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/generator/ElementTypeRegistryGenerator.xtend122
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesContentProvider.java170
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsContentProvider.java340
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsLabelProvider.java78
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesLabelProvider.java90
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventContentProvider.java322
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventLabelProvider.java270
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/EClassComparator.java48
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeConfigurationComparator.java48
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeRegistryUtils.java90
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/GenerateElementTypesConfigurationsUtils.java224
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/IElementTypeComparator.java48
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/NotifierNullEditHelper.java58
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/TypesEventPrinter.java276
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/RegistredElementTypesView.java392
-rw-r--r--plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/TypesConfigurationsListenerView.java454
25 files changed, 2215 insertions, 2215 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/.classpath b/plugins/developer/org.eclipse.papyrus.dev.types/.classpath
index 7bcdff09eb7..248b4c5dc7a 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/.classpath
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/.classpath
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="xtend-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/.project b/plugins/developer/org.eclipse.papyrus.dev.types/.project
index dfb6ffa2e60..14cb793e53b 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/.project
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/.project
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.dev.types</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.oomph.version.VersionBuilder</name>
- <arguments>
- <dictionary>
- <key>check.maven.pom</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>ignore.lower.bound.dependency.ranges</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>release.path</key>
- <value>/org.eclipse.papyrus.releng.dev.release/release.xml</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.oomph.version.VersionNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.dev.types</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.dev.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/.settings/org.eclipse.jdt.core.prefs b/plugins/developer/org.eclipse.papyrus.dev.types/.settings/org.eclipse.jdt.core.prefs
index 9ca8e68231b..f08be2b06c4 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/.settings/org.eclipse.jdt.core.prefs
@@ -1,291 +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
+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/plugins/developer/org.eclipse.papyrus.dev.types/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.dev.types/META-INF/MANIFEST.MF
index 0034f968b96..4753f551c02 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/META-INF/MANIFEST.MF
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/META-INF/MANIFEST.MF
@@ -1,20 +1,20 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.3.0,6.0.0)",
- org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.services.edit;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.gmf.codegen;bundle-version="[2.11.0,3.0.0)",
- org.eclipse.xtend.lib;bundle-version="[2.10.0,3.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.6.0,2.0.0)",
- org.eclipse.m2m.qvt.oml;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.papyrus.infra.architecture;bundle-version="[1.0.0,2.0.0)"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 3.0.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.dev.types.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.dev.types;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.3.0,6.0.0)",
+ org.eclipse.papyrus.infra.types.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.gmf.codegen;bundle-version="[2.11.0,3.0.0)",
+ org.eclipse.xtend.lib;bundle-version="[2.10.0,3.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.core.filesystem;bundle-version="[1.6.0,2.0.0)",
+ org.eclipse.m2m.qvt.oml;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.papyrus.infra.architecture;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 3.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.dev.types.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.dev.types;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/about.html b/plugins/developer/org.eclipse.papyrus.dev.types/about.html
index 82d49bf5f81..d35d5aed64c 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/about.html
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/plugin.properties b/plugins/developer/org.eclipse.papyrus.dev.types/plugin.properties
index 270c6ea9504..99fb4e221d9 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/plugin.properties
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/plugin.properties
@@ -1,15 +1,15 @@
-###############################################################################
-# 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:
-# CEA LIST - initial API and implementation
-###############################################################################
-pluginName=Papyrus TypesConfigurations framework for developers plugin
-providerName=Eclipse Modeling Project
-viewRegisteredElementtype.name = Registered ElementTypes
-viewListenerElementtype.name = TypesConfigurations Listener
+###############################################################################
+# 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:
+# CEA LIST - initial API and implementation
+###############################################################################
+pluginName=Papyrus TypesConfigurations framework for developers plugin
+providerName=Eclipse Modeling Project
+viewRegisteredElementtype.name = Registered ElementTypes
+viewListenerElementtype.name = TypesConfigurations Listener
category.name = Papyrus Dev \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/plugin.xml b/plugins/developer/org.eclipse.papyrus.dev.types/plugin.xml
index 2a2c370f492..9d0f7c94998 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/plugin.xml
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/plugin.xml
@@ -1,159 +1,159 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
- <command
- commandId="org.eclipse.papyrus.infra.dev.types.commands.migrateTypesConfigurations"
- id="org.eclipse.papyrus.infra.dev.types.menus.migrateTypesConfigurations"
- label="Migrate ElementTypes Configurations"
- mnemonic="S"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IFile">
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
- <command
- commandId="org.eclipse.papyrus.infra.dev.types.commands.generateElementTypesRegistry"
- id="org.eclipse.papyrus.infra.dev.types.menus.generateElementTypesRegistry"
- label="Generate ElementTypes Registry"
- mnemonic="G"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IFile">
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
- <command
- commandId="org.eclipse.papyrus.infra.dev.types.commands.migrateSpecializations"
- id="org.eclipse.papyrus.infra.dev.types.menus.migrateSpecializations"
- label="Migrate Specializations"
- mnemonic="S"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.core.resources.IFile">
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
- <command
- commandId="org.eclipse.papyrus.infra.dev.types.commands.elementTypeInfo"
- id="org.eclipse.papyrus.infra.dev.types.menus.elementTypeInfo"
- label="ElementType Info"
- mnemonic="E"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="selection">
- <iterate
- ifEmpty="false"
- operator="and">
- <adapt
- type="org.eclipse.emf.ecore.EObject">
- </adapt>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- defaultHandler="org.eclipse.papyrus.dev.types.handlers.MigrateTypesConfigurations"
- id="org.eclipse.papyrus.infra.dev.types.commands.migrateTypesConfigurations"
- name="Migrate TypesConfigurations">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.dev.types.handlers.GenerateElementTypesRegistry"
- id="org.eclipse.papyrus.infra.dev.types.commands.generateElementTypesRegistry"
- name="Generate ElementTypes Registry">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.dev.types.handlers.ElementTypeInfo"
- id="org.eclipse.papyrus.infra.dev.types.commands.elementTypeInfo"
- name="ElementType Info">
- </command>
- <command
- defaultHandler="org.eclipse.papyrus.dev.types.handlers.MigrateSpecializations"
- id="org.eclipse.papyrus.infra.dev.types.commands.migrateSpecializations"
- name="Migrate Specializations">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.papyrus.dev.views.category"
- class="org.eclipse.papyrus.dev.types.view.RegistredElementTypesView"
- id="org.eclipse.papyrus.dev.types.registeredElementTypesView"
- name="%viewRegisteredElementtype.name"
- icon="icons/Papyrus.gif"
- restorable="true">
- </view>
- <category
- id="org.eclipse.papyrus.dev.views.category"
- name="%category.name" >
- </category>
- </extension>
-
- <extension
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.papyrus.dev.views.category"
- class="org.eclipse.papyrus.dev.types.view.TypesConfigurationsListenerView"
- id="org.eclipse.papyrus.dev.types.typesConfigurationsListenerView"
- name="%viewListenerElementtype.name"
- icon="icons/Papyrus.gif"
- restorable="true">
- </view>
- <category
- id="org.eclipse.papyrus.dev.views.category"
- name="%category.name" >
- </category>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
+ <command
+ commandId="org.eclipse.papyrus.infra.dev.types.commands.migrateTypesConfigurations"
+ id="org.eclipse.papyrus.infra.dev.types.menus.migrateTypesConfigurations"
+ label="Migrate ElementTypes Configurations"
+ mnemonic="S"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
+ <command
+ commandId="org.eclipse.papyrus.infra.dev.types.commands.generateElementTypesRegistry"
+ id="org.eclipse.papyrus.infra.dev.types.menus.generateElementTypesRegistry"
+ label="Generate ElementTypes Registry"
+ mnemonic="G"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
+ <command
+ commandId="org.eclipse.papyrus.infra.dev.types.commands.migrateSpecializations"
+ id="org.eclipse.papyrus.infra.dev.types.menus.migrateSpecializations"
+ label="Migrate Specializations"
+ mnemonic="S"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.core.resources.IFile">
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.dev.ui.menu">
+ <command
+ commandId="org.eclipse.papyrus.infra.dev.types.commands.elementTypeInfo"
+ id="org.eclipse.papyrus.infra.dev.types.menus.elementTypeInfo"
+ label="ElementType Info"
+ mnemonic="E"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="selection">
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.dev.types.handlers.MigrateTypesConfigurations"
+ id="org.eclipse.papyrus.infra.dev.types.commands.migrateTypesConfigurations"
+ name="Migrate TypesConfigurations">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.dev.types.handlers.GenerateElementTypesRegistry"
+ id="org.eclipse.papyrus.infra.dev.types.commands.generateElementTypesRegistry"
+ name="Generate ElementTypes Registry">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.dev.types.handlers.ElementTypeInfo"
+ id="org.eclipse.papyrus.infra.dev.types.commands.elementTypeInfo"
+ name="ElementType Info">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.dev.types.handlers.MigrateSpecializations"
+ id="org.eclipse.papyrus.infra.dev.types.commands.migrateSpecializations"
+ name="Migrate Specializations">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.papyrus.dev.views.category"
+ class="org.eclipse.papyrus.dev.types.view.RegistredElementTypesView"
+ id="org.eclipse.papyrus.dev.types.registeredElementTypesView"
+ name="%viewRegisteredElementtype.name"
+ icon="icons/Papyrus.gif"
+ restorable="true">
+ </view>
+ <category
+ id="org.eclipse.papyrus.dev.views.category"
+ name="%category.name" >
+ </category>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.papyrus.dev.views.category"
+ class="org.eclipse.papyrus.dev.types.view.TypesConfigurationsListenerView"
+ id="org.eclipse.papyrus.dev.types.typesConfigurationsListenerView"
+ name="%viewListenerElementtype.name"
+ icon="icons/Papyrus.gif"
+ restorable="true">
+ </view>
+ <category
+ id="org.eclipse.papyrus.dev.views.category"
+ name="%category.name" >
+ </category>
+ </extension>
+
+</plugin>
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/pom.xml b/plugins/developer/org.eclipse.papyrus.dev.types/pom.xml
index 4fb75d5f4b0..72442344e40 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/pom.xml
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/pom.xml
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus.developer</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>org.eclipse.papyrus.dev.types</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>3.0.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
- <build>
- <plugins>
- <!-- Empty out the xtend-gen folder in the clean phase. -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>xtend-gen</directory>
- <excludes>
- <exclude>**/.gitignore</exclude>
- </excludes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <!-- Generate Xtend sources in the compilation phase. -->
- <plugin>
- <groupId>org.eclipse.xtend</groupId>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.developer</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.dev.types</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+ <build>
+ <plugins>
+ <!-- Empty out the xtend-gen folder in the clean phase. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>xtend-gen</directory>
+ <excludes>
+ <exclude>**/.gitignore</exclude>
+ </excludes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <!-- Generate Xtend sources in the compilation phase. -->
+ <plugin>
+ <groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- </goals>
- <configuration>
- <outputDirectory>xtend-gen</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>xtend-gen</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project> \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/Activator.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/Activator.java
index be4d7b01a47..e42d7fc21f8 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/Activator.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/Activator.java
@@ -1,82 +1,82 @@
-/*****************************************************************************
- * 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.dev.types;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.dev.types"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /** Logging helper */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- log = null;
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
+/*****************************************************************************
+ * 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.dev.types;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.dev.types"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** Logging helper */
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ log = null;
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/generator/ElementTypeRegistryGenerator.xtend b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/generator/ElementTypeRegistryGenerator.xtend
index cc1eaa69f61..260c3d727b7 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/generator/ElementTypeRegistryGenerator.xtend
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/generator/ElementTypeRegistryGenerator.xtend
@@ -1,61 +1,61 @@
-package org.eclipse.papyrus.dev.types.generator
-
-import org.eclipse.emf.ecore.resource.Resource
-import org.eclipse.emf.common.util.TreeIterator
-import org.eclipse.emf.ecore.EObject
-import org.eclipse.papyrus.infra.types.ElementTypeConfiguration
-
-class ElementTypeRegistryGenerator {
-
- static def Iterable<EObject> allContentsIterable(Resource resource) {
- var TreeIterator<EObject> _allContents = resource.getAllContents();
- return IteratorExtensions.<EObject>toIterable(_allContents);
- }
-
- static def String camelToUnderScore(String in) {
- var String regex = "([a-z])([A-Z])";
- var String replacement = "$1_$2";
- return in.replaceAll(regex, replacement);
- }
-
- static def String safeName(String in) {
- var result = camelToUnderScore(in)
- result = result.replaceAll("[^A-Za-z0-9]", "_")
- result = result.replaceAll("_{2,}", "_")
- result = result.toUpperCase;
- result = result.replaceAll("UML_","");
- return result;
- }
-
-
-
-
- static def generateRegistry(Resource it,String outputType) '''
- /*****************************************************************************
- * 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
- *
- *****************************************************************************/
- import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
- import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-
- public class «outputType» extends AbstractElementTypeEnumerator {
-
- /** Constant for UML nature */
- public static final String UML_NATURE = "UML_Nature";
-
- «FOR elementTypeConfiguration : allContentsIterable(it).filter(typeof(ElementTypeConfiguration))»
- public static final IHintedType «safeName(elementTypeConfiguration.name).toUpperCase» = (IHintedType)getElementType("«elementTypeConfiguration.identifier»"); //$NON-NLS-1$
-
- «ENDFOR»
-
- }
- '''
-}
+package org.eclipse.papyrus.dev.types.generator
+
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.emf.common.util.TreeIterator
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.papyrus.infra.types.ElementTypeConfiguration
+
+class ElementTypeRegistryGenerator {
+
+ static def Iterable<EObject> allContentsIterable(Resource resource) {
+ var TreeIterator<EObject> _allContents = resource.getAllContents();
+ return IteratorExtensions.<EObject>toIterable(_allContents);
+ }
+
+ static def String camelToUnderScore(String in) {
+ var String regex = "([a-z])([A-Z])";
+ var String replacement = "$1_$2";
+ return in.replaceAll(regex, replacement);
+ }
+
+ static def String safeName(String in) {
+ var result = camelToUnderScore(in)
+ result = result.replaceAll("[^A-Za-z0-9]", "_")
+ result = result.replaceAll("_{2,}", "_")
+ result = result.toUpperCase;
+ result = result.replaceAll("UML_","");
+ return result;
+ }
+
+
+
+
+ static def generateRegistry(Resource it,String outputType) '''
+ /*****************************************************************************
+ * 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
+ *
+ *****************************************************************************/
+ import org.eclipse.gmf.runtime.emf.type.core.AbstractElementTypeEnumerator;
+ import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+
+ public class «outputType» extends AbstractElementTypeEnumerator {
+
+ /** Constant for UML nature */
+ public static final String UML_NATURE = "UML_Nature";
+
+ «FOR elementTypeConfiguration : allContentsIterable(it).filter(typeof(ElementTypeConfiguration))»
+ public static final IHintedType «safeName(elementTypeConfiguration.name).toUpperCase» = (IHintedType)getElementType("«elementTypeConfiguration.identifier»"); //$NON-NLS-1$
+
+ «ENDFOR»
+
+ }
+ '''
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesContentProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesContentProvider.java
index 2a7be16c7dd..984594e82d4 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesContentProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesContentProvider.java
@@ -1,85 +1,85 @@
-/*****************************************************************************
- * 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.dev.types.providers;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.MetamodelType;
-import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.dev.types.utils.IElementTypeComparator;
-
-public class ElementTypesContentProvider implements ITreeContentProvider {
-
- private Map<IElementType, List<SpecializationType>> elementTypesHierarchy = new HashMap<IElementType, List<SpecializationType>>();
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput instanceof Object[]) {
- elementTypesHierarchy.clear();
- for (Object elementType : ((Object[]) newInput)) {
- if (elementType instanceof MetamodelType) {
- if (!elementTypesHierarchy.containsKey(elementType)) {
- elementTypesHierarchy.put((MetamodelType) elementType, new ArrayList<SpecializationType>());
- }
- } else if (elementType instanceof SpecializationType) {
- for (IElementType superType : ((SpecializationType) elementType).getSpecializedTypes()) {
- if (!elementTypesHierarchy.containsKey(superType)) {
- elementTypesHierarchy.put(superType, new ArrayList<SpecializationType>());
- }
- elementTypesHierarchy.get(superType).add((SpecializationType) elementType);
- }
- }
- }
- }
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- inputChanged(null, null, inputElement);
- ArrayList<IElementType> result = new ArrayList<IElementType>();
- for (IElementType iElementType : elementTypesHierarchy.keySet()) {
- if (iElementType instanceof MetamodelType) {
- result.add(iElementType);
- }
- }
- Collections.sort(result, new IElementTypeComparator());
-
- return result.toArray();
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- return elementTypesHierarchy.containsKey(parentElement) ? elementTypesHierarchy.get(parentElement).toArray() : Collections.emptyList().toArray();
- }
-
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- return getChildren(element).length == 0 ? false : true;
- }
-}
+/*****************************************************************************
+ * 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.dev.types.providers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.MetamodelType;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.dev.types.utils.IElementTypeComparator;
+
+public class ElementTypesContentProvider implements ITreeContentProvider {
+
+ private Map<IElementType, List<SpecializationType>> elementTypesHierarchy = new HashMap<IElementType, List<SpecializationType>>();
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (newInput instanceof Object[]) {
+ elementTypesHierarchy.clear();
+ for (Object elementType : ((Object[]) newInput)) {
+ if (elementType instanceof MetamodelType) {
+ if (!elementTypesHierarchy.containsKey(elementType)) {
+ elementTypesHierarchy.put((MetamodelType) elementType, new ArrayList<SpecializationType>());
+ }
+ } else if (elementType instanceof SpecializationType) {
+ for (IElementType superType : ((SpecializationType) elementType).getSpecializedTypes()) {
+ if (!elementTypesHierarchy.containsKey(superType)) {
+ elementTypesHierarchy.put(superType, new ArrayList<SpecializationType>());
+ }
+ elementTypesHierarchy.get(superType).add((SpecializationType) elementType);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ inputChanged(null, null, inputElement);
+ ArrayList<IElementType> result = new ArrayList<IElementType>();
+ for (IElementType iElementType : elementTypesHierarchy.keySet()) {
+ if (iElementType instanceof MetamodelType) {
+ result.add(iElementType);
+ }
+ }
+ Collections.sort(result, new IElementTypeComparator());
+
+ return result.toArray();
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return elementTypesHierarchy.containsKey(parentElement) ? elementTypesHierarchy.get(parentElement).toArray() : Collections.emptyList().toArray();
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length == 0 ? false : true;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsContentProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsContentProvider.java
index 92e08cff7d3..3f6bf29481b 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsContentProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsContentProvider.java
@@ -1,170 +1,170 @@
-/*****************************************************************************
- * 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.dev.types.providers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.infra.types.core.utils.AdviceComparator;
-
-public class ElementTypesDetailsContentProvider implements ITreeContentProvider {
-
- String contextID;
-
- String typeID;
-
-
- /**
- * @param contextID
- * the contextID to set
- */
- public void setContextID(String contextID) {
- this.contextID = contextID;
- }
-
- public void setTypeID(String typeID) {
- this.typeID = typeID;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- *
- */
- @Override
- public void dispose() {
-
-
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- *
- * @param viewer
- * @param oldInput
- * @param newInput
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
-
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
- *
- * @param inputElement
- * @return
- */
- @Override
- public Object[] getElements(Object inputElement) {
- ArrayList<Object> result = new ArrayList<Object>();
- if (inputElement instanceof IElementType) {
- if (inputElement instanceof IHintedType) {
- result.add("Semantic Hint: " + ((IHintedType) inputElement).getSemanticHint());
- } else {
- result.add("Not Hinted");
- }
- if (inputElement instanceof SpecializationType) {
- for (String id : ((SpecializationType) inputElement).getSpecializedTypeIds()) {
- result.add("SpecializedType Id: " + id);
- }
-
-
- if (((SpecializationType) inputElement).getEditHelperAdvice() != null) {
- result.add("EditHelperAdvice: " + ((SpecializationType) inputElement).getEditHelperAdvice().getClass().getName());
- } else {
- result.add("EditHelperAdvice: None");
- }
-
- if (((SpecializationType) inputElement).getEContainerDescriptor() != null) {
- String eReferences = "";
- for (EReference eReference : ((SpecializationType) inputElement).getEContainerDescriptor().getContainmentFeatures()) {
- eReferences += EMFCoreUtil.getQualifiedName(eReference, true) + " ";
- }
- result.add("EContainerDescriptor: " + eReferences);
- } else {
- result.add("EContainerDescriptor: None");
- }
- }
-
- if (((IElementType) inputElement).getEditHelper() != null) {
- result.add("EditHelper: " + ((IElementType) inputElement).getEditHelper().getClass().getName());
- } else {
- result.add("EditHelper: None");
- }
-
- if (((IElementType) inputElement).getEClass() != null) {
- result.add("Eclass: " + EMFCoreUtil.getQualifiedName(((IElementType) inputElement).getEClass(), true));
- } else {
- result.add("Eclass: None");
- }
-
- result.add("Display Name: " + ((IElementType) inputElement).getDisplayName());
- IEditHelperAdvice[] advices = ElementTypeRegistry.getInstance().getEditHelperAdvice(((IElementType) inputElement));
- result.add(Arrays.asList(advices));
- }
- return result.toArray();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- *
- * @param parentElement
- * @return
- */
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof List<?>) {
- Collections.sort((List<IEditHelperAdvice>) parentElement, new AdviceComparator(ElementTypeRegistry.getInstance().getType(typeID), contextID));
- return ((List<?>) parentElement).toArray();
- }
-
- return Collections.emptyList().toArray();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Object getParent(Object element) {
-
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean hasChildren(Object element) {
- return getChildren(element).length == 0 ? false : true;
- }
-
-
-}
+/*****************************************************************************
+ * 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.dev.types.providers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.types.core.utils.AdviceComparator;
+
+public class ElementTypesDetailsContentProvider implements ITreeContentProvider {
+
+ String contextID;
+
+ String typeID;
+
+
+ /**
+ * @param contextID
+ * the contextID to set
+ */
+ public void setContextID(String contextID) {
+ this.contextID = contextID;
+ }
+
+ public void setTypeID(String typeID) {
+ this.typeID = typeID;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+
+
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ *
+ * @param viewer
+ * @param oldInput
+ * @param newInput
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
+ *
+ * @param inputElement
+ * @return
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ if (inputElement instanceof IElementType) {
+ if (inputElement instanceof IHintedType) {
+ result.add("Semantic Hint: " + ((IHintedType) inputElement).getSemanticHint());
+ } else {
+ result.add("Not Hinted");
+ }
+ if (inputElement instanceof SpecializationType) {
+ for (String id : ((SpecializationType) inputElement).getSpecializedTypeIds()) {
+ result.add("SpecializedType Id: " + id);
+ }
+
+
+ if (((SpecializationType) inputElement).getEditHelperAdvice() != null) {
+ result.add("EditHelperAdvice: " + ((SpecializationType) inputElement).getEditHelperAdvice().getClass().getName());
+ } else {
+ result.add("EditHelperAdvice: None");
+ }
+
+ if (((SpecializationType) inputElement).getEContainerDescriptor() != null) {
+ String eReferences = "";
+ for (EReference eReference : ((SpecializationType) inputElement).getEContainerDescriptor().getContainmentFeatures()) {
+ eReferences += EMFCoreUtil.getQualifiedName(eReference, true) + " ";
+ }
+ result.add("EContainerDescriptor: " + eReferences);
+ } else {
+ result.add("EContainerDescriptor: None");
+ }
+ }
+
+ if (((IElementType) inputElement).getEditHelper() != null) {
+ result.add("EditHelper: " + ((IElementType) inputElement).getEditHelper().getClass().getName());
+ } else {
+ result.add("EditHelper: None");
+ }
+
+ if (((IElementType) inputElement).getEClass() != null) {
+ result.add("Eclass: " + EMFCoreUtil.getQualifiedName(((IElementType) inputElement).getEClass(), true));
+ } else {
+ result.add("Eclass: None");
+ }
+
+ result.add("Display Name: " + ((IElementType) inputElement).getDisplayName());
+ IEditHelperAdvice[] advices = ElementTypeRegistry.getInstance().getEditHelperAdvice(((IElementType) inputElement));
+ result.add(Arrays.asList(advices));
+ }
+ return result.toArray();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ *
+ * @param parentElement
+ * @return
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof List<?>) {
+ Collections.sort((List<IEditHelperAdvice>) parentElement, new AdviceComparator(ElementTypeRegistry.getInstance().getType(typeID), contextID));
+ return ((List<?>) parentElement).toArray();
+ }
+
+ return Collections.emptyList().toArray();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Object getParent(Object element) {
+
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length == 0 ? false : true;
+ }
+
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsLabelProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsLabelProvider.java
index 508b2bce445..607ba42dcf6 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsLabelProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesDetailsLabelProvider.java
@@ -1,39 +1,39 @@
-/*****************************************************************************
- * 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.dev.types.providers;
-
-import java.util.List;
-
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.swt.graphics.Image;
-
-public class ElementTypesDetailsLabelProvider extends org.eclipse.jface.viewers.LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- return null;
- }
-
- @Override
- public String getText(Object element) {
- String result = "";
- if (element instanceof String) {
- result += element;
- } else if (element instanceof List<?>) {
- result += "Advices: ";
- } else if (element instanceof IEditHelperAdvice) {
- result += element;
- }
- return result;
- }
-}
+/*****************************************************************************
+ * 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.dev.types.providers;
+
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.swt.graphics.Image;
+
+public class ElementTypesDetailsLabelProvider extends org.eclipse.jface.viewers.LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = "";
+ if (element instanceof String) {
+ result += element;
+ } else if (element instanceof List<?>) {
+ result += "Advices: ";
+ } else if (element instanceof IEditHelperAdvice) {
+ result += element;
+ }
+ return result;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesLabelProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesLabelProvider.java
index d058a520729..c89cc88d5e6 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesLabelProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/ElementTypesLabelProvider.java
@@ -1,45 +1,45 @@
-/*****************************************************************************
- * 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.dev.types.providers;
-
-import java.io.IOException;
-
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-
-public class ElementTypesLabelProvider extends org.eclipse.jface.viewers.LabelProvider {
-
- @Override
- public Image getImage(Object element) {
- if (element instanceof IElementType) {
- if (((IElementType) element).getIconURL() != null) {
- try {
- return new Image(Display.getCurrent(), ((IElementType) element).getIconURL().openStream());
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- }
- return null;
- }
-
- @Override
- public String getText(Object element) {
- String result = "";
- if (element instanceof IElementType) {
- result += ((IElementType) element).getId();
- }
- return result;
- }
-}
+/*****************************************************************************
+ * 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.dev.types.providers;
+
+import java.io.IOException;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class ElementTypesLabelProvider extends org.eclipse.jface.viewers.LabelProvider {
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IElementType) {
+ if (((IElementType) element).getIconURL() != null) {
+ try {
+ return new Image(Display.getCurrent(), ((IElementType) element).getIconURL().openStream());
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = "";
+ if (element instanceof IElementType) {
+ result += ((IElementType) element).getId();
+ }
+ return result;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventContentProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventContentProvider.java
index 58d0d5306cd..28d507d7ef5 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventContentProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventContentProvider.java
@@ -1,161 +1,161 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.dev.types.providers;
-
-import java.util.AbstractMap;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
-import org.eclipse.papyrus.infra.types.core.notification.events.AbstractTypesEvent;
-
-
-public class TypesEventContentProvider implements ITreeContentProvider {
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- *
- */
- @Override
- public void dispose() {
-
-
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- *
- * @param viewer
- * @param oldInput
- * @param newInput
- */
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
-
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- *
- * @param inputElement
- * @return
- */
- @Override
- public Object[] getElements(Object inputElement) {
- List<TypesEventsChain> result = new ArrayList<TypesEventsChain>();
- if (inputElement instanceof List<?>) {
- List<?> inputSet = (List<?>) inputElement;
- for (Object element : inputSet) {
- if (element instanceof TypesEventsChain) {
- result.add((TypesEventsChain) element);
- }
- }
- }
-
- Collections.sort(result, new Comparator<TypesEventsChain>() {
-
- @Override
- public int compare(TypesEventsChain o1, TypesEventsChain o2) {
- if (o1.getTimestamp() > o2.getTimestamp()) {
- return -1;
- }
- return 1;
- }
- });
-
-
- return result.toArray();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- *
- * @param parentElement
- * @return
- */
- @Override
- public Object[] getChildren(Object parentElement) {
-
-
- List<Object> result = new ArrayList<Object>();
- if (parentElement instanceof TypesEventsChain) {
- TypesEventsChain typesEventsChain = (TypesEventsChain) parentElement;
-
- List<AbstractTypesEvent> adviceRequestConfigurationEvents = typesEventsChain.getAdviceRequestConfigurationEvents();
- if (!adviceRequestConfigurationEvents.isEmpty()) {
- result.add(new AbstractMap.SimpleEntry<String, Object>("AdviceRequestConfigurationEvents", adviceRequestConfigurationEvents));
- }
- AbstractTypesEvent editHelperRequestConfigurationEvent = typesEventsChain.getEditHelperRequestConfigurationEvent();
- if (editHelperRequestConfigurationEvent != null) {
- result.add(editHelperRequestConfigurationEvent);
- }
- List<AbstractTypesEvent> adviceApprovalEvents = typesEventsChain.getAdviceApprovalEvents();
- if (!adviceApprovalEvents.isEmpty()) {
- result.add(new AbstractMap.SimpleEntry<String, Object>("AdviceApprovalEvents", adviceApprovalEvents));
- }
- AbstractTypesEvent editHelperApprovalEvent = typesEventsChain.getEditHelperApprovalEvent();
- if (editHelperApprovalEvent != null) {
- result.add(editHelperApprovalEvent);
- }
- List<AbstractTypesEvent> beforeAdvicesCommandsEvents = typesEventsChain.getBeforeAdvicesCommandsEvents();
- if (!beforeAdvicesCommandsEvents.isEmpty()) {
- result.add(new AbstractMap.SimpleEntry<String, Object>("BeforeAdvicesCommandsEvents", beforeAdvicesCommandsEvents));
- }
- AbstractTypesEvent editHelperCommandEvent = typesEventsChain.getEditHelperCommandEvent();
- if (editHelperCommandEvent != null) {
- result.add(editHelperCommandEvent);
- }
- List<AbstractTypesEvent> afterAdvicesCommandsEvents = typesEventsChain.getAfterAdvicesCommandsEvents();
- if (!afterAdvicesCommandsEvents.isEmpty()) {
- result.add(new AbstractMap.SimpleEntry<String, Object>("AfterAdvicesCommandsEvents", afterAdvicesCommandsEvents));
- }
- } else if (parentElement instanceof Map.Entry) {
- Object value = ((Map.Entry<?, ?>) parentElement).getValue();
- if (value instanceof Collection) {
- result.addAll((Collection<?>) value);
- }
- }
- return result.toArray();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public boolean hasChildren(Object element) {
- return getChildren(element).length == 0 ? false : true;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.dev.types.providers;
+
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
+import org.eclipse.papyrus.infra.types.core.notification.events.AbstractTypesEvent;
+
+
+public class TypesEventContentProvider implements ITreeContentProvider {
+
+ /**
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+
+
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ *
+ * @param viewer
+ * @param oldInput
+ * @param newInput
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ *
+ * @param inputElement
+ * @return
+ */
+ @Override
+ public Object[] getElements(Object inputElement) {
+ List<TypesEventsChain> result = new ArrayList<TypesEventsChain>();
+ if (inputElement instanceof List<?>) {
+ List<?> inputSet = (List<?>) inputElement;
+ for (Object element : inputSet) {
+ if (element instanceof TypesEventsChain) {
+ result.add((TypesEventsChain) element);
+ }
+ }
+ }
+
+ Collections.sort(result, new Comparator<TypesEventsChain>() {
+
+ @Override
+ public int compare(TypesEventsChain o1, TypesEventsChain o2) {
+ if (o1.getTimestamp() > o2.getTimestamp()) {
+ return -1;
+ }
+ return 1;
+ }
+ });
+
+
+ return result.toArray();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ *
+ * @param parentElement
+ * @return
+ */
+ @Override
+ public Object[] getChildren(Object parentElement) {
+
+
+ List<Object> result = new ArrayList<Object>();
+ if (parentElement instanceof TypesEventsChain) {
+ TypesEventsChain typesEventsChain = (TypesEventsChain) parentElement;
+
+ List<AbstractTypesEvent> adviceRequestConfigurationEvents = typesEventsChain.getAdviceRequestConfigurationEvents();
+ if (!adviceRequestConfigurationEvents.isEmpty()) {
+ result.add(new AbstractMap.SimpleEntry<String, Object>("AdviceRequestConfigurationEvents", adviceRequestConfigurationEvents));
+ }
+ AbstractTypesEvent editHelperRequestConfigurationEvent = typesEventsChain.getEditHelperRequestConfigurationEvent();
+ if (editHelperRequestConfigurationEvent != null) {
+ result.add(editHelperRequestConfigurationEvent);
+ }
+ List<AbstractTypesEvent> adviceApprovalEvents = typesEventsChain.getAdviceApprovalEvents();
+ if (!adviceApprovalEvents.isEmpty()) {
+ result.add(new AbstractMap.SimpleEntry<String, Object>("AdviceApprovalEvents", adviceApprovalEvents));
+ }
+ AbstractTypesEvent editHelperApprovalEvent = typesEventsChain.getEditHelperApprovalEvent();
+ if (editHelperApprovalEvent != null) {
+ result.add(editHelperApprovalEvent);
+ }
+ List<AbstractTypesEvent> beforeAdvicesCommandsEvents = typesEventsChain.getBeforeAdvicesCommandsEvents();
+ if (!beforeAdvicesCommandsEvents.isEmpty()) {
+ result.add(new AbstractMap.SimpleEntry<String, Object>("BeforeAdvicesCommandsEvents", beforeAdvicesCommandsEvents));
+ }
+ AbstractTypesEvent editHelperCommandEvent = typesEventsChain.getEditHelperCommandEvent();
+ if (editHelperCommandEvent != null) {
+ result.add(editHelperCommandEvent);
+ }
+ List<AbstractTypesEvent> afterAdvicesCommandsEvents = typesEventsChain.getAfterAdvicesCommandsEvents();
+ if (!afterAdvicesCommandsEvents.isEmpty()) {
+ result.add(new AbstractMap.SimpleEntry<String, Object>("AfterAdvicesCommandsEvents", afterAdvicesCommandsEvents));
+ }
+ } else if (parentElement instanceof Map.Entry) {
+ Object value = ((Map.Entry<?, ?>) parentElement).getValue();
+ if (value instanceof Collection) {
+ result.addAll((Collection<?>) value);
+ }
+ }
+ return result.toArray();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length == 0 ? false : true;
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventLabelProvider.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventLabelProvider.java
index b9b6b310828..ee532309225 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventLabelProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/providers/TypesEventLabelProvider.java
@@ -1,135 +1,135 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.dev.types.providers;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Map;
-
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
-import org.eclipse.papyrus.infra.types.core.notification.events.TypesEventKind;
-import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-
-public class TypesEventLabelProvider extends org.eclipse.jface.viewers.LabelProvider implements IColorProvider {
-
- @Override
- public Image getImage(Object element) {
-
- return null;
- }
-
- @Override
- public String getText(Object element) {
- String result = "";
- Calendar calendar = Calendar.getInstance();
- SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd - hh:mm:ss:SSS");
- if (element instanceof ITypesEvent) {
- calendar.setTimeInMillis(((ITypesEvent) element).getTimestamp());
- result += "[" + formater.format(calendar.getTime()) + "] " + ((ITypesEvent) element).getEventName();
- } else if (element instanceof TypesEventsChain) {
- calendar.setTimeInMillis(((TypesEventsChain) element).getTimestamp());
- result += "[" + formater.format(calendar.getTime()) + "] " + ((TypesEventsChain) element).getName();
- } else if (element instanceof Map.Entry) {
- result += ((Map.Entry<?, ?>) element).getKey().toString();
- } else {
- result += element.toString();
- }
- return result;
- }
-
- Color yellow = new Color(Display.getCurrent(), new RGB(255, 200, 0));
- Color green = new Color(Display.getCurrent(), new RGB(0, 128, 0));
- Color red = new Color(Display.getCurrent(), new RGB(255, 0, 0));
- Color black = new Color(Display.getCurrent(), new RGB(0, 0, 0));
- Color blue = new Color(Display.getCurrent(), new RGB(0, 0, 255));
-
-
- /**
- * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Color getForeground(Object element) {
- if (element instanceof ITypesEvent) {
- if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Disapproved)) {
- return red;
- } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Unexecutable)) {
- return red;
- } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Executable)) {
- return green;
- } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Approved)) {
- return green;
- } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Identity)) {
- return yellow;
- } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.RequestConfiguration)) {
- return blue;
- }
- } else if (element instanceof Map.Entry) {
- Object value = ((Map.Entry<?, ?>) element).getValue();
- if (value instanceof Collection) {
- return checkWorst((Collection<?>) value, true);
- }
- } else if (element instanceof TypesEventsChain) {
- return checkWorst(((TypesEventsChain) element).getAllEvents(), false);
- }
- return black;
- }
-
- /**
- * @param value
- */
- private Color checkWorst(Collection<?> value, boolean considerRequestConfiguration) {
- Color result = green;
- for (Object object : value) {
- if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Disapproved)) {
- return red;
- } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Unexecutable)) {
- return red;
- } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Identity)) {
- if (result == green) {
- result = yellow;
- }
- } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.RequestConfiguration)) {
- if (considerRequestConfiguration) {
- if (result != yellow && result != red) {
- result = blue;
- }
- }
- }
- }
- return result;
- }
-
- /**
- * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
- *
- * @param element
- * @return
- */
- @Override
- public Color getBackground(Object element) {
-
- return null;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.dev.types.providers;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Map;
+
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
+import org.eclipse.papyrus.infra.types.core.notification.events.TypesEventKind;
+import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+
+public class TypesEventLabelProvider extends org.eclipse.jface.viewers.LabelProvider implements IColorProvider {
+
+ @Override
+ public Image getImage(Object element) {
+
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ String result = "";
+ Calendar calendar = Calendar.getInstance();
+ SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd - hh:mm:ss:SSS");
+ if (element instanceof ITypesEvent) {
+ calendar.setTimeInMillis(((ITypesEvent) element).getTimestamp());
+ result += "[" + formater.format(calendar.getTime()) + "] " + ((ITypesEvent) element).getEventName();
+ } else if (element instanceof TypesEventsChain) {
+ calendar.setTimeInMillis(((TypesEventsChain) element).getTimestamp());
+ result += "[" + formater.format(calendar.getTime()) + "] " + ((TypesEventsChain) element).getName();
+ } else if (element instanceof Map.Entry) {
+ result += ((Map.Entry<?, ?>) element).getKey().toString();
+ } else {
+ result += element.toString();
+ }
+ return result;
+ }
+
+ Color yellow = new Color(Display.getCurrent(), new RGB(255, 200, 0));
+ Color green = new Color(Display.getCurrent(), new RGB(0, 128, 0));
+ Color red = new Color(Display.getCurrent(), new RGB(255, 0, 0));
+ Color black = new Color(Display.getCurrent(), new RGB(0, 0, 0));
+ Color blue = new Color(Display.getCurrent(), new RGB(0, 0, 255));
+
+
+ /**
+ * @see org.eclipse.jface.viewers.IColorProvider#getForeground(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Color getForeground(Object element) {
+ if (element instanceof ITypesEvent) {
+ if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Disapproved)) {
+ return red;
+ } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Unexecutable)) {
+ return red;
+ } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Executable)) {
+ return green;
+ } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Approved)) {
+ return green;
+ } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.Identity)) {
+ return yellow;
+ } else if (((ITypesEvent) element).getEventType().equals(TypesEventKind.RequestConfiguration)) {
+ return blue;
+ }
+ } else if (element instanceof Map.Entry) {
+ Object value = ((Map.Entry<?, ?>) element).getValue();
+ if (value instanceof Collection) {
+ return checkWorst((Collection<?>) value, true);
+ }
+ } else if (element instanceof TypesEventsChain) {
+ return checkWorst(((TypesEventsChain) element).getAllEvents(), false);
+ }
+ return black;
+ }
+
+ /**
+ * @param value
+ */
+ private Color checkWorst(Collection<?> value, boolean considerRequestConfiguration) {
+ Color result = green;
+ for (Object object : value) {
+ if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Disapproved)) {
+ return red;
+ } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Unexecutable)) {
+ return red;
+ } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.Identity)) {
+ if (result == green) {
+ result = yellow;
+ }
+ } else if (((ITypesEvent) object).getEventType().equals(TypesEventKind.RequestConfiguration)) {
+ if (considerRequestConfiguration) {
+ if (result != yellow && result != red) {
+ result = blue;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IColorProvider#getBackground(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+ @Override
+ public Color getBackground(Object element) {
+
+ return null;
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/EClassComparator.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/EClassComparator.java
index 43edf19b7f2..25a9421e6f6 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/EClassComparator.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/EClassComparator.java
@@ -1,25 +1,25 @@
-/*****************************************************************************
- * 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.dev.types.utils;
-
-import java.util.Comparator;
-
-import org.eclipse.emf.ecore.EClass;
-
-public class EClassComparator implements Comparator<EClass> {
-
- @Override
- public int compare(EClass o1, EClass o2) {
- return o1.getName().compareTo(o2.getName());
- }
+/*****************************************************************************
+ * 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.dev.types.utils;
+
+import java.util.Comparator;
+
+import org.eclipse.emf.ecore.EClass;
+
+public class EClassComparator implements Comparator<EClass> {
+
+ @Override
+ public int compare(EClass o1, EClass o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeConfigurationComparator.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeConfigurationComparator.java
index 6632433a54f..b8de00edf4c 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeConfigurationComparator.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeConfigurationComparator.java
@@ -1,25 +1,25 @@
-/*****************************************************************************
- * 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.dev.types.utils;
-
-import java.util.Comparator;
-
-import org.eclipse.papyrus.infra.types.ElementTypeConfiguration;
-
-public class ElementTypeConfigurationComparator implements Comparator<ElementTypeConfiguration> {
-
- @Override
- public int compare(ElementTypeConfiguration o1, ElementTypeConfiguration o2) {
- return o1.getName().compareTo(o2.getName());
- }
+/*****************************************************************************
+ * 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.dev.types.utils;
+
+import java.util.Comparator;
+
+import org.eclipse.papyrus.infra.types.ElementTypeConfiguration;
+
+public class ElementTypeConfigurationComparator implements Comparator<ElementTypeConfiguration> {
+
+ @Override
+ public int compare(ElementTypeConfiguration o1, ElementTypeConfiguration o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeRegistryUtils.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeRegistryUtils.java
index bd6cd54695b..0b44546e382 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeRegistryUtils.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/ElementTypeRegistryUtils.java
@@ -1,45 +1,45 @@
-/*****************************************************************************
- * 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.dev.types.utils;
-
-import java.lang.reflect.Field;
-
-import org.eclipse.gmf.runtime.emf.type.core.MetamodelType;
-import org.eclipse.papyrus.dev.types.Activator;
-
-
-public class ElementTypeRegistryUtils {
-
-
- static public synchronized Field getNullElementTypeEditHelper() {
-
- Field declaredField = null;
- try {
- declaredField = MetamodelType.class.getDeclaredField("editHelper");
- } catch (SecurityException e1) {
- Activator.log.error(e1);
- return null;
- } catch (NoSuchFieldException e1) {
- Activator.log.error(e1);
- return null;
- }
- if (declaredField == null) {
- Activator.log.error("impossible to find editHelper", null);
- return null;
- }
- declaredField.setAccessible(true);
-
- return declaredField;
- }
-
-}
+/*****************************************************************************
+ * 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.dev.types.utils;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.gmf.runtime.emf.type.core.MetamodelType;
+import org.eclipse.papyrus.dev.types.Activator;
+
+
+public class ElementTypeRegistryUtils {
+
+
+ static public synchronized Field getNullElementTypeEditHelper() {
+
+ Field declaredField = null;
+ try {
+ declaredField = MetamodelType.class.getDeclaredField("editHelper");
+ } catch (SecurityException e1) {
+ Activator.log.error(e1);
+ return null;
+ } catch (NoSuchFieldException e1) {
+ Activator.log.error(e1);
+ return null;
+ }
+ if (declaredField == null) {
+ Activator.log.error("impossible to find editHelper", null);
+ return null;
+ }
+ declaredField.setAccessible(true);
+
+ return declaredField;
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/GenerateElementTypesConfigurationsUtils.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/GenerateElementTypesConfigurationsUtils.java
index fbc452094b2..05a3ad24c00 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/GenerateElementTypesConfigurationsUtils.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/GenerateElementTypesConfigurationsUtils.java
@@ -1,112 +1,112 @@
-/*****************************************************************************
- * 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.dev.types.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.uml2.uml.UMLPackage;
-
-public class GenerateElementTypesConfigurationsUtils {
-
-
-
- static public Collection<EReference> findAmbiguousContainments(EReference eReference, Collection<EReference> possibleContainmentsEReference) {
- HashSet<EReference> result = new HashSet<EReference>();
-
- for (EReference ownerContainment : eReference.getEContainingClass().getEAllContainments()) {
- for (EReference possibleContainement : possibleContainmentsEReference) {
- if (eReference != possibleContainement) {
- if (ownerContainment.equals(possibleContainement)) {
- result.add(possibleContainement);
- }
- }
- }
- }
-
- return result;
- }
-
- static public Collection<EReference> findPossibleContainmentsEReference(EClass ownedEClass, Collection<EClass> ownerTypes) {
- HashSet<EReference> result = new HashSet<EReference>();
- for (EClass candidateOwner : ownerTypes) {
- for (EReference eReference : candidateOwner.getEAllContainments()) {
- if (isKindOf(ownedEClass, eReference.getEReferenceType())) {
- result.add(eReference);
- }
- }
- }
- return result;
- }
-
- static public boolean isKindOf(EClass a, EClassifier b) {
- if (a.getEAllSuperTypes().contains(b)) {
- return true;
- } else {
- return a.equals(b);
- }
- }
-
- static public Collection<EClass> getAllEClass(EPackage ePackage) {
- List<EClass> eClasses = new ArrayList<EClass>();
- for (EClassifier eClassifier : ePackage.getEClassifiers()) {
- if (eClassifier instanceof EClass) {
- eClasses.add((EClass) eClassifier);
- }
- }
-
- Collections.sort(eClasses, new EClassComparator());
-
- return eClasses;
- }
-
- static public String getIdentifier(EClass eClass) {
- return "org.eclipse.papyrus.uml." + eClass.getName();
- }
-
- static public String getAsName(EReference containmentEReference, EClass container) {
- return "_As_" + ((ENamedElement) container.eContainer()).getName().toUpperCase() + "::" + container.getName() + "::" + containmentEReference.getName();
- }
-
- static public boolean isSpecializedASpecialization(EClass eClass, EReference containmentEReference) {
- Collection<EReference> possibleContainmentsEReference = findPossibleContainmentsEReference(eClass, getAllEClass(UMLPackage.eINSTANCE));
- if (!findAmbiguousContainments(containmentEReference, possibleContainmentsEReference).isEmpty()) {
- // The SpecialiazedType is SpecializationType
- return true;
- } else {
- // The SpecialiazedType is MetamodelType
- return false;
-
- }
- }
-
- static public String findSpecializedTypesIDs(EClass eClass, EReference containmentEReference) {
- if (isSpecializedASpecialization(eClass, containmentEReference)) {
- // The SpecialiazedType is SpecializationType
- return GenerateElementTypesConfigurationsUtils.getIdentifier(eClass) + GenerateElementTypesConfigurationsUtils.getAsName(containmentEReference, eClass);
- } else {
- // The SpecialiazedType is MetamodelType
- return getIdentifier(eClass);
- }
-
-
- }
-}
+/*****************************************************************************
+ * 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.dev.types.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class GenerateElementTypesConfigurationsUtils {
+
+
+
+ static public Collection<EReference> findAmbiguousContainments(EReference eReference, Collection<EReference> possibleContainmentsEReference) {
+ HashSet<EReference> result = new HashSet<EReference>();
+
+ for (EReference ownerContainment : eReference.getEContainingClass().getEAllContainments()) {
+ for (EReference possibleContainement : possibleContainmentsEReference) {
+ if (eReference != possibleContainement) {
+ if (ownerContainment.equals(possibleContainement)) {
+ result.add(possibleContainement);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ static public Collection<EReference> findPossibleContainmentsEReference(EClass ownedEClass, Collection<EClass> ownerTypes) {
+ HashSet<EReference> result = new HashSet<EReference>();
+ for (EClass candidateOwner : ownerTypes) {
+ for (EReference eReference : candidateOwner.getEAllContainments()) {
+ if (isKindOf(ownedEClass, eReference.getEReferenceType())) {
+ result.add(eReference);
+ }
+ }
+ }
+ return result;
+ }
+
+ static public boolean isKindOf(EClass a, EClassifier b) {
+ if (a.getEAllSuperTypes().contains(b)) {
+ return true;
+ } else {
+ return a.equals(b);
+ }
+ }
+
+ static public Collection<EClass> getAllEClass(EPackage ePackage) {
+ List<EClass> eClasses = new ArrayList<EClass>();
+ for (EClassifier eClassifier : ePackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ eClasses.add((EClass) eClassifier);
+ }
+ }
+
+ Collections.sort(eClasses, new EClassComparator());
+
+ return eClasses;
+ }
+
+ static public String getIdentifier(EClass eClass) {
+ return "org.eclipse.papyrus.uml." + eClass.getName();
+ }
+
+ static public String getAsName(EReference containmentEReference, EClass container) {
+ return "_As_" + ((ENamedElement) container.eContainer()).getName().toUpperCase() + "::" + container.getName() + "::" + containmentEReference.getName();
+ }
+
+ static public boolean isSpecializedASpecialization(EClass eClass, EReference containmentEReference) {
+ Collection<EReference> possibleContainmentsEReference = findPossibleContainmentsEReference(eClass, getAllEClass(UMLPackage.eINSTANCE));
+ if (!findAmbiguousContainments(containmentEReference, possibleContainmentsEReference).isEmpty()) {
+ // The SpecialiazedType is SpecializationType
+ return true;
+ } else {
+ // The SpecialiazedType is MetamodelType
+ return false;
+
+ }
+ }
+
+ static public String findSpecializedTypesIDs(EClass eClass, EReference containmentEReference) {
+ if (isSpecializedASpecialization(eClass, containmentEReference)) {
+ // The SpecialiazedType is SpecializationType
+ return GenerateElementTypesConfigurationsUtils.getIdentifier(eClass) + GenerateElementTypesConfigurationsUtils.getAsName(containmentEReference, eClass);
+ } else {
+ // The SpecialiazedType is MetamodelType
+ return getIdentifier(eClass);
+ }
+
+
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/IElementTypeComparator.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/IElementTypeComparator.java
index b557679d875..622d729ecd7 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/IElementTypeComparator.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/IElementTypeComparator.java
@@ -1,25 +1,25 @@
-/*****************************************************************************
- * 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.dev.types.utils;
-
-import java.util.Comparator;
-
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-public class IElementTypeComparator implements Comparator<IElementType> {
-
- @Override
- public int compare(IElementType o1, IElementType o2) {
- return o1.getId().compareTo(o2.getId());
- }
+/*****************************************************************************
+ * 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.dev.types.utils;
+
+import java.util.Comparator;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+public class IElementTypeComparator implements Comparator<IElementType> {
+
+ @Override
+ public int compare(IElementType o1, IElementType o2) {
+ return o1.getId().compareTo(o2.getId());
+ }
} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/NotifierNullEditHelper.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/NotifierNullEditHelper.java
index c7297f9d370..df2e84c7db1 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/NotifierNullEditHelper.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/NotifierNullEditHelper.java
@@ -1,30 +1,30 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.dev.types.utils;
-
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.infra.types.core.notification.AbstractNotifierEditHelper;
-
-/**
- * Edit helper for the NullElementType that considers before and after
- * advice, only.
- */
-public class NotifierNullEditHelper
- extends AbstractNotifierEditHelper {
-
- protected ICommand getInsteadCommand(IEditCommandRequest req) {
- return null;
- }
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.dev.types.utils;
+
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.types.core.notification.AbstractNotifierEditHelper;
+
+/**
+ * Edit helper for the NullElementType that considers before and after
+ * advice, only.
+ */
+public class NotifierNullEditHelper
+ extends AbstractNotifierEditHelper {
+
+ protected ICommand getInsteadCommand(IEditCommandRequest req) {
+ return null;
+ }
} \ No newline at end of file
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/TypesEventPrinter.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/TypesEventPrinter.java
index 88ef53da10f..f8213214503 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/TypesEventPrinter.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/utils/TypesEventPrinter.java
@@ -1,138 +1,138 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.dev.types.utils;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.infra.types.core.notification.events.AdviceApprovedEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.AdviceDisapprovedEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.AdviceRequestEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperApprovedEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperDisapprovedEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperRequestEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.ExecutableAdviceEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.ExecutableEditHelperEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.IAdviceEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.IdentityAdviceEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.IdentityEditHelperEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.UnexecutableAdviceEvent;
-import org.eclipse.papyrus.infra.types.core.notification.events.UnexecutableEditHelperEvent;
-
-public class TypesEventPrinter {
- public static Map<String, String> getEventDetails(ITypesEvent event) {
- Map<String, String> result = new HashMap<>();
-
- if (event instanceof AdviceApprovedEvent) {
- result.put("Approved Advice", ((AdviceApprovedEvent) event).getAdvice().getClass().getName());
- } else if (event instanceof AdviceDisapprovedEvent) {
- result.put("Disapprover Advice", ((AdviceDisapprovedEvent) event).getAdvice().getClass().getName());
- } else if (event instanceof EditHelperApprovedEvent) {
- result.put("Approver edithelper", ((EditHelperApprovedEvent) event).getEditHelper().getClass().getName());
- } else if (event instanceof EditHelperDisapprovedEvent) {
- result.put("Disapprover edithelper", ((EditHelperDisapprovedEvent) event).getEditHelper().getClass().getName());
- } else if (event instanceof ExecutableAdviceEvent) {
- result.put("Advice", ((ExecutableAdviceEvent) event).getAdvice().getClass().getName());
- result.put("Phase ", ((ExecutableAdviceEvent) event).getAdvicePhase().name());
- result.put("Executable command", ((ExecutableAdviceEvent) event).getCommand().getClass().getName());
- } else if (event instanceof ExecutableEditHelperEvent) {
- result.put("Executable command from edithelper", ((ExecutableEditHelperEvent) event).getEditHelper().getClass().getName());
- result.put("Executable command", ((ExecutableEditHelperEvent) event).getCommand().getClass().getName());
- } else if (event instanceof IdentityAdviceEvent) {
- result.put("Identity Advice", ((IdentityAdviceEvent) event).getAdvice().getClass().getName());
- result.put("Phase ", ((IdentityAdviceEvent) event).getAdvicePhase().name());
- } else if (event instanceof IdentityEditHelperEvent) {
- result.put("Identity EditHelper", ((IdentityEditHelperEvent) event).getEditHelper().getClass().getName());
- } else if (event instanceof UnexecutableAdviceEvent) {
- result.put("Unexecutable Advice", ((UnexecutableAdviceEvent) event).getAdvice().getClass().getName());
- result.put("Phase ", ((UnexecutableAdviceEvent) event).getAdvicePhase().name());
- result.put("Unexecutable command", ((UnexecutableAdviceEvent) event).getCommand().getClass().getName());
- } else if (event instanceof UnexecutableEditHelperEvent) {
- result.put("Unexecutable command from edithelper", ((UnexecutableEditHelperEvent) event).getEditHelper().getClass().getName());
- result.put("Unexecutable command", ((UnexecutableEditHelperEvent) event).getCommand().getClass().getName());
- } else if (event instanceof AdviceRequestEvent) {
- result.put("RequestConfiguration Advice", ((AdviceRequestEvent) event).getAdvice().getClass().getName());
- } else if (event instanceof EditHelperRequestEvent) {
- result.put("RequestConfiguration EditHelper", ((EditHelperRequestEvent) event).getEditHelper().getClass().getName());
- }
-
- if (event instanceof IAdviceEvent) {
- String adviceNames = "";
- for (IEditHelperAdvice editHelperAdvice : ((IAdviceEvent) event).getAdvices()) {
- adviceNames += " -" + editHelperAdvice.getClass().getName() + "\n";
- }
- result.put("Among the following advices ", adviceNames);
- }
-
- return result;
- }
-
- public static String printHtmlEvent(Map<String, String> details) {
-
-
- String html = "<table border=\"1\">";
- for (String key : details.keySet()) {
- html += "<tr>";
- html += "<td><b>" + key + "<b></td>";
- html += "<td>" + details.get(key) + "</td>";
- html += "</tr>";
- }
- html += "</table>";
-
- html = html.replaceAll("\\n", "<br>");
-
- return html;
- }
-
- /**
- * @param req
- * @return
- */
- public static String printHtmRequest(IEditCommandRequest req) {
- String result = "<ul>";
- result += "<li><b>Request</b>: " + req + "</li>";
- result += "<li><b>Label</b>: " + req.getLabel() + "</li>";
- result += "<li><b>Kind</b>: " + req.getClass().getName() + "</li>";
- result += "<li><b>ElementsToEdit</b>: " + req.getElementsToEdit() + "</li>";
- result += "<li><b>Parameters</b>:</li>";
-
- if (!req.getParameters().keySet().isEmpty()) {
- result += "<ul>";
-
- for (Object key : req.getParameters().keySet()) {
- result += "<li><b>" + key + "</b> <-> " + req.getParameters().get(key) + "</li>";
- }
- result += "</ul>";
- }
- result += "<li><b>EditHelperContext</b>: " + req.getEditHelperContext() + "</li>";
-
- if (req instanceof CreateElementRequest) {
- result += "<li><b>ElementType</b>: " + ((CreateElementRequest) req).getElementType() + "</li>";
- result += "<li><b>Container</b>: " + ((CreateElementRequest) req).getContainer() + "</li>";
- result += "<li><b>ContainmentFeature</b>: " + ((CreateElementRequest) req).getContainmentFeature() + "</li>";
- if (req instanceof CreateRelationshipRequest) {
- result += "<li><b>Source</b>: " + ((CreateRelationshipRequest) req).getSource() + "</li>";
- result += "<li><b>Target</b>: " + ((CreateRelationshipRequest) req).getTarget() + "</li>";
- }
- }
- result += "</ul>";
-
- return result;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.dev.types.utils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.types.core.notification.events.AdviceApprovedEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.AdviceDisapprovedEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.AdviceRequestEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperApprovedEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperDisapprovedEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.EditHelperRequestEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.ExecutableAdviceEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.ExecutableEditHelperEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.IAdviceEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.IdentityAdviceEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.IdentityEditHelperEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.UnexecutableAdviceEvent;
+import org.eclipse.papyrus.infra.types.core.notification.events.UnexecutableEditHelperEvent;
+
+public class TypesEventPrinter {
+ public static Map<String, String> getEventDetails(ITypesEvent event) {
+ Map<String, String> result = new HashMap<>();
+
+ if (event instanceof AdviceApprovedEvent) {
+ result.put("Approved Advice", ((AdviceApprovedEvent) event).getAdvice().getClass().getName());
+ } else if (event instanceof AdviceDisapprovedEvent) {
+ result.put("Disapprover Advice", ((AdviceDisapprovedEvent) event).getAdvice().getClass().getName());
+ } else if (event instanceof EditHelperApprovedEvent) {
+ result.put("Approver edithelper", ((EditHelperApprovedEvent) event).getEditHelper().getClass().getName());
+ } else if (event instanceof EditHelperDisapprovedEvent) {
+ result.put("Disapprover edithelper", ((EditHelperDisapprovedEvent) event).getEditHelper().getClass().getName());
+ } else if (event instanceof ExecutableAdviceEvent) {
+ result.put("Advice", ((ExecutableAdviceEvent) event).getAdvice().getClass().getName());
+ result.put("Phase ", ((ExecutableAdviceEvent) event).getAdvicePhase().name());
+ result.put("Executable command", ((ExecutableAdviceEvent) event).getCommand().getClass().getName());
+ } else if (event instanceof ExecutableEditHelperEvent) {
+ result.put("Executable command from edithelper", ((ExecutableEditHelperEvent) event).getEditHelper().getClass().getName());
+ result.put("Executable command", ((ExecutableEditHelperEvent) event).getCommand().getClass().getName());
+ } else if (event instanceof IdentityAdviceEvent) {
+ result.put("Identity Advice", ((IdentityAdviceEvent) event).getAdvice().getClass().getName());
+ result.put("Phase ", ((IdentityAdviceEvent) event).getAdvicePhase().name());
+ } else if (event instanceof IdentityEditHelperEvent) {
+ result.put("Identity EditHelper", ((IdentityEditHelperEvent) event).getEditHelper().getClass().getName());
+ } else if (event instanceof UnexecutableAdviceEvent) {
+ result.put("Unexecutable Advice", ((UnexecutableAdviceEvent) event).getAdvice().getClass().getName());
+ result.put("Phase ", ((UnexecutableAdviceEvent) event).getAdvicePhase().name());
+ result.put("Unexecutable command", ((UnexecutableAdviceEvent) event).getCommand().getClass().getName());
+ } else if (event instanceof UnexecutableEditHelperEvent) {
+ result.put("Unexecutable command from edithelper", ((UnexecutableEditHelperEvent) event).getEditHelper().getClass().getName());
+ result.put("Unexecutable command", ((UnexecutableEditHelperEvent) event).getCommand().getClass().getName());
+ } else if (event instanceof AdviceRequestEvent) {
+ result.put("RequestConfiguration Advice", ((AdviceRequestEvent) event).getAdvice().getClass().getName());
+ } else if (event instanceof EditHelperRequestEvent) {
+ result.put("RequestConfiguration EditHelper", ((EditHelperRequestEvent) event).getEditHelper().getClass().getName());
+ }
+
+ if (event instanceof IAdviceEvent) {
+ String adviceNames = "";
+ for (IEditHelperAdvice editHelperAdvice : ((IAdviceEvent) event).getAdvices()) {
+ adviceNames += " -" + editHelperAdvice.getClass().getName() + "\n";
+ }
+ result.put("Among the following advices ", adviceNames);
+ }
+
+ return result;
+ }
+
+ public static String printHtmlEvent(Map<String, String> details) {
+
+
+ String html = "<table border=\"1\">";
+ for (String key : details.keySet()) {
+ html += "<tr>";
+ html += "<td><b>" + key + "<b></td>";
+ html += "<td>" + details.get(key) + "</td>";
+ html += "</tr>";
+ }
+ html += "</table>";
+
+ html = html.replaceAll("\\n", "<br>");
+
+ return html;
+ }
+
+ /**
+ * @param req
+ * @return
+ */
+ public static String printHtmRequest(IEditCommandRequest req) {
+ String result = "<ul>";
+ result += "<li><b>Request</b>: " + req + "</li>";
+ result += "<li><b>Label</b>: " + req.getLabel() + "</li>";
+ result += "<li><b>Kind</b>: " + req.getClass().getName() + "</li>";
+ result += "<li><b>ElementsToEdit</b>: " + req.getElementsToEdit() + "</li>";
+ result += "<li><b>Parameters</b>:</li>";
+
+ if (!req.getParameters().keySet().isEmpty()) {
+ result += "<ul>";
+
+ for (Object key : req.getParameters().keySet()) {
+ result += "<li><b>" + key + "</b> <-> " + req.getParameters().get(key) + "</li>";
+ }
+ result += "</ul>";
+ }
+ result += "<li><b>EditHelperContext</b>: " + req.getEditHelperContext() + "</li>";
+
+ if (req instanceof CreateElementRequest) {
+ result += "<li><b>ElementType</b>: " + ((CreateElementRequest) req).getElementType() + "</li>";
+ result += "<li><b>Container</b>: " + ((CreateElementRequest) req).getContainer() + "</li>";
+ result += "<li><b>ContainmentFeature</b>: " + ((CreateElementRequest) req).getContainmentFeature() + "</li>";
+ if (req instanceof CreateRelationshipRequest) {
+ result += "<li><b>Source</b>: " + ((CreateRelationshipRequest) req).getSource() + "</li>";
+ result += "<li><b>Target</b>: " + ((CreateRelationshipRequest) req).getTarget() + "</li>";
+ }
+ }
+ result += "</ul>";
+
+ return result;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/RegistredElementTypesView.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/RegistredElementTypesView.java
index da3a26356ae..a1e446eb0d2 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/RegistredElementTypesView.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/RegistredElementTypesView.java
@@ -1,196 +1,196 @@
-/*****************************************************************************
- * 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.dev.types.view;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.gmf.runtime.emf.type.core.ClientContextManager;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.papyrus.dev.types.providers.ElementTypesContentProvider;
-import org.eclipse.papyrus.dev.types.providers.ElementTypesDetailsContentProvider;
-import org.eclipse.papyrus.dev.types.providers.ElementTypesDetailsLabelProvider;
-import org.eclipse.papyrus.dev.types.providers.ElementTypesLabelProvider;
-import org.eclipse.papyrus.infra.types.core.utils.AdviceComparator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.part.ViewPart;
-
-public class RegistredElementTypesView extends ViewPart {
-
- FilteredTree detailsFilteredTree = null;
- SashForm sash = null;
- FilteredTree elementTypesFilteredTree = null;
- Combo combo = null;
- ElementTypesDetailsContentProvider elementTypesDetailsContentProvider;
-
-
- @Override
- public void createPartControl(Composite parent) {
- parent.setLayout(new GridLayout(1, true));
-
- combo = new Combo(parent, SWT.NONE);
- final List<String> itemsList = new ArrayList<>();
- List<IClientContext> contexts = new ArrayList<IClientContext>(ClientContextManager.getInstance().getClientContexts());
-
- int index = -1;
- int i = 0;
- for (IClientContext context : contexts) {
- itemsList.add(context.getId());
- if (context.getId().equals(ClientContextManager.getDefaultClientContext().getId())) {
- index = i;
- }
- i++;
- }
- String[] items = new String[itemsList.size()];
- items = itemsList.toArray(items);
- combo.setItems(items);
- if (index != -1) {
- combo.select(index);
- }
- combo.addSelectionListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- int index = combo.getSelectionIndex();
-
- String clientContexId = itemsList.get(index);
-
- if (clientContexId != null) {
- IClientContext clientContex = ClientContextManager.getInstance().getClientContext(clientContexId);
- if (clientContex != null) {
- IElementType[] elementTypes = ElementTypeRegistry.getInstance().getElementTypes(clientContex);
- elementTypesDetailsContentProvider.setContextID(clientContex.getId());
- elementTypesFilteredTree.getViewer().setInput(elementTypes);
- }
- }
-
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
-
-
- }
- });
-
- Button exportButton = new Button(parent, SWT.NONE);
- exportButton.setText("Export registry");
- exportButton.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseUp(MouseEvent e) {
- FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
- String dest = dialog.open();
- if (dest != null) {
- File file = new File(dest);
- if (file != null) {
- BufferedWriter writer = null;
- try {
- writer = new BufferedWriter(new FileWriter(file));
-
- for (String clientContexId : itemsList) {
- writer.write(clientContexId + "\n");
- IElementType[] elementTypes = ElementTypeRegistry.getInstance().getElementTypes(ClientContextManager.getInstance().getClientContext(clientContexId));
- for (int j = 0; j < elementTypes.length; j++) {
- IElementType elementType = elementTypes[j];
- writer.write("\t" + elementType.getId() + "\n");
-
-
- IEditHelperAdvice[] advices = ElementTypeRegistry.getInstance().getEditHelperAdvice(elementType);
- List<IEditHelperAdvice> advicesList = Arrays.asList(advices);
- Collections.sort(advicesList, new AdviceComparator(elementType, clientContexId));
- for (IEditHelperAdvice advice : advicesList) {
- writer.write("\t\t" + advice.getClass().getName() + "\n");
- }
- }
- }
-
- writer.flush();
-
- } catch (IOException e1) {
- e1.printStackTrace();
- } finally {
- try {
- writer.close();
- } catch (Exception e1) {
- e1.printStackTrace();
- }
- }
-
- }
- }
- }
- });
-
- sash = new SashForm(parent, SWT.HORIZONTAL);
- sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- elementTypesFilteredTree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
- elementTypesFilteredTree.getViewer().setLabelProvider(new ElementTypesLabelProvider());
- elementTypesFilteredTree.getViewer().setContentProvider(new ElementTypesContentProvider());
- detailsFilteredTree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
- detailsFilteredTree.getViewer().setLabelProvider(new ElementTypesDetailsLabelProvider());
- elementTypesDetailsContentProvider = new ElementTypesDetailsContentProvider();
- detailsFilteredTree.getViewer().setContentProvider(elementTypesDetailsContentProvider);
-
- if (index != -1) {
- combo.select(index);
- }
-
- elementTypesFilteredTree.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- if (event.getSelection() instanceof IStructuredSelection) {
- Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
- if (selection instanceof IElementType) {
- elementTypesDetailsContentProvider.setTypeID(((IElementType) selection).getId());
- detailsFilteredTree.getViewer().setInput(selection);
- }
- }
-
- }
- });
- }
-
- @Override
- public void setFocus() {
-
- }
-}
+/*****************************************************************************
+ * 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.dev.types.view;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.ClientContextManager;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.papyrus.dev.types.providers.ElementTypesContentProvider;
+import org.eclipse.papyrus.dev.types.providers.ElementTypesDetailsContentProvider;
+import org.eclipse.papyrus.dev.types.providers.ElementTypesDetailsLabelProvider;
+import org.eclipse.papyrus.dev.types.providers.ElementTypesLabelProvider;
+import org.eclipse.papyrus.infra.types.core.utils.AdviceComparator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.part.ViewPart;
+
+public class RegistredElementTypesView extends ViewPart {
+
+ FilteredTree detailsFilteredTree = null;
+ SashForm sash = null;
+ FilteredTree elementTypesFilteredTree = null;
+ Combo combo = null;
+ ElementTypesDetailsContentProvider elementTypesDetailsContentProvider;
+
+
+ @Override
+ public void createPartControl(Composite parent) {
+ parent.setLayout(new GridLayout(1, true));
+
+ combo = new Combo(parent, SWT.NONE);
+ final List<String> itemsList = new ArrayList<>();
+ List<IClientContext> contexts = new ArrayList<IClientContext>(ClientContextManager.getInstance().getClientContexts());
+
+ int index = -1;
+ int i = 0;
+ for (IClientContext context : contexts) {
+ itemsList.add(context.getId());
+ if (context.getId().equals(ClientContextManager.getDefaultClientContext().getId())) {
+ index = i;
+ }
+ i++;
+ }
+ String[] items = new String[itemsList.size()];
+ items = itemsList.toArray(items);
+ combo.setItems(items);
+ if (index != -1) {
+ combo.select(index);
+ }
+ combo.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ int index = combo.getSelectionIndex();
+
+ String clientContexId = itemsList.get(index);
+
+ if (clientContexId != null) {
+ IClientContext clientContex = ClientContextManager.getInstance().getClientContext(clientContexId);
+ if (clientContex != null) {
+ IElementType[] elementTypes = ElementTypeRegistry.getInstance().getElementTypes(clientContex);
+ elementTypesDetailsContentProvider.setContextID(clientContex.getId());
+ elementTypesFilteredTree.getViewer().setInput(elementTypes);
+ }
+ }
+
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+
+ }
+ });
+
+ Button exportButton = new Button(parent, SWT.NONE);
+ exportButton.setText("Export registry");
+ exportButton.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ FileDialog dialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
+ String dest = dialog.open();
+ if (dest != null) {
+ File file = new File(dest);
+ if (file != null) {
+ BufferedWriter writer = null;
+ try {
+ writer = new BufferedWriter(new FileWriter(file));
+
+ for (String clientContexId : itemsList) {
+ writer.write(clientContexId + "\n");
+ IElementType[] elementTypes = ElementTypeRegistry.getInstance().getElementTypes(ClientContextManager.getInstance().getClientContext(clientContexId));
+ for (int j = 0; j < elementTypes.length; j++) {
+ IElementType elementType = elementTypes[j];
+ writer.write("\t" + elementType.getId() + "\n");
+
+
+ IEditHelperAdvice[] advices = ElementTypeRegistry.getInstance().getEditHelperAdvice(elementType);
+ List<IEditHelperAdvice> advicesList = Arrays.asList(advices);
+ Collections.sort(advicesList, new AdviceComparator(elementType, clientContexId));
+ for (IEditHelperAdvice advice : advicesList) {
+ writer.write("\t\t" + advice.getClass().getName() + "\n");
+ }
+ }
+ }
+
+ writer.flush();
+
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ } finally {
+ try {
+ writer.close();
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ }
+ }
+ }
+ });
+
+ sash = new SashForm(parent, SWT.HORIZONTAL);
+ sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ elementTypesFilteredTree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
+ elementTypesFilteredTree.getViewer().setLabelProvider(new ElementTypesLabelProvider());
+ elementTypesFilteredTree.getViewer().setContentProvider(new ElementTypesContentProvider());
+ detailsFilteredTree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
+ detailsFilteredTree.getViewer().setLabelProvider(new ElementTypesDetailsLabelProvider());
+ elementTypesDetailsContentProvider = new ElementTypesDetailsContentProvider();
+ detailsFilteredTree.getViewer().setContentProvider(elementTypesDetailsContentProvider);
+
+ if (index != -1) {
+ combo.select(index);
+ }
+
+ elementTypesFilteredTree.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (event.getSelection() instanceof IStructuredSelection) {
+ Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ if (selection instanceof IElementType) {
+ elementTypesDetailsContentProvider.setTypeID(((IElementType) selection).getId());
+ detailsFilteredTree.getViewer().setInput(selection);
+ }
+ }
+
+ }
+ });
+ }
+
+ @Override
+ public void setFocus() {
+
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/TypesConfigurationsListenerView.java b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/TypesConfigurationsListenerView.java
index cbbb3ae8ce4..0e937b4fee0 100644
--- a/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/TypesConfigurationsListenerView.java
+++ b/plugins/developer/org.eclipse.papyrus.dev.types/src/org/eclipse/papyrus/dev/types/view/TypesConfigurationsListenerView.java
@@ -1,227 +1,227 @@
-/*****************************************************************************
- * 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.dev.types.view;
-
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
-import org.eclipse.gmf.runtime.emf.type.core.NullElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.papyrus.dev.types.Activator;
-import org.eclipse.papyrus.dev.types.providers.TypesEventContentProvider;
-import org.eclipse.papyrus.dev.types.providers.TypesEventLabelProvider;
-import org.eclipse.papyrus.dev.types.utils.ElementTypeRegistryUtils;
-import org.eclipse.papyrus.dev.types.utils.TypesEventPrinter;
-import org.eclipse.papyrus.dev.types.utils.NotifierNullEditHelper;
-import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
-import org.eclipse.papyrus.infra.types.core.notification.TypesListenersRegistry;
-import org.eclipse.papyrus.infra.types.core.notification.ITypesEventsChainListener;
-import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.part.ViewPart;
-
-public class TypesConfigurationsListenerView extends ViewPart {
-
- IClientContext context = null;
- FilteredTree tree = null;
- SashForm sash = null;
- Browser browser = null;
- ITypesEventsChainListener listener = null;
- Text limitText = null;
-
- List<TypesEventsChain> eventsChains = new ArrayList<TypesEventsChain>();
-
- final private int MAX_SIZE = 1000;
-
-
- @Override
- public void createPartControl(Composite parent) {
- parent.setLayout(new GridLayout(3, true));
- Button startButton = new Button(parent, SWT.NONE);
- startButton.setText("Start");
- startButton.addMouseListener(new MouseAdapter() {
-
-
-
- @Override
- public void mouseUp(MouseEvent e) {
- if (!Platform.inDebugMode()) {
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Debug mode", "You must activate debug mode to be able to use this view. ");
- }
-
- // Dirty work to force the NullElementType edithelper if in debug mode
- if (Platform.inDebugMode()) {
-
- Field nullElementTypeEditHelperField = ElementTypeRegistryUtils.getNullElementTypeEditHelper();
-
- if (nullElementTypeEditHelperField != null) {
- // Register fake
-
- try {
- nullElementTypeEditHelperField.set(NullElementType.getInstance(), new NotifierNullEditHelper());
- } catch (IllegalArgumentException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (IllegalAccessException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- } else {
- Activator.log.warn("Failed to override NullElementType's EditHelper");
- }
-
- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Debug mode", "Be careful, as the platform is in debug mode, the NullElementType's EditHelper has been overriden");
- }
-
- if (listener == null) {
- listener = new ITypesEventsChainListener() {
-
- @Override
- public void notifyChain(TypesEventsChain chain) {
- int limit;
- String text = limitText.getText();
- try {
- limit = Integer.parseInt(text);
- } catch (NumberFormatException e) {
- limit = MAX_SIZE;
- }
- if (eventsChains.size() >= limit) {
- eventsChains.remove(0);
- }
- eventsChains.add(chain);
- Display.getCurrent().asyncExec(new Runnable() {
- @Override
- public void run() {
- tree.getViewer().refresh();
- }
- });
-
- }
- };
- TypesListenersRegistry.getInstance().addEventChainListener(listener);
- }
- }
-
- });
- startButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Button stopButton = new Button(parent, SWT.NONE);
- stopButton.setText("Stop");
- stopButton.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseUp(MouseEvent e) {
- TypesListenersRegistry.getInstance().removeEventChainListener(listener);
- listener = null;
- }
-
- });
- stopButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Button clearButton = new Button(parent, SWT.NONE);
- clearButton.setText("Clear");
- clearButton.addMouseListener(new MouseAdapter() {
-
- @Override
- public void mouseUp(MouseEvent e) {
- eventsChains.clear();
- tree.getViewer().refresh();
- browser.setText("");
- }
-
- });
- clearButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Label label = new Label(parent, SWT.NONE);
- label.setText("Limit: ");
-
- limitText = new Text(parent, SWT.BORDER);
- limitText.setText(MAX_SIZE + "");
- limitText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
-
- sash = new SashForm(parent, SWT.HORIZONTAL | SWT.BORDER);
-
- sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
-
- tree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
- tree.getViewer().setLabelProvider(new TypesEventLabelProvider());
- tree.getViewer().setContentProvider(new TypesEventContentProvider());
- tree.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- if (event.getSelection() instanceof IStructuredSelection) {
- Object first = ((IStructuredSelection) event.getSelection()).getFirstElement();
- String result = "";
- if (first instanceof ITypesEvent) {
-
- Map<String, String> details = TypesEventPrinter.getEventDetails(((ITypesEvent) first));
- result = TypesEventPrinter.printHtmlEvent(details);
- } else if (first instanceof TypesEventsChain) {
- IEditCommandRequest req = ((TypesEventsChain) first).getRequest();
- result = TypesEventPrinter.printHtmRequest(req);
- }
- browser.setText(result);
- }
-
- }
- });
- tree.getViewer().setInput(eventsChains);
-
- browser = new Browser(sash, SWT.NONE);
-
-
- sash.setWeights(new int[] { 1, 3 });
- }
-
-
-
- @Override
- public void setFocus() {
-
- }
-
- /**
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- *
- */
- @Override
- public void dispose() {
- TypesListenersRegistry.getInstance().removeEventChainListener(listener);
- super.dispose();
- }
-
-
-}
+/*****************************************************************************
+ * 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.dev.types.view;
+
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.NullElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.papyrus.dev.types.Activator;
+import org.eclipse.papyrus.dev.types.providers.TypesEventContentProvider;
+import org.eclipse.papyrus.dev.types.providers.TypesEventLabelProvider;
+import org.eclipse.papyrus.dev.types.utils.ElementTypeRegistryUtils;
+import org.eclipse.papyrus.dev.types.utils.TypesEventPrinter;
+import org.eclipse.papyrus.dev.types.utils.NotifierNullEditHelper;
+import org.eclipse.papyrus.infra.types.core.notification.TypesEventsChain;
+import org.eclipse.papyrus.infra.types.core.notification.TypesListenersRegistry;
+import org.eclipse.papyrus.infra.types.core.notification.ITypesEventsChainListener;
+import org.eclipse.papyrus.infra.types.core.notification.events.ITypesEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.part.ViewPart;
+
+public class TypesConfigurationsListenerView extends ViewPart {
+
+ IClientContext context = null;
+ FilteredTree tree = null;
+ SashForm sash = null;
+ Browser browser = null;
+ ITypesEventsChainListener listener = null;
+ Text limitText = null;
+
+ List<TypesEventsChain> eventsChains = new ArrayList<TypesEventsChain>();
+
+ final private int MAX_SIZE = 1000;
+
+
+ @Override
+ public void createPartControl(Composite parent) {
+ parent.setLayout(new GridLayout(3, true));
+ Button startButton = new Button(parent, SWT.NONE);
+ startButton.setText("Start");
+ startButton.addMouseListener(new MouseAdapter() {
+
+
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ if (!Platform.inDebugMode()) {
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Debug mode", "You must activate debug mode to be able to use this view. ");
+ }
+
+ // Dirty work to force the NullElementType edithelper if in debug mode
+ if (Platform.inDebugMode()) {
+
+ Field nullElementTypeEditHelperField = ElementTypeRegistryUtils.getNullElementTypeEditHelper();
+
+ if (nullElementTypeEditHelperField != null) {
+ // Register fake
+
+ try {
+ nullElementTypeEditHelperField.set(NullElementType.getInstance(), new NotifierNullEditHelper());
+ } catch (IllegalArgumentException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ } catch (IllegalAccessException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ } else {
+ Activator.log.warn("Failed to override NullElementType's EditHelper");
+ }
+
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Debug mode", "Be careful, as the platform is in debug mode, the NullElementType's EditHelper has been overriden");
+ }
+
+ if (listener == null) {
+ listener = new ITypesEventsChainListener() {
+
+ @Override
+ public void notifyChain(TypesEventsChain chain) {
+ int limit;
+ String text = limitText.getText();
+ try {
+ limit = Integer.parseInt(text);
+ } catch (NumberFormatException e) {
+ limit = MAX_SIZE;
+ }
+ if (eventsChains.size() >= limit) {
+ eventsChains.remove(0);
+ }
+ eventsChains.add(chain);
+ Display.getCurrent().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ tree.getViewer().refresh();
+ }
+ });
+
+ }
+ };
+ TypesListenersRegistry.getInstance().addEventChainListener(listener);
+ }
+ }
+
+ });
+ startButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Button stopButton = new Button(parent, SWT.NONE);
+ stopButton.setText("Stop");
+ stopButton.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ TypesListenersRegistry.getInstance().removeEventChainListener(listener);
+ listener = null;
+ }
+
+ });
+ stopButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Button clearButton = new Button(parent, SWT.NONE);
+ clearButton.setText("Clear");
+ clearButton.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ eventsChains.clear();
+ tree.getViewer().refresh();
+ browser.setText("");
+ }
+
+ });
+ clearButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+ Label label = new Label(parent, SWT.NONE);
+ label.setText("Limit: ");
+
+ limitText = new Text(parent, SWT.BORDER);
+ limitText.setText(MAX_SIZE + "");
+ limitText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+
+ sash = new SashForm(parent, SWT.HORIZONTAL | SWT.BORDER);
+
+ sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+
+ tree = new FilteredTree(sash, SWT.BORDER, new PatternFilter(), true);
+ tree.getViewer().setLabelProvider(new TypesEventLabelProvider());
+ tree.getViewer().setContentProvider(new TypesEventContentProvider());
+ tree.getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (event.getSelection() instanceof IStructuredSelection) {
+ Object first = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ String result = "";
+ if (first instanceof ITypesEvent) {
+
+ Map<String, String> details = TypesEventPrinter.getEventDetails(((ITypesEvent) first));
+ result = TypesEventPrinter.printHtmlEvent(details);
+ } else if (first instanceof TypesEventsChain) {
+ IEditCommandRequest req = ((TypesEventsChain) first).getRequest();
+ result = TypesEventPrinter.printHtmRequest(req);
+ }
+ browser.setText(result);
+ }
+
+ }
+ });
+ tree.getViewer().setInput(eventsChains);
+
+ browser = new Browser(sash, SWT.NONE);
+
+
+ sash.setWeights(new int[] { 1, 3 });
+ }
+
+
+
+ @Override
+ public void setFocus() {
+
+ }
+
+ /**
+ * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ TypesListenersRegistry.getInstance().removeEventChainListener(listener);
+ super.dispose();
+ }
+
+
+}

Back to the top