Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-03-03 14:13:19 +0000
committerGerrit Code Review @ Eclipse.org2017-03-06 08:48:20 +0000
commit831ebb2405a0609fb566471c646dac61b838f889 (patch)
treef2dfe7802cd57b78cdcb181e2fbe77611b28d4a5 /extraplugins
parentedded3048c754e466504cc8ebcc0a6e68a053791 (diff)
downloadorg.eclipse.papyrus-831ebb2405a0609fb566471c646dac61b838f889.tar.gz
org.eclipse.papyrus-831ebb2405a0609fb566471c646dac61b838f889.tar.xz
org.eclipse.papyrus-831ebb2405a0609fb566471c646dac61b838f889.zip
Bug 512954 - [UML Export] Move umlexport to incubation repository
- remove code from UML Export - the code has bee moved to org.eclipse.papyrus.incubation repository Change-Id: Iff76aceeca8fd9ce3f4f9f64b1dac426d78997df Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/.classpath7
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/.project28
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/META-INF/MANIFEST.MF33
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/about.html28
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/build.properties9
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/icons/export_wiz_16x16-papyrusColor.gifbin561 -> 0 bytes
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/icons/import_wiz_16x16-papyrusColor.gifbin541 -> 0 bytes
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.properties3
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.xml153
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/pom.xml14
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/Activator.java95
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesIconsDialog.java124
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesParametersDialog.java261
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ProfilesToExportSelectionDialog.java216
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java327
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportAppliedProfileHandler.java69
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportProfilesCommand.java528
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/Messages.java88
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/messages.properties25
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/AreThereAppliedProfilesFromWS.java90
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/BuildProperties.java184
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ChangeProfileApplicationTester.java39
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ExportProfilesUserParameters.java135
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ImportedLibrary.java147
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/InstalledProfileURI.java84
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/PluginExportUtil.java541
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfileUtil.java92
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfilesLabelProvider.java51
-rw-r--r--extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/WSFileUtil.java182
31 files changed, 0 insertions, 3912 deletions
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/.classpath b/extraplugins/uml/org.eclipse.papyrus.uml.export/.classpath
deleted file mode 100644
index ad32c83a788..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/.project b/extraplugins/uml/org.eclipse.papyrus.uml.export/.project
deleted file mode 100644
index d3966dc4461..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.export</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.core.prefs b/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 94d61f00da6..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,291 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
-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/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.ui.prefs b/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 954281dbc31..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,68 +0,0 @@
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
-cleanup.add_missing_annotations=true
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_methods=false
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_missing_override_annotations_interface_methods=true
-cleanup.add_serial_version_id=false
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=false
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_functional_interfaces=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.correct_indentation=false
-cleanup.format_source_code=false
-cleanup.format_source_code_changes_only=false
-cleanup.insert_inferred_type_arguments=false
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=false
-cleanup.make_private_fields_final=true
-cleanup.make_type_abstract_if_missing_method=false
-cleanup.make_variable_declarations_final=false
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=true
-cleanup.organize_imports=false
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=true
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_redundant_type_arguments=true
-cleanup.remove_trailing_whitespaces=true
-cleanup.remove_trailing_whitespaces_all=true
-cleanup.remove_trailing_whitespaces_ignore_empty=false
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=false
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.sort_members=false
-cleanup.sort_members_all=false
-cleanup.use_anonymous_class_creation=false
-cleanup.use_blocks=true
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_lambda=true
-cleanup.use_parentheses_in_expressions=false
-cleanup.use_this_for_non_static_field_access=false
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=false
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup.use_type_arguments=false
-cleanup_profile=_Papyrus
-cleanup_settings_version=2
-eclipse.preferences.version=1
-formatter_profile=_Papyrus
-formatter_settings_version=12
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/META-INF/MANIFEST.MF b/extraplugins/uml/org.eclipse.papyrus.uml.export/META-INF/MANIFEST.MF
deleted file mode 100644
index 49de89e1ec5..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.views.modelexplorer;bundle-version="1.2.0",
- org.eclipse.uml2.uml;bundle-version="3.2.0",
- org.eclipse.uml2.common.edit,
- org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.2.0",
- org.eclipse.core.expressions,
- org.eclipse.pde.ui;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.4.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.core.filebuffers,
- org.eclipse.gmf.runtime.common.ui,
- org.eclipse.papyrus.eclipse.project.editors;bundle-version="1.2.0",
- org.eclipse.papyrus.editor;bundle-version="1.2.0",
- org.eclipse.pde.build,
- com.ibm.icu,
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.uml.export.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.export;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/about.html b/extraplugins/uml/org.eclipse.papyrus.uml.export/about.html
deleted file mode 100644
index 209103075a7..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!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>November 14, 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/extraplugins/uml/org.eclipse.papyrus.uml.export/build.properties b/extraplugins/uml/org.eclipse.papyrus.uml.export/build.properties
deleted file mode 100644
index b4a0106d4db..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- icons/
-src.includes = about.html
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/export_wiz_16x16-papyrusColor.gif b/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/export_wiz_16x16-papyrusColor.gif
deleted file mode 100644
index be0e5397a35..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/export_wiz_16x16-papyrusColor.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/import_wiz_16x16-papyrusColor.gif b/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/import_wiz_16x16-papyrusColor.gif
deleted file mode 100644
index c7be463bcd2..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/icons/import_wiz_16x16-papyrusColor.gif
+++ /dev/null
Binary files differ
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.properties b/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.properties
deleted file mode 100644
index 16ec2eaf4f8..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.papyrus.import
-providerName = Eclipse Modeling Project
-pluginName = Papyrus Export Profiles plugin (Incubation)
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.xml b/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.xml
deleted file mode 100644
index 48c77878fb1..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/plugin.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?before=org.eclipse.papyrus.views.modelexplorer.popupmenu.createchild">
- <menu
- icon="icons/export_wiz_16x16-papyrusColor.gif"
- id="org.eclipse.papyrus.uml.export.menu"
- label="&amp;Export"
- tooltip="Papyrus Export Profile Menu">
- <command
- commandId="org.eclipse.papyrus.export.applied.profile"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- label="Export &amp;Applied Profiles from Workspace"
- style="push">
- </command>
- </menu>
- </menuContribution>
- <!--menuContribution
- allPopups="true"
- locationURI="popup:org.eclipse.ui.popup.any?after=additions">
- <menu
- icon="platform:/plugin/org.eclipse.papyrus.infra.widgets/icons/PapyrusLogo16x16.gif"
- id="org.eclipse.papyrus.uml.export.refactorModel"
- label="Refactor Model">
- <command
- commandId="org.eclipse.papyrus.uml.export.refactorModel.changeProfileAplication"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- id="org.eclipse.papyrus.uml.export.refactorModel.changeProfileAplication"
- label="ChangeProfileApplication"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <and>
- <count value="1"/>
- <adapt
- type="org.eclipse.core.resources.IFile">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.ChangeProfileApplication.ChangeProfileApplication">
- </test>
- </adapt>
- </and>
-
- </visibleWhen>
- </command>
- </menu>
- </menuContribution-->
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.papyrus.editor.category"
- description="Export Applied Profile"
- id="org.eclipse.papyrus.export.applied.profile"
- name="Export Applied Profile">
- </command>
- <!--command
- description="Change Profile Application"
- id="org.eclipse.papyrus.uml.export.refactorModel.changeProfileAplication"
- name="Change Profile Application">
- </command-->
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.papyrus.uml.export.handlers.ExportAppliedProfileHandler"
- commandId="org.eclipse.papyrus.export.applied.profile">
- <activeWhen>
- <and>
-
- <with
- variable="selection">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.AreThereAppliedProfiles.AreThereAppliedProfiles"
- value="true">
- </test>
- </with>
- </and>
- </activeWhen>
-
- </handler>
- <!--handler
- class="org.eclipse.papyrus.uml.export.handlers.EditProfileApplicationAction"
- commandId="org.eclipse.papyrus.uml.export.refactorModel.changeProfileAplication">
- </handler-->
-
- </extension>
-
-
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution
- adaptable="true"
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.uml"
- id="org.eclipse.papyrus.uml.export.popupMenus.contribution.IFile">
-
- <menu
- icon="platform:/plugin/org.eclipse.papyrus.infra.widgets/icons/PapyrusLogo16x16.gif"
- id="org.eclipse.papyrus.uml.export.menu"
- label="Refactor Model"
- path="additionsAcceleo">
- <groupMarker name="refactor model"/>
- </menu>
- <action
- class="org.eclipse.papyrus.uml.export.handlers.EditProfileApplicationAction"
- enablesFor="+"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- id="org.eclipse.papyrus.uml.export.popupMenus.EditProfileApplicationAction"
- label="Edit Profile Application"
- menubarPath="org.eclipse.papyrus.uml.export.menu/edit model">
- <!--enablement>
-
- <and>
- <count value="1"/>
- <adapt
- type="org.eclipse.core.resources.IFile">
- <test
- forcePluginActivation="true"
- property="org.eclipse.papyrus.uml.export.changeProfileApplicationTester.ChangeProfileApplication">
- </test>
- </adapt>
- </and>
-
-
- </enablement-->
- </action>
-
- </objectContribution>
- </extension>
-<extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.papyrus.uml.export.util.AreThereAppliedProfilesFromWS"
- id="org.eclipse.papyrus.AreThereAppliedProfiles"
- namespace="org.eclipse.papyrus.AreThereAppliedProfiles"
- properties="AreThereAppliedProfiles"
- type="org.eclipse.jface.viewers.ISelection">
- </propertyTester>
- <propertyTester
- class="org.eclipse.papyrus.uml.export.util.ChangeProfileApplicationTester"
- id="org.eclipse.papyrus.ChangeProfileApplication"
- namespace="org.eclipse.papyrus.uml.export"
- properties="ChangeProfileApplication"
- type="org.eclipse.core.resources.IFile">
- </propertyTester>
- </extension>
-</plugin>
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/pom.xml b/extraplugins/uml/org.eclipse.papyrus.uml.export/pom.xml
deleted file mode 100644
index 3c9a5da5dd0..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>3.0.0-SNAPSHOT</version>
- <relativePath>../../../releng/extra</relativePath>
- </parent>
- <artifactId>org.eclipse.papyrus.uml.export</artifactId>
- <groupId>org.eclipse.papyrus</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/Activator.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/Activator.java
deleted file mode 100644
index 632afa1804d..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/Activator.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.export;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-// TODO: Auto-generated Javadoc
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- /** The Constant PLUGIN_ID. */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.export"; //$NON-NLS-1$
-
- // The shared instance
- /** The plugin. */
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor.
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- /**
- * Start.
- *
- * @param context
- * the context
- * @throws Exception
- * the exception
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- /**
- * Stop.
- *
- * @param context
- * the context
- * @throws Exception
- * the exception
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesIconsDialog.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesIconsDialog.java
deleted file mode 100644
index 2d23aaefc11..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesIconsDialog.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.dialog;
-
-
-
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.uml2.uml.Profile;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ExportProfilesIconsDialog.
- */
-public class ExportProfilesIconsDialog extends TrayDialog {
-
- /** The profiles. */
- private Object[] profiles;
-
- /** The profiles icons. */
- private String[] profilesIcons = new String[10];
-
-
-
-
- /** The table icon editor. */
- private StringFileSelector[] profileIconEditors = new StringFileSelector[10];
-
- /**
- * Instantiates a new export profiles icons dialog.
- *
- * @param shell
- * the shell
- * @param profiles
- * the profiles
- */
- public ExportProfilesIconsDialog(Shell shell, Object[] profiles) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.profiles = profiles;
-
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#create()
- *
- */
-
- @Override
- public void create() {
- // TODO Auto-generated method stub
- super.create();
- this.createEditors();
- }
-
- /**
- * Creates the editors.
- */
- protected void createEditors() {
- GridData data = new GridData();
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
-
- Composite parent = (Composite) getDialogArea();
- for (int i = 0; i < this.profiles.length; i++) {
- this.profileIconEditors[i] = new StringFileSelector(parent, SWT.BORDER);
- this.profileIconEditors[i].setLayoutData(data);
- this.profileIconEditors[i].setLabel("Icon for " + ((Profile) this.profiles[i]).getName());
- this.profileIconEditors[i].setToolTipText("Enter the profile icon");
- }
-
- // Configure the shell
- getShell().setSize(800, 250);
- getShell().setText("Choose icons for the profiles to export");
- getShell().layout();
-
- }
-
- /**
- * Gets the profiles icons.
- *
- * @return the profiles icons
- */
- public String[] getProfilesIcons() {
- return profilesIcons;
- }
-
- /**
- * Ok pressed.
- *
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
-
- @Override
- protected void okPressed() {
-
- loop: for (int i = 0; i < this.profileIconEditors.length; i++) {
- if (this.profileIconEditors[i] != null) {
- this.profilesIcons[i] = (String) this.profileIconEditors[i].getValue();
- } else {
- break loop;
- }
- }
-
- super.okPressed();
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesParametersDialog.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesParametersDialog.java
deleted file mode 100644
index eb3f8fb3414..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ExportProfilesParametersDialog.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.dialog;
-
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.papyrus.infra.widgets.editors.StringEditor;
-import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
-import org.eclipse.papyrus.uml.export.messages.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.uml2.uml.Profile;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ExportProfilesParametersDialog.
- */
-public class ExportProfilesParametersDialog extends TrayDialog {
-
- /** The plugin name. */
- private String pluginName;
-
- /** The plugin provider. */
- private String pluginProvider;
-
- /** The plugin version. */
- private String pluginVersion;
-
- /** The plugin exec environment. */
- private String pluginExecEnvironment;
-
- /** The plugin name editor. */
- private StringEditor pluginNameEditor;
-
- /** The plugin provider editor. */
- private StringEditor pluginProviderEditor;
-
- /** The plugin version editor. */
- private StringEditor pluginVersionEditor;
-
- /** The plugin exec environment editor. */
- private StringEditor pluginExecEnvironmentEditor;
-
- private Object[] profiles;
-
- private String[] profilesIcons = new String[10];
-
- private StringFileSelector[] profileIconEditors = new StringFileSelector[10];
-
- /**
- * Instantiates a new export profiles parameters dialog.
- *
- * @param shell
- * the shell
- * @param pluginName
- * the plugin name
- * @param pluginProvider
- * the plugin provider
- * @param pluginVersion
- * the plugin version
- * @param execEnvironment
- * the exec environment
- */
- public ExportProfilesParametersDialog(Shell shell, String pluginName, String pluginProvider, String pluginVersion, String execEnvironment, Object[] profiles) {
- super(shell);
- setShellStyle(getShellStyle() | SWT.RESIZE);
- this.setPluginName(pluginName == null ? "" : pluginName); //$NON-NLS-1$
- this.setPluginProvider(pluginProvider == null ? "" : pluginProvider); //$NON-NLS-1$
- this.setPluginVersion(pluginVersion == null ? "" : pluginVersion); //$NON-NLS-1$
- this.setPluginExecEnvironment(execEnvironment == null ? "" : execEnvironment); //$NON-NLS-1$
- this.profiles = profiles;
-
- }
-
- /**
- * @see org.eclipse.jface.dialogs.Dialog#create()
- *
- */
-
- @Override
- public void create() {
- // TODO Auto-generated method stub
- super.create();
- this.createEditors();
- }
-
- /**
- * Creates the editors.
- */
- protected void createEditors() {
-
-
- GridData data = new GridData();
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
-
-
- Composite parent = (Composite) getDialogArea();
-
-
- this.pluginNameEditor = new StringEditor(parent, SWT.NONE, Messages.ExportProfilesParametersDialog_0);
- this.pluginNameEditor.setValue(getPluginName());
- this.pluginNameEditor.setLayoutData(data);
- this.pluginNameEditor.setToolTipText(Messages.ExportProfilesParametersDialog_1);
-
-
- this.pluginProviderEditor = new StringEditor(parent, SWT.BORDER, Messages.ExportProfilesParametersDialog_2);
- this.pluginProviderEditor.setValue(getPluginProvider());
- this.pluginProviderEditor.setLayoutData(data);
- this.pluginProviderEditor.setToolTipText(Messages.ExportProfilesParametersDialog_7);
-
- this.pluginVersionEditor = new StringEditor(parent, SWT.BORDER, Messages.ExportProfilesParametersDialog_8);
- this.pluginVersionEditor.setValue(getPluginVersion());
- this.pluginVersionEditor.setLayoutData(data);
- this.pluginVersionEditor.setToolTipText(Messages.ExportProfilesParametersDialog_9);
-
-
- this.pluginExecEnvironmentEditor = new StringEditor(parent, SWT.BORDER, Messages.ExportProfilesParametersDialog_10);
- this.pluginExecEnvironmentEditor.setValue(getPluginExecEnvironment());
- this.pluginExecEnvironmentEditor.setLayoutData(data);
- this.pluginExecEnvironmentEditor.setToolTipText(Messages.ExportProfilesParametersDialog_11);
-
- for (int i = 0; i < this.profiles.length; i++) {
- this.profileIconEditors[i] = new StringFileSelector(parent, SWT.BORDER);
- this.profileIconEditors[i].setLayoutData(data);
- this.profileIconEditors[i].setLabel("Icon for " + ((Profile) this.profiles[i]).getName());
- this.profileIconEditors[i].setToolTipText("Enter the profile icon");
- }
-
-
- // Configure the shell
- getShell().setSize(800, 350);
-
- getShell().setText(Messages.ExportProfilesParametersDialog_12);
-
-
- getShell().layout();
-
-
- }
-
- /**
- * Ok pressed.
- *
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
-
- @Override
- protected void okPressed() {
-
- loop: for (int i = 0; i < this.profileIconEditors.length; i++) {
- if (this.profileIconEditors[i] != null) {
- this.profilesIcons[i] = (String) this.profileIconEditors[i].getValue();
- } else {
- break loop;
- }
- }
- this.pluginExecEnvironment = (String) this.pluginExecEnvironmentEditor.getValue();
- this.pluginName = (String) this.pluginNameEditor.getValue();
- this.pluginProvider = (String) this.pluginProviderEditor.getValue();
- this.pluginVersion = (String) this.pluginVersionEditor.getValue();
-
-
- super.okPressed();
- }
-
- /**
- * Gets the plugin name.
- *
- * @return the plugin name
- */
- public String getPluginName() {
- return pluginName;
- }
-
- /**
- * Sets the plugin name.
- *
- * @param pluginName
- * the new plugin name
- */
- private void setPluginName(String pluginName) {
- this.pluginName = pluginName;
- }
-
- /**
- * Gets the plugin provider.
- *
- * @return the plugin provider
- */
- public String getPluginProvider() {
- return pluginProvider;
- }
-
- /**
- * Sets the plugin provider.
- *
- * @param pluginProvider
- * the new plugin provider
- */
- private void setPluginProvider(String pluginProvider) {
- this.pluginProvider = pluginProvider;
- }
-
- /**
- * Gets the plugin version.
- *
- * @return the plugin version
- */
- public String getPluginVersion() {
- return pluginVersion;
- }
-
- /**
- * Sets the plugin version.
- *
- * @param pluginVersion
- * the new plugin version
- */
- private void setPluginVersion(String pluginVersion) {
- this.pluginVersion = pluginVersion;
- }
-
- /**
- * Gets the plugin exec environment.
- *
- * @return the plugin exec environment
- */
- public String getPluginExecEnvironment() {
- return pluginExecEnvironment;
- }
-
- /**
- * Sets the plugin exec environment.
- *
- * @param execEnvironment
- * the new plugin exec environment
- */
- private void setPluginExecEnvironment(String execEnvironment) {
- this.pluginExecEnvironment = execEnvironment;
- }
-
-
- public String[] getProfilesIcons() {
- return profilesIcons;
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ProfilesToExportSelectionDialog.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ProfilesToExportSelectionDialog.java
deleted file mode 100644
index 0ddce2ee6c7..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/dialog/ProfilesToExportSelectionDialog.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.dialog;
-
-import java.util.Comparator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.papyrus.uml.export.messages.Messages;
-import org.eclipse.papyrus.uml.export.util.ProfilesLabelProvider;
-import org.eclipse.papyrus.uml.extensionpoints.Activator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
-import org.eclipse.uml2.uml.Profile;
-
-
-
-/**
- * The Class ProfilesToExportSelectionDialog.
- */
-public class ProfilesToExportSelectionDialog extends FilteredItemsSelectionDialog {
-
- /** all elements that can be selected by the dialog. */
- Object[] totalInput;
-
- /** The imported profiles label provider. */
- private ProfilesLabelProvider importedProfilesLabelProvider;
-
- /** ID for this dialog preferences section. */
- protected static final String DIALOG_SETTINGS = Activator.PLUGIN_ID + "dialogs.exportedprofiles"; //$NON-NLS-1$
-
-
-
- /**
- * Instantiates a new profiles to export selection dialog.
- *
- * @param shell
- * the shell
- * @param multi
- * the multi
- * @param input
- * the input
- * @param title
- * the title
- */
- public ProfilesToExportSelectionDialog(Shell shell, boolean multi, Object[] input, String title) {
- super(shell, multi);
- importedProfilesLabelProvider = new ProfilesLabelProvider();
- setTitle(title);
- setInitialPattern("**"); //$NON-NLS-1$
- setListLabelProvider(importedProfilesLabelProvider);
- this.totalInput = input;
-
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getElementName(java.lang.Object)
- *
- * @param item
- * @return
- */
-
- @Override
- public String getElementName(Object item) {
- if (!(item instanceof Profile)) {
- return null;
- }
- // System.err.println(((Profile)item).getName());
-
- return ((Profile) item).getName();
- }
-
-
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createExtendedContentArea(org.eclipse.swt.widgets.Composite)
- *
- * @param parent
- * @return
- */
-
- @Override
- protected Control createExtendedContentArea(Composite parent) {
- // nothing
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
- */
- /**
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
- *
- * @return
- */
-
- @Override
- protected ItemsFilter createFilter() {
- return new ProfileFilter() {
- };
- }
-
- /**
- * Filter for extension points.
- */
- private class ProfileFilter extends ItemsFilter {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isConsistentItem(Object item) {
- if (item instanceof Profile) {
- return true;
- }
- return false;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter#matchItem(java.lang.Object)
- *
- * @param item
- * @return
- */
-
- @Override
- public boolean matchItem(Object item) {
- if ((item instanceof Profile)) {
- return true;
- }
- return false;
- }
-
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected Comparator<Profile> getItemsComparator() {
- Comparator<Profile> comp = new Comparator<Profile>() {
-
- @Override
- public int compare(Profile o1, Profile o2) {
- return o1.getName().compareTo(o2.getName());
- }
- };
- return comp;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected IDialogSettings getDialogSettings() {
- IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS);
- if (settings == null) {
- settings = Activator.getDefault().getDialogSettings().addNewSection(DIALOG_SETTINGS);
- }
- return settings;
- }
-
- /**
- * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#validateItem(java.lang.Object)
- *
- * @param item
- * @return
- */
-
- @Override
- protected IStatus validateItem(Object item) {
- // TODO Auto-generated method stub
- return new Status(IStatus.OK, Activator.PLUGIN_ID, ""); //$NON-NLS-1$
- }
-
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException {
- if (progressMonitor != null) {
- progressMonitor.beginTask(Messages.ProfilesToExportSelectionDialog_3, totalInput.length);
- }
- for (int i = 0; i < totalInput.length; i++) {
- contentProvider.add(totalInput[i], itemsFilter);
- progressMonitor.worked(1);
- }
- if (progressMonitor != null) {
- progressMonitor.done();
- }
-
- }
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java
deleted file mode 100644
index b8e68c35ccb..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/EditProfileApplicationAction.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.handlers;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.uml.export.Activator;
-import org.eclipse.papyrus.uml.export.dialog.ProfilesToExportSelectionDialog;
-import org.eclipse.papyrus.uml.export.messages.Messages;
-import org.eclipse.papyrus.uml.export.util.ProfileUtil;
-import org.eclipse.papyrus.uml.export.util.WSFileUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionDelegate;
-import org.eclipse.uml2.uml.Profile;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class EditProfileApplicationAction.
- */
-public class EditProfileApplicationAction extends ActionDelegate implements IActionDelegate {
-
-
- /**
- * Selected model files.
- */
- protected List<IFile> files;
-
- /**
- * Gets the i file.
- *
- * @param selectedObj
- * the selected obj
- * @return the i file
- */
- public static IFile getIFile(Object selectedObj) {
- IFile result = null;
- if (selectedObj instanceof IFile) {
- result = (IFile) selectedObj;
- }
- // Try to adapt
- if (result == null && selectedObj instanceof IAdaptable) {
- result = (IFile) ((IAdaptable) selectedObj).getAdapter(IFile.class);
- }
- // adapt in ifile
- if (result == null) {
- result = (IFile) Platform.getAdapterManager().getAdapter(selectedObj, IFile.class);
- }
- if (result == null) {
- // try to check if it is a collection
- Collection<?> collec = (Collection<?>) Platform.getAdapterManager().getAdapter(selectedObj, Collection.class);
- if (collec != null) {
- for (Object o : collec) {
- if (o instanceof IFile) {
- IFile f = (IFile) o;
- if ("uml".equals(f.getFileExtension())) {
- result = f;
- break;
- }
- }
- }
- }
- }
- return result != null && "uml".equals(result.getFileExtension()) ? result : null;
- }
-
- /**
- * Checks if is profile application is editable.
- *
- * @param selectedObj
- * the selected obj
- * @return true, if is profile application editable
- */
- public static boolean isProfileApplicationEditable(Object selectedObj) {
- IFile file = getIFile(selectedObj);
- if (file != null) {
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource umlResource = WSFileUtil.loadResource(file.getFullPath().toString(), resourceSet);
- if (umlResource.getContents().isEmpty()) {
- // The root doesn't exist.
- return false;
- }
- EObject root = umlResource.getContents().get(0);
- Object[] appliedProfiles = ProfileUtil.getAppliedProfilesFromWS(root);
- if (appliedProfiles != null) {
- for (int i = 0; i < appliedProfiles.length; i++) {
- String installedProfileURI = findCorrespondingInstalledProfile((Profile) appliedProfiles[i]);
- if (installedProfileURI != null) {
- return true;
- }
-
- }
- }
- }
- return false;
-
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- * @generated
- */
- @Override
- @SuppressWarnings("unchecked")
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- files = ((IStructuredSelection) selection).toList();
- }
- }
-
- /**
- * Run.
- *
- * @param action
- * the action
- * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction)
- */
-
- @Override
- public void run(IAction action) {
- if (files != null) {
- Iterator<IFile> filesIt = files.iterator();
- final IFile file = filesIt.next();
- ResourceSet resourceSet = new ResourceSetImpl();
- ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
- try {
- manager.connect(file.getFullPath(), null);
- } catch (CoreException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- final ITextFileBuffer buffer = manager.getTextFileBuffer(file.getFullPath());
- final IDocument doc = buffer.getDocument();
- final FindReplaceDocumentAdapter adapter = new FindReplaceDocumentAdapter(doc);
- final MultiTextEdit multiEdit = new MultiTextEdit();
- final Resource umlResource = WSFileUtil.loadResource(file.getFullPath().toString(), resourceSet);
- if (umlResource.getContents().isEmpty()) {
- // The root doesn't exist.
- try {
- throw new NotFoundException(Messages.EditProfileApplicationAction_0);
- } catch (NotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- EObject root = umlResource.getContents().get(0);
- Object[] appliedProfiles = ProfileUtil.getAppliedProfilesFromWS(root);
- ArrayList<Object> appliedLocalProfiles = new ArrayList<Object>();
- for (int i = 0; i < appliedProfiles.length; i++) {
- String installedProfileURI = findCorrespondingInstalledProfile((Profile) appliedProfiles[i]);
- if (installedProfileURI != null) {
- appliedLocalProfiles.add(appliedProfiles[i]);
- }
-
- }
- if (appliedLocalProfiles != null && !appliedLocalProfiles.isEmpty()) {
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- final ProfilesToExportSelectionDialog dialog = new ProfilesToExportSelectionDialog(shell, true, appliedLocalProfiles.toArray(), "Change profile application from local to installed");
-
- dialog.open();
- if (Window.OK == dialog.getReturnCode()) {
-
- IRunnableWithProgress operation = new IRunnableWithProgress() {
-
-
- @Override
- public void run(IProgressMonitor monitor) {
- Object[] profiles = dialog.getResult();
- for (int i = 0; i < profiles.length; i++) {
- if (profiles[i] instanceof Profile) {
- // Absolute profile URI (platform:/resource/)
- URI localProfileURI = ((Profile) profiles[i]).eResource().getURI();
-
- // Absolute model URI (platform:/resource)
- IPath filePath = file.getFullPath();
- URI modelURI = umlResource.getURI();
-
- // Relative profile URI
- URI relativeProfileURI = localProfileURI.deresolve(modelURI);
-
- String installedProfileURI = findCorrespondingInstalledProfile((Profile) profiles[i]);
- if (installedProfileURI != null) {
-
- try {
- WSFileUtil.replaceString(localProfileURI.toString(), installedProfileURI, adapter, doc, 0, multiEdit);
- WSFileUtil.replaceString(relativeProfileURI.toString(), installedProfileURI, adapter, doc, 0, multiEdit);
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
- }
-
-
- }
- if (multiEdit.hasChildren()) {
- try {
- multiEdit.apply(doc);
- } catch (MalformedTreeException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (BadLocationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- buffer.commit(null, true);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
-
- }
- }
- };
- try {
- PlatformUI.getWorkbench().getProgressService().run(true, true, operation);
- } catch (InvocationTargetException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- org.eclipse.papyrus.uml.export.Activator.getDefault().getLog().log(status);
- } catch (InterruptedException e) {
- IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- org.eclipse.papyrus.uml.export.Activator.getDefault().getLog().log(status);
- }
- }
- } else {
- // launch an error message
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MessageDialog.openError(shell, "Error", "No profile application to edit");
- }
- }
-
-
- }
-
-
-
-
-
- /**
- * Find corresponding installed profile.
- *
- * @param profile
- * the profile
- * @return the corresponding installed profile uri
- */
- public static String findCorrespondingInstalledProfile(Profile profile) {
- // TODO Auto-generated method stub
- IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode("org.eclipse.papyrus.uml.export"); //$NON-NLS-1$
- org.osgi.service.prefs.Preferences node = preferences.node("installedProfilesUriCorrespondance");
- String installedProfileURI = node.get(profile.eResource().getURI().toString(), "default"); //$NON-NLS-1$
- if ((!installedProfileURI.equals("default"))) {
- URI uri = URI.createURI(installedProfileURI);
- try {
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.getResource(uri, true);
- // verify that the profile is indeed installed in the platform before replacing the uri
- if ((resource.isLoaded()) && (!(resource.getContents().isEmpty()))) {
- // System.err.println(installedProfileURI);
- return installedProfileURI;
- }
- } catch (WrappedException ex) {
- ex.printStackTrace();
- }
- } else {
- return null;
- }
- return null;
-
- }
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportAppliedProfileHandler.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportAppliedProfileHandler.java
deleted file mode 100644
index bb184f3ca08..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportAppliedProfileHandler.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.handlers;
-
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.ui.command.AbstractCommandHandler;
-import org.eclipse.papyrus.uml.export.messages.Messages;
-import org.eclipse.uml2.uml.Package;
-
-
-
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ExportAppliedProfileHandler.
- */
-public class ExportAppliedProfileHandler extends AbstractCommandHandler {
-
-
-
- /**
- *
- * {@inheritDoc}
- */
- @Override
- protected Command getCommand(final IEvaluationContext context) {
-
- if (canExecute()) {
-
- AbstractTransactionalCommand cmd = new ExportProfilesCommand(getEditingDomain(context), Messages.ExportAppliedProfileHandler_0, null);
- return new GMFtoEMFCommandWrapper(cmd);
- } else {
- return UnexecutableCommand.INSTANCE;
- }
- }
-
-
-
-
-
- /**
- * Can execute.
- *
- * @return true, if successful
- */
- public boolean canExecute() {
- if (getSelectedElements().size() == 1) {
- return (getSelectedElement() instanceof Package);
- }
- return false;
- }
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportProfilesCommand.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportProfilesCommand.java
deleted file mode 100644
index c7e7e931d60..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/handlers/ExportProfilesCommand.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.handlers;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.ui.util.DisplayUtils;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.eclipse.project.editors.file.ManifestEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
-import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.papyrus.uml.export.dialog.ExportProfilesParametersDialog;
-import org.eclipse.papyrus.uml.export.dialog.ProfilesToExportSelectionDialog;
-import org.eclipse.papyrus.uml.export.messages.Messages;
-import org.eclipse.papyrus.uml.export.util.BuildProperties;
-import org.eclipse.papyrus.uml.export.util.ExportProfilesUserParameters;
-import org.eclipse.papyrus.uml.export.util.ImportedLibrary;
-import org.eclipse.papyrus.uml.export.util.InstalledProfileURI;
-import org.eclipse.papyrus.uml.export.util.PluginExportUtil;
-import org.eclipse.papyrus.uml.export.util.ProfileUtil;
-import org.eclipse.papyrus.uml.export.util.WSFileUtil;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.pde.core.plugin.IPluginBase;
-import org.eclipse.pde.core.plugin.IPluginElement;
-import org.eclipse.pde.core.plugin.IPluginExtension;
-import org.eclipse.pde.core.plugin.IPluginModel;
-import org.eclipse.pde.internal.core.plugin.WorkspacePluginModel;
-import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.xml.sax.SAXException;
-
-
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ExportProfilesCommand.
- */
-@SuppressWarnings("restriction")
-public class ExportProfilesCommand extends AbstractTransactionalCommand {
-
- /**
- * Instantiates a new export profiles command.
- *
- * @param domain
- * the domain
- * @param label
- * the label
- * @param affectedFiles
- * the affected files
- */
- public ExportProfilesCommand(TransactionalEditingDomain domain, String label, @SuppressWarnings("rawtypes") List affectedFiles) {
- super(domain, label, affectedFiles);
- // TODO Auto-generated constructor stub
- }
-
- /** The resources folder name. */
- private String resourcesFolderName = Messages.ExportProfilesCommand_0;
-
- /** The plugin provider. */
- String pluginProvider = Messages.ExportProfilesCommand_1;
-
- /** The plugin to install name. */
- String pluginToInstallName = Messages.ExportProfilesCommand_2;
-
- /** The plugin version. */
- String pluginVersion = Messages.ExportProfilesCommand_3;
-
- /** The exec environment. */
- String execEnvironment = Messages.ExportProfilesCommand_4;
-
-
-
- /**
- * Do execute with result.
- *
- * @param monitor
- * the monitor
- * @param info
- * the info
- * @return the command result
- * @throws ExecutionException
- * the execution exception
- * @see org.eclipse.core.commands.operations.AbstractOperation#canExecute()
- */
-
-
-
- /**
- * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- *
- * @param monitor
- * @param info
- * @return
- * @throws org.eclipse.core.commands.ExecutionException
- */
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
- UmlModel openedModel;
-
- try {
- openedModel = (UmlModel) ((ModelSet) getEditingDomain().getResourceSet()).getModel(UmlModel.MODEL_ID);
- if (openedModel != null) {
-
- EObject root = openedModel.lookupRoot();
-
-
-
- Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-
-
- ProfilesToExportSelectionDialog dialog = new ProfilesToExportSelectionDialog(shell, true, ProfileUtil.getAppliedProfilesFromWS(root), Messages.ExportProfilesCommand_6);
-
- dialog.open();
- if (Window.OK == dialog.getReturnCode()) {
- // get the result, which is the set of libraries to export
- // then export the result
- // launch a window to set the user specified export parameters:
- // * name of the plugin that will contain the exported profiles and will be installed in the environement
- // * version of the plugin
- // * Provider of the plugin
- // * Execution Environment
-
-
- Object[] profiles = dialog.getResult();
- for (int i = 0; i < profiles.length; i++) {
- pluginToInstallName += ((Profile) profiles[i]).getName();
-
- }
- ExportProfilesParametersDialog paramDialog = new ExportProfilesParametersDialog(DisplayUtils.getDefaultShell(), pluginToInstallName, pluginProvider, pluginVersion, execEnvironment, dialog.getResult());
-
- if (paramDialog.open() == Window.OK) {
- ExportProfilesUserParameters param = new ExportProfilesUserParameters(paramDialog.getPluginName(), paramDialog.getPluginProvider(), paramDialog.getPluginVersion(), paramDialog.getPluginExecEnvironment());
-
- exportProfiles(shell, dialog.getResult(), param, paramDialog.getProfilesIcons());
- return CommandResult.newOKCommandResult();
-
-
- }
-
-
-
- }
- } else {
- return CommandResult.newErrorCommandResult(Messages.ExportProfilesCommand_7);
- }
- } catch (NotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ParserConfigurationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (SAXException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
-
- return CommandResult.newErrorCommandResult(Messages.ExportProfilesCommand_8);
-
-
-
-
-
- }
-
- /**
- * Export profiles.
- *
- * @param shell
- * the shell
- * @param appliedProfilesFromWS
- * the applied profiles from ws
- * @param param
- * User defined paprameters for the generation
- * @param profilesIcons
- * @throws ParserConfigurationException
- * the parser configuration exception
- * @throws SAXException
- * the sAX exception
- * @throws IOException
- * Signals that an I/O exception has occurred.
- * @throws CoreException
- * the core exception
- */
- protected void exportProfiles(final Shell shell, final Object[] appliedProfilesFromWS, final ExportProfilesUserParameters param, final String[] profilesIcons) throws ParserConfigurationException, SAXException, IOException, CoreException {
-
-
- final ProgressMonitorDialog monitordialog = new ProgressMonitorDialog(shell);
- try {
- monitordialog.run(true, true, new IRunnableWithProgress() {
-
-
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-
- // Construct the profile
- String profilesConcatName = ""; //$NON-NLS-1$
-
- for (int i = 0; i < appliedProfilesFromWS.length; i++) {
-
- profilesConcatName += ((Profile) appliedProfilesFromWS[i]).getName();
- }
-
- String localPluginName = param.getPluginName();
-
- // this variable will store the imported libraries from WS, it will be used for the extensions generation in the manifest
- ArrayList<ImportedLibrary> importedLibrariesFromWS = new ArrayList<ImportedLibrary>();
-
- IProject project = null;
- final PluginExportUtil pluginCreator = new PluginExportUtil();
- monitor.beginTask(Messages.ExportProfilesCommand_10, 100);
-
- // ****************************************************************
- // 1. Generating a Plugin in the WS that encapsulated the applied profiles
- // ****************************************************************
- monitor.subTask(Messages.ExportProfilesCommand_11);
- project = pluginCreator.createPlugin(monitor, param.getPluginName(), param.getPluginExecEnvironment(), param.getPluginVersion(), param.getPluginProvider());
- monitor.worked(1);
- try {
- monitor.subTask(Messages.ExportProfilesCommand_12);
- // ****************************************************************
- // 1.0 Plugin customization: adding dependencies to Manifest
- // ****************************************************************
- ManifestEditor editor = new ManifestEditor(project);
- editor.init();
- editor.setSingleton(true);// we are going to add extensions to manifest, singleton must be set to true
- editor.addDependency("org.eclipse.papyrus.uml.extensionpoints");
- editor.addDependency("org.eclipse.emf.ecore");
- editor.save();
-
- // ***********************************************************************************
- // 1.1 Plugin customization: adding model directory and copying the profiles resources
- // ************************************************************************************
-
- for (int i = 0; i < appliedProfilesFromWS.length; i++) {
-
-
-
-
- ModelSet modelset = ServiceUtilsForResource.getInstance().getModelSet(((Profile) appliedProfilesFromWS[i]).eResource());
- String umlFileName = WSFileUtil.getFileName((Profile) appliedProfilesFromWS[i], "uml"); //$NON-NLS-1$
-
- Resource umlProfile = modelset.getAssociatedResource((Profile) appliedProfilesFromWS[i], "uml"); //$NON-NLS-1$
-
-
- // Visits all proxies in the model set and tries to resolve them.
- EcoreUtil.resolveAll(modelset);
-
-
-
-
-
- // copy the uml profile in the created plugin (xmi ids will be copied)
- URI umlFilenewURI = URI.createPlatformResourceURI(localPluginName + resourcesFolderName + umlFileName, true);
- URI umlFileoldURI = umlProfile.getURI();
- umlProfile.setURI(umlFilenewURI);
- umlProfile.save(null);
-
- // resave the resource with the original uri
- umlProfile.setURI(umlFileoldURI);
- umlProfile.save(null);
-
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource newUmlProfileResource = resourceSet.getResource(umlFilenewURI, true);
- EcoreUtil.resolveAll(resourceSet);
- // Verify that the uml model does not import packages. If it is the case, create the imported resources in the generated plugin and export them as well
- for (EObject obj : newUmlProfileResource.getContents()) {
- if (obj instanceof Profile) {
-
- EList<Package> importedPackages = ((Profile) obj).getImportedPackages();
- for (Package pack : importedPackages) {
-
- // if the package is stored in the workspace, export it in the resource directory of the created profile plugin
- if (pack.eResource() != null) {
- if (pack.eResource().getURI().isPlatformResource()) {
- String umlPackageFileName = WSFileUtil.getFileName(pack, "uml"); //$NON-NLS-1$
-
- // Create the uml file that contain the library
- URI uri = pack.eResource().getURI();
- URI newURI = URI.createPlatformResourceURI(localPluginName + resourcesFolderName + umlPackageFileName, true);
- pack.eResource().setURI(newURI);
- pack.eResource().save(null);
-
-
- // set the uri to the platform/plugin URI
- pack.eResource().setURI(URI.createURI("platform:/plugin/" + localPluginName + resourcesFolderName + umlPackageFileName)); //$NON-NLS-1$
- // redefine the profile
- ((Profile) obj).define();
-
- // The variable importedLibrariesFromWS is used to store the libraries that will be declared in the extensions of plugin.xml
- importedLibrariesFromWS.add(new ImportedLibrary(pack, "platform:/plugin/" + localPluginName + resourcesFolderName + umlPackageFileName, uri, pack.getName())); //$NON-NLS-1$
-
-
- }
- }
- }
-
- }
- }
- newUmlProfileResource.save(null);
-
- }
-
-
-
- // ****************************************************************
- // 1.2 Plugin customization: adding extension points in plugin.xml
- // ****************************************************************
- final WorkspacePluginModelBase model = new WorkspacePluginModel(project.getProject().getFile("plugin.xml"), false); //$NON-NLS-1$
- IPluginBase base = model.getPluginBase();
- // ****************************************************************
- // 1.2.1 Adding extension "org.eclipse.emf.ecore.uri_mapping"
- // ****************************************************************
- IPluginExtension uri_mapping_ext = model.createExtension();
- base.add(uri_mapping_ext);
- uri_mapping_ext.setPoint("org.eclipse.emf.ecore.uri_mapping"); //$NON-NLS-1$
- IPluginElement uri_mapping_elem = model.createElement(uri_mapping_ext);
- uri_mapping_ext.add(uri_mapping_elem);
-
-
- uri_mapping_elem.setName("mapping"); //$NON-NLS-1$
- uri_mapping_elem.setAttribute("source", "pathmap://EXPORTED_" + profilesConcatName + "PROFILES/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- uri_mapping_elem.setAttribute("target", "platform:/plugin/" + localPluginName + resourcesFolderName); //$NON-NLS-1$ //$NON-NLS-2$
- model.setDirty(true);
- model.save();
- // **********************************************************************
- // 1.2.2Adding Extension "org.eclipse.papyrus.uml.extensionpoints.UMLProfile"
- // **********************************************************************
- final List<InstalledProfileURI> installedProfilesUri = new ArrayList<InstalledProfileURI>();
- for (int i1 = 0; i1 < appliedProfilesFromWS.length; i1++) {
-
- IPluginExtension ext = model.createExtension();
- base.add(ext);
- ext.setPoint("org.eclipse.papyrus.uml.extensionpoints.UMLProfile"); //$NON-NLS-1$
- IPluginElement elem = model.createElement(ext);
- ext.add(elem);
-
- Profile profile = (Profile) appliedProfilesFromWS[i1];
-
- String umlFileName = WSFileUtil.getFileName(profile, "uml"); //$NON-NLS-1$
- elem.setName("profile"); //$NON-NLS-1$
- // mandatory attributes
- elem.setAttribute("name", profile.getName()); //$NON-NLS-1$
- elem.setAttribute("path", "platform:/plugin/" + localPluginName + resourcesFolderName + umlFileName); //$NON-NLS-1$ //$NON-NLS-2$
- // optional attributes
- elem.setAttribute("description", "UML Profile " + profile.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- elem.setAttribute("provider", param.getPluginProvider()); //$NON-NLS-1$
- if (!(profilesIcons[i1] == null) && !(profilesIcons[i1].length() == 0)) {
- File icon = FileUtil.getFile(profilesIcons[i1]);
- String iconName = getFSFileName(icon.getAbsolutePath());
- elem.setAttribute("iconpath", "icons/" + iconName);
- // copying icon file into created project
- WSFileUtil.copyFile(project, icon, "icons/", iconName);
-
- }
-
-
-
- installedProfilesUri.add(new InstalledProfileURI("platform:/plugin/" + localPluginName + resourcesFolderName + umlFileName, profile.eResource().getURI().toString())); //$NON-NLS-1$
-
- model.setDirty(true);
- model.save();
- }
- // **********************************************************************
- // 1.2.3 Adding Extension "org.eclipse.papyrus.uml.extensionpoints.UMLLibrary"
- // **********************************************************************
- if (!importedLibrariesFromWS.isEmpty()) {
- for (ImportedLibrary importedLibrary : importedLibrariesFromWS) {
- IPluginExtension ext = model.createExtension();
- base.add(ext);
- ext.setPoint("org.eclipse.papyrus.uml.extensionpoints.UMLLibrary"); //$NON-NLS-1$
- IPluginElement elem = model.createElement(ext);
- ext.add(elem);
-
- elem.setName("library"); //$NON-NLS-1$
- // mandatory attributes
- elem.setAttribute("name", importedLibrary.getName()); //$NON-NLS-1$
- elem.setAttribute("path", importedLibrary.getUri()); //$NON-NLS-1$
- // optional attributes
- elem.setAttribute("description", "UML Library " + importedLibrary.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- elem.setAttribute("provider", param.getPluginProvider()); //$NON-NLS-1$
-
- model.setDirty(true);
- model.save();
-
- }
- }
-
- // Refresh workspace files
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
-
-
- monitor.worked(1);
-
- // ****************************************************************
- // 1.3 Plugin customization: adding build properties to Manifest
- // ****************************************************************
- monitor.subTask("Plugin customization: adding build properties to Manifest ..."); //$NON-NLS-1$
- BuildProperties buildproperties = new BuildProperties(project);
- buildproperties.addBuildEntry("bin.includes", "META-INF/,.,plugin.xml,build.properties,model/,icons/"); //$NON-NLS-1$ //$NON-NLS-2$
- monitor.worked(1);
- // ****************************************************************
- // 2. Export the plugin and install it
- // ****************************************************************
- monitor.subTask(Messages.ExportProfilesCommand_5);
- final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-
- final IPluginModel pluginModel = PluginExportUtil.getPluginModelForProject(project);
- Display.getDefault().asyncExec(new Runnable() {
-
- @Override
- public void run() {
-
- pluginCreator.exportProfilePlugin(shell, pluginModel, root.getLocation().toString() + "/.metadata/.plugins/org.eclipse.pde.core/install/", installedProfilesUri); //$NON-NLS-1$
-
-
- }
-
-
- });
-
- monitor.worked(1);
- monitor.done();
-
-
-
-
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ServiceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
-
-
-
-
- }
-
-
-
-
- });
-
- } catch (InvocationTargetException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (InterruptedException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- }
-
- /**
- * Gets the fS file name.
- *
- * @param path
- * the path
- * @return the fS file name
- */
- public static String getFSFileName(String path) {
-
- String fileName;
- if (path.indexOf("\\") < 0) { //$NON-NLS-1$
- fileName = path;
- } else {
- fileName = path.substring(path.lastIndexOf("\\") + 1, path.length()); //$NON-NLS-1$
- }
- return fileName;
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/Messages.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/Messages.java
deleted file mode 100644
index 6b36ea4e870..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/Messages.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Messages.
- */
-public class Messages extends NLS {
-
- /** The Constant BUNDLE_NAME. */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.export.messages.messages"; //$NON-NLS-1$
-
- public static String EditProfileApplicationAction_0;
-
- public static String ExportAppliedProfileHandler_0;
-
- public static String ExportProfilesCommand_0;
-
- public static String ExportProfilesCommand_1;
-
- public static String ExportProfilesCommand_10;
-
- public static String ExportProfilesCommand_11;
-
- public static String ExportProfilesCommand_12;
-
- public static String ExportProfilesCommand_2;
-
- public static String ExportProfilesCommand_3;
-
- public static String ExportProfilesCommand_4;
-
- public static String ExportProfilesCommand_5;
-
- public static String ExportProfilesCommand_6;
-
- public static String ExportProfilesCommand_7;
-
- public static String ExportProfilesCommand_8;
-
- public static String ExportProfilesParametersDialog_0;
-
- public static String ExportProfilesParametersDialog_1;
-
- public static String ExportProfilesParametersDialog_10;
-
- public static String ExportProfilesParametersDialog_11;
-
- public static String ExportProfilesParametersDialog_12;
-
- public static String ExportProfilesParametersDialog_2;
-
- public static String ExportProfilesParametersDialog_7;
-
- public static String ExportProfilesParametersDialog_8;
-
- public static String ExportProfilesParametersDialog_9;
-
- /** The Import package from file handler_ select registered model library. */
- public static String ImportPackageFromFileHandler_SelectRegisteredModelLibrary;
-
- /** The Profiles to export selection dialog_3. */
- public static String ProfilesToExportSelectionDialog_3;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Instantiates a new messages.
- */
- private Messages() {
- }
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/messages.properties b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/messages.properties
deleted file mode 100644
index cfb7c9a59b5..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/messages/messages.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-EditProfileApplicationAction_0=No root defined in the model
-ExportAppliedProfileHandler_0=Export Applied Profiles From Workspace
-ExportProfilesCommand_0=/model/
-ExportProfilesCommand_1=CEA List
-ExportProfilesCommand_10=Exporting Applied Local Profiles ...
-ExportProfilesCommand_11=Generating Plugin encapsulating the applied profiles ...
-ExportProfilesCommand_12=Customization of the plugin encapsulating the applied profiles ...
-ExportProfilesCommand_2=org.eclipse.papyrus.exported.profile.
-ExportProfilesCommand_3=0.1.0
-ExportProfilesCommand_4=J2SE-1.5
-ExportProfilesCommand_5=Export the plugin and install it ...
-ExportProfilesCommand_6=Export applied profiles :
-ExportProfilesCommand_7=Error while executing the command
-ExportProfilesCommand_8=Error while executing the command
-ExportProfilesParametersDialog_0=Plugin Name
-ExportProfilesParametersDialog_1=Enter the name of the plugin that will contain the exported profiles
-ExportProfilesParametersDialog_10=Execution Environment
-ExportProfilesParametersDialog_11=Enter the version of the java execution environment
-ExportProfilesParametersDialog_12=Parameters for the exported profiles plugin
-ExportProfilesParametersDialog_2=Plugin Provider
-ExportProfilesParametersDialog_7=Enter the provider of the plugin to be installed
-ExportProfilesParametersDialog_8=Plugin Version
-ExportProfilesParametersDialog_9=Enter the version of the plugin to be installed
-ImportPackageFromFileHandler_SelectRegisteredModelLibrary=Select Registered ModelLibrary
-ProfilesToExportSelectionDialog_3=Loading profiles... \ No newline at end of file
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/AreThereAppliedProfilesFromWS.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/AreThereAppliedProfilesFromWS.java
deleted file mode 100644
index de86361af97..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/AreThereAppliedProfilesFromWS.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.uml.export.Activator;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Profile;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class AreThereAppliedProfilesFromWS.
- */
-public class AreThereAppliedProfilesFromWS extends PropertyTester {
-
- /** The Constant ARE_THERE_APPLIED_PROFILES. */
- public final static String ARE_THERE_APPLIED_PROFILES = "AreThereAppliedProfiles";
-
-
-
- /**
- * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
- *
- * @param receiver
- * @param property
- * @param args
- * @param expectedValue
- * @return
- */
-
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
-
- // Ensure Papyrus is the active editor
-
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- if ((editor == null) || (!(editor instanceof IMultiDiagramEditor))) {
- return false;
- }
- Object currentValue = null;
- if (ARE_THERE_APPLIED_PROFILES.equals(property)) {
-
- ServicesRegistry registry = ((IMultiDiagramEditor) editor).getServicesRegistry();
- UmlModel openedModel;
- try {
- openedModel = (UmlModel) ServiceUtils.getInstance().getModelSet(registry).getModel(UmlModel.MODEL_ID);
- EObject root = openedModel.lookupRoot();
- Object[] profiles = ProfileUtil.getAppliedProfilesFromWS(root);
-
- for (int i = 0; i < profiles.length; i++) {
- if (profiles[i] instanceof Profile) {
- currentValue = true;
- break;
- }
- }
- return (currentValue == expectedValue);
- } catch (ServiceException e) {
- Activator.log.error(e);
- } catch (NotFoundException e) {
- Activator.log.error(e);
- }
-
- }
-
- return false;
- }
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/BuildProperties.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/BuildProperties.java
deleted file mode 100644
index 94db4e95d49..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/BuildProperties.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.core.build.IBuild;
-import org.eclipse.pde.core.build.IBuildEntry;
-import org.eclipse.pde.core.build.IBuildModel;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class BuildProperties.
- */
-@SuppressWarnings("restriction")
-public class BuildProperties {
-
- /** The Constant OVERWRITE_BUILD_PROPERTY. */
- public static final String OVERWRITE_BUILD_PROPERTY = "overwrite build property?";
-
- /** The Constant NL. */
- public static final String NL = System.getProperty("line.separator");
-
- /** The project. */
- private final IProject project;
-
- /** The its build model. */
- private IBuildModel itsBuildModel;
-
- /**
- * Instantiates a new builds the properties.
- *
- * @param project
- * the project
- */
- public BuildProperties(IProject project) {
- this.project = project;
- }
-
- /**
- * adds or overwrites an entry in the 'build.properties'.<br>
- * returns <b>true</b> if adding was successful,<br>
- * <b>false</b> is dialog did not confirm adding
- *
- * @param key
- * the build property's name
- * @param value
- * the build property's value
- * @return <b>true</b> if adding was successful,<br>
- * <b>false</b> is dialog did not confirm adding
- * @throws CoreException
- * the core exception
- */
- public boolean addBuildEntry(String key, String value) throws CoreException {
- Assert.isNotNull(key);
- Assert.isNotNull(value);
- boolean writeEntry = true;
- if (hasBuildEntry(key)) {
- if (getBuild().getEntry(key).contains(value)) {
- return true;
- }
-
-
- removeExistingBuildEntry(key);
-
- }
-
- if (writeEntry) {
- IBuildModel buildModel = getBuildModel();
- IBuildEntry buildEntry = buildModel.getFactory().createEntry(key);
- buildEntry.addToken(value);
- getBuild().add(buildEntry);
-
- ((WorkspaceBuildModel) buildModel).save();
- }
- return writeEntry;
- }
-
-
-
- /**
- * removes an entry with the given name from the 'build.properties'
- *
- * @param key
- * the build property's name
- * @throws CoreException
- * the core exception
- */
- public void removeExistingBuildEntry(String key) throws CoreException {
- IBuildEntry entry = getBuild().getEntry(key);
- if (entry != null) {
- getBuild().remove(entry);
- }
- }
-
- /**
- * returns whether an entry exists for the given key.
- *
- * @param key
- * the build property's name
- * @return true, if successful
- */
- public boolean hasBuildEntry(final String key) {
- return getBuild().getEntry(key) != null;
- }
-
-
-
- /**
- * Gets the builds the.
- *
- * @return the builds the
- */
- private IBuild getBuild() {
- IBuildModel buildModel = getBuildModel();
- if (buildModel == null) {
- return null;
- }
- return buildModel.getBuild();
- }
-
-
- /**
- * Gets the properties.
- *
- * @param key
- * the key
- * @return the properties
- */
- public String[] getProperties(String key) {
- return getBuild().getEntry(key).getTokens();
- }
-
-
-
- /**
- * returns the Eclipse BuildModel.
- *
- * @return the Eclipse BuildModel
- */
- private IBuildModel getBuildModel() {
- if (itsBuildModel == null) {
- IPluginModelBase pluginModel = PluginRegistry.findModel(this.project);
- itsBuildModel = createBuildModel(pluginModel);
- }
- return itsBuildModel;
- }
-
-
- /**
- * see org.eclipse.pde.internal.core.ClasspathUtilCore.getBuild
- *
- * @param model
- * the model
- * @return the i build model
- */
- private IBuildModel createBuildModel(final IPluginModelBase model) {
- IProject project = model.getUnderlyingResource().getProject();
- IFile buildFile = project.getFile("build.properties"); //$NON-NLS-1$
- if (!buildFile.exists()) {
- return null;
- }
- WorkspaceBuildModel buildModel = new WorkspaceBuildModel(buildFile);
- buildModel.load();
- return buildModel;
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ChangeProfileApplicationTester.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ChangeProfileApplicationTester.java
deleted file mode 100644
index 87ae0bb9be5..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ChangeProfileApplicationTester.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-
-
-import org.eclipse.papyrus.uml.export.handlers.EditProfileApplicationAction;
-
-
-
-
-public class ChangeProfileApplicationTester extends org.eclipse.core.expressions.PropertyTester {
-
-
-
-
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
- if ("ChangeProfileApplication".equals(property) || EditProfileApplicationAction.getIFile(receiver) != null) {
-
-
- return EditProfileApplicationAction.isProfileApplicationEditable(receiver);
- }
- return false;
- }
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ExportProfilesUserParameters.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ExportProfilesUserParameters.java
deleted file mode 100644
index 001681da4e5..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ExportProfilesUserParameters.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ExportProfilesUserParameters.
- */
-public class ExportProfilesUserParameters {
-
- /** The plugin name. */
- private String pluginName;
-
- /** The plugin provider. */
- private String pluginProvider;
-
- /** The plugin version. */
- private String pluginVersion;
-
- /** The plugin exec environment. */
- private String pluginExecEnvironment;
-
- /**
- * Instantiates a new export profiles user parameters.
- *
- * @param pluginName
- * the plugin name
- * @param pluginProvider
- * the plugin provider
- * @param pluginVersion
- * the plugin version
- * @param execEnvironment
- * the exec environment
- */
- public ExportProfilesUserParameters(String pluginName, String pluginProvider, String pluginVersion, String execEnvironment) {
- this.pluginName = pluginName;
- this.pluginProvider = pluginProvider;
- this.pluginVersion = pluginVersion;
- this.pluginExecEnvironment = execEnvironment;
-
- }
-
-
- /**
- * Gets the plugin name.
- *
- * @return the plugin name
- */
- public String getPluginName() {
- return pluginName;
- }
-
- /**
- * Sets the plugin name.
- *
- * @param pluginName
- * the new plugin name
- */
- public void setPluginName(String pluginName) {
- this.pluginName = pluginName;
- }
-
- /**
- * Gets the plugin provider.
- *
- * @return the plugin provider
- */
- public String getPluginProvider() {
- return pluginProvider;
- }
-
- /**
- * Sets the plugin provider.
- *
- * @param pluginProvider
- * the new plugin provider
- */
- public void setPluginProvider(String pluginProvider) {
- this.pluginProvider = pluginProvider;
- }
-
- /**
- * Gets the plugin version.
- *
- * @return the plugin version
- */
- public String getPluginVersion() {
- return pluginVersion;
- }
-
- /**
- * Sets the plugin version.
- *
- * @param pluginVersion
- * the new plugin version
- */
- public void setPluginVersion(String pluginVersion) {
- this.pluginVersion = pluginVersion;
- }
-
- /**
- * Gets the plugin exec environment.
- *
- * @return the plugin exec environment
- */
- public String getPluginExecEnvironment() {
- return pluginExecEnvironment;
- }
-
- /**
- * Sets the plugin exec environment.
- *
- * @param pluginExecEnvironment
- * the new plugin exec environment
- */
- public void setPluginExecEnvironment(String pluginExecEnvironment) {
- this.pluginExecEnvironment = pluginExecEnvironment;
- }
-
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ImportedLibrary.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ImportedLibrary.java
deleted file mode 100644
index 31d08be950d..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ImportedLibrary.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ImportedLibrary.
- */
-public class ImportedLibrary {
-
- /** The library model. */
- private EObject libraryModel;
-
- /** The new uri. */
- private String newUri;
-
- /** The old uri. */
- private URI oldURI;
-
-
-
- /** The name. */
- private String name;
-
-
-
- /**
- * Instantiates a new imported library.
- *
- * @param libraryModel
- * the library model
- * @param newUri
- * the new uri
- * @param oldURI
- * the old uri
- * @param libraryName
- * the library name
- */
- public ImportedLibrary(EObject libraryModel, String newUri, URI oldURI, String libraryName) {
- super();
- this.libraryModel = libraryModel;
- this.newUri = newUri;
- this.name = libraryName;
- this.oldURI = oldURI;
-
- }
-
-
- /**
- * Gets the library model.
- *
- * @return the library model
- */
- public EObject getLibraryModel() {
- return libraryModel;
- }
-
- /**
- * Sets the library model.
- *
- * @param libraryModel
- * the new library model
- */
- public void setLibraryModel(EObject libraryModel) {
- this.libraryModel = libraryModel;
- }
-
- /**
- * Gets the uri.
- *
- * @return the uri
- */
- public String getUri() {
- return newUri;
- }
-
- /**
- * Sets the uri.
- *
- * @param uri
- * the new uri
- */
- public void setUri(String uri) {
- this.newUri = uri;
- }
-
-
- /**
- * Gets the name.
- *
- * @return the name
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * Sets the name.
- *
- * @param name
- * the new name
- */
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- * Gets the old uri.
- *
- * @return the old uri
- */
- public URI getOldURI() {
- return oldURI;
- }
-
-
- /**
- * Sets the old uri.
- *
- * @param oldURI
- * the new old uri
- */
- public void setOldURI(URI oldURI) {
- this.oldURI = oldURI;
- }
-
-
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/InstalledProfileURI.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/InstalledProfileURI.java
deleted file mode 100644
index ca5b70527be..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/InstalledProfileURI.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class InstalledProfileURI.
- */
-public class InstalledProfileURI {
-
- /**
- * Instantiates a new installed profile uri.
- *
- * @param uri_installed
- * the uri of the installed profile
- * @param uri_local
- * the uri of the corresponding local profile from which the installed profile has been copied
- */
- public InstalledProfileURI(String uri_installed, String uri_local) {
- super();
- this.uri_installed = uri_installed;
- this.uri_local = uri_local;
- }
-
- /** The uri of the installed profile. */
- public String uri_installed;
-
- /** The uri of the local profile. */
- public String uri_local;
-
- /**
- * Gets the uri of the installed profile.
- *
- * @return the uri of the installed profile
- */
- public String getUri_installed() {
- return uri_installed;
- }
-
- /**
- * Sets the uri of the installed profile.
- *
- * @param uri_installed
- * the new uri of the installed profile
- */
- public void setUri_installed(String uri_installed) {
- this.uri_installed = uri_installed;
- }
-
- /**
- * Gets the uri of the local profile.
- *
- * @return the uri of the local profile
- */
- public String getUri_local() {
- return uri_local;
- }
-
- /**
- * Sets the uri of the local profile.
- *
- * @param uri_local
- * the new uri of the local profile
- */
- public void setUri_local(String uri_local) {
- this.uri_local = uri_local;
- }
-
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/PluginExportUtil.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/PluginExportUtil.java
deleted file mode 100644
index f38914264f7..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/PluginExportUtil.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-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.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.build.IBuildEntry;
-import org.eclipse.pde.core.build.IBuildModel;
-import org.eclipse.pde.core.plugin.IPluginBase;
-import org.eclipse.pde.core.plugin.IPluginModel;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.PDECoreMessages;
-import org.eclipse.pde.internal.core.PluginModelManager;
-import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
-import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
-import org.eclipse.pde.internal.core.exports.PluginExportOperation;
-import org.eclipse.pde.internal.core.feature.WorkspaceFeatureModel;
-import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
-import org.eclipse.pde.internal.core.project.PDEProject;
-import org.eclipse.pde.internal.ui.IPreferenceConstants;
-import org.eclipse.pde.internal.ui.PDELabelProvider;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEPluginImages;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.internal.ui.build.RuntimeInstallJob;
-import org.eclipse.pde.internal.ui.wizards.IProjectProvider;
-import org.eclipse.pde.internal.ui.wizards.plugin.NewProjectCreationOperation;
-import org.eclipse.pde.internal.ui.wizards.plugin.PluginFieldData;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.osgi.service.prefs.BackingStoreException;
-
-import com.ibm.icu.text.MessageFormat;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class PluginExportUtil.
- */
-@SuppressWarnings("restriction")
-public class PluginExportUtil {
-
-
- /** The Constant MAX_RETRY. */
- protected static final int MAX_RETRY = 3;
-
- /** The Constant SrcFolderName. */
- private static final String SrcFolderName = "src";
-
-
-
-
-
- /**
- * Creates the plugin.
- *
- * @param progressMonitor
- * the progress monitor
- * @param pluginName
- * the plugin name
- * @param executionEnvironment
- * the execution environment
- * @param pluginVersion
- * the plugin version
- * @param provider
- * the provider
- * @return the i project
- */
- public IProject createPlugin(IProgressMonitor progressMonitor, final String pluginName, String executionEnvironment, String pluginVersion, String provider) {
-
-
- PluginFieldData fPluginData = new PluginFieldData();
- fPluginData.setProvider(provider);
- fPluginData.setId(pluginName);
- fPluginData.setName(pluginName);
- fPluginData.setSourceFolderName(SrcFolderName);
- fPluginData.setVersion(pluginVersion);
- fPluginData.setWorkingSets(null);
- fPluginData.setClassname(pluginName + ".Activator");
- fPluginData.setDoGenerateClass(true);
- fPluginData.setExecutionEnvironment(executionEnvironment);
- fPluginData.setOSGiFramework(null);
- fPluginData.setHasBundleStructure(true);
- fPluginData.setUIPlugin(true);
- fPluginData.setLegacy(false);
- fPluginData.setLibraryName(null);
- fPluginData.setOutputFolderName("bin");
- fPluginData.setRCPApplicationPlugin(false);
- fPluginData.setEnableAPITooling(false);
- fPluginData.setSimple(false);
- fPluginData.setTargetVersion("3.7");
- IWorkingSet[] workingSets = {};
- fPluginData.setWorkingSets(workingSets);
-
-
-
-
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- final IProject project = root.getProject(pluginName);
-
-
-
- IProjectProvider fProjectProvider = new IProjectProvider() {
-
- @Override
- public String getProjectName() {
- // TODO Auto-generated method stub
- return pluginName;
- }
-
- @Override
- public IProject getProject() {
- // TODO Auto-generated method stub
- return project;
- }
-
- @Override
- public IPath getLocationPath() {
- // TODO Auto-generated method stub
- return ResourcesPlugin.getWorkspace().getRoot().getLocation();
- }
- };
-
- NewProjectCreationOperation op = new NewProjectCreationOperation(fPluginData, fProjectProvider, null);
-
- try {
-
- op.run(progressMonitor);
- } catch (InvocationTargetException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (InterruptedException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- return project;
-
- }
-
- /**
- * Export profile plugin.
- *
- * @param shell
- * the shell
- * @param object
- * the object
- * @param installationDirectory
- * the installation directory
- * @param installedProfilesUri
- * the installed profiles uri
- * @return true, if successful
- */
- public boolean exportProfilePlugin(Shell shell, Object object, String installationDirectory, List<InstalledProfileURI> installedProfilesUri) {
-
- if (!PlatformUI.getWorkbench().saveAllEditors(true)) {
- return false;
- }
-
- if (!performPreliminaryChecks(shell, object)) {
- return false;
- }
-
- scheduleExportJob(object, installationDirectory, installedProfilesUri);
-
- return true;
-
- }
-
-
- /**
- * Schedule export job.
- *
- * @param object
- * the object
- * @param installationDirectory
- * the installation directory
- * @param installedProfilesUri
- * the installed profiles uri
- */
- protected void scheduleExportJob(Object object, String installationDirectory, final List<InstalledProfileURI> installedProfilesUri) {
- Object obj[] = new Object[1];
- obj[0] = object;
- final FeatureExportInfo info = new FeatureExportInfo();
- info.toDirectory = true;
- info.useJarFormat = true;
- info.exportSource = true;
- info.exportSourceBundle = false;
- info.allowBinaryCycles = true;
- info.useWorkspaceCompiledClasses = false;
- info.destinationDirectory = installationDirectory;
-
- info.zipFileName = null;
- info.items = obj;
- info.signingInfo = null;
- info.qualifier = null;
-
- final boolean installAfterExport = true;
- if (installAfterExport) {
- RuntimeInstallJob.modifyInfoForInstall(info);
- }
-
- final PluginExportOperation job = new PluginExportOperation(info, PDEUIMessages.PluginExportJob_name);
- job.setUser(true);
- job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_PLUGIN_OBJ);
- job.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- if (job.hasAntErrors()) {
- // If there were errors when running the ant scripts, inform the user where the logs can be found.
- final File logLocation = new File(info.destinationDirectory, "logs.zip"); //$NON-NLS-1$
- if (logLocation.exists()) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-
- @Override
- public void run() {
- ExportErrorDialog dialog = new ExportErrorDialog(logLocation);
- dialog.open();
- }
- });
- }
- } else if (event.getResult().isOK() && installAfterExport) {
- // Install the export into the current running platform
- RuntimeInstallJob installJob = new RuntimeInstallJob(PDEUIMessages.PluginExportWizard_InstallJobName, info);
- installJob.setUser(true);
- installJob.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_FEATURE_OBJ);
- // add preferences that contain the information about the correspondence between the installed and the local profiles
- editPreferences(installedProfilesUri);
- installJob.schedule();
- }
- }
- });
- job.schedule();
- }
-
- /**
- * Edits the preferences.
- *
- * @param installedProfilesUri
- * the installed profiles uri
- */
- private void editPreferences(List<InstalledProfileURI> installedProfilesUri) {
- // TODO Auto-generated method stub
- IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode("org.eclipse.papyrus.uml.export");
- org.osgi.service.prefs.Preferences node = preferences.node("installedProfilesUriCorrespondance");
- for (InstalledProfileURI p : installedProfilesUri) {
- node.put(p.getUri_local(), p.getUri_installed());
-
-
- try {
- // Forces the application to save the preferences
- preferences.flush();
- } catch (BackingStoreException e2) {
- e2.printStackTrace();
- }
- }
-
- }
-
- /**
- * Perform preliminary checks.
- *
- * @param shell
- * the shell
- * @param object
- * the object
- * @return true, if successful
- */
- @SuppressWarnings("unchecked")
- protected boolean performPreliminaryChecks(Shell shell, Object object) {
- // Check if we are going to overwrite an existing build.xml file
- if (!MessageDialogWithToggle.ALWAYS.equals(PDEPlugin.getDefault().getPreferenceStore().getString(IPreferenceConstants.OVERWRITE_BUILD_FILES_ON_EXPORT))) {
-
- @SuppressWarnings("rawtypes")
- List problemModels = new ArrayList();
-
- String installLocation = null;
- IResource underlyingResource = null;
- if (object instanceof WorkspacePluginModelBase) {
- installLocation = ((WorkspacePluginModelBase) object).getInstallLocation();
- underlyingResource = ((WorkspacePluginModelBase) object).getUnderlyingResource();
- } else if (object instanceof WorkspaceFeatureModel) {
- installLocation = ((WorkspaceFeatureModel) object).getInstallLocation();
- underlyingResource = ((WorkspaceFeatureModel) object).getUnderlyingResource();
- }
- if (installLocation != null && underlyingResource != null) {
- File file = new File(installLocation, "build.xml"); //$NON-NLS-1$
- if (file.exists()) {
- try {
- IFile buildFile = PDEProject.getBuildProperties(underlyingResource.getProject());
- IBuildModel buildModel = new WorkspaceBuildModel(buildFile);
- buildModel.load();
- if (buildModel != null) {
- IBuildEntry entry = buildModel.getBuild().getEntry(IBuildPropertiesConstants.PROPERTY_CUSTOM);
- if (entry == null || !entry.contains(IBuildPropertiesConstants.TRUE)) {
- problemModels.add(object);
- }
- }
- } catch (CoreException e) {
- PDEPlugin.log(e);
- }
- }
- }
-
- if (problemModels.size() > 0) {
- StringBuffer buf = new StringBuffer();
- PDELabelProvider labelProvider = new PDELabelProvider();
- int maxCount = 10;
- for (Iterator<Object> iterator = problemModels.iterator(); iterator.hasNext();) {
- buf.append(labelProvider.getText(iterator.next()));
- buf.append('\n');
- maxCount--;
- if (maxCount <= 0) {
- buf.append(Dialog.ELLIPSIS);
- break;
- }
- }
-
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(shell, PDEUIMessages.AntGeneratingExportWizard_0, MessageFormat.format(PDEUIMessages.AntGeneratingExportWizard_1, buf.toString()),
- PDEUIMessages.AntGeneratingExportWizard_2, false, PDEPlugin.getDefault().getPreferenceStore(), IPreferenceConstants.OVERWRITE_BUILD_FILES_ON_EXPORT);
- if (dialog.getReturnCode() == Window.CANCEL) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- /**
- * The Class ExportErrorDialog.
- */
- protected class ExportErrorDialog extends MessageDialog {
-
- /** The log location. */
- private File fLogLocation;
-
- /**
- * Instantiates a new export error dialog.
- *
- * @param logLocation
- * the log location
- */
- public ExportErrorDialog(File logLocation) {
- super(PlatformUI.getWorkbench().getDisplay().getActiveShell(), PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, null, null, MessageDialog.ERROR, new String[] { IDialogConstants.OK_LABEL }, 0);
- fLogLocation = logLocation;
- }
-
- /**
- * Creates the message area.
- *
- * @param composite
- * the composite
- * @return the control
- * @see org.eclipse.jface.dialogs.IconAndMessageDialog#createMessageArea(org.eclipse.swt.widgets.Composite)
- */
-
- @Override
- protected Control createMessageArea(Composite composite) {
- Link link = new Link(composite, SWT.WRAP);
- try {
- link.setText(NLS.bind(PDEUIMessages.PluginExportWizard_Ant_errors_during_export_logs_generated, "<a>" + fLogLocation.getCanonicalPath() + "</a>")); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- PDEPlugin.log(e);
- }
- GridData data = new GridData();
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- Program.launch(fLogLocation.getCanonicalPath());
- } catch (IOException ex) {
- PDEPlugin.log(ex);
- }
- }
- });
- return link;
- }
- }
-
- // public void createJarFromPlugin(final IProject project, Shell parentShell){
- // JarPackageData description= new JarPackageData();
- // IPath location= new Path("projectDir+File.separator+jarFileName");
- // description.setJarLocation(location);
- // description.setManifestMainClass(mainType);
- // description.setExportClassFiles(true);
- // description.setExportOutputFolders(false);
- // description.setExportErrors(true);
- // description.setExportWarnings(true);
- // description.setOverwrite(true);
- // description.setGenerateManifest(true);
- // description.setElements(filestoExport);
- // IJarExportRunnable runnable= description.createJarExportRunnable(parentShell);
- // try {
- // new ProgressMonitorDialog(parentShell).run(true,true, runnable);S
- // } catch (InvocationTargetException e) {
- // } catch (InterruptedException e) {
- // }
- // return;
- // }
-
-
- /**
- * Delete.
- *
- * @param project
- * the project to delete.
- * @throws CoreException
- * the core exception
- */
- public void delete(final IProject project) throws CoreException {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
-
- @Override
- public void run(IProgressMonitor monitor) throws CoreException {
- // jproject.setRawClasspath(new IClasspathEntry[0], jproject
- // .getProject().getFullPath(), null);
- for (int i = 0; i < MAX_RETRY; i++) {
- try {
- IProject tmpProject = project.getProject();
- synchronized (tmpProject) {
- if (tmpProject.exists()) {
- tmpProject.delete(true, true, null);
- }
- }
- i = MAX_RETRY;
- } catch (CoreException e) {
- if (i == MAX_RETRY - 1) {
-
- throw e;
- }
- try {
- Thread.sleep(1000); // sleep a second
- } catch (InterruptedException e1) {
- }
- }
- }
- }
- };
- ResourcesPlugin.getWorkspace().run(runnable, null);
- }
-
- /**
- * Gets the plugin model for project.
- *
- * @param project
- * the project
- * @return the plugin model for project
- */
- public static IPluginModel getPluginModelForProject(final IProject project) {
-
- PluginModelManager pmm = PDECore.getDefault().getModelManager();
- IPluginModelBase[] wsPlugins = pmm.getWorkspaceModels();
-
- if (wsPlugins.length == 0) {
- // ErrorHandler.reportError("Project " + project.getName() + " is not a plugin project (no plugin projects)?", false);
- return null;
- }
- for (int i = 0; i < wsPlugins.length; i++) {
- IPluginModelBase wsPlugin = wsPlugins[i];
-
-
-
- // May get both workspace and project plugin models
- // (although only the latter are of interest)
- IPluginBase pmBase = wsPlugin.getPluginBase();
- if (pmBase == null) {
- continue;
- }
- String id = pmBase.getId();
- if (id == null) {
- continue;
- }
- String projName = project.getName();
- if (projName == null) {
- continue;
- }
-
-
- String resourceLocation = pmBase.getModel().getUnderlyingResource().getLocation().toString();
- if (resourceLocation.endsWith(projName + "/META-INF/MANIFEST.MF")) {
- return (IPluginModel) wsPlugin;
- }
-
- }
- // ErrorHandler.reportError("Could not find plugin for project " + project.getName(), false);
- return null;
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfileUtil.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfileUtil.java
deleted file mode 100644
index 618658748f2..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfileUtil.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.uml2.uml.Profile;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ProfileUtil.
- */
-public class ProfileUtil {
-
- /**
- * Gets the applied profiles from ws.
- *
- * @param openedModel
- * the opened model
- * @return the applied profiles from ws
- */
- public static Object[] getAppliedProfilesFromWS(EObject openedModel) {
-
-
-
-
-
- // the list of root profiles, we will export only the root profiles and profiles that are applied from local workspace plugins
- // use of set to not having duplicate elements
- Set<EObject> rootProfiles = new HashSet<EObject>();
-
-
- for (Profile p : ((org.eclipse.uml2.uml.Package) openedModel).getAllAppliedProfiles()) {
-
- rootProfiles.add(getRootLocalProfile(p));
-
- }
-
-
-
- Object[] profilesToExport = rootProfiles.toArray(new Object[rootProfiles.size()]);
- return profilesToExport;
-
-
- }
-
- /**
- * Gets the root local profile.
- *
- * @param p
- * the p
- * @return the root local profile
- */
- public static EObject getRootLocalProfile(EObject p) {
- if (p.eContainer() == null) {
- Resource eResource = p.eResource();
- if (eResource != null) {
- URI eUri = eResource.getURI();
- if (eUri.isPlatformResource()) {
- return p;
- } else {
- return null;
- }
- } else {
- return null;
- }
-
- } else {
- return getRootLocalProfile(p.eContainer());
- }
-
-
- }
-
-
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfilesLabelProvider.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfilesLabelProvider.java
deleted file mode 100644
index 3b2df64db2b..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/ProfilesLabelProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.uml2.uml.Profile;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class ProfilesLabelProvider.
- */
-public class ProfilesLabelProvider extends LabelProvider {
-
- /**
- * Instantiates a new profiles label provider.
- */
- public ProfilesLabelProvider() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /**
- * Gets the text.
- *
- * @param element
- * the element
- * @return the text
- * @{inheritedDoc
- */
- @Override
- public String getText(Object element) {
- if (!(element instanceof Profile)) {
- return super.getText(element);
- }
-
- return ((Profile) element).getName();
- }
-
-}
diff --git a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/WSFileUtil.java b/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/WSFileUtil.java
deleted file mode 100644
index a98ae0cb327..00000000000
--- a/extraplugins/uml/org.eclipse.papyrus.uml.export/src/org/eclipse/papyrus/uml/export/util/WSFileUtil.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*****************************************************************************
- * 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:
- * Saadia DHOUIB (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.export.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.widgets.util.FileUtil;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class WSFileUtil.
- */
-public class WSFileUtil {
-
-
-
- /**
- * Gets the file name.
- *
- * @param model
- * the model
- * @param extension
- * the extension
- * @return the file name
- * @throws ServiceException
- * the service exception
- */
- public static String getFileName(EObject model, String extension) throws ServiceException {
-
- Resource resource = model.eResource();
- String resourcepath = resource.getURI().toString();
- String umlFileName = resourcepath.substring(resourcepath.lastIndexOf("/") + 1, resourcepath.length());
- return umlFileName;
-
- }
-
- /**
- * Load resource.
- *
- * @param path
- * the path
- * @param resourceSet
- * the resource set
- * @return the resource
- */
- @SuppressWarnings("deprecation")
- public static Resource loadResource(String path, ResourceSet resourceSet) {
- // java.net.URL templateURL = Platform.getBundle(myPluginId).getResource(path);
- // String fullUri = templateURL.getPath();
- URI uri = URI.createPlatformResourceURI(path);
- try {
- Resource resource = resourceSet.getResource(uri, true);
- if (resource.isLoaded()) {
- return resource;
- }
- } catch (WrappedException ex) {
- ex.printStackTrace();
- }
-
- return null;
- }
-
-
- /**
- * Search for a specific string in an xmi file and replace all its occurences by the new string.
- *
- * @param oldString
- * the old uri
- * @param newString
- * the new uri
- * @param adapter
- * the adapter
- * @param doc
- * the doc
- * @param offset
- * the offset
- * @param multiEdit
- * the multi text edit
- * @throws BadLocationException
- * the bad location exception
- */
- public static void replaceString(String oldString, String newString, FindReplaceDocumentAdapter adapter, IDocument doc, int offset, MultiTextEdit multiEdit) throws BadLocationException {
- IRegion region = adapter.find(offset, oldString, true, true, false, true);
-
- if (region != null) {
- multiEdit.addChild(new ReplaceEdit(region.getOffset(), region.getLength(), newString));
- replaceString(oldString, newString, adapter, doc, region.getOffset() + region.getLength(), multiEdit);
- // return new ReplaceEdit(region.getOffset(), region.getLength(), installedURI);
- }
-
-
- }
-
-
- /**
- * Copy.
- *
- * @param source
- * the source
- * @param target
- * the target
- * @throws IOException
- * Signals that an I/O exception has occurred.
- */
- public static void copy(InputStream source, File target) throws IOException {
- if (!target.getParentFile().exists()) {
- target.getParentFile().mkdirs();
- }
-
-
- OutputStream out = new FileOutputStream(target);
-
-
- byte[] buf = new byte[1024];
-
- int len;
- try {
- while ((len = source.read(buf)) > 0) {
-
- out.write(buf, 0, len);
-
- }
-
- } catch (IOException ex) {
- throw ex;
- } finally {
-
- source.close();
-
- out.close();
- }
- }
-
-
- public static void copyFile(IProject project, File iconSrc, String destinationDir, String destFileName) {
- // TODO Auto-generated method stub
- File targetIconFile = FileUtil.getWorkspaceFile("/" + project.getName() + "/" + destinationDir + "/" + destFileName);
-
- if (!targetIconFile.getParentFile().exists()) {
- targetIconFile.getParentFile().mkdirs();
-
- }
- try {
-
- WSFileUtil.copy(new FileInputStream(iconSrc), targetIconFile);
- } catch (IOException ex) {
- ex.printStackTrace();
- }
-
- }
-
-}

Back to the top