Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.classpath14
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.settings/org.eclipse.jdt.core.prefs590
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/OSGI-INF/l10n/bundle.properties26
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/about.html54
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/build.properties40
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/plugin.xml64
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/pom.xml20
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/resources/Activator.java.template64
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/schema/builderRegistration.exsd276
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Activator.java84
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectBuilder.java406
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectNature.java118
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Messages.java52
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/CommonConstants.java50
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/IEmfFacetProjectBuilder.java102
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/utils/ProjectUtils.java710
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/messages.properties20
17 files changed, 1345 insertions, 1345 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.classpath b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.classpath
index 2d1a4302f04..64c5e31b7a2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.classpath
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <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="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.settings/org.eclipse.jdt.core.prefs b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.settings/org.eclipse.jdt.core.prefs
index 73da3815343..0de02b374f2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,295 +1,295 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
-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.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+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/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/OSGI-INF/l10n/bundle.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/OSGI-INF/l10n/bundle.properties
index 62ec9f1df87..82cbc0d9ca9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/OSGI-INF/l10n/bundle.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/OSGI-INF/l10n/bundle.properties
@@ -1,13 +1,13 @@
-###############################################################################
-# Copyright (c) 2012 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:
-# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
-###############################################################################
-#Properties file for org.eclipse.papyrus.emf.facet.common.sdk.core
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = Papyrus EMF Facet Common SDK Core
+###############################################################################
+# Copyright (c) 2012 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:
+# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+###############################################################################
+#Properties file for org.eclipse.papyrus.emf.facet.common.sdk.core
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus EMF Facet Common SDK Core
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/about.html b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/about.html
index 3019b95b9cf..42595040e90 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/about.html
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/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>December 22, 2008</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>
+<!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>December 22, 2008</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> \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/build.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/build.properties
index 72f52df4e79..e3bd13d3c26 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/build.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/build.properties
@@ -1,20 +1,20 @@
-###############################################################################
-# Copyright (c) 2012 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:
-# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- OSGI-INF/,\
- plugin.xml,\
- schema/,\
- resources/
-src.includes = about.html
+###############################################################################
+# Copyright (c) 2012 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:
+# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ OSGI-INF/,\
+ plugin.xml,\
+ schema/,\
+ resources/
+src.includes = about.html
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/plugin.xml b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/plugin.xml
index ffbad6a912f..fab6c2ad0a5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/plugin.xml
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/plugin.xml
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="builderRegistration" name="EMF Facet Builder registration" schema="schema/builderRegistration.exsd"/>
- <extension
- id="org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"
- name="EMF Facet project builder"
- point="org.eclipse.core.resources.builders">
- <builder
- callOnEmptyDelta="true"
- hasNature="true"
- isConfigurable="false">
- <run
- class="org.eclipse.papyrus.emf.facet.common.sdk.core.internal.EmfFacetProjectBuilder">
- </run>
- </builder>
- </extension>
- <extension
- id="org.eclipse.papyrus.emf.facet.common.sdk.core.ProjectNature"
- name="EMF Facet"
- point="org.eclipse.core.resources.natures">
- <runtime>
- <run
- class="org.eclipse.papyrus.emf.facet.common.sdk.core.internal.EmfFacetProjectNature">
- </run>
- </runtime>
- <builder id="org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"/>
- <requires-nature id="org.eclipse.jdt.core.javanature"/>
- <requires-nature id="org.eclipse.pde.PluginNature"/>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="builderRegistration" name="EMF Facet Builder registration" schema="schema/builderRegistration.exsd"/>
+ <extension
+ id="org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"
+ name="EMF Facet project builder"
+ point="org.eclipse.core.resources.builders">
+ <builder
+ callOnEmptyDelta="true"
+ hasNature="true"
+ isConfigurable="false">
+ <run
+ class="org.eclipse.papyrus.emf.facet.common.sdk.core.internal.EmfFacetProjectBuilder">
+ </run>
+ </builder>
+ </extension>
+ <extension
+ id="org.eclipse.papyrus.emf.facet.common.sdk.core.ProjectNature"
+ name="EMF Facet"
+ point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="org.eclipse.papyrus.emf.facet.common.sdk.core.internal.EmfFacetProjectNature">
+ </run>
+ </runtime>
+ <builder id="org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"/>
+ <requires-nature id="org.eclipse.jdt.core.javanature"/>
+ <requires-nature id="org.eclipse.pde.PluginNature"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/pom.xml b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/pom.xml
index 6dff3110f5d..b53fa780d8b 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/pom.xml
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/pom.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus.facet</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <artifactId>org.eclipse.papyrus.emf.facet.common.sdk.core</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.facet</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.emf.facet.common.sdk.core</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/resources/Activator.java.template b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/resources/Activator.java.template
index 59aa1af9ba6..e2d488c26c8 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/resources/Activator.java.template
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/resources/Activator.java.template
@@ -1,32 +1,32 @@
-package {0};
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends Plugin {
-
- // The shared instance
- private static Activator plugin;
-
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- Activator.plugin = this;
- }
-
- @Override
- public void stop(final BundleContext context) throws Exception {
- Activator.plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return Activator.plugin;
- }
-}
+package {0};
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/** The activator class controls the plug-in life cycle */
+public class Activator extends Plugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ Activator.plugin = this;
+ }
+
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ Activator.plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return Activator.plugin;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/schema/builderRegistration.exsd b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/schema/builderRegistration.exsd
index 3e019b24c0f..8324d0f5ec8 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/schema/builderRegistration.exsd
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/schema/builderRegistration.exsd
@@ -1,138 +1,138 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.emf.facet.common.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.emf.facet.common.core" id="builderRegistration" name="EMF Facet Builder Registration"/>
- </appinfo>
- <documentation>
- This extension point allows to register builders that will be run when the main EMF Facet builder is run.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice>
- <element ref="builder"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="builder">
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="depends"/>
- </choice>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A class that implements org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="depends">
- <complexType>
- <attribute name="builder" type="string" use="required">
- <annotation>
- <documentation>
- ID of an EMF Facet builder on which this EMF Facet builder depends.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 0.2.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration&quot;&gt;
- &lt;builder class=&quot;org.eclipse.papyrus.emf.facet.custom.sdk.core.internal.validation.CustomizationValidationBuilder&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- The builder must implement org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- For an example, see the customization validation builder in org.eclipse.papyrus.emf.facet.custom.sdk.core:&lt;br/&gt;
-org.eclipse.papyrus.emf.facet.custom.sdk.core.internal.validation.CustomizationValidationBuilder
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2009-2012 Mia-Software.
-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
-&lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
-Contributors:
- Grégoire Dupé (Mia-Software)
- Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.emf.facet.common.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.emf.facet.common.core" id="builderRegistration" name="EMF Facet Builder Registration"/>
+ </appinfo>
+ <documentation>
+ This extension point allows to register builders that will be run when the main EMF Facet builder is run.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="builder"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="builder">
+ <complexType>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="depends"/>
+ </choice>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A class that implements org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="depends">
+ <complexType>
+ <attribute name="builder" type="string" use="required">
+ <annotation>
+ <documentation>
+ ID of an EMF Facet builder on which this EMF Facet builder depends.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.2.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration&quot;&gt;
+ &lt;builder class=&quot;org.eclipse.papyrus.emf.facet.custom.sdk.core.internal.validation.CustomizationValidationBuilder&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ The builder must implement org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ For an example, see the customization validation builder in org.eclipse.papyrus.emf.facet.custom.sdk.core:&lt;br/&gt;
+org.eclipse.papyrus.emf.facet.custom.sdk.core.internal.validation.CustomizationValidationBuilder
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2009-2012 Mia-Software.
+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
+&lt;a
+href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
+Contributors:
+ Grégoire Dupé (Mia-Software)
+ Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Activator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Activator.java
index 33ca4c964e6..1d4e3bb8b19 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Activator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Activator.java
@@ -1,42 +1,42 @@
-/*******************************************************************************
- * Copyright (c) 2012 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:
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/** The activator class controls the plug-in life cycle */
-public class Activator extends Plugin {
-
- // The shared instance
- private static Activator plugin;
-
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- Activator.plugin = this;
- }
-
- @Override
- public void stop(final BundleContext context) throws Exception {
- Activator.plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return Activator.plugin;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/** The activator class controls the plug-in life cycle */
+public class Activator extends Plugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ Activator.plugin = this;
+ }
+
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ Activator.plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return Activator.plugin;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectBuilder.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectBuilder.java
index 5a1673131da..86577cb99f9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectBuilder.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectBuilder.java
@@ -1,203 +1,203 @@
-/*******************************************************************************
- * Copyright (c) 2009-2012 Mia-Software.
- * 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:
- * Gregoire Dupe (Mia-Software)
- * Nicolas Bros (Mia-Software)
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-
-/**
- * A builder for EMF Facet projects, that delegates to children builders provided by the extension point
- * "builderRegistration".
- *
- * @author Gregoire Dupe (Mia-Software)
- */
-public class EmfFacetProjectBuilder extends IncrementalProjectBuilder {
-
- private static ArrayList<BuilderDescriptor> emffacetBuilders = null;
-
- public EmfFacetProjectBuilder() {
- super();
- if (EmfFacetProjectBuilder.emffacetBuilders == null) {
- EmfFacetProjectBuilder.emffacetBuilders = new ArrayList<BuilderDescriptor>();
- synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
- final IConfigurationElement[] configs = Platform.getExtensionRegistry()
- .getConfigurationElementsFor(CommonConstants.BUILDER_EXTENSION_POINT_ID);
- for (final IConfigurationElement config : configs) {
- try {
- final String id = config.getDeclaringExtension().getUniqueIdentifier();
- final IEmfFacetProjectBuilder builderInst = (IEmfFacetProjectBuilder) config
- .createExecutableExtension("class"); //$NON-NLS-1$
- final BuilderDescriptor builderDescriptor = new BuilderDescriptor(
- builderInst, id);
- EmfFacetProjectBuilder.emffacetBuilders.add(builderDescriptor);
- for (final IConfigurationElement depends : config.getChildren("depends")) { //$NON-NLS-1$
- builderDescriptor.getDependsOn().add(depends.getAttribute("builder")); //$NON-NLS-1$
- }
- } catch (final Exception e) {
- Logger.logError(e, Activator.getDefault());
- }
- }
- EmfFacetProjectBuilder.emffacetBuilders = sortBuilders(EmfFacetProjectBuilder.emffacetBuilders);
- }
- }
- validateBuilderDependencies();
- }
-
- /**
- * Sort builders by dependencies : first those that depend on nothing, then those that depend on those already in
- * the list, etc.
- */
- private static ArrayList<BuilderDescriptor> sortBuilders(final ArrayList<BuilderDescriptor> builders) {
- final ArrayList<BuilderDescriptor> result = new ArrayList<EmfFacetProjectBuilder.BuilderDescriptor>();
- final List<BuilderDescriptor> remaining = new LinkedList<EmfFacetProjectBuilder.BuilderDescriptor>();
- remaining.addAll(builders);
-
- while (!remaining.isEmpty()) {
- boolean stuck = true;
- final ListIterator<BuilderDescriptor> listIterator = remaining.listIterator();
- while (listIterator.hasNext()) {
- final BuilderDescriptor builder = listIterator.next();
- // if it depends only on builders that are already in the list
- // before it, then add it here
- if (dependendsOnlyOn(builder, result)) {
- result.add(builder);
- listIterator.remove();
- stuck = false;
- }
- }
- if (stuck) {
- throw new RuntimeException("Cannot order builders due to incoherent dependencies"); //$NON-NLS-1$
- }
- }
-
- return result;
- }
-
- /** Whether the given builder only depends on those in the list. */
- private static boolean dependendsOnlyOn(final BuilderDescriptor builder, final ArrayList<BuilderDescriptor> list) {
- final List<String> dependsOn = builder.getDependsOn();
- for (final String dep : dependsOn) {
- boolean found = false;
- for (final BuilderDescriptor prev : list) {
- if (prev.getId().equals(dep)) {
- found = true;
- break;
- }
- }
- if (!found) {
- return false;
- }
- }
- return true;
- }
-
- private static void validateBuilderDependencies() {
- final List<String> idList = new ArrayList<String>();
- for (final BuilderDescriptor descriptor : EmfFacetProjectBuilder.emffacetBuilders) {
- idList.add(descriptor.getId());
- }
- for (final BuilderDescriptor descriptor : EmfFacetProjectBuilder.emffacetBuilders) {
- for (final String dependsOn : descriptor.getDependsOn()) {
- if (!idList.contains(dependsOn)) {
- Logger.logWarning("The builder " + descriptor.getId() + " depends on " //$NON-NLS-1$//$NON-NLS-2$
- + dependsOn + " which does not exist.", Activator //$NON-NLS-1$
- .getDefault());
- }
- }
- }
-
- }
-
- @Override
- protected void clean(final IProgressMonitor monitor) throws CoreException {
- synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
- final Iterator<BuilderDescriptor> builders = EmfFacetProjectBuilder.emffacetBuilders
- .iterator();
- while (builders.hasNext()) {
- final BuilderDescriptor builder = builders.next();
- builder.getBuilderInst().clean(this, monitor);
- }
- }
- }
-
- @Override
- protected IProject[] build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor)
- throws CoreException {
- synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
- final Iterator<BuilderDescriptor> builders = EmfFacetProjectBuilder.emffacetBuilders
- .iterator();
- while (builders.hasNext()) {
- final BuilderDescriptor builder = builders.next();
- builder.getBuilderInst().build(this, kind, args, monitor);
- }
- }
- return null;
- }
-
- /**
- * This class is used to hold the builder id, the builder instance and the builder dependencies in a single
- * structure.
- */
- private class BuilderDescriptor {
- private final IEmfFacetProjectBuilder builderInst;
-
- private final List<String> dependsOn = new ArrayList<String>();
-
- private final String id;
-
- /**
- * @param builderInst
- * an instance of the described builder
- * @param id
- * the id of the described builder
- */
- public BuilderDescriptor(final IEmfFacetProjectBuilder builderInst, final String id) {
- this.builderInst = builderInst;
- this.id = id;
- }
-
- public String getId() {
- return this.id;
- }
-
- /** @return the list of dependencies on other EmfFacet builders. */
- public List<String> getDependsOn() {
- return this.dependsOn;
- }
-
- /** @return the instance of the described builder */
- public IEmfFacetProjectBuilder getBuilderInst() {
- return this.builderInst;
- }
-
- @Override
- public String toString() {
- return this.id + "(" + this.builderInst.getClass().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009-2012 Mia-Software.
+ * 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:
+ * Gregoire Dupe (Mia-Software)
+ * Nicolas Bros (Mia-Software)
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.IEmfFacetProjectBuilder;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+
+/**
+ * A builder for EMF Facet projects, that delegates to children builders provided by the extension point
+ * "builderRegistration".
+ *
+ * @author Gregoire Dupe (Mia-Software)
+ */
+public class EmfFacetProjectBuilder extends IncrementalProjectBuilder {
+
+ private static ArrayList<BuilderDescriptor> emffacetBuilders = null;
+
+ public EmfFacetProjectBuilder() {
+ super();
+ if (EmfFacetProjectBuilder.emffacetBuilders == null) {
+ EmfFacetProjectBuilder.emffacetBuilders = new ArrayList<BuilderDescriptor>();
+ synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
+ final IConfigurationElement[] configs = Platform.getExtensionRegistry()
+ .getConfigurationElementsFor(CommonConstants.BUILDER_EXTENSION_POINT_ID);
+ for (final IConfigurationElement config : configs) {
+ try {
+ final String id = config.getDeclaringExtension().getUniqueIdentifier();
+ final IEmfFacetProjectBuilder builderInst = (IEmfFacetProjectBuilder) config
+ .createExecutableExtension("class"); //$NON-NLS-1$
+ final BuilderDescriptor builderDescriptor = new BuilderDescriptor(
+ builderInst, id);
+ EmfFacetProjectBuilder.emffacetBuilders.add(builderDescriptor);
+ for (final IConfigurationElement depends : config.getChildren("depends")) { //$NON-NLS-1$
+ builderDescriptor.getDependsOn().add(depends.getAttribute("builder")); //$NON-NLS-1$
+ }
+ } catch (final Exception e) {
+ Logger.logError(e, Activator.getDefault());
+ }
+ }
+ EmfFacetProjectBuilder.emffacetBuilders = sortBuilders(EmfFacetProjectBuilder.emffacetBuilders);
+ }
+ }
+ validateBuilderDependencies();
+ }
+
+ /**
+ * Sort builders by dependencies : first those that depend on nothing, then those that depend on those already in
+ * the list, etc.
+ */
+ private static ArrayList<BuilderDescriptor> sortBuilders(final ArrayList<BuilderDescriptor> builders) {
+ final ArrayList<BuilderDescriptor> result = new ArrayList<EmfFacetProjectBuilder.BuilderDescriptor>();
+ final List<BuilderDescriptor> remaining = new LinkedList<EmfFacetProjectBuilder.BuilderDescriptor>();
+ remaining.addAll(builders);
+
+ while (!remaining.isEmpty()) {
+ boolean stuck = true;
+ final ListIterator<BuilderDescriptor> listIterator = remaining.listIterator();
+ while (listIterator.hasNext()) {
+ final BuilderDescriptor builder = listIterator.next();
+ // if it depends only on builders that are already in the list
+ // before it, then add it here
+ if (dependendsOnlyOn(builder, result)) {
+ result.add(builder);
+ listIterator.remove();
+ stuck = false;
+ }
+ }
+ if (stuck) {
+ throw new RuntimeException("Cannot order builders due to incoherent dependencies"); //$NON-NLS-1$
+ }
+ }
+
+ return result;
+ }
+
+ /** Whether the given builder only depends on those in the list. */
+ private static boolean dependendsOnlyOn(final BuilderDescriptor builder, final ArrayList<BuilderDescriptor> list) {
+ final List<String> dependsOn = builder.getDependsOn();
+ for (final String dep : dependsOn) {
+ boolean found = false;
+ for (final BuilderDescriptor prev : list) {
+ if (prev.getId().equals(dep)) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static void validateBuilderDependencies() {
+ final List<String> idList = new ArrayList<String>();
+ for (final BuilderDescriptor descriptor : EmfFacetProjectBuilder.emffacetBuilders) {
+ idList.add(descriptor.getId());
+ }
+ for (final BuilderDescriptor descriptor : EmfFacetProjectBuilder.emffacetBuilders) {
+ for (final String dependsOn : descriptor.getDependsOn()) {
+ if (!idList.contains(dependsOn)) {
+ Logger.logWarning("The builder " + descriptor.getId() + " depends on " //$NON-NLS-1$//$NON-NLS-2$
+ + dependsOn + " which does not exist.", Activator //$NON-NLS-1$
+ .getDefault());
+ }
+ }
+ }
+
+ }
+
+ @Override
+ protected void clean(final IProgressMonitor monitor) throws CoreException {
+ synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
+ final Iterator<BuilderDescriptor> builders = EmfFacetProjectBuilder.emffacetBuilders
+ .iterator();
+ while (builders.hasNext()) {
+ final BuilderDescriptor builder = builders.next();
+ builder.getBuilderInst().clean(this, monitor);
+ }
+ }
+ }
+
+ @Override
+ protected IProject[] build(final int kind, @SuppressWarnings("rawtypes") final Map args, final IProgressMonitor monitor)
+ throws CoreException {
+ synchronized (EmfFacetProjectBuilder.emffacetBuilders) {
+ final Iterator<BuilderDescriptor> builders = EmfFacetProjectBuilder.emffacetBuilders
+ .iterator();
+ while (builders.hasNext()) {
+ final BuilderDescriptor builder = builders.next();
+ builder.getBuilderInst().build(this, kind, args, monitor);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * This class is used to hold the builder id, the builder instance and the builder dependencies in a single
+ * structure.
+ */
+ private class BuilderDescriptor {
+ private final IEmfFacetProjectBuilder builderInst;
+
+ private final List<String> dependsOn = new ArrayList<String>();
+
+ private final String id;
+
+ /**
+ * @param builderInst
+ * an instance of the described builder
+ * @param id
+ * the id of the described builder
+ */
+ public BuilderDescriptor(final IEmfFacetProjectBuilder builderInst, final String id) {
+ this.builderInst = builderInst;
+ this.id = id;
+ }
+
+ public String getId() {
+ return this.id;
+ }
+
+ /** @return the list of dependencies on other EmfFacet builders. */
+ public List<String> getDependsOn() {
+ return this.dependsOn;
+ }
+
+ /** @return the instance of the described builder */
+ public IEmfFacetProjectBuilder getBuilderInst() {
+ return this.builderInst;
+ }
+
+ @Override
+ public String toString() {
+ return this.id + "(" + this.builderInst.getClass().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectNature.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectNature.java
index 6f5be62ae47..86e15c7f278 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectNature.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/EmfFacetProjectNature.java
@@ -1,59 +1,59 @@
-/*******************************************************************************
- * Copyright (c) 2009-2012 Mia-Software.
- * 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:
- * Fabien Giquel (Mia-Software)
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
-
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
-
-/** The implementation of the EMF Facet project nature. */
-public class EmfFacetProjectNature implements IProjectNature {
-
- /** The platform project this <code>IJavaProject</code> is based on */
- private IProject project;
-
- /** @see org.eclipse.core.resources.IProjectNature#configure() */
- public void configure() throws CoreException {
- // Add nature-specific information
- // for the project, such as adding a builder
- // to a project's build spec.
- final IProjectDescription projectDescription = this.project.getDescription();
- final ICommand[] oldBuildSpec = this.project.getDescription().getBuildSpec();
- final ICommand[] newBuildSpec = new ICommand[oldBuildSpec.length + 1];
- System.arraycopy(oldBuildSpec, 0, newBuildSpec, 0, oldBuildSpec.length);
- final ICommand command = this.project.getDescription().newCommand();
- command.setBuilderName(CommonConstants.BUILDER_NAME);
- newBuildSpec[oldBuildSpec.length] = command;
- projectDescription.setBuildSpec(newBuildSpec);
- this.project.setDescription(projectDescription, new NullProgressMonitor());
- }
-
- /** @see org.eclipse.core.resources.IProjectNature#deconfigure() */
- public void deconfigure() throws CoreException {
- // Remove the nature-specific information here.
- }
-
- /** @see org.eclipse.core.resources.IProjectNature#getProject() */
- public IProject getProject() {
- return this.project;
- }
-
- /** @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) */
- public void setProject(final IProject value) {
- this.project = value;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009-2012 Mia-Software.
+ * 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:
+ * Fabien Giquel (Mia-Software)
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
+
+/** The implementation of the EMF Facet project nature. */
+public class EmfFacetProjectNature implements IProjectNature {
+
+ /** The platform project this <code>IJavaProject</code> is based on */
+ private IProject project;
+
+ /** @see org.eclipse.core.resources.IProjectNature#configure() */
+ public void configure() throws CoreException {
+ // Add nature-specific information
+ // for the project, such as adding a builder
+ // to a project's build spec.
+ final IProjectDescription projectDescription = this.project.getDescription();
+ final ICommand[] oldBuildSpec = this.project.getDescription().getBuildSpec();
+ final ICommand[] newBuildSpec = new ICommand[oldBuildSpec.length + 1];
+ System.arraycopy(oldBuildSpec, 0, newBuildSpec, 0, oldBuildSpec.length);
+ final ICommand command = this.project.getDescription().newCommand();
+ command.setBuilderName(CommonConstants.BUILDER_NAME);
+ newBuildSpec[oldBuildSpec.length] = command;
+ projectDescription.setBuildSpec(newBuildSpec);
+ this.project.setDescription(projectDescription, new NullProgressMonitor());
+ }
+
+ /** @see org.eclipse.core.resources.IProjectNature#deconfigure() */
+ public void deconfigure() throws CoreException {
+ // Remove the nature-specific information here.
+ }
+
+ /** @see org.eclipse.core.resources.IProjectNature#getProject() */
+ public IProject getProject() {
+ return this.project;
+ }
+
+ /** @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject) */
+ public void setProject(final IProject value) {
+ this.project = value;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Messages.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Messages.java
index 7f19583cbc2..5161ce57e5d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Messages.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/Messages.java
@@ -1,26 +1,26 @@
-/*******************************************************************************
- * Copyright (c) 2012 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:
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.emf.facet.common.sdk.core.internal.messages"; //$NON-NLS-1$
- public static String ProjectUtils_createEMFFacetProject;
- public static String ProjectUtils_createPluginProject;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.emf.facet.common.sdk.core.internal.messages"; //$NON-NLS-1$
+ public static String ProjectUtils_createEMFFacetProject;
+ public static String ProjectUtils_createPluginProject;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/CommonConstants.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/CommonConstants.java
index 91b963c9ed2..465cd8cd89b 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/CommonConstants.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/CommonConstants.java
@@ -1,25 +1,25 @@
-/*******************************************************************************
- * Copyright (c) 2012 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:
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported;
-
-public final class CommonConstants {
- private CommonConstants() {
- // not instantiable
- }
-
- public static final String BUILDER_EXTENSION_POINT_ID = "org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration"; //$NON-NLS-1$
-
- /** The builder of EMF Facet projects */
- public static final String BUILDER_NAME = "org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"; //$NON-NLS-1$
-
- /** The nature of EMF Facet projects */
- public static final String NATURE_ID = "org.eclipse.papyrus.emf.facet.common.sdk.core.ProjectNature"; //$NON-NLS-1$
-}
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported;
+
+public final class CommonConstants {
+ private CommonConstants() {
+ // not instantiable
+ }
+
+ public static final String BUILDER_EXTENSION_POINT_ID = "org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration"; //$NON-NLS-1$
+
+ /** The builder of EMF Facet projects */
+ public static final String BUILDER_NAME = "org.eclipse.papyrus.emf.facet.common.sdk.core.projectBuilder"; //$NON-NLS-1$
+
+ /** The nature of EMF Facet projects */
+ public static final String NATURE_ID = "org.eclipse.papyrus.emf.facet.common.sdk.core.ProjectNature"; //$NON-NLS-1$
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/IEmfFacetProjectBuilder.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/IEmfFacetProjectBuilder.java
index 52daf35aaaa..ce98923fe5e 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/IEmfFacetProjectBuilder.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/IEmfFacetProjectBuilder.java
@@ -1,51 +1,51 @@
-/*******************************************************************************
- * Copyright (c) 2009-2012 Mia-Software.
- * 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:
- * Grégoire Dupé (Mia-Software) - Initial API
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * The EMF Facet project builder delegates its build behavior to a set of classes
- * implementing this interface. This set of classes is defined through the use of
- * the <tt>org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration</tt> extension
- * point.
- *
- * @author Grégoire Dupé (Mia-Software)
- *
- */
-public interface IEmfFacetProjectBuilder {
-
- /**
- * @param builder
- * The EMF Facet builder which delegates its build behavior to the
- * classes that implement {@link IEmfFacetProjectBuilder}.
- * @throws CoreException
- */
- IProject[] build(IncrementalProjectBuilder builder, int kind, Map<?, ?> args, IProgressMonitor monitor)
- throws CoreException;
-
- /**
- * @see IncrementalProjectBuilder#clean(IProgressMonitor)
- * @param builder
- * The EmfFacet builder which delegates the build behavior to the
- * classes that implement {@link IEmfFacetProjectBuilder}.
- * @param monitor
- * @throws CoreException
- */
- void clean(IncrementalProjectBuilder builder, IProgressMonitor monitor)
- throws CoreException;
-}
+/*******************************************************************************
+ * Copyright (c) 2009-2012 Mia-Software.
+ * 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:
+ * Grégoire Dupé (Mia-Software) - Initial API
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * The EMF Facet project builder delegates its build behavior to a set of classes
+ * implementing this interface. This set of classes is defined through the use of
+ * the <tt>org.eclipse.papyrus.emf.facet.common.sdk.core.builderRegistration</tt> extension
+ * point.
+ *
+ * @author Grégoire Dupé (Mia-Software)
+ *
+ */
+public interface IEmfFacetProjectBuilder {
+
+ /**
+ * @param builder
+ * The EMF Facet builder which delegates its build behavior to the
+ * classes that implement {@link IEmfFacetProjectBuilder}.
+ * @throws CoreException
+ */
+ IProject[] build(IncrementalProjectBuilder builder, int kind, Map<?, ?> args, IProgressMonitor monitor)
+ throws CoreException;
+
+ /**
+ * @see IncrementalProjectBuilder#clean(IProgressMonitor)
+ * @param builder
+ * The EmfFacet builder which delegates the build behavior to the
+ * classes that implement {@link IEmfFacetProjectBuilder}.
+ * @param monitor
+ * @throws CoreException
+ */
+ void clean(IncrementalProjectBuilder builder, IProgressMonitor monitor)
+ throws CoreException;
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/utils/ProjectUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/utils/ProjectUtils.java
index b1ec36ca240..80447b02112 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/utils/ProjectUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/exported/utils/ProjectUtils.java
@@ -1,355 +1,355 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 Mia-Software.
- * 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:
- * Gregoire Dupe (Mia-Software)
- * Fabien Giquel (Mia-Software)
- * Nicolas Bros (Mia-Software)
- * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.utils;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaConventions;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.Activator;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.Messages;
-import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.util.core.internal.exported.FileUtils;
-import org.eclipse.papyrus.emf.facet.util.core.internal.exported.FolderUtils;
-
-import com.ibm.icu.lang.UCharacter;
-
-/**
- * @author Gregoire Dupe (Mia-Software), Fabien Giquel (Mia-Software)
- *
- */
-public final class ProjectUtils {
-
- private ProjectUtils() {
- // Nothing
- }
-
- private static final String JAVA_VERSION = "J2SE-1.5"; //$NON-NLS-1$
-
- public static void addPdeClassPath(final IProject project) throws JavaModelException {
- final IJavaProject javaProject = JavaCore.create(project);
- final IClasspathEntry[] oldClassPath = javaProject.getRawClasspath();
- for (final IClasspathEntry classpathEntry : oldClassPath) {
- if (classpathEntry.getPath().equals(new Path("org.eclipse.pde.core.requiredPlugins"))) { //$NON-NLS-1$
- return;
- }
- }
- final IClasspathEntry[] newClassPath = new IClasspathEntry[oldClassPath.length + 1];
- System.arraycopy(oldClassPath, 0, newClassPath, 0, oldClassPath.length);
- newClassPath[oldClassPath.length] = JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins")); //$NON-NLS-1$
- javaProject.setRawClasspath(newClassPath, new NullProgressMonitor());
- }
-
- /**
- * @author Gregoire Dupe (Mia-Software) - Removing "Require-Bundle" statement
- */
- public static void createManifest(final IProject project) throws CoreException {
- final IFolder folder = project.getFolder("META-INF"); //$NON-NLS-1$
- if (!folder.exists()) {
- folder.create(true, true, new NullProgressMonitor());
- }
- final IFile manifestFile = folder.getFile("MANIFEST.MF"); //$NON-NLS-1$
- if (!manifestFile.exists()) {
- final StringBuffer manifestSB = new StringBuffer();
- manifestSB.append("Manifest-Version: 1.0\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-ManifestVersion: 2\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-Name: " + project.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- final String packageName = ProjectUtils.packageName(project.getName());
- manifestSB.append("Bundle-SymbolicName: " + packageName //$NON-NLS-1$
- + ";singleton:=true\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-Version: 0.0.1.qualifier\n"); //$NON-NLS-1$
- manifestSB
- .append("Bundle-Activator: " + ProjectUtils.bundleActivatorQualifiedName(packageName) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- //manifestSB.append("Bundle-Vendor: bundle vendor\n"); //$NON-NLS-1$
- manifestSB.append("Require-Bundle: org.eclipse.core.runtime,\n"); //$NON-NLS-1$
- manifestSB.append(" org.eclipse.papyrus.emf.facet.util.core\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-RequiredExecutionEnvironment: " //$NON-NLS-1$
- + ProjectUtils.JAVA_VERSION + "\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-ActivationPolicy: lazy\n"); //$NON-NLS-1$
- manifestSB.append("Bundle-ClassPath: .,bin\n"); //$NON-NLS-1$
- final InputStream source = new ByteArrayInputStream(manifestSB.toString().getBytes());
- manifestFile.create(source, true, new NullProgressMonitor());
- }
- }
-
- private static String bundleActivatorQualifiedName(final String packageName) {
- return packageName + ".Activator"; //$NON-NLS-1$
- }
-
- private static void createActivator(final IProject project) throws CoreException {
- final String packageName = ProjectUtils.packageName(project.getName());
- final String qualifiedName = ProjectUtils.bundleActivatorQualifiedName(packageName);
- final String path = qualifiedName.replaceAll("\\.", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- final IFile activatorFile = project
- .getFile(new Path("src").append(path).addFileExtension("java")); //$NON-NLS-1$ //$NON-NLS-2$
- FolderUtils.createFolder((IFolder) activatorFile.getParent());
- if (!activatorFile.exists()) {
- try {
- final String template = FileUtils.getFileContents(Activator.getDefault()
- .getBundle(), "resources/Activator.java.template"); //$NON-NLS-1$
- final String activatorContents = template.replace("{0}", packageName); //$NON-NLS-1$
- final InputStream source = new ByteArrayInputStream(activatorContents.getBytes());
- activatorFile.create(source, true, new NullProgressMonitor());
- } catch (final IOException e) {
- Logger.logError(e, "Couldn't create Activator", Activator //$NON-NLS-1$
- .getDefault());
- }
- }
- }
-
- /** Transform the given name into a valid package and bundle name */
- public static String packageName(final String name) {
- final StringBuilder builder = new StringBuilder();
- char prev = ' ';
- for (int i = 0; i < name.length(); i++) {
- final char c = name.charAt(i);
- if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_') {
- builder.append(c);
- prev = c;
- } else if (c >= '0' && c <= '9') {
- if (builder.length() == 0 || prev == '.') {
- builder.append("_"); //$NON-NLS-1$
- }
- builder.append(c);
- prev = c;
- } else if (c == '.') {
- if (prev == '.') {
- continue;
- }
- if (builder.length() == 0 || prev >= '0' && prev <= '9') {
- builder.append("_"); //$NON-NLS-1$
- }
- builder.append(c);
- prev = c;
- } else {
- builder.append("_"); //$NON-NLS-1$
- }
- }
-
- String result = builder.toString();
- // first letter to lowercase
- if (result.length() > 0 && UCharacter.isUpperCase(result.charAt(0))) {
- result = UCharacter.toLowerCase(result.charAt(0)) + result.substring(1);
- }
-
- final IStatus status = JavaConventions.validatePackageName(result, JavaCore.VERSION_1_5,
- JavaCore.VERSION_1_5);
- if (!status.isOK()) {
- Logger.logWarning("Couldn't make valid package name from project name: " //$NON-NLS-1$
- + status.getMessage(), Activator.getDefault());
- return name;
- }
- return result;
- }
-
- public static void addPdeNature(final IProject project) throws CoreException {
- final String pluginNature = "org.eclipse.pde.PluginNature"; //$NON-NLS-1$
- final IProjectDescription description = project.getDescription();
- final String[] natures = description.getNatureIds();
- if (!Arrays.asList(natures).contains(pluginNature)) {
- final String[] newNatures = new String[natures.length + 1];
- System.arraycopy(natures, 0, newNatures, 0, natures.length);
- newNatures[natures.length] = pluginNature;
- description.setNatureIds(newNatures);
- project.setDescription(description, new NullProgressMonitor());
- }
- }
-
- public static void addPdeBuilder(final IProject project) throws CoreException {
- final IProjectDescription projectDescription = project.getDescription();
- final ICommand[] oldBuildSpec = project.getDescription().getBuildSpec();
- for (final ICommand command : oldBuildSpec) {
- if ("org.eclipse.pde.ManifestBuilder".equals(command.getBuilderName())) { //$NON-NLS-1$
- return;
- }
- }
- final ICommand[] newBuildSpec = new ICommand[oldBuildSpec.length + 2];
- System.arraycopy(oldBuildSpec, 0, newBuildSpec, 0, oldBuildSpec.length);
- final ICommand command1 = project.getDescription().newCommand();
- command1.setBuilderName("org.eclipse.pde.ManifestBuilder"); //$NON-NLS-1$
- final ICommand command2 = project.getDescription().newCommand();
- command2.setBuilderName("org.eclipse.pde.SchemaBuilder"); //$NON-NLS-1$
- newBuildSpec[oldBuildSpec.length] = command1;
- newBuildSpec[oldBuildSpec.length + 1] = command2;
- projectDescription.setBuildSpec(newBuildSpec);
- project.setDescription(projectDescription, new NullProgressMonitor());
- }
-
- /**
- * @author Gregoire Dupe (Mia-Software) - classpath entries modification
- */
- public static void configureAsJavaProject(final IProject project, final IProgressMonitor monitor)
- throws CoreException {
- ProjectUtils.addNature(project, monitor, JavaCore.NATURE_ID);
- final IJavaProject javaProject = JavaCore.create(project);
- // Set output folder
- final IPath path = project.getFullPath().append("bin"); //$NON-NLS-1$
- javaProject.setOutputLocation(path, null);
- final List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
- // Set source folder
- final IFolder sourceFolder = project.getFolder("src"); //$NON-NLS-1$
- if (!sourceFolder.exists()) {
- sourceFolder.create(false, true, monitor);
- classpathEntries.add(JavaCore.newSourceEntry(javaProject.getPath().append(
- new Path("src")))); //$NON-NLS-1$
- }
- final Path jrePath = new Path(JavaRuntime.JRE_CONTAINER
- + "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/" //$NON-NLS-1$
- + ProjectUtils.JAVA_VERSION);
- boolean hasJrePath = false;
- final IClasspathEntry[] existingClassPath = javaProject.getRawClasspath();
- for (final IClasspathEntry classpathEntry : existingClassPath) {
- if (jrePath.equals(classpathEntry.getPath())) {
- hasJrePath = true;
- }
- }
- if (!hasJrePath) {
- // add the jre api to the classpath
- classpathEntries.add(JavaCore.newContainerEntry(jrePath));
- javaProject.setRawClasspath(classpathEntries.toArray(new IClasspathEntry[0]), monitor);
- }
- }
-
- public static void configureAsPluginProject(final IProject project) throws CoreException {
- // TODO PDE Operations would be useful here but they are internal in PDE
- ProjectUtils.addPdeNature(project);
- // PDE builders are automatically added when the PDE nature is added
- // ProjectUtils.addPdeBuilder(project);
- ProjectUtils.addPdeClassPath(project);
- ProjectUtils.createManifest(project);
- ProjectUtils.createActivator(project);
- }
-
- public static void addNature(final IProject project, final IProgressMonitor monitor,
- final String natureId) throws CoreException {
- final IProjectDescription description = project.getDescription();
- final String[] natures = description.getNatureIds();
- if (!Arrays.asList(natures).contains(natureId)) {
- final String[] newNatures = new String[natures.length + 1];
- System.arraycopy(natures, 0, newNatures, 1, natures.length);
- newNatures[0] = natureId;
- description.setNatureIds(newNatures);
- project.setDescription(description, monitor);
- }
- }
-
- /**
- * @author Gregoire Dupe (Mia-Software) - initial implementation
- */
- public static void createBuildProperties(final IProject project) throws CoreException {
- final IFile buildFile = project.getFile("build.properties"); //$NON-NLS-1$
- if (!buildFile.exists()) {
- final StringBuffer buildSB = new StringBuffer();
- buildSB.append("source.. = src/\n"); //$NON-NLS-1$
- buildSB.append("output.. = bin/\n"); //$NON-NLS-1$
- buildSB.append("bin.includes = META-INF/,\\\n"); //$NON-NLS-1$
- buildSB.append(" .\n"); //$NON-NLS-1$
- final InputStream source = new ByteArrayInputStream(buildSB.toString().getBytes());
- buildFile.create(source, true, new NullProgressMonitor());
- }
- }
-
- /**
- * Create an EMF Facet project
- *
- * @param project
- * a reference to the project to create (it must not already exist)
- * @param projectLocation
- * @param monitor
- * a progress monitor
- * @throws CoreException
- * in case of error
- */
- public static void createEmfFacetProject(final IProject project, final IPath projectLocation, final IProgressMonitor monitor)
- throws CoreException {
- ProjectUtils.createPluginProject(project, projectLocation, monitor, false);
- ProjectUtils.addNature(project, monitor, CommonConstants.NATURE_ID);
- monitor.done();
- }
-
- public static void createPluginProject(final IProject project, final IPath projectLocation, final IProgressMonitor monitor,
- final boolean monitorDone) throws CoreException {
- monitor.beginTask(Messages.ProjectUtils_createPluginProject, IProgressMonitor.UNKNOWN);
- if (!project.exists()) {
- final IProjectDescription description = project.getWorkspace().newProjectDescription(
- project.getName());
- if (!Platform.getLocation().equals(projectLocation)) {
- description.setLocation(projectLocation);
- }
- project.create(description, monitor);
- project.open(monitor);
- ProjectUtils.configureAsJavaProject(project, monitor);
- ProjectUtils.configureAsPluginProject(project);
- ProjectUtils.createBuildProperties(project);
- } else {
- throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), "The project already exists")); //$NON-NLS-1$
- }
- if (monitorDone) {
- monitor.done();
- }
- }
-
- public static boolean isEmfFacetProject(final IProject project) {
- try {
- if (!project.isAccessible()) {
- return false;
- }
- return project.getNature(CommonConstants.NATURE_ID) != null;
- } catch (final CoreException e) {
- Logger.logError(e, Activator.getDefault());
- return false;
- }
- }
-
- public static boolean isInEmfFacetProject(final IPath path) {
- final IProject project = getProject(path);
- return isEmfFacetProject(project);
- }
-
- public static IProject getProject(final IPath path) {
- final IProject project;
- if (path.segmentCount() == 1) {
- project = ResourcesPlugin.getWorkspace().getRoot()
- .getProject(path.segment(0));
- } else {
- final IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- project = folder.getProject();
- }
- return project;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 Mia-Software.
+ * 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:
+ * Gregoire Dupe (Mia-Software)
+ * Fabien Giquel (Mia-Software)
+ * Nicolas Bros (Mia-Software)
+ * Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.Activator;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.Messages;
+import org.eclipse.papyrus.emf.facet.common.sdk.core.internal.exported.CommonConstants;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.util.core.internal.exported.FileUtils;
+import org.eclipse.papyrus.emf.facet.util.core.internal.exported.FolderUtils;
+
+import com.ibm.icu.lang.UCharacter;
+
+/**
+ * @author Gregoire Dupe (Mia-Software), Fabien Giquel (Mia-Software)
+ *
+ */
+public final class ProjectUtils {
+
+ private ProjectUtils() {
+ // Nothing
+ }
+
+ private static final String JAVA_VERSION = "J2SE-1.5"; //$NON-NLS-1$
+
+ public static void addPdeClassPath(final IProject project) throws JavaModelException {
+ final IJavaProject javaProject = JavaCore.create(project);
+ final IClasspathEntry[] oldClassPath = javaProject.getRawClasspath();
+ for (final IClasspathEntry classpathEntry : oldClassPath) {
+ if (classpathEntry.getPath().equals(new Path("org.eclipse.pde.core.requiredPlugins"))) { //$NON-NLS-1$
+ return;
+ }
+ }
+ final IClasspathEntry[] newClassPath = new IClasspathEntry[oldClassPath.length + 1];
+ System.arraycopy(oldClassPath, 0, newClassPath, 0, oldClassPath.length);
+ newClassPath[oldClassPath.length] = JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins")); //$NON-NLS-1$
+ javaProject.setRawClasspath(newClassPath, new NullProgressMonitor());
+ }
+
+ /**
+ * @author Gregoire Dupe (Mia-Software) - Removing "Require-Bundle" statement
+ */
+ public static void createManifest(final IProject project) throws CoreException {
+ final IFolder folder = project.getFolder("META-INF"); //$NON-NLS-1$
+ if (!folder.exists()) {
+ folder.create(true, true, new NullProgressMonitor());
+ }
+ final IFile manifestFile = folder.getFile("MANIFEST.MF"); //$NON-NLS-1$
+ if (!manifestFile.exists()) {
+ final StringBuffer manifestSB = new StringBuffer();
+ manifestSB.append("Manifest-Version: 1.0\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-ManifestVersion: 2\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-Name: " + project.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ final String packageName = ProjectUtils.packageName(project.getName());
+ manifestSB.append("Bundle-SymbolicName: " + packageName //$NON-NLS-1$
+ + ";singleton:=true\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-Version: 0.0.1.qualifier\n"); //$NON-NLS-1$
+ manifestSB
+ .append("Bundle-Activator: " + ProjectUtils.bundleActivatorQualifiedName(packageName) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ //manifestSB.append("Bundle-Vendor: bundle vendor\n"); //$NON-NLS-1$
+ manifestSB.append("Require-Bundle: org.eclipse.core.runtime,\n"); //$NON-NLS-1$
+ manifestSB.append(" org.eclipse.papyrus.emf.facet.util.core\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-RequiredExecutionEnvironment: " //$NON-NLS-1$
+ + ProjectUtils.JAVA_VERSION + "\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-ActivationPolicy: lazy\n"); //$NON-NLS-1$
+ manifestSB.append("Bundle-ClassPath: .,bin\n"); //$NON-NLS-1$
+ final InputStream source = new ByteArrayInputStream(manifestSB.toString().getBytes());
+ manifestFile.create(source, true, new NullProgressMonitor());
+ }
+ }
+
+ private static String bundleActivatorQualifiedName(final String packageName) {
+ return packageName + ".Activator"; //$NON-NLS-1$
+ }
+
+ private static void createActivator(final IProject project) throws CoreException {
+ final String packageName = ProjectUtils.packageName(project.getName());
+ final String qualifiedName = ProjectUtils.bundleActivatorQualifiedName(packageName);
+ final String path = qualifiedName.replaceAll("\\.", "/"); //$NON-NLS-1$ //$NON-NLS-2$
+ final IFile activatorFile = project
+ .getFile(new Path("src").append(path).addFileExtension("java")); //$NON-NLS-1$ //$NON-NLS-2$
+ FolderUtils.createFolder((IFolder) activatorFile.getParent());
+ if (!activatorFile.exists()) {
+ try {
+ final String template = FileUtils.getFileContents(Activator.getDefault()
+ .getBundle(), "resources/Activator.java.template"); //$NON-NLS-1$
+ final String activatorContents = template.replace("{0}", packageName); //$NON-NLS-1$
+ final InputStream source = new ByteArrayInputStream(activatorContents.getBytes());
+ activatorFile.create(source, true, new NullProgressMonitor());
+ } catch (final IOException e) {
+ Logger.logError(e, "Couldn't create Activator", Activator //$NON-NLS-1$
+ .getDefault());
+ }
+ }
+ }
+
+ /** Transform the given name into a valid package and bundle name */
+ public static String packageName(final String name) {
+ final StringBuilder builder = new StringBuilder();
+ char prev = ' ';
+ for (int i = 0; i < name.length(); i++) {
+ final char c = name.charAt(i);
+ if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_') {
+ builder.append(c);
+ prev = c;
+ } else if (c >= '0' && c <= '9') {
+ if (builder.length() == 0 || prev == '.') {
+ builder.append("_"); //$NON-NLS-1$
+ }
+ builder.append(c);
+ prev = c;
+ } else if (c == '.') {
+ if (prev == '.') {
+ continue;
+ }
+ if (builder.length() == 0 || prev >= '0' && prev <= '9') {
+ builder.append("_"); //$NON-NLS-1$
+ }
+ builder.append(c);
+ prev = c;
+ } else {
+ builder.append("_"); //$NON-NLS-1$
+ }
+ }
+
+ String result = builder.toString();
+ // first letter to lowercase
+ if (result.length() > 0 && UCharacter.isUpperCase(result.charAt(0))) {
+ result = UCharacter.toLowerCase(result.charAt(0)) + result.substring(1);
+ }
+
+ final IStatus status = JavaConventions.validatePackageName(result, JavaCore.VERSION_1_5,
+ JavaCore.VERSION_1_5);
+ if (!status.isOK()) {
+ Logger.logWarning("Couldn't make valid package name from project name: " //$NON-NLS-1$
+ + status.getMessage(), Activator.getDefault());
+ return name;
+ }
+ return result;
+ }
+
+ public static void addPdeNature(final IProject project) throws CoreException {
+ final String pluginNature = "org.eclipse.pde.PluginNature"; //$NON-NLS-1$
+ final IProjectDescription description = project.getDescription();
+ final String[] natures = description.getNatureIds();
+ if (!Arrays.asList(natures).contains(pluginNature)) {
+ final String[] newNatures = new String[natures.length + 1];
+ System.arraycopy(natures, 0, newNatures, 0, natures.length);
+ newNatures[natures.length] = pluginNature;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, new NullProgressMonitor());
+ }
+ }
+
+ public static void addPdeBuilder(final IProject project) throws CoreException {
+ final IProjectDescription projectDescription = project.getDescription();
+ final ICommand[] oldBuildSpec = project.getDescription().getBuildSpec();
+ for (final ICommand command : oldBuildSpec) {
+ if ("org.eclipse.pde.ManifestBuilder".equals(command.getBuilderName())) { //$NON-NLS-1$
+ return;
+ }
+ }
+ final ICommand[] newBuildSpec = new ICommand[oldBuildSpec.length + 2];
+ System.arraycopy(oldBuildSpec, 0, newBuildSpec, 0, oldBuildSpec.length);
+ final ICommand command1 = project.getDescription().newCommand();
+ command1.setBuilderName("org.eclipse.pde.ManifestBuilder"); //$NON-NLS-1$
+ final ICommand command2 = project.getDescription().newCommand();
+ command2.setBuilderName("org.eclipse.pde.SchemaBuilder"); //$NON-NLS-1$
+ newBuildSpec[oldBuildSpec.length] = command1;
+ newBuildSpec[oldBuildSpec.length + 1] = command2;
+ projectDescription.setBuildSpec(newBuildSpec);
+ project.setDescription(projectDescription, new NullProgressMonitor());
+ }
+
+ /**
+ * @author Gregoire Dupe (Mia-Software) - classpath entries modification
+ */
+ public static void configureAsJavaProject(final IProject project, final IProgressMonitor monitor)
+ throws CoreException {
+ ProjectUtils.addNature(project, monitor, JavaCore.NATURE_ID);
+ final IJavaProject javaProject = JavaCore.create(project);
+ // Set output folder
+ final IPath path = project.getFullPath().append("bin"); //$NON-NLS-1$
+ javaProject.setOutputLocation(path, null);
+ final List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
+ // Set source folder
+ final IFolder sourceFolder = project.getFolder("src"); //$NON-NLS-1$
+ if (!sourceFolder.exists()) {
+ sourceFolder.create(false, true, monitor);
+ classpathEntries.add(JavaCore.newSourceEntry(javaProject.getPath().append(
+ new Path("src")))); //$NON-NLS-1$
+ }
+ final Path jrePath = new Path(JavaRuntime.JRE_CONTAINER
+ + "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/" //$NON-NLS-1$
+ + ProjectUtils.JAVA_VERSION);
+ boolean hasJrePath = false;
+ final IClasspathEntry[] existingClassPath = javaProject.getRawClasspath();
+ for (final IClasspathEntry classpathEntry : existingClassPath) {
+ if (jrePath.equals(classpathEntry.getPath())) {
+ hasJrePath = true;
+ }
+ }
+ if (!hasJrePath) {
+ // add the jre api to the classpath
+ classpathEntries.add(JavaCore.newContainerEntry(jrePath));
+ javaProject.setRawClasspath(classpathEntries.toArray(new IClasspathEntry[0]), monitor);
+ }
+ }
+
+ public static void configureAsPluginProject(final IProject project) throws CoreException {
+ // TODO PDE Operations would be useful here but they are internal in PDE
+ ProjectUtils.addPdeNature(project);
+ // PDE builders are automatically added when the PDE nature is added
+ // ProjectUtils.addPdeBuilder(project);
+ ProjectUtils.addPdeClassPath(project);
+ ProjectUtils.createManifest(project);
+ ProjectUtils.createActivator(project);
+ }
+
+ public static void addNature(final IProject project, final IProgressMonitor monitor,
+ final String natureId) throws CoreException {
+ final IProjectDescription description = project.getDescription();
+ final String[] natures = description.getNatureIds();
+ if (!Arrays.asList(natures).contains(natureId)) {
+ final String[] newNatures = new String[natures.length + 1];
+ System.arraycopy(natures, 0, newNatures, 1, natures.length);
+ newNatures[0] = natureId;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, monitor);
+ }
+ }
+
+ /**
+ * @author Gregoire Dupe (Mia-Software) - initial implementation
+ */
+ public static void createBuildProperties(final IProject project) throws CoreException {
+ final IFile buildFile = project.getFile("build.properties"); //$NON-NLS-1$
+ if (!buildFile.exists()) {
+ final StringBuffer buildSB = new StringBuffer();
+ buildSB.append("source.. = src/\n"); //$NON-NLS-1$
+ buildSB.append("output.. = bin/\n"); //$NON-NLS-1$
+ buildSB.append("bin.includes = META-INF/,\\\n"); //$NON-NLS-1$
+ buildSB.append(" .\n"); //$NON-NLS-1$
+ final InputStream source = new ByteArrayInputStream(buildSB.toString().getBytes());
+ buildFile.create(source, true, new NullProgressMonitor());
+ }
+ }
+
+ /**
+ * Create an EMF Facet project
+ *
+ * @param project
+ * a reference to the project to create (it must not already exist)
+ * @param projectLocation
+ * @param monitor
+ * a progress monitor
+ * @throws CoreException
+ * in case of error
+ */
+ public static void createEmfFacetProject(final IProject project, final IPath projectLocation, final IProgressMonitor monitor)
+ throws CoreException {
+ ProjectUtils.createPluginProject(project, projectLocation, monitor, false);
+ ProjectUtils.addNature(project, monitor, CommonConstants.NATURE_ID);
+ monitor.done();
+ }
+
+ public static void createPluginProject(final IProject project, final IPath projectLocation, final IProgressMonitor monitor,
+ final boolean monitorDone) throws CoreException {
+ monitor.beginTask(Messages.ProjectUtils_createPluginProject, IProgressMonitor.UNKNOWN);
+ if (!project.exists()) {
+ final IProjectDescription description = project.getWorkspace().newProjectDescription(
+ project.getName());
+ if (!Platform.getLocation().equals(projectLocation)) {
+ description.setLocation(projectLocation);
+ }
+ project.create(description, monitor);
+ project.open(monitor);
+ ProjectUtils.configureAsJavaProject(project, monitor);
+ ProjectUtils.configureAsPluginProject(project);
+ ProjectUtils.createBuildProperties(project);
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), "The project already exists")); //$NON-NLS-1$
+ }
+ if (monitorDone) {
+ monitor.done();
+ }
+ }
+
+ public static boolean isEmfFacetProject(final IProject project) {
+ try {
+ if (!project.isAccessible()) {
+ return false;
+ }
+ return project.getNature(CommonConstants.NATURE_ID) != null;
+ } catch (final CoreException e) {
+ Logger.logError(e, Activator.getDefault());
+ return false;
+ }
+ }
+
+ public static boolean isInEmfFacetProject(final IPath path) {
+ final IProject project = getProject(path);
+ return isEmfFacetProject(project);
+ }
+
+ public static IProject getProject(final IPath path) {
+ final IProject project;
+ if (path.segmentCount() == 1) {
+ project = ResourcesPlugin.getWorkspace().getRoot()
+ .getProject(path.segment(0));
+ } else {
+ final IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
+ project = folder.getProject();
+ }
+ return project;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/messages.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/messages.properties
index c96b421ec74..ce28f8b79c1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/messages.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core/src/org/eclipse/papyrus/emf/facet/common/sdk/core/internal/messages.properties
@@ -1,12 +1,12 @@
-###############################################################################
-# Copyright (c) 2012 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:
-# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
-###############################################################################
+###############################################################################
+# Copyright (c) 2012 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:
+# Nicolas Bros (Mia-Software) - Bug 375054 - Add validation warning for overlay on EClass
+###############################################################################
ProjectUtils_createEMFFacetProject=Create EMF Facet project
ProjectUtils_createPluginProject=Create Plug-in project

Back to the top