Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-10-04 15:05:54 +0000
committerGerrit Code Review @ Eclipse.org2016-11-09 08:21:00 +0000
commit22d6cd8dcddee32ab067c07b742fadccd0847f41 (patch)
tree131fde39c2b31392f8da2e90a4e7ec1a6e8cda59 /plugins/views
parent567776b61bd3f399951d7ad182389e0ca9ecc487 (diff)
downloadorg.eclipse.papyrus-22d6cd8dcddee32ab067c07b742fadccd0847f41.tar.gz
org.eclipse.papyrus-22d6cd8dcddee32ab067c07b742fadccd0847f41.tar.xz
org.eclipse.papyrus-22d6cd8dcddee32ab067c07b742fadccd0847f41.zip
Bug 501511 - [Documentation] A new documentation View for UML Element
shall be available. https://bugs.eclipse.org/bugs/show_bug.cgi?id=501511 - Add new Documentation View. Change-Id: Iac879a5eb1e188dd59cd9bcd38d90bf0e756b83f Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/views')
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/.classpath7
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/.project52
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.core.prefs315
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.pde.api.tools.prefs98
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/META-INF/MANIFEST.MF25
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/about.html28
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/build.properties9
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/icons/documentation.pngbin0 -> 1079 bytes
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.properties16
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.xml89
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/pom.xml12
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/Activator.java216
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/constants/DocumentationViewConstants.java30
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/handlers/DocumentationViewHandler.java66
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/Messages.java55
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/messages.properties24
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferenceInitializer.java42
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferencePage.java54
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferences.java26
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/views/DocumentationView.java845
-rw-r--r--plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/widgets/DocumentationResourceEditor.java323
-rw-r--r--plugins/views/documentation/pom.xml17
-rw-r--r--plugins/views/pom.xml1
24 files changed, 2418 insertions, 0 deletions
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.classpath b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.classpath
new file mode 100644
index 00000000000..22f30643cba
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.project b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.project
new file mode 100644
index 00000000000..8e2786fff67
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.project
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.views.documentation</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>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.core.prefs b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..17bbe54e276
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,315 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+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_expressions_in_for_loop_header=0
+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_parameterized_type_references=0
+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_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+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_enum_constant=insert
+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.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+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_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.ui.prefs b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?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/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.pde.api.tools.prefs b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 00000000000..23fb95e120f
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,98 @@
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Ignore
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_ANNOTATION=Ignore
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Ignore
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=Enabled
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Warning
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/META-INF/MANIFEST.MF b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..d24027d51f4
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.views.documentation;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.views.documentation.Activator
+Require-Bundle: org.eclipse.papyrus.infra.services.navigation;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.openelement;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)",
+ org.eclipse.papyrus.uml.ui;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.nebula.widgets.richtext;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.services.edit.ui;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.documentation.profile;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.types.core;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Description: %pluginDescription
+Bundle-Localization: plugin
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/about.html b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/build.properties b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/build.properties
new file mode 100644
index 00000000000..6260629af25
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ icons/,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/icons/documentation.png b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/icons/documentation.png
new file mode 100644
index 00000000000..48c8792f98f
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/icons/documentation.png
Binary files differ
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.properties b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.properties
new file mode 100644
index 00000000000..7ef10319470
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.properties
@@ -0,0 +1,16 @@
+#############################################################################
+# Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+#############################################################################
+
+pluginName=Papyrus Documentation View
+pluginDescription=This plug-in provides the configuration of the view 'Documentation'
+
+Bundle-Vendor = Eclipse Modeling Project \ No newline at end of file
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.xml b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.xml
new file mode 100644
index 00000000000..8d3e020e553
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/plugin.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.ui.popup.any?after=showPropertiesViewAction">
+ <command
+ commandId="org.eclipse.papyrus.views.documentation.ShowDocumentationView"
+ icon="icons/documentation.png"
+ label="Show Documentation View"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="selection">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="java.lang.Object">
+ </instanceof>
+ </adapt>
+ </iterate>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.views.documentation.handlers.DocumentationViewHandler"
+ commandId="org.eclipse.papyrus.views.documentation.ShowDocumentationView">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ id="org.eclipse.papyrus.views.documentation.ShowDocumentationView"
+ name="Show Documention View">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.papyrus.views.category"
+ class="org.eclipse.papyrus.views.documentation.views.DocumentationView"
+ icon="icons/documentation.png"
+ id="org.eclipse.papyrus.views.documentation.DocumentationView"
+ name="Documentation">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.papyrus.infra.core.perspective">
+ <view
+ id="org.eclipse.papyrus.views.documentation.DocumentationView"
+ relationship="stack"
+ relative="org.eclipse.papyrus.perspective.folder.bottom">
+ </view>
+ </perspectiveExtension>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.views.documentation.preferences.DocumentationViewPreferenceInitializer">
+ </initializer>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.views.documentation.preferences.DocumentationViewPreferencePage"
+ id="org.eclipse.papyrus.views.documentation.preferences"
+ name="Documentation View">
+ </page>
+ </extension>
+
+</plugin>
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/pom.xml b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/pom.xml
new file mode 100644
index 00000000000..e801a9b03c8
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.views-documentation</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.views.documentation</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/Activator.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/Activator.java
new file mode 100644
index 00000000000..3b0b24a6210
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/Activator.java
@@ -0,0 +1,216 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.papyrus.infra.ui.util.EditorHelper;
+import org.eclipse.papyrus.uml.diagram.common.preferences.RichtextPreferencePage;
+import org.eclipse.papyrus.views.documentation.preferences.DocumentationViewPreferences;
+import org.eclipse.papyrus.views.documentation.views.DocumentationView;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ */
+public class Activator extends AbstractUIPlugin {
+ /**
+ * The name of the use rich text settings.
+ */
+ private static final String USE_RICH_TEXT = "useRichtext";//$NON-NLS-1$
+
+ /**
+ * The plug-in ID.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.views.documentation"; //$NON-NLS-1$
+
+ /**
+ * The name of the ToggleLinking setting.
+ */
+ public static final String TOGGLE_LINKING = "ToggleLinking"; //$NON-NLS-1$
+
+ /**
+ * The shared instance.
+ */
+ private static Activator plugin;
+
+ /**
+ * The constructor.
+ */
+ public Activator() {
+ }
+
+ /**
+ * Listener in the change property DocumentationViewPreferences.USE_DOCUMENTATION_PROFILE to reopen documentation view.
+ */
+ IPropertyChangeListener listener = event -> {
+ if (DocumentationViewPreferences.USE_DOCUMENTATION_PROFILE == event.getProperty()) {
+ IViewPart view = EditorHelper.getActiveWindow().getActivePage().findView(DocumentationView.ID);
+ if (null != view) {
+ EditorHelper.getActiveWindow().getActivePage().hideView(view);
+ try {
+ EditorHelper.getActiveWindow().getActivePage().showView(DocumentationView.ID);
+ } catch (PartInitException e) {
+ logError(e.getMessage());
+ }
+ }
+ }
+ };
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
+ * BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+
+ // Reopen Documentation View in case of preference changes
+ getDefault().getPreferenceStore().addPropertyChangeListener(listener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.
+ * BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ if (null != listener) {
+ getDefault().getPreferenceStore().removePropertyChangeListener(listener);
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given plug-in
+ * relative path.
+ *
+ * @param path
+ * the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Logs a warning message in the plug-in log
+ *
+ * @param message
+ * the message to log
+ */
+ public static void logWarning(String message) {
+ getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs an error message in the plug-in log
+ *
+ * @param message
+ * the message to log
+ */
+ public static void logError(String message) {
+ getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs an information message in the plug-in log
+ *
+ * @param message
+ * the message to log
+ */
+ public static void logInfo(String message) {
+ getDefault().getLog().log(new Status(IStatus.INFO, Activator.PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs an exception message in the plug-in log
+ *
+ * @param exception
+ * the exception to log
+ */
+ public static void logException(Exception exception) {
+ getDefault().getLog()
+ .log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, exception.getLocalizedMessage(), exception));
+ }
+
+ /**
+ * Returns the 'ToggleLinking' value stored on the dialog settings of the
+ * plug-in.
+ *
+ * @return The 'ToggleLinking' value.
+ */
+ public boolean getToogleLinkingSetting() {
+ return getDialogSettings().getBoolean(PLUGIN_ID + "_" + TOGGLE_LINKING);//$NON-NLS-1$
+ }
+
+ /**
+ * Sets the 'ToggleLinking' value stored on the dialog settings of the
+ * plug-in.
+ *
+ * @param toggleLinkingSetting
+ * The 'ToggleLinking' value to store.
+ */
+ public void setToggleEditorSetting(final boolean toggleLinkingSetting) {
+ if (toggleLinkingSetting != getDialogSettings().getBoolean(PLUGIN_ID + "_" + TOGGLE_LINKING)) {//$NON-NLS-1$
+ getDialogSettings().put(PLUGIN_ID + "_" + TOGGLE_LINKING, toggleLinkingSetting);//$NON-NLS-1$
+ }
+ }
+
+
+
+ /**
+ * Returns the 'UseRichText' preferences from uml.common
+ */
+ public boolean getUseRichTextSetting() {
+ return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getPreferenceStore().getBoolean(RichtextPreferencePage.USE_CK_EDITOR);
+ }
+
+ /**
+ * Gets the preference for the richtext toolbar initial expanded.
+ */
+ public static boolean getToolbarInitialExpendedPreference() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ return store.getBoolean(DocumentationViewPreferences.TOOLBAR_INITIAL_EXPANDED);
+ }
+
+ /**
+ * Gets the preference for the use of Documentation Profile.
+ */
+ public static boolean getUseDocumentationProfilePreference() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ return store.getBoolean(DocumentationViewPreferences.USE_DOCUMENTATION_PROFILE);
+ }
+
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/constants/DocumentationViewConstants.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/constants/DocumentationViewConstants.java
new file mode 100644
index 00000000000..af51cbc85cb
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/constants/DocumentationViewConstants.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.constants;
+
+/**
+ * Class used to store all the constants for the plug-in 'views.documentation'
+ */
+public interface DocumentationViewConstants {
+
+ /**
+ * The name of the image used for a Link with Editor action.
+ */
+ public static final String ICON_LINK_WITH_EDITOR = "icons/full/elcl16/synced.png"; //$NON-NLS-1$
+
+ /**
+ * Id of the Plug-In 'org.eclipse.ui'.
+ */
+ public static final String PLUGIN_ORG_ECLIPSE_UI = "org.eclipse.ui"; //$NON-NLS-1$
+
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/handlers/DocumentationViewHandler.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/handlers/DocumentationViewHandler.java
new file mode 100644
index 00000000000..2d480acc3ba
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/handlers/DocumentationViewHandler.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.ui.util.EditorHelper;
+import org.eclipse.papyrus.views.documentation.Activator;
+import org.eclipse.papyrus.views.documentation.views.DocumentationView;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Handler used to show the 'documentation' view.
+ */
+public class DocumentationViewHandler extends AbstractHandler {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ openViewAndSetSelection(HandlerUtil.getCurrentStructuredSelection(event));
+ return null;
+ }
+
+ /**
+ * Open the view 'documentation' and set the selection
+ *
+ * @param structuredSelection
+ * The objects to search.
+ */
+ public void openViewAndSetSelection(final IStructuredSelection structuredSelection) {
+ DocumentationView documentationView = openDocumentationView();
+ documentationView.setSelectedElement(structuredSelection);
+ }
+
+ /**
+ * Show the view 'documentation'.
+ */
+ public DocumentationView openDocumentationView() {
+ try {
+
+ final IWorkbenchPage activePage = EditorHelper.getActiveWindow().getActivePage();
+ return (DocumentationView) activePage.showView(DocumentationView.ID, null, IWorkbenchPage.VIEW_VISIBLE);
+ } catch (final PartInitException e) {
+ Activator.logError(e.getMessage());
+ return null;
+ }
+ }
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/Messages.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/Messages.java
new file mode 100644
index 00000000000..f247b4206e8
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/Messages.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST, ALL4TEC and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.views.documentation.messages.messages"; //$NON-NLS-1$
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+
+ public static String DocumentationResourceEditor_AddButtonTooltip;
+ public static String DocumentationResourceEditor_AddFileSystemDialogTitle;
+ public static String DocumentationResourceEditor_AddRemoteDialogMessage;
+ public static String DocumentationResourceEditor_AddRemoteDialogTitle;
+ public static String DocumentationResourceEditor_AddWSDialogTitle;
+ public static String DocumentationResourceEditor_BrowseSystemButtonTooltip;
+ public static String DocumentationResourceEditor_BrowseWSButtonTooltip;
+ public static String DocumentationResourceEditor_EditResourceDialogMessage;
+ public static String DocumentationResourceEditor_EditResourceDialogTitle;
+ public static String DocumentationResourceEditor_Message;
+ public static String DocumentationResourceEditor_RemoveButtonTootip;
+ public static String DocumentationView_CommentTabLabel;
+ public static String DocumentationView_EditButtonLabel;
+ public static String DocumentationView_EditButtonTooltip;
+ public static String DocumentationView_NoCommentCreatedMessage;
+ public static String DocumentationView_notProfileAppliedDialogMessage;
+ public static String DocumentationView_notProfileAppliedDialogTitle;
+ public static String DocumentationView_ResourcesTabLabel;
+ public static String DocumentationView_SyncActionTooltip;
+ public static String DocumentationViewPreferencePage_chooseUseProfile;
+ public static String DocumentationViewPreferencePage_description;
+ public static String DocumentationViewPreferencePage_toolbarInitialExpandedLabel;
+ public static String DocumentationViewPreferencePage_useFirstCommentChoice;
+ public static String DocumentationViewPreferencePage_useProfileChoice;
+
+
+
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/messages.properties b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/messages.properties
new file mode 100644
index 00000000000..39f889ab76e
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/messages/messages.properties
@@ -0,0 +1,24 @@
+DocumentationResourceEditor_AddButtonTooltip=Add remote element
+DocumentationResourceEditor_AddFileSystemDialogTitle=Add File System Resource
+DocumentationResourceEditor_AddRemoteDialogMessage=Enter the URL of the remote resource.
+DocumentationResourceEditor_AddRemoteDialogTitle=Add Remote
+DocumentationResourceEditor_AddWSDialogTitle=Add Workspace Resource
+DocumentationResourceEditor_BrowseSystemButtonTooltip=Browse file system
+DocumentationResourceEditor_BrowseWSButtonTooltip=Browse workspace
+DocumentationResourceEditor_EditResourceDialogMessage=Edit the selected resource.
+DocumentationResourceEditor_EditResourceDialogTitle=Edit Resource
+DocumentationResourceEditor_Message=Associated resources
+DocumentationResourceEditor_RemoveButtonTootip=Remove selected elements
+DocumentationView_CommentTabLabel=Comment
+DocumentationView_EditButtonLabel=Edit
+DocumentationView_EditButtonTooltip=Edit the Documentation for the Selected Element
+DocumentationView_NoCommentCreatedMessage=Please create a stereotyped comment \n or write something in comment tab before add resources
+DocumentationView_notProfileAppliedDialogMessage=Preference is set to use Documentation::Documentaton stereotyped comment as documentation. Please apply it to the model or change preference at Window > preferences > Papyrus > Documentation View.
+DocumentationView_notProfileAppliedDialogTitle=Profile Documenation::Documentation not Applied
+DocumentationView_ResourcesTabLabel=Resources
+DocumentationView_SyncActionTooltip=Link with Editor
+DocumentationViewPreferencePage_chooseUseProfile=Choose the type a Documentation Comment:
+DocumentationViewPreferencePage_description=Papyrus Documentation View Preferences.
+DocumentationViewPreferencePage_toolbarInitialExpandedLabel=Initialy Expand Richtext Toolbar.
+DocumentationViewPreferencePage_useFirstCommentChoice=Use first Comment as Documentation
+DocumentationViewPreferencePage_useProfileChoice=Use first Comment Stereotyped Documentation::Documentation as Documentation
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferenceInitializer.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferenceInitializer.java
new file mode 100644
index 00000000000..dca066e7ea6
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferenceInitializer.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST, ALL4TEC and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.documentation.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.views.documentation.Activator;
+
+/**
+ * Initializer for documentation view preferences.
+ */
+public class DocumentationViewPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /**
+ * Constructor.
+ */
+ public DocumentationViewPreferenceInitializer() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ store.setDefault(DocumentationViewPreferences.USE_DOCUMENTATION_PROFILE, false);
+ store.setDefault(DocumentationViewPreferences.TOOLBAR_INITIAL_EXPANDED, false);
+ }
+
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferencePage.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferencePage.java
new file mode 100644
index 00000000000..c614c48a14d
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferencePage.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST, ALL4TEC and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.papyrus.views.documentation.Activator;
+import org.eclipse.papyrus.views.documentation.messages.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Preference page to define default type of documentation comment.
+ */
+public class DocumentationViewPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription(Messages.DocumentationViewPreferencePage_description);
+
+ }
+
+ /**
+ * Creates the field editors.
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(DocumentationViewPreferences.TOOLBAR_INITIAL_EXPANDED, Messages.DocumentationViewPreferencePage_toolbarInitialExpandedLabel, getFieldEditorParent()));
+ addField(new RadioGroupFieldEditor(DocumentationViewPreferences.USE_DOCUMENTATION_PROFILE, Messages.DocumentationViewPreferencePage_chooseUseProfile, 1,
+ new String[][] {
+ { Messages.DocumentationViewPreferencePage_useFirstCommentChoice, "false" }, //$NON-NLS-1$
+ { Messages.DocumentationViewPreferencePage_useProfileChoice, "true" }, //$NON-NLS-1$
+ }, getFieldEditorParent()));
+ }
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferences.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferences.java
new file mode 100644
index 00000000000..790a324f00b
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/preferences/DocumentationViewPreferences.java
@@ -0,0 +1,26 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST, ALL4TEC and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.preferences;
+
+/**
+ * Preference's keys for DocumentationView Preferences.
+ *
+ */
+public interface DocumentationViewPreferences {
+
+ /** The Constant USE_DOCUMENTATION_PROFILE. */
+ public static final String USE_DOCUMENTATION_PROFILE = "useDocumentationProfile"; //$NON-NLS-1$
+
+ /** The Constant TOOLBARI_NITIAL_EXPANDED. */
+ public static final String TOOLBAR_INITIAL_EXPANDED = "toolbarInitialExpanded"; //$NON-NLS-1$
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/views/DocumentationView.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/views/DocumentationView.java
new file mode 100644
index 00000000000..3e5465c0df1
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/views/DocumentationView.java
@@ -0,0 +1,845 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.views;
+
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.properties.ui.widgets.TabbedPropertyTitle;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.infra.widgets.util.PapyrusSelectionService;
+import org.eclipse.papyrus.uml.diagram.common.preferences.RichtextPreferencePage;
+import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
+import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
+import org.eclipse.papyrus.uml.types.core.commands.SetStereotypeValueCommand;
+import org.eclipse.papyrus.uml.types.core.requests.SetStereotypeValueRequest;
+import org.eclipse.papyrus.uml.ui.editors.UMLRichtextEditorWithReferences;
+import org.eclipse.papyrus.uml.ui.editors.UMLToolbarConfiguration;
+import org.eclipse.papyrus.views.documentation.Activator;
+import org.eclipse.papyrus.views.documentation.constants.DocumentationViewConstants;
+import org.eclipse.papyrus.views.documentation.messages.Messages;
+import org.eclipse.papyrus.views.documentation.widgets.DocumentationResourceEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * View to display documentation of {@link Element}. The first owned comment is associate to this documentation.
+ */
+public class DocumentationView extends ViewPart {
+
+ /** Property label for the associated feature of documentation profile. */
+ private static final String ASSOCIATED_RESOURCE_PROPERTY_LABEL = "associatedResource"; //$NON-NLS-1$
+
+ /** The Stereotype Documentation if used. */
+ private static final String DOCUMENT_PROFILE_QUALIFY_NAME = "Documentation::Documentation";//$NON-NLS-1$
+
+ /** The documentation view Id. */
+ public static final String ID = "org.eclipse.papyrus.views.documentation.DocumentationView";//$NON-NLS-1$
+
+ /** True if the linking with the editor is active. */
+ private boolean linkingEnabled;
+
+ /** The rich text editor. */
+ private UMLRichtextEditorWithReferences richtextEditor;
+
+ /** The current comment representing the documentation. */
+ private Comment comment;
+
+ /** The owner of the current comment. */
+ private Element commentOwner;
+
+ /** The Widget Factory. */
+ private TabbedPropertySheetWidgetFactory widgetFactory;
+
+ /** The composite for the rich text editor. */
+ private Composite topComposite;
+
+ /** The name title bar. */
+ private TabbedPropertyTitle nameTitle;
+
+ /** The label Provider. */
+ private ILabelProvider titleLabelProvider = new LabelProviderServiceImpl().getLabelProvider();
+
+ /** THe toolbar configuration. */
+ private UMLToolbarConfiguration toolbarConfig;
+
+ /** The last selection. */
+ private ISelection lastSelection;
+
+ /** the stack layout. */
+ private StackLayout parentStackLayout;
+
+ /** The main composite. */
+ private Composite mainComposite;
+
+ /** The composite where is no element available. */
+ private Composite noEditorComposite;
+
+ /** The parent Composite. */
+ private Composite parent;
+
+ /** The selection Listener. */
+ private ISelectionListener selectionListener;
+
+ /** The selection change listener for viwer from property view. */
+ private ISelectionChangedListener selectionChangeListener;
+
+ /** The text of the documentation. */
+ private String text;
+
+ /** True if the richtext editor is used. */
+ protected boolean useRichText;
+
+ /** The stack layout of the editor composite. */
+ private StackLayout editorStackLayout;
+
+ /** The editor composite. */
+ private Composite editorsComposite;
+
+ /** The string editor for not richtext documentation. */
+ private Text stringEditor;
+
+ /** True if the owner is readOnly: no documentation modification. */
+ private boolean readOnly;
+
+ /** True if we use the stereotype Documentation::Documentation to comment. */
+ private boolean useDocumentationProfile;
+
+ /** The composite for resources view. */
+ private Composite resourcesComposite;
+
+ /** The tabFolder composite for stereotyped comment. */
+ private CTabFolder tabFolderComposite;
+
+ /** The documentation resources editor */
+ private DocumentationResourceEditor resourceTableComposite;
+
+ /** the listener for change on comment and owner. */
+ private Adapter listener = new AdapterImpl() {
+ /**
+ * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
+ */
+ @Override
+ public void notifyChanged(final Notification msg) {
+ // Refresh name title if name changed
+ if (msg.getNotifier().equals(commentOwner) && null != msg.getFeature() && msg.getFeature().equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
+ refreshNameTitle();
+ } else if (msg.getNotifier().equals(comment) && null != msg.getFeature() && msg.getFeature().equals(UMLPackage.eINSTANCE.getComment_Body()) && !richtextEditor.getText().equals(comment.getBody())) {
+ if (null != richtextEditor && !richtextEditor.isDisposed()) {
+ refreshEditors();
+ }
+ }
+ }
+ };
+
+ /**
+ * Switch between single editor or RichText editor with preferences.
+ */
+ IPropertyChangeListener richTextPreferenceListener = event -> {
+ if (RichtextPreferencePage.USE_CK_EDITOR == event.getProperty()) {
+ useRichText = org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getPreferenceStore().getBoolean(RichtextPreferencePage.USE_CK_EDITOR);
+ if (useRichText) {
+ if (null != richtextEditor && !richtextEditor.isDisposed()) {
+ richtextEditor.setText(text);
+ }
+ editorStackLayout.topControl = richtextEditor;
+ } else {
+ if (null != stringEditor && !stringEditor.isDisposed()) {
+ stringEditor.setText(text);
+ }
+ editorStackLayout.topControl = stringEditor;
+ }
+ if (null != editorsComposite && !editorsComposite.isDisposed()) {
+ editorsComposite.layout(true);
+ }
+ }
+ };
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ public void createPartControl(final Composite parent) {
+ this.parent = parent;
+ // Create the parent stack layout
+ parentStackLayout = new StackLayout();
+ parent.setLayout(parentStackLayout);
+
+ CTabItem createTabItemComment = null;
+ CTabItem createTabItemRessources = null;
+ if (useDocumentationProfile) {
+ tabFolderComposite = widgetFactory.createTabFolder(parent, SWT.NONE);
+
+ createTabItemComment = widgetFactory.createTabItem(tabFolderComposite, SWT.NONE);
+ createTabItemComment.setText(Messages.DocumentationView_CommentTabLabel);
+ createTabItemRessources = widgetFactory.createTabItem(tabFolderComposite, SWT.NONE);
+ createTabItemRessources.setText(Messages.DocumentationView_ResourcesTabLabel);
+ tabFolderComposite.setSelection(createTabItemComment);
+ }
+
+ noEditorComposite = widgetFactory.createComposite(parent, SWT.NONE);
+ parentStackLayout.topControl = noEditorComposite;
+
+ // Create the main composite
+ createMainComposite(useDocumentationProfile ? tabFolderComposite : parent);
+
+ if (useDocumentationProfile) {
+ resourcesComposite = widgetFactory.createComposite(tabFolderComposite);
+ GridLayoutFactory.fillDefaults().equalWidth(false).spacing(0, 0).applyTo(resourcesComposite);
+ resourceTableComposite = new DocumentationResourceEditor(resourcesComposite);
+
+ createTabItemComment.setControl(mainComposite);
+ createTabItemRessources.setControl(resourcesComposite);
+ }
+ parent.layout(true);
+
+ // Create Action
+ createAction();
+ }
+
+ /**
+ * Creation view menu actions
+ */
+ protected void createAction() {
+ final IToolBarManager toolBarManager = getViewSite().getActionBars().getToolBarManager();
+ if (null != toolBarManager) {
+ toolBarManager.add(createToggleLinkingAction());
+ }
+ }
+
+ /**
+ * Create the rich text editor into the rich text composite.
+ */
+ protected void createRichTextEditor(final Composite parent) {
+ toolbarConfig = new UMLToolbarConfiguration();
+ toolbarConfig.toolbarCollapsible = true;
+ toolbarConfig.removeFormat = false;
+ toolbarConfig.toolbarInitialExpanded = Activator.getToolbarInitialExpendedPreference();
+
+ richtextEditor = new UMLRichtextEditorWithReferences(parent, toolbarConfig);
+ FormData formData = new FormData();
+ formData.left = new FormAttachment(0, 0);
+ formData.right = new FormAttachment(100, 0);
+ formData.top = new FormAttachment(nameTitle, 0);
+ formData.bottom = new FormAttachment(100, 0);
+ richtextEditor.setLayoutData(formData);
+ richtextEditor.addModifyListener(event -> {
+ if (!readOnly) {
+ text = richtextEditor.getText();
+ }
+ });
+
+ }
+
+ /**
+ * Save the text in the comment, if no comment exist it will be created.
+ */
+ protected void save() {
+ if (null != commentOwner) {
+ TransactionalEditingDomain editingDomain = getDomain();
+ CompoundCommand cc = new CompoundCommand("Edit Documentation");//$NON-NLS-1$
+
+ // get save text command
+ if (null != text) {
+ // if comment exist
+ if (null != comment) {
+ if (!text.equals(comment.getBody())) {// And there is modification
+ // Set the new value of the comment
+ cc.append(new SetCommand(editingDomain, comment, UMLPackage.eINSTANCE.getComment_Body(), text));
+ }
+
+ } else if (!text.isEmpty() || (null != resourceTableComposite && !resourceTableComposite.getResources().isEmpty())) {
+ // if no comment, create one when we begin to type
+ cc.append(getCreateNewCommentCommand());
+ }
+ }
+
+ // get save resource command
+ if (useDocumentationProfile && null != comment && null != resourceTableComposite) {
+ SetStereotypeValueRequest requestSetResources = new SetStereotypeValueRequest(editingDomain, getDocumentationStereotype(), comment, ASSOCIATED_RESOURCE_PROPERTY_LABEL, resourceTableComposite.getResources());
+ cc.append(new GMFtoEMFCommandWrapper(new SetStereotypeValueCommand(requestSetResources, editingDomain, "")));//$NON-NLS-1$
+ }
+
+ // Execute command
+ if (null != cc && cc.canExecute()) {
+ editingDomain.getCommandStack().execute(cc);
+ }
+
+ // Refresh rich text configuration
+ richtextEditor.configureEdition(comment, UMLPackage.eINSTANCE.getComment_Body());
+ }
+ }
+
+
+ /**
+ * @return the editing domain of the comment owner.
+ */
+ private TransactionalEditingDomain getDomain() {
+ return TransactionUtil.getEditingDomain(commentOwner);
+ }
+
+
+ /**
+ * Create the new comment and return the command.
+ */
+ protected CompoundCommand getCreateNewCommentCommand() {
+
+ TransactionalEditingDomain editingDomain = getDomain();
+
+ // create comment
+ comment = UMLFactory.eINSTANCE.createComment();
+ comment.setBody(text);
+
+ CompoundCommand cc = new CompoundCommand("Create new Comment");//$NON-NLS-1$
+
+ // Add it to the owner
+ cc.append(new AddCommand(editingDomain, commentOwner, UMLPackage.eINSTANCE.getElement_OwnedComment(), comment));
+ if (useDocumentationProfile) {
+
+ Stereotype documentationStereotype = getDocumentationStereotype();
+ if (null != documentationStereotype) {
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(comment, documentationStereotype, editingDomain);
+ cc.append(applyStereotypeCommand);
+ } else {
+ // If null the profile is not applied: inform the user to apply it
+ MessageDialog.openInformation(getSite().getShell(), Messages.DocumentationView_notProfileAppliedDialogTitle,
+ Messages.DocumentationView_notProfileAppliedDialogMessage);
+ }
+ }
+ return cc;
+ }
+
+ /**
+ * @return The stereotype Documentation::Documentation
+ */
+ public Stereotype getDocumentationStereotype() {
+
+ Stereotype docStereotype = null;
+ if (null != commentOwner) {
+ org.eclipse.uml2.uml.Package package_ = commentOwner.getNearestPackage();
+ if (null != package_) {
+
+ for (Iterator<ProfileApplication> iterator = package_.getAllProfileApplications().iterator(); null == docStereotype && iterator.hasNext();) {
+ ProfileApplication profileApplication = iterator.next();
+ Profile appliedProfile = profileApplication.getAppliedProfile();
+
+ if (null != appliedProfile) {
+
+ for (Iterator<Stereotype> iterator2 = appliedProfile.allApplicableStereotypes().iterator(); null == docStereotype && iterator2.hasNext();) {
+ Stereotype stereotype = iterator2.next();
+ ENamedElement appliedDefinition = profileApplication.getAppliedDefinition(stereotype);
+
+ if (appliedDefinition instanceof EClass
+ && !((EClass) appliedDefinition).isAbstract()
+ && DOCUMENT_PROFILE_QUALIFY_NAME.equals(stereotype.getQualifiedName())) {
+
+ // Stereotype found
+ docStereotype = stereotype;
+ }
+ }
+ }
+ }
+ }
+ }
+ return docStereotype;
+ }
+
+
+ /**
+ * Create the title composite
+ */
+ protected void createEditorTitle() {
+ nameTitle = new TabbedPropertyTitle(topComposite, widgetFactory);
+
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.top = new FormAttachment(0, 0);
+ nameTitle.setLayoutData(data);
+ }
+
+ /**
+ * Create the rich Text main composite.
+ */
+ protected void createTopComposite(final Composite parent) {
+
+ topComposite = widgetFactory.createComposite(parent, SWT.NONE);
+ topComposite.setLayout(new FormLayout());
+ {
+ FormData formData = new FormData();
+ formData.left = new FormAttachment(0, 0);
+ formData.right = new FormAttachment(100, 0);
+ formData.top = new FormAttachment(0, 0);
+ formData.bottom = new FormAttachment(100, 0);
+ topComposite.setLayoutData(formData);
+ }
+
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(topComposite);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
+ */
+ @Override
+ public void init(final IViewSite site, final IMemento memento) throws PartInitException {
+ super.init(site, memento);
+
+ linkingEnabled = Activator.getDefault().getToogleLinkingSetting();
+ useRichText = Activator.getDefault().getUseRichTextSetting();
+ useDocumentationProfile = Activator.getUseDocumentationProfilePreference();
+
+ widgetFactory = new TabbedPropertySheetWidgetFactory();
+
+ selectionListener = createSelectionListener();
+ site.getPage().addSelectionListener(selectionListener);
+
+ // add selection change listener in papyrus selection service
+ selectionChangeListener = createSelectionChangedListener();
+ PapyrusSelectionService.getInstance().addSelectionChangedListener(selectionChangeListener);
+
+ // Add listener on page to save at view focus lost
+ getViewSite().getPage().addPartListener(new SaveAtPartFocusLostListener());
+
+ // Add listener on richtext preference
+ org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getPreferenceStore().addPropertyChangeListener(richTextPreferenceListener);
+ }
+
+ /**
+ * To create the selection listener to check the selection changed on the
+ * editor.
+ *
+ * @return The ISelectionListener.
+ */
+ private ISelectionListener createSelectionListener() {
+ return (part, selection) -> {
+ if (!(part instanceof DocumentationView)) {
+ lastSelection = selection;
+ if (linkingEnabled) {
+ setSelectedElement(selection);
+ }
+ }
+ };
+ }
+
+ /**
+ * To create the selection listener to check the selection changed on the
+ * editor.
+ *
+ * @return The ISelectionListener.
+ */
+ private ISelectionChangedListener createSelectionChangedListener() {
+ return (event) -> {
+ ISelection selection = event.getSelection();
+ lastSelection = selection;
+ if (linkingEnabled) {
+ setSelectedElement(selection);
+ }
+ };
+ }
+
+ /**
+ * Set the selection element from a {@link ISelection}.
+ */
+ public void setSelectedElement(final ISelection selection) {
+ if (selection instanceof IStructuredSelection && null != parent && !parent.isDisposed()) {
+ final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if (1 == structuredSelection.size()) {
+ Object firstElement = structuredSelection.getFirstElement();
+ if (!(firstElement instanceof String)) {// In case of selection in resources tab
+ setSelectedElement(UMLUtil.resolveUMLElement(firstElement));
+ }
+ }
+ }
+ }
+
+ /**
+ * Create the main composite which have to appear when an element is selected.
+ */
+ protected void createMainComposite(final Composite parent) {
+ mainComposite = widgetFactory.createPlainComposite(parent, SWT.NONE);
+ GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(mainComposite);
+
+ // create the top composite containing the title and editors
+ createTopComposite(mainComposite);
+
+ // create title
+ createEditorTitle();
+
+ // Create the editor composite containing the richtext editor and the string editor
+ createEditorsComposite();
+
+ // create the richtext editor
+ createRichTextEditor(editorsComposite);
+
+ // create the simple string editor
+ createStringEditorComposite();
+
+ editorsComposite.layout(true);
+
+ editorStackLayout.topControl = useRichText ? richtextEditor : stringEditor;
+ }
+
+ /**
+ * Create the string editor composite.
+ */
+ protected void createStringEditorComposite() {
+ stringEditor = widgetFactory.createText(editorsComposite, "", SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);//$NON-NLS-1$
+ stringEditor.addModifyListener(event -> {
+ if (!readOnly) {
+ text = stringEditor.getText();
+ }
+ });
+ }
+
+ /**
+ * Create the editors composite.
+ */
+ protected void createEditorsComposite() {
+ editorsComposite = widgetFactory.createComposite(topComposite);
+ FormData formData = new FormData();
+ formData.left = new FormAttachment(0, 0);
+ formData.right = new FormAttachment(100, 0);
+ formData.top = new FormAttachment(nameTitle, 0);
+ formData.bottom = new FormAttachment(100, 0);
+ editorsComposite.setLayoutData(formData);
+ editorStackLayout = new StackLayout();
+ editorsComposite.setLayout(editorStackLayout);
+ }
+
+ /**
+ * Set the selection element from a {@link Element}.
+ */
+ protected void setSelectedElement(final Element element) {
+ // switch between composite
+ if (null != element) {
+ parentStackLayout.topControl = useDocumentationProfile ? tabFolderComposite : mainComposite;
+ } else {
+ parentStackLayout.topControl = noEditorComposite;
+ }
+
+ // remove listener in previous element
+ removeListener();
+ // set the new owner
+ commentOwner = element;
+ // reset comment
+ comment = null;
+
+ boolean isReadOnly = true;
+ // set the comment and install eAdapter
+ if (null != commentOwner) {
+ commentOwner.eAdapters().add(listener);
+
+ EList<Comment> ownedComments = commentOwner.getOwnedComments();
+ if (!ownedComments.isEmpty()) {
+ comment = getDocumentationComment(ownedComments);
+ if (null != comment) {
+ comment.eAdapters().add(listener);
+ }
+ }
+ // Check if the owner is a read only Element
+ if (null != commentOwner.eResource()) {
+ TransactionalEditingDomain editingDomain = getDomain();
+ if (null != editingDomain) {
+ isReadOnly = editingDomain.isReadOnly(commentOwner.eResource());
+ }
+ }
+ }
+
+ setReadOnly(isReadOnly);
+
+ // refresh title and rich text editor
+ refreshNameTitle();
+ refreshEditors();
+ refreshResources();
+
+ parent.layout(true);
+
+ }
+
+ /**
+ * Refresh the resources composite.
+ */
+ @SuppressWarnings("unchecked")
+ protected void refreshResources() {
+ List<String> resources = new ArrayList<String>();
+ if (null != resourceTableComposite) {
+ if (useDocumentationProfile && null != comment) {
+ Stereotype appliedStereotype = comment.getAppliedStereotype(DOCUMENT_PROFILE_QUALIFY_NAME);
+ if (null != appliedStereotype) {
+ Object value = comment.getValue(appliedStereotype, ASSOCIATED_RESOURCE_PROPERTY_LABEL);
+ if (value instanceof List) {
+ resources.addAll((List<String>) value);
+ }
+ }
+ }
+ resourceTableComposite.setResources(resources);
+ resourceTableComposite.refresh();
+ }
+ }
+
+ /**
+ * Gets the comment used for the documentation;
+ *
+ * @param ownedComments
+ * The owned comments of an {@link Element}.
+ */
+ protected Comment getDocumentationComment(final EList<Comment> ownedComments) {
+ Comment docComment = null;
+ useDocumentationProfile = Activator.getUseDocumentationProfilePreference();
+ if (useDocumentationProfile) {
+ for (Iterator<Comment> iterator = ownedComments.iterator(); iterator.hasNext() && null == docComment;) {
+ Comment comment = iterator.next();
+ if (null != comment.getAppliedStereotype(DOCUMENT_PROFILE_QUALIFY_NAME)) {
+ docComment = comment;
+ }
+ }
+ } else {
+ docComment = ownedComments.get(0);
+ }
+ return docComment;
+ }
+
+
+ /**
+ * @param readOnly:
+ * true if the comment's owner is read only.
+ */
+ protected void setReadOnly(final boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ /**
+ * Refresh the rich text editor.
+ */
+ protected void refreshEditors() {
+ if (null != comment && null != comment.getBody()) {
+ text = comment.getBody();
+ } else {
+ text = ""; //$NON-NLS-1$
+ }
+
+ // // Refresh rich text text editor
+ if (null != richtextEditor && !richtextEditor.isDisposed()) {
+ richtextEditor.configureEdition(comment, null != comment ? UMLPackage.eINSTANCE.getComment_Body() : null);
+ try {
+ richtextEditor.setText(text);
+ richtextEditor.setEditable(!readOnly);
+ } catch (Exception e) {
+ // do nothing : web browser exception
+ }
+ }
+
+ // Refresh simple string text editor
+ if (null != stringEditor && !stringEditor.isDisposed()) {
+ stringEditor.setText(text);
+ stringEditor.setEditable(!readOnly);
+ }
+ }
+
+ /**
+ * Refresh the name title header.
+ */
+ protected void refreshNameTitle() {
+ // Refresh Title
+ if (null != nameTitle && !nameTitle.isDisposed()) {
+ nameTitle.setTitle(titleLabelProvider.getText(commentOwner), titleLabelProvider.getImage(commentOwner));
+ }
+ }
+
+ /**
+ * Remove eAdapters on comment and comment owner.
+ */
+ protected void removeListener() {
+ if (null != commentOwner) {
+ commentOwner.eAdapters().remove(listener);
+ }
+ if (null != comment) {
+ comment.eAdapters().remove(listener);
+ }
+ }
+
+
+ /**
+ * Creates the 'Link with Editor' action.
+ */
+ protected IAction createToggleLinkingAction() {
+ final IAction toggleLinkingAction = new Action(Messages.DocumentationView_SyncActionTooltip, SWT.TOGGLE) {
+ @Override
+ public void run() {
+ linkingEnabled = isChecked();
+ Activator.getDefault().setToggleEditorSetting(linkingEnabled);
+ if (linkingEnabled && null != lastSelection) {
+ setSelectedElement(lastSelection);
+ }
+ }
+ };
+
+ toggleLinkingAction.setChecked(linkingEnabled);
+ toggleLinkingAction.setImageDescriptor(Activator.imageDescriptorFromPlugin(DocumentationViewConstants.PLUGIN_ORG_ECLIPSE_UI, DocumentationViewConstants.ICON_LINK_WITH_EDITOR));
+
+ return toggleLinkingAction;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ if (null != richtextEditor) {
+ try {
+ richtextEditor.setEditable(!readOnly);
+ } catch (Exception e) {
+ // do nothing : web browser exception
+ }
+ richtextEditor.setFocus();
+ } else {
+ parent.setFocus();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#dispose()
+ */
+ @Override
+ public void dispose() {
+ // Remove the modify listener
+ removeListener();
+
+ // Remove the selection listener.
+ if (null != selectionListener) {
+ getSite().getPage().removeSelectionListener(selectionListener);
+ }
+ if (null != selectionChangeListener) {
+ PapyrusSelectionService.getInstance().removeSelectionChangedListener(selectionChangeListener);
+ }
+ if (null != richTextPreferenceListener) {
+ org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getPreferenceStore().removePropertyChangeListener(richTextPreferenceListener);
+ }
+ super.dispose();
+ }
+
+ /**
+ * Save the text at focus lost of the view.
+ */
+ private final class SaveAtPartFocusLostListener implements IPartListener {
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IPartListener#partOpened(org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void partOpened(final IWorkbenchPart part) {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}<br>
+ * Override to save the text at focus lost.
+ *
+ * @see org.eclipse.ui.IPartListener#partDeactivated(org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void partDeactivated(final IWorkbenchPart part) {
+ if (part.equals(DocumentationView.this)) {
+ save();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IPartListener#partClosed(org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void partClosed(final IWorkbenchPart part) {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IPartListener#partBroughtToTop(org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void partBroughtToTop(final IWorkbenchPart part) {
+ // Do nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IPartListener#partActivated(org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void partActivated(final IWorkbenchPart part) {
+ // Do nothing
+ }
+ }
+
+}
diff --git a/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/widgets/DocumentationResourceEditor.java b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/widgets/DocumentationResourceEditor.java
new file mode 100644
index 00000000000..abb0c4f6d7e
--- /dev/null
+++ b/plugins/views/documentation/org.eclipse.papyrus.views.documentation/src/org/eclipse/papyrus/views/documentation/widgets/DocumentationResourceEditor.java
@@ -0,0 +1,323 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST, ALL4TEC and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.views.documentation.widgets;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.labelprovider.service.impl.LabelProviderServiceImpl;
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.editors.InputDialog;
+import org.eclipse.papyrus.infra.widgets.editors.MultipleValueSelectionDialog;
+import org.eclipse.papyrus.infra.widgets.providers.WorkspaceContentProvider;
+import org.eclipse.papyrus.infra.widgets.selectors.ReferenceSelector;
+import org.eclipse.papyrus.infra.widgets.util.FileUtil;
+import org.eclipse.papyrus.views.documentation.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+
+
+/**
+ * Create a composite that manage resources through a string list.
+ */
+public class DocumentationResourceEditor implements SelectionListener {
+
+ /** The icon to delete entry. */
+ private static final String DELETE_ICON = "/icons/Delete_12x12.gif"; //$NON-NLS-1$
+
+ /** The icon to add remote entry. */
+ public static final String REMOTE_ICON = "icons/Remote.gif"; //$NON-NLS-1$
+
+ /** The icon to add WS entry. */
+ public static final String BROWSE_WORKSPACE_ICON = "icons/browse-workspace_12x12.png"; //$NON-NLS-1$
+
+ /** The icon to add file system entry. */
+ public static final String BROWSE_FILE_SYSTEM_ICON = "icons/browse-filesystem_12x12.png"; //$NON-NLS-1$
+
+
+ /** The remote url prefix. */
+ private static final String HTTP = "http://"; //$NON-NLS-1$
+
+ /** the widget factory. */
+ TabbedPropertySheetWidgetFactory widgetFactory = new TabbedPropertySheetWidgetFactory();
+
+ /** The toolbar composite. */
+ private Composite toolbar;
+
+ /** The browse file system button. */
+ private Button browseFileSystemButton;
+
+ /** The browse workspace button. */
+ private Button browseWorkspaceButton;
+
+ /** The delete button. */
+ private Button removeButton;
+
+ /** The add button. */
+ private Button addRemoteButton;
+
+ /** The list of resources */
+ private List<String> resources = new ArrayList<>();
+
+ /** the table viewer */
+ private TableViewer tableViewer;
+
+ /** the label provider. */
+ private ILabelProvider labelProvider;
+
+ /**
+ * Constructor.
+ */
+ public DocumentationResourceEditor(final Composite parent) {
+
+ LabelProviderService labelProviderService = new LabelProviderServiceImpl();
+ try {
+ labelProviderService.startService();
+ } catch (ServiceException ex) {
+ Activator.log.error(ex);
+ }
+
+ labelProvider = labelProviderService.getLabelProvider();
+
+ Composite composite = widgetFactory.createComposite(parent);
+ GridLayoutFactory.fillDefaults().numColumns(1).equalWidth(false).applyTo(composite);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);
+
+ toolbar = widgetFactory.createComposite(composite);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(toolbar);
+ GridLayoutFactory.fillDefaults().spacing(0, 0).numColumns(5).applyTo(toolbar);
+
+ CLabel fillerComposite = widgetFactory.createCLabel(toolbar, Messages.DocumentationResourceEditor_Message);
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(fillerComposite);
+
+ createListControls();
+
+ Table table = new Table(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
+ table.addSelectionListener(this);
+
+ tableViewer = new TableViewer(table);
+ tableViewer.setContentProvider(new ArrayContentProvider());
+ tableViewer.setLabelProvider(labelProvider);
+
+ tableViewer.setInput(resources);
+
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(tableViewer.getTable());
+
+ composite.layout(true);
+
+ toolbar.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_CYAN));
+ }
+
+
+ /**
+ * Creates controls.
+ */
+ protected void createListControls() {
+ addRemoteButton = createButton(Activator.getDefault().getImageFromPlugin(REMOTE_ICON), Messages.DocumentationResourceEditor_AddButtonTooltip);
+ browseFileSystemButton = createButton(Activator.getDefault().getImageFromPlugin(BROWSE_FILE_SYSTEM_ICON), Messages.DocumentationResourceEditor_BrowseSystemButtonTooltip);
+ browseWorkspaceButton = createButton(Activator.getDefault().getImageFromPlugin(BROWSE_WORKSPACE_ICON), Messages.DocumentationResourceEditor_BrowseWSButtonTooltip);
+ removeButton = createButton(Activator.getDefault().getImage(DELETE_ICON), Messages.DocumentationResourceEditor_RemoveButtonTootip);
+ }
+
+ protected Button createButton(final Image image, final String toolTipText) {
+ Button button = new Button(toolbar, SWT.PUSH);
+ button.setImage(image);
+ button.addSelectionListener(this);
+ button.setToolTipText(toolTipText);
+ GridDataFactory.fillDefaults().grab(false, false).applyTo(button);
+ return button;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ if (e.widget == browseFileSystemButton) {
+ browseFileSystem();
+ } else if (e.widget == browseWorkspaceButton) {
+ browseWorkspace();
+ } else if (e.widget == addRemoteButton) {
+ addRemote();
+ } else if (e.widget == removeButton) {
+ remove();
+ }
+ refresh();
+ }
+
+ /**
+ * remove action
+ */
+ protected void remove() {
+ IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
+
+ if (0 < selection.size()) {
+ TableItem[] selectedResources = tableViewer.getTable().getSelection();
+ for (int i = 0; i < selectedResources.length; i++) {
+ TableItem selectedItem = selectedResources[i];
+ Table parentTable = selectedItem.getParent();
+ final int index = parentTable.indexOf(selectedItem);
+ parentTable.remove(index);
+ resources.remove(index);
+ }
+
+ }
+ }
+
+ /**
+ * Add a resource by browse file system.
+ */
+ protected void browseFileSystem() {
+ FileDialog dialog = new FileDialog(toolbar.getShell(), SWT.MULTI | SWT.OPEN);
+ dialog.setText(Messages.DocumentationResourceEditor_AddFileSystemDialogTitle);
+ if (null != dialog.open()) {
+ String filterPath = dialog.getFilterPath();
+ for (String fileName : dialog.getFileNames()) {
+ resources.add(filterPath + File.separator + fileName);
+ }
+ }
+ }
+
+ /**
+ * Add a resource by browse workspace.
+ */
+ protected void browseWorkspace() {
+ ReferenceSelector selector = new ReferenceSelector();
+ selector.setLabelProvider(labelProvider);
+
+ // Prepare the WorkspaceContentProvider and use the right filters
+ WorkspaceContentProvider contentProvider = new WorkspaceContentProvider();
+ contentProvider.setExtensionFilters(new LinkedHashMap<String, String>()); // Reset the default filters
+
+ selector.setContentProvider(contentProvider);
+
+ MultipleValueSelectionDialog dialog = new MultipleValueSelectionDialog(toolbar.getShell(), selector);
+ dialog.setTitle(Messages.DocumentationResourceEditor_AddWSDialogTitle);
+ dialog.setLabelProvider(labelProvider);
+ dialog.setOrdered(true);
+ dialog.setUnique(true);
+ selector.setUnique(true);
+
+ int code = dialog.open();
+ if (Window.OK == code) {
+ Object[] result = dialog.getResult();
+ if (0 < result.length) {
+ for (Object file : result) {
+ if (file instanceof IFile) {
+ resources.add(FileUtil.getPath((IFile) file, false));
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Add a remote resource.
+ */
+ protected void addRemote() {
+
+ SelectionDialog dialog = new InputDialog(toolbar.getShell(), Messages.DocumentationResourceEditor_AddRemoteDialogTitle, Messages.DocumentationResourceEditor_AddRemoteDialogMessage, HTTP, null);
+
+ if (dialog.OK == dialog.open()) {
+ if (0 < dialog.getResult().length) {
+ resources.add((String) dialog.getResult()[0]);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ edit();
+ }
+
+ /**
+ * Handle edit Action.
+ */
+ protected void edit() {
+ IStructuredSelection selection = (IStructuredSelection) tableViewer.getSelection();
+
+ if (1 == selection.size()) {
+
+ TableItem selectedItem = tableViewer.getTable().getSelection()[0];
+ Table parentTable = selectedItem.getParent();
+
+ final int index = parentTable.indexOf(selectedItem);
+ final Object currentValue = selection.getFirstElement();
+
+ SelectionDialog dialog = new InputDialog(toolbar.getShell(), Messages.DocumentationResourceEditor_EditResourceDialogTitle, Messages.DocumentationResourceEditor_EditResourceDialogMessage, (String) currentValue, null);
+
+ if (dialog.OK == dialog.open()) {
+ if (0 < dialog.getResult().length) {
+
+ String newValue = (String) dialog.getResult()[0];
+ if (newValue != currentValue && newValue != null) {
+ resources.remove(index);
+ resources.add(index, newValue);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the list of resources.
+ */
+ public void setResources(final List<String> resources) {
+ this.resources = resources;
+ refresh();
+ }
+
+ /**
+ * Gets the list of resources.
+ */
+ public List<String> getResources() {
+ return resources;
+ }
+
+ /**
+ * Refresh the resource list.
+ */
+ public void refresh() {
+ tableViewer.setInput(resources);
+ tableViewer.refresh();
+ }
+
+}
diff --git a/plugins/views/documentation/pom.xml b/plugins/views/documentation/pom.xml
new file mode 100644
index 00000000000..a5265eaba02
--- /dev/null
+++ b/plugins/views/documentation/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>org.eclipse.papyrus.views-documentation</artifactId>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.views</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <name>Papyrus Documentation View</name>
+ <description>The plug-ins comprising the Papyrus Documentation View.</description>
+
+ <modules>
+ <module>org.eclipse.papyrus.views.documentation</module>
+ </modules>
+</project>
diff --git a/plugins/views/pom.xml b/plugins/views/pom.xml
index 32ce34eb237..02e1d047a79 100644
--- a/plugins/views/pom.xml
+++ b/plugins/views/pom.xml
@@ -17,5 +17,6 @@
<module>validation</module>
<module>org.eclipse.papyrus.views.search</module>
<module>references</module>
+ <module>documentation</module>
</modules>
</project>

Back to the top