diff options
Diffstat (limited to 'plugins/views/properties')
227 files changed, 18497 insertions, 7 deletions
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.classpath b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.classpath new file mode 100644 index 00000000000..74056ab23ec --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.project b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.project new file mode 100644 index 00000000000..14d1d43347d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.project @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.views.properties.model.xwt</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.m2m.qvt.oml.project.QVTOBuilder</name> + <arguments> + <dictionary> + <key>src_container</key> + <value>Transformation</value> + </dictionary> + </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>ignore.missing.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.m2m.qvt.oml.project.QVTONature</nature> + <nature>org.eclipse.oomph.version.VersionNature</nature> + <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> + </natures> +</projectDescription> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.jdt.core.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..410244d65a6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.jdt.ui.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.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/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.m2m.qvt.oml.mmodel.urimap b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.m2m.qvt.oml.mmodel.urimap new file mode 100644 index 00000000000..8fb2b8eb4eb --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.m2m.qvt.oml.mmodel.urimap @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="ASCII"?>
+<uriMap:MappingContainer xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uriMap="http:///www.eclipse.org/m2m/qvt/oml/MModelUriMap/1.0.0">
+ <mapping sourceURI="http://www.eclipse.org/papyrus/xwt/XML" targetURI="platform:/resource/org.eclipse.papyrus.customization.properties.model.xwt/model/xml.ecore"/>
+</uriMap:MappingContainer>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.pde.api.tools.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..23fb95e120f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/.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/properties/org.eclipse.papyrus.views.properties.model.xwt/META-INF/MANIFEST.MF b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..821ea99b359 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.views.properties.model.xwt.resource, + org.eclipse.papyrus.views.properties.model.xwt.xwtxml, + org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl, + org.eclipse.papyrus.views.properties.model.xwt.xwtxml.util +Require-Bundle: org.eclipse.m2m.qvt.oml;bundle-version="[3.6.0,4.0.0)", + org.eclipse.papyrus.views.properties;bundle-version="[3.0.0,4.0.0)", + org.eclipse.wst.xml.core;bundle-version="[1.1.0,2.0.0)", + org.eclipse.m2m.qvt.oml.project;bundle-version="[3.6.0,4.0.0)", + com.ibm.icu +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Bundle-Version: 2.0.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-Activator: org.eclipse.papyrus.views.properties.model.xwt.Activator +Bundle-ManifestVersion: 2 +Bundle-Description: %pluginDescription +Bundle-SymbolicName: org.eclipse.papyrus.views.properties.model.xwt;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/OSGI-INF/l10n/bundle.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..ee4f0e575f2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,3 @@ +#Properties file for org.eclipse.papyrus.customization.properties.model.xwt
+Bundle-Name = Papyrus properties XWT Projectors
+Bundle-Vendor = Eclipse Modeling Project
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/UIToXML.qvto b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/UIToXML.qvto new file mode 100644 index 00000000000..c84c2640efb --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/UIToXML.qvto @@ -0,0 +1,217 @@ +modeltype XML uses "http://www.eclipse.org/papyrus/xwt/XML"; +modeltype UI uses "http://www.eclipse.org/papyrus/properties/ui/0.9"; +modeltype Environment uses "http://www.eclipse.org/papyrus/properties/environment/0.9"; +modeltype Context uses "http://www.eclipse.org/papyrus/properties/contexts/0.9"; + +transformation UIToXML(in ui : UI, out xml : XML); + +-- Adds the given namespace to the widget's root composite +query addNamespace(namespace : Environment::Namespace, component : UI::UIComponent){ + var rootComposite := component.findRootComposite(); + if namespace.oclIsUndefined() then + return + endif; + + var nsName := namespace.name; + var root := rootComposite.map toRoot(); + + if not root.namespaces->exists(e | e.name = nsName) then + root.namespaces := root.namespaces->including(namespace.map toNamespace()) + endif; +} + +query UI::UIComponent::findRootComposite() : UI::CompositeWidget{ + return + if self.container().oclIsUndefined() then + self.oclAsType(UI::CompositeWidget) + else + self.container().oclAsType(UI::UIComponent).findRootComposite() + endif; +} + +main() { + ui.rootObjects()[CompositeWidget]->map toRoot() +} + +mapping UI::Element::toXML() : XML::Node + disjuncts Layout::toLayoutXML, Widget::toAbstractWidgetXML, + ValueAttribute::toAttributeXML, ReferenceAttribute::toReferenceXML, + ValueAttribute::toNamespace{ +} + +mapping Layout::toLayoutXML() : XML::Element{ + name := self.container().oclAsType(UIComponent).getName()+".layout"; + children := self.map toLayout(); + addNamespace(self.layoutType.namespace, self); +} + +mapping Layout::toLayout() : XML::Element { + name := self.getName(); + children := self.attributes->map toXML(); +} + +mapping Widget::toAbstractWidgetXML() : XML::Element + disjuncts CompositeWidget::toCompositeXML, StandardWidget::toStandardWidgetXML, + PropertyEditor::toEditorXML, UnknownComponent::toComponentXML{ +} + +abstract mapping Widget::toWidgetXML() : XML::Element { + name := self.getName(); +} + +mapping CompositeWidget::toRoot() : XML::Root { + name := self.getName(); + + namespaces := self.attributes->select(e | e.isNamespace()).oclAsType(UI::ValueAttribute)->map toNamespace(); + + var theChildren : Sequence(XML::Node) := Sequence{}; + + theChildren := self.attributes->select(e | not e.isNamespace())->map toXML(); + theChildren := theChildren->union(Sequence{self.layout.map toXML()}); + theChildren := theChildren->union(self.widgets->map toXML()); + + children := theChildren->asOrderedSet(); + + addNamespace(self.widgetType.namespace, self); +} + +mapping CompositeWidget::toCompositeXML() : XML::Element inherits Widget::toWidgetXML{ + var subElements : Sequence(UI::Element) := Sequence{self.layout}; + subElements := subElements->union(self.attributes->asSequence()); + subElements := subElements->union(self.widgets->asSequence()); + + children := subElements->map toXML(); + + addNamespace(self.widgetType.namespace, self); +} + +mapping PropertyEditor::toEditorXML() : XML::Element inherits Widget::toWidgetXML { + var subElements : OrderedSet(UI::Element) := self.attributes; + + children := (self.attributes->map toXML())->including(self._property.map toXML()); //TODO : self._property may be null, which may crash the transformation ? + if not self.attributes->exists(e | e.name = 'input') then + children := children->including(createAttribute("input", "{Binding}")) + endif; + + if self.readOnly then + children := children->including(createAttribute("readOnly", "true")) + endif; + if not self.showLabel then + children := children->including(createAttribute("showLabel", "false")) + endif; + if not self.customLabel.oclIsUndefined() and self.customLabel <> '' then + children := children->including(createAttribute("customLabel", self.customLabel)) + endif; + + addNamespace(self.widgetType.namespace, self); +} + +query createAttribute(name : String, value : String) : XML::Attribute{ + var attribute := object XML::Attribute { + }; + + attribute.name := name; + attribute.value := value; + + return attribute; +} + +mapping StandardWidget::toStandardWidgetXML() : XML::Element inherits Widget::toWidgetXML { + children := self.attributes->map toXML(); + addNamespace(self.widgetType.namespace, self); +} + +mapping UnknownComponent::toComponentXML() : XML::Element inherits Widget::toWidgetXML{ + children := self.attributes->map toXML(); +} + +mapping Property::toXML() : XML::Attribute { + name := "property"; + value := self.contextElement.getQualifiedName()+":"+self.name; +} + +mapping UnknownProperty::toXML() : XML::Attribute { + name := "property"; + value := self.name; +} + +query DataContextElement::getQualifiedName() : String { + if self.package.oclIsUndefined() then + return self.name + else + return self.package.getQualifiedName()+":"+self.name + endif; + + return ""; +} + +query WidgetAttribute::isNamespace() : Boolean { + var res := false; + if self.oclIsKindOf(UI::ValueAttribute) then + res := self.name = "xmlns" or self.name.startsWith("xmlns:") + endif; + + return res; +} + +mapping ValueAttribute::toAttributeXML() : Attribute{ + name := self.name; + value := self.value; +} + +mapping ValueAttribute::toNamespace() : Namespace{ + name := if self.name = 'xmlns' then '' else self.name.substring('xmlns:'.length()+1, self.name.length()) endif; + value := self.value; +} + +mapping Environment::Namespace::toNamespace() : XML::Namespace { + name := self.name; + value := self.prefix+':'+self.value; +} + +mapping ReferenceAttribute::toReferenceXML() : XML::Element { + name := self.container().oclAsType(UIComponent).getName()+"."+self.name; + children := self.value.map toXML(); +} + +abstract query UI::UIComponent::getName() : String{ + return "abstract"; +} + +query getName(namespace : Environment::Namespace, className : String) : String{ + if className.oclIsUndefined() then { + return 'ppe:InvalidWidget' + } endif; + + var prefixedName := + if not namespace.oclIsUndefined() then + namespace.name + ':' + else + '' + endif + + className; + + return prefixedName; +} + +query Layout::getName() : String { + if self.layoutType.oclIsUndefined() then return 'ppel:PropertiesLayout' endif; + return getName(self.layoutType.namespace, self.layoutType.widgetClass); +} + +query UI::CompositeWidget::getName() : String { + if self.widgetType.oclIsUndefined() then return 'Composite' endif; + return getName(self.widgetType.namespace, self.widgetType.widgetClass); +} + +query UI::StandardWidget::getName() : String { + return getName(self.widgetType.namespace, self.widgetType.widgetClass); +} + +query UI::PropertyEditor::getName() : String { + return getName(self.widgetType.namespace, self.widgetType.widgetClass); +} + +query UI::UnknownComponent::getName() : String { + return self.typeName; +}
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/XMLToUI.qvto b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/XMLToUI.qvto new file mode 100644 index 00000000000..4622d426385 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/Transformation/XMLToUI.qvto @@ -0,0 +1,254 @@ +modeltype XML uses "http://www.eclipse.org/papyrus/xwt/XML"; +modeltype UI uses "http://www.eclipse.org/papyrus/properties/ui/0.9"; +modeltype PropertiesRoot uses "http://www.eclipse.org/papyrus/properties/root"; +modeltype Context uses "http://www.eclipse.org/papyrus/properties/contexts/0.9"; +modeltype Environment uses "http://www.eclipse.org/papyrus/properties/environment/0.9"; + +transformation XMLToUI(in xml : XML, in root : PropertiesRoot, in ctx : Context, out ui : UI); + +main() { + xml.rootObjects()[Node]->map toUIElement(); +} + +mapping Node::toAttribute() : WidgetAttribute + disjuncts + Namespace::toValueAttribute, + Attribute::toValueAttribute, + XML::Element::toReferenceAttribute{ +} + +mapping Attribute::toValueAttribute() : ValueAttribute + when {not self.isProperty()} { + result.name := self.name; + result.value := self.value; +} + +query Attribute::isProperty() : Boolean { + return self.parent.isPropertyEditor() and self.name = "property"; +} + +mapping XML::Namespace::toValueAttribute() : ValueAttribute{ + + result.name := if self.name.oclIsUndefined() or self.name = "" + then "xmlns" + else "xmlns:"+self.name + endif; + + result.value := self.value; +} + +//layout is a ReferenceAttribute but is computed differently +mapping XML::Element::toReferenceAttribute() : ReferenceAttribute + when {self.isReferenceAttribute() and not self.isLayoutAttribute()}{ + result.name := self.getName(); + result.value := self.children->select(e | e.oclIsKindOf(XML::Element)) + ->first().oclAsType(XML::Element).map toUIComponent(); +} + +query XML::Element::isReferenceAttribute() : Boolean { + return self.name.startsWith(self.parent.name+"."); +} + +query XML::Element::getName() : String { + var parentPrefix := self.parent.name+"."; + if self.name.startsWith(parentPrefix) then + return self.name.replace(parentPrefix, "") + endif; + + return self.name; +} + +mapping Node::toUIElement() : UI::Element + disjuncts + XML::Element::toUIComponent, + XML::Node::toAttribute { +} + +mapping XML::Element::toUIComponent() : UIComponent + disjuncts + XML::Element::toWidget, + XML::Element::toLayout{ +} + +mapping XML::Element::toWidget() : Widget + disjuncts + XML::Element::toComposite, + XML::Element::toPropertyEditor, + XML::Element::toStandardWidget, + XML::Element::toUnknownComponent{ +} + +abstract mapping XML::Element::toAbstractUIComponent() : UIComponent { + var allChildren : Set(Node) := self.children; + if self.oclIsKindOf(Root) then + allChildren := allChildren->union(self.oclAsType(Root).namespaces) + endif; + + attributes := allChildren->map toAttribute(); +} + +mapping XML::Element::toComposite() : CompositeWidget inherits XML::Element::toAbstractUIComponent + when {self.isComposite()} { + widgetType := self.getCompositeType(); + + var elements := self.children->select(e | e.oclIsKindOf(XML::Element)) + .oclAsType(XML::Element); + + layout := elements->select(e | e.isLayoutAttribute()).children + ->select(e | e.oclIsKindOf(XML::Element)).oclAsType(XML::Element) + ->select(e | e.isLayout())->first().map toLayout(); + widgets := elements->select(e | e.isWidget())->map toWidget(); +} + +mapping XML::Element::toLayout() : Layout inherits XML::Element::toAbstractUIComponent + when {self.isLayout()} { + layoutType := self.getLayoutType(); +} + +mapping XML::Element::toStandardWidget() : StandardWidget inherits XML::Element::toAbstractUIComponent + when {self.isStandardWidget() and not self.getWidgetType().oclIsUndefined()}{ + widgetType := self.getWidgetType(); +} + +mapping XML::Element::toUnknownComponent() : UnknownComponent inherits XML::Element::toAbstractUIComponent + when {self.getWidgetType().oclIsUndefined()}{ + typeName := self.name; +} + +mapping XML::Element::toPropertyEditor() : PropertyEditor inherits XML::Element::toAbstractUIComponent + when {self.isPropertyEditor()}{ + widgetType := self.getPropertyEditorType(); + var prop := findProperty(self.getPropertyName()); + if prop.oclIsUndefined() then + prop := object UnknownProperty { + name := self.getPropertyName(); + } + endif; + _property := prop; + + //Remove the readOnly and showLabel Attributes, as they are actual properties (i.e. not generic) in the UI Model + //Avoids dupplication of the attribute + var readOnlyAttribute := result.attributes->any(e | e.name = "readOnly"); + var showLabelAttribute := result.attributes->any(e | e.name = "showLabel"); + var customLabelAttribute := result.attributes->any(e | e.name = "customLabel"); + result.attributes := result.attributes->excluding(readOnlyAttribute)->excluding(showLabelAttribute)->excluding(customLabelAttribute); + + unresolvedProperty := prop.oclAsType(UnknownProperty); + readOnly := self.children->exists(e | e.oclIsKindOf(XML::Attribute) and e.oclAsType(XML::Attribute).name = 'readOnly' and e.oclAsType(XML::Attribute).value='true'); + showLabel := not self.children->exists(e | e.oclIsKindOf(XML::Attribute) and e.oclAsType(XML::Attribute).name = 'showLabel' and e.oclAsType(XML::Attribute).value='false'); + customLabel := self.children->any(e | e.oclIsKindOf(XML::Attribute) and e.oclAsType(XML::Attribute).name = 'customLabel').oclAsType(XML::Attribute).value; +} + +query XML::Element::getPropertyName() : String { + var attributes := self.children->select(e | e.oclIsKindOf(Attribute)).oclAsType(Attribute); + var propertyName := attributes->any(e | e.name = "property").value; + + return propertyName; +} + +query findProperty(propertyName : String) : Property { + var prefix := propertyName.substring(1, propertyName.indexOf(":")-1); + var allContexts := ctx.rootObjects()[Context::Context]; + var validDataContexts := allContexts.dataContexts->select(f | f.name = prefix); + var prop := findProperty(propertyName.substring(propertyName.indexOf(":")+1, propertyName.size()), validDataContexts->any(e | true)); + return prop; +} + +query findProperty(propertyName : String, element : DataContextElement) : Property{ + if propertyName.indexOf(":") > 0 + then { + var packageName := propertyName.substring(1, propertyName.indexOf(":")-1); + var propertyNameSuffix := propertyName.substring(propertyName.indexOf(":")+1, propertyName.size()); + var package := element.oclAsType(DataContextPackage).elements->any(e | e.name = packageName); + return findProperty(propertyNameSuffix, package); + } else { + return element.properties->any(e | e.name = propertyName); + } endif; + + return null; +} + +query XML::Element::match(widgetClass : String, namespace : Environment::Namespace) : Boolean{ + return self.name.getSimpleName() = widgetClass + and ((self.name.getNamespace() = '' and namespace.oclIsUndefined()) + or self.name.getNamespace() = namespace.name + ) +} + +query XML::Element::isWidget() : Boolean { + return not (self.isLayout() or self.isReferenceAttribute()); +} + +query XML::Element::isComposite() : Boolean { + var composites = root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.compositeWidgetTypes; + return composites->exists(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::isStandardWidget() : Boolean { + var stdWidgets := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.widgetTypes; + return stdWidgets->exists(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::isPropertyEditor() : Boolean { + var editors := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.propertyEditorTypes; + return editors->exists(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::isLayout() : Boolean { + var layouts := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.layoutTypes; + return layouts->exists(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::isLayoutAttribute() : Boolean { + var res := self.name = self.parent.name+".layout"; + return res; +} + +/* + Returns the simple name from the given String + The namespace is truncated + ppe:StringEditor -> StringEditor +*/ +query String::getSimpleName() : String { + var simpleName := if self.indexOf(':') < 1 then + self + else + self.substring(self.indexOf(':')+1, self.length()) + endif; + + return simpleName; +} +/* + Returns the namespace prefix from the given String, if any + ppe:StringEditor -> ppe +*/ +query String::getNamespace() : String { + var namespace := if self.indexOf(':') < 1 then + '' + else + self.substring(1, self.indexOf(':') - 1) + endif; + + return namespace; +} + +query XML::Element::getWidgetType() : StandardWidgetType { + var stdWidgets := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.widgetTypes; + return stdWidgets->any(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::getCompositeType() : CompositeWidgetType { + var composites := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.compositeWidgetTypes; + return composites->any(e | self.match(e.widgetClass, e.namespace)); +} + +query XML::Element::getPropertyEditorType() : PropertyEditorType { + var editors := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.propertyEditorTypes; + var type := editors->any(e | self.match(e.widgetClass, e.namespace)); + return type; +} + +query XML::Element::getLayoutType() : LayoutType { + var layouts := root.rootObjects()[PropertiesRoot::PropertiesRoot].environments.layoutTypes; + return layouts->any(e | self.match(e.widgetClass, e.namespace)); +}
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/about.html b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/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 ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/build.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/build.properties new file mode 100644 index 00000000000..eb0549dd11b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/build.properties @@ -0,0 +1,13 @@ +# +#Mon Sep 12 09:30:05 CEST 2011 +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + Transformation/,\ + OSGI-INF/,\ + about.html +output..=bin/ +src.includes = about.html +source.. = src/,\ + src-gen/ +bin..=bin/ diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.ecore b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.ecore new file mode 100644 index 00000000000..5d171fd3645 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.ecore @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="xwtxml" nsURI="http://www.eclipse.org/papyrus/xwt/XML" nsPrefix="xwtxml">
+ <eClassifiers xsi:type="ecore:EClass" name="Node" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" unique="false"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" ordered="false"
+ eType="#//Element" eOpposite="#//Element/children"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Attribute" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" ordered="false"
+ unique="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Text" eSuperTypes="#//Node"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Element" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//Node" containment="true" eOpposite="#//Node/parent"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Root" eSuperTypes="#//Element">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="namespaces" upperBound="-1"
+ eType="#//Namespace" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dtd" eType="#//DocumentTypeDeclaration"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="leadingPIs" upperBound="-1"
+ eType="#//ProcessingInstruction" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Namespace" eSuperTypes="#//Attribute"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Comment" eSuperTypes="#//Node"/>
+ <eClassifiers xsi:type="ecore:EClass" name="DocumentTypeDeclaration" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="publicID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="systemID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CDATA" eSuperTypes="#//Text"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ProcessingInstruction" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="data" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.genmodel b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.genmodel new file mode 100644 index 00000000000..54c241238a5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/models/xml.genmodel @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.views.properties.model.xwt/src-gen"
+ editDirectory="/org.eclipse.papyrus.views.properties.model.xwt.edit/src-gen" editorDirectory="/org.eclipse.papyrus.views.properties.model.xwt.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.views.properties.model.xwt" modelName="Xml"
+ editPluginClass="org.eclipse.papyrus.views.properties.model.xwt.xwtxml.provider.XmlEditPlugin"
+ editorPluginClass="org.eclipse.papyrus.views.properties.model.xwt.xwtxml.presentation.XmlEditorPlugin"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="/org.eclipse.papyrus.customization.properties.model.xwt.tests/src-gen"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
+ editPluginID="org.eclipse.papyrus.views.properties.model.xwt.edit" editorPluginID="org.eclipse.papyrus.views.properties.model.xwt.editor"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>xml.ecore</foreignModel>
+ <genPackages prefix="Xwtxml" basePackage="org.eclipse.papyrus.customization.properties.model.xwt"
+ disposableProviderFactory="true" ecorePackage="xml.ecore#/">
+ <genClasses image="false" ecoreClass="xml.ecore#//Node">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xml.ecore#//Node/name"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference xml.ecore#//Node/parent"/>
+ </genClasses>
+ <genClasses ecoreClass="xml.ecore#//Attribute">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xml.ecore#//Attribute/value"/>
+ </genClasses>
+ <genClasses ecoreClass="xml.ecore#//Text"/>
+ <genClasses ecoreClass="xml.ecore#//Element">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference xml.ecore#//Element/children"/>
+ </genClasses>
+ <genClasses ecoreClass="xml.ecore#//Root">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference xml.ecore#//Root/namespaces"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference xml.ecore#//Root/dtd"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference xml.ecore#//Root/leadingPIs"/>
+ </genClasses>
+ <genClasses ecoreClass="xml.ecore#//Namespace"/>
+ <genClasses ecoreClass="xml.ecore#//Comment"/>
+ <genClasses ecoreClass="xml.ecore#//DocumentTypeDeclaration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xml.ecore#//DocumentTypeDeclaration/publicID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xml.ecore#//DocumentTypeDeclaration/systemID"/>
+ </genClasses>
+ <genClasses ecoreClass="xml.ecore#//CDATA"/>
+ <genClasses ecoreClass="xml.ecore#//ProcessingInstruction">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute xml.ecore#//ProcessingInstruction/data"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.properties new file mode 100644 index 00000000000..c8f09daf30b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.properties @@ -0,0 +1,12 @@ +################################################################################# +# Copyright (c) 2015 CEA LIST. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation +##################################################################################) + +pluginDescription=This plug-in contains the EMF Projectors for XWT files. The XWT format is an xml-based format. In order to manipulate these files as EMF Models, we need an Injector to parse them, and an extractor to re-generate them from the modified EMF model.
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.xml new file mode 100644 index 00000000000..6f2d1209fee --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/plugin.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser class="org.eclipse.papyrus.views.properties.model.xwt.resource.XWTModelFactory" type="xwt">
+ </parser>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <file-association
+ content-type="org.eclipse.wst.xml.core.xmlsource"
+ file-extensions="xwt">
+ </file-association>
+ </extension>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated xml -->
+ <package
+ uri="http://www.eclipse.org/papyrus/xwt/XML"
+ class="org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage"
+ genModel="models/xml.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/pom.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/pom.xml new file mode 100644 index 00000000000..5fe338a3270 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>org.eclipse.papyrus.views-properties</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <artifactId>org.eclipse.papyrus.views.properties.model.xwt</artifactId> + <version>2.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Attribute.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Attribute.java new file mode 100644 index 00000000000..afa4a978424 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Attribute.java @@ -0,0 +1,63 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getAttribute()
+ * @model
+ * @generated
+ */
+public interface Attribute extends Node {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(String)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getAttribute_Value()
+ * @model unique="false" required="true" ordered="false"
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(String value);
+
+} // Attribute
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/CDATA.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/CDATA.java new file mode 100644 index 00000000000..2e9bdb13472 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/CDATA.java @@ -0,0 +1,29 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>CDATA</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getCDATA()
+ * @model
+ * @generated
+ */
+public interface CDATA extends Text {
+} // CDATA
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Comment.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Comment.java new file mode 100644 index 00000000000..9e8a08d0ae4 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Comment.java @@ -0,0 +1,29 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Comment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getComment()
+ * @model
+ * @generated
+ */
+public interface Comment extends Node {
+} // Comment
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/DocumentTypeDeclaration.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/DocumentTypeDeclaration.java new file mode 100644 index 00000000000..69b72638cc4 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/DocumentTypeDeclaration.java @@ -0,0 +1,92 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Document Type Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getPublicID <em>Public ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getSystemID <em>System ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getDocumentTypeDeclaration()
+ * @model
+ * @generated
+ */
+public interface DocumentTypeDeclaration extends Node {
+ /**
+ * Returns the value of the '<em><b>Public ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Public ID</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Public ID</em>' attribute.
+ * @see #setPublicID(String)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getDocumentTypeDeclaration_PublicID()
+ * @model
+ * @generated
+ */
+ String getPublicID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getPublicID <em>Public ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Public ID</em>' attribute.
+ * @see #getPublicID()
+ * @generated
+ */
+ void setPublicID(String value);
+
+ /**
+ * Returns the value of the '<em><b>System ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>System ID</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>System ID</em>' attribute.
+ * @see #setSystemID(String)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getDocumentTypeDeclaration_SystemID()
+ * @model
+ * @generated
+ */
+ String getSystemID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getSystemID <em>System ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>System ID</em>' attribute.
+ * @see #getSystemID()
+ * @generated
+ */
+ void setSystemID(String value);
+
+} // DocumentTypeDeclaration
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Element.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Element.java new file mode 100644 index 00000000000..50e748f4728 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Element.java @@ -0,0 +1,54 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element#getChildren <em>Children</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getElement()
+ * @model
+ * @generated
+ */
+public interface Element extends Node {
+ /**
+ * Returns the value of the '<em><b>Children</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Children</em>' containment reference list.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getElement_Children()
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent
+ * @model opposite="parent" containment="true"
+ * @generated
+ */
+ EList<Node> getChildren();
+
+} // Element
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Namespace.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Namespace.java new file mode 100644 index 00000000000..9bfcbc6ae48 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Namespace.java @@ -0,0 +1,29 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Namespace</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getNamespace()
+ * @model
+ * @generated
+ */
+public interface Namespace extends Attribute {
+} // Namespace
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Node.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Node.java new file mode 100644 index 00000000000..b5ae9e69299 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Node.java @@ -0,0 +1,95 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getNode()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Node extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getNode_Name()
+ * @model unique="false" required="true" ordered="false"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element#getChildren <em>Children</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' container reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Parent</em>' container reference.
+ * @see #setParent(Element)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getNode_Parent()
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element#getChildren
+ * @model opposite="children" transient="false" ordered="false"
+ * @generated
+ */
+ Element getParent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent <em>Parent</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(Element value);
+
+} // Node
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/ProcessingInstruction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/ProcessingInstruction.java new file mode 100644 index 00000000000..505dbef4b23 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/ProcessingInstruction.java @@ -0,0 +1,63 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Processing Instruction</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction#getData <em>Data</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getProcessingInstruction()
+ * @model
+ * @generated
+ */
+public interface ProcessingInstruction extends Node {
+ /**
+ * Returns the value of the '<em><b>Data</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Data</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Data</em>' attribute.
+ * @see #setData(String)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getProcessingInstruction_Data()
+ * @model required="true"
+ * @generated
+ */
+ String getData();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction#getData <em>Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Data</em>' attribute.
+ * @see #getData()
+ * @generated
+ */
+ void setData(String value);
+
+} // ProcessingInstruction
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Root.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Root.java new file mode 100644 index 00000000000..ef52ed208f7 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Root.java @@ -0,0 +1,98 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getNamespaces <em>Namespaces</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getDtd <em>Dtd</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getLeadingPIs <em>Leading PIs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getRoot()
+ * @model
+ * @generated
+ */
+public interface Root extends Element {
+ /**
+ * Returns the value of the '<em><b>Namespaces</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Namespaces</em>' containment reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Namespaces</em>' containment reference list.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getRoot_Namespaces()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Namespace> getNamespaces();
+
+ /**
+ * Returns the value of the '<em><b>Dtd</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Dtd</em>' containment reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Dtd</em>' containment reference.
+ * @see #setDtd(DocumentTypeDeclaration)
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getRoot_Dtd()
+ * @model containment="true"
+ * @generated
+ */
+ DocumentTypeDeclaration getDtd();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getDtd <em>Dtd</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Dtd</em>' containment reference.
+ * @see #getDtd()
+ * @generated
+ */
+ void setDtd(DocumentTypeDeclaration value);
+
+ /**
+ * Returns the value of the '<em><b>Leading PIs</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Leading PIs</em>' containment reference list isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Leading PIs</em>' containment reference list.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getRoot_LeadingPIs()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ProcessingInstruction> getLeadingPIs();
+
+} // Root
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Text.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Text.java new file mode 100644 index 00000000000..d100dff3af5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/Text.java @@ -0,0 +1,29 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Text</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#getText()
+ * @model
+ * @generated
+ */
+public interface Text extends Node {
+} // Text
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlFactory.java new file mode 100644 index 00000000000..8ecbb773c68 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlFactory.java @@ -0,0 +1,138 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage
+ * @generated
+ */
+public interface XwtxmlFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ XwtxmlFactory eINSTANCE = org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Attribute</em>'.
+ * @generated
+ */
+ Attribute createAttribute();
+
+ /**
+ * Returns a new object of class '<em>Text</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Text</em>'.
+ * @generated
+ */
+ Text createText();
+
+ /**
+ * Returns a new object of class '<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Element</em>'.
+ * @generated
+ */
+ Element createElement();
+
+ /**
+ * Returns a new object of class '<em>Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Root</em>'.
+ * @generated
+ */
+ Root createRoot();
+
+ /**
+ * Returns a new object of class '<em>Namespace</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Namespace</em>'.
+ * @generated
+ */
+ Namespace createNamespace();
+
+ /**
+ * Returns a new object of class '<em>Comment</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Comment</em>'.
+ * @generated
+ */
+ Comment createComment();
+
+ /**
+ * Returns a new object of class '<em>Document Type Declaration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Document Type Declaration</em>'.
+ * @generated
+ */
+ DocumentTypeDeclaration createDocumentTypeDeclaration();
+
+ /**
+ * Returns a new object of class '<em>CDATA</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>CDATA</em>'.
+ * @generated
+ */
+ CDATA createCDATA();
+
+ /**
+ * Returns a new object of class '<em>Processing Instruction</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Processing Instruction</em>'.
+ * @generated
+ */
+ ProcessingInstruction createProcessingInstruction();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ XwtxmlPackage getXwtxmlPackage();
+
+} // XwtxmlFactory
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlPackage.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlPackage.java new file mode 100644 index 00000000000..58c20df8a1c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/XwtxmlPackage.java @@ -0,0 +1,1144 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface XwtxmlPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "xwtxml";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/xwt/XML";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "xwtxml";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ XwtxmlPackage eINSTANCE = org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getNode()
+ * @generated
+ */
+ int NODE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE__PARENT = 1;
+
+ /**
+ * The number of structural features of the '<em>Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.AttributeImpl <em>Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.AttributeImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getAttribute()
+ * @generated
+ */
+ int ATTRIBUTE = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE__PARENT = NODE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE__VALUE = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ATTRIBUTE_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.TextImpl <em>Text</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.TextImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getText()
+ * @generated
+ */
+ int TEXT = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEXT__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEXT__PARENT = NODE__PARENT;
+
+ /**
+ * The number of structural features of the '<em>Text</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEXT_FEATURE_COUNT = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Text</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int TEXT_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ElementImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getElement()
+ * @generated
+ */
+ int ELEMENT = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ELEMENT__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ELEMENT__PARENT = NODE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ELEMENT__CHILDREN = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ELEMENT_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getRoot()
+ * @generated
+ */
+ int ROOT = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__NAME = ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__PARENT = ELEMENT__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__CHILDREN = ELEMENT__CHILDREN;
+
+ /**
+ * The feature id for the '<em><b>Namespaces</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__NAMESPACES = ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Dtd</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__DTD = ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Leading PIs</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT__LEADING_PIS = ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT_FEATURE_COUNT = ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of operations of the '<em>Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ROOT_OPERATION_COUNT = ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NamespaceImpl <em>Namespace</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NamespaceImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getNamespace()
+ * @generated
+ */
+ int NAMESPACE = 5;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NAMESPACE__NAME = ATTRIBUTE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NAMESPACE__PARENT = ATTRIBUTE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NAMESPACE__VALUE = ATTRIBUTE__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Namespace</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NAMESPACE_FEATURE_COUNT = ATTRIBUTE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Namespace</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NAMESPACE_OPERATION_COUNT = ATTRIBUTE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CommentImpl <em>Comment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CommentImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getComment()
+ * @generated
+ */
+ int COMMENT = 6;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COMMENT__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COMMENT__PARENT = NODE__PARENT;
+
+ /**
+ * The number of structural features of the '<em>Comment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COMMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Comment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int COMMENT_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl <em>Document Type Declaration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getDocumentTypeDeclaration()
+ * @generated
+ */
+ int DOCUMENT_TYPE_DECLARATION = 7;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION__PARENT = NODE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Public ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION__PUBLIC_ID = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>System ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION__SYSTEM_ID = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Document Type Declaration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION_FEATURE_COUNT = NODE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Document Type Declaration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_TYPE_DECLARATION_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CDATAImpl <em>CDATA</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CDATAImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getCDATA()
+ * @generated
+ */
+ int CDATA = 8;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CDATA__NAME = TEXT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CDATA__PARENT = TEXT__PARENT;
+
+ /**
+ * The number of structural features of the '<em>CDATA</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CDATA_FEATURE_COUNT = TEXT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>CDATA</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int CDATA_OPERATION_COUNT = TEXT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ProcessingInstructionImpl <em>Processing Instruction</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ProcessingInstructionImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getProcessingInstruction()
+ * @generated
+ */
+ int PROCESSING_INSTRUCTION = 9;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROCESSING_INSTRUCTION__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROCESSING_INSTRUCTION__PARENT = NODE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Data</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROCESSING_INSTRUCTION__DATA = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Processing Instruction</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROCESSING_INSTRUCTION_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Processing Instruction</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int PROCESSING_INSTRUCTION_OPERATION_COUNT = NODE_OPERATION_COUNT + 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Node</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node
+ * @generated
+ */
+ EClass getNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getName()
+ * @see #getNode()
+ * @generated
+ */
+ EAttribute getNode_Name();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node#getParent()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_Parent();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Attribute</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute
+ * @generated
+ */
+ EClass getAttribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute#getValue()
+ * @see #getAttribute()
+ * @generated
+ */
+ EAttribute getAttribute_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text <em>Text</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Text</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text
+ * @generated
+ */
+ EClass getText();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Element</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element
+ * @generated
+ */
+ EClass getElement();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element#getChildren <em>Children</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element#getChildren()
+ * @see #getElement()
+ * @generated
+ */
+ EReference getElement_Children();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Root</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root
+ * @generated
+ */
+ EClass getRoot();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getNamespaces <em>Namespaces</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Namespaces</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getNamespaces()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_Namespaces();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getDtd <em>Dtd</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference '<em>Dtd</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getDtd()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_Dtd();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getLeadingPIs <em>Leading PIs</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Leading PIs</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root#getLeadingPIs()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_LeadingPIs();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace <em>Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Namespace</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace
+ * @generated
+ */
+ EClass getNamespace();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment <em>Comment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Comment</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment
+ * @generated
+ */
+ EClass getComment();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration <em>Document Type Declaration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Document Type Declaration</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration
+ * @generated
+ */
+ EClass getDocumentTypeDeclaration();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getPublicID <em>Public ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Public ID</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getPublicID()
+ * @see #getDocumentTypeDeclaration()
+ * @generated
+ */
+ EAttribute getDocumentTypeDeclaration_PublicID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getSystemID <em>System ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>System ID</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration#getSystemID()
+ * @see #getDocumentTypeDeclaration()
+ * @generated
+ */
+ EAttribute getDocumentTypeDeclaration_SystemID();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA <em>CDATA</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>CDATA</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA
+ * @generated
+ */
+ EClass getCDATA();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction <em>Processing Instruction</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Processing Instruction</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction
+ * @generated
+ */
+ EClass getProcessingInstruction();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction#getData <em>Data</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Data</em>'.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction#getData()
+ * @see #getProcessingInstruction()
+ * @generated
+ */
+ EAttribute getProcessingInstruction_Data();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ XwtxmlFactory getXwtxmlFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getNode()
+ * @generated
+ */
+ EClass NODE = eINSTANCE.getNode();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NODE__NAME = eINSTANCE.getNode_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE__PARENT = eINSTANCE.getNode_Parent();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.AttributeImpl <em>Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.AttributeImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getAttribute()
+ * @generated
+ */
+ EClass ATTRIBUTE = eINSTANCE.getAttribute();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ATTRIBUTE__VALUE = eINSTANCE.getAttribute_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.TextImpl <em>Text</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.TextImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getText()
+ * @generated
+ */
+ EClass TEXT = eINSTANCE.getText();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ElementImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getElement()
+ * @generated
+ */
+ EClass ELEMENT = eINSTANCE.getElement();
+
+ /**
+ * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ELEMENT__CHILDREN = eINSTANCE.getElement_Children();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getRoot()
+ * @generated
+ */
+ EClass ROOT = eINSTANCE.getRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Namespaces</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ROOT__NAMESPACES = eINSTANCE.getRoot_Namespaces();
+
+ /**
+ * The meta object literal for the '<em><b>Dtd</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ROOT__DTD = eINSTANCE.getRoot_Dtd();
+
+ /**
+ * The meta object literal for the '<em><b>Leading PIs</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ROOT__LEADING_PIS = eINSTANCE.getRoot_LeadingPIs();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NamespaceImpl <em>Namespace</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NamespaceImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getNamespace()
+ * @generated
+ */
+ EClass NAMESPACE = eINSTANCE.getNamespace();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CommentImpl <em>Comment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CommentImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getComment()
+ * @generated
+ */
+ EClass COMMENT = eINSTANCE.getComment();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl <em>Document Type Declaration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getDocumentTypeDeclaration()
+ * @generated
+ */
+ EClass DOCUMENT_TYPE_DECLARATION = eINSTANCE.getDocumentTypeDeclaration();
+
+ /**
+ * The meta object literal for the '<em><b>Public ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute DOCUMENT_TYPE_DECLARATION__PUBLIC_ID = eINSTANCE.getDocumentTypeDeclaration_PublicID();
+
+ /**
+ * The meta object literal for the '<em><b>System ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute DOCUMENT_TYPE_DECLARATION__SYSTEM_ID = eINSTANCE.getDocumentTypeDeclaration_SystemID();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CDATAImpl <em>CDATA</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.CDATAImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getCDATA()
+ * @generated
+ */
+ EClass CDATA = eINSTANCE.getCDATA();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ProcessingInstructionImpl <em>Processing Instruction</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ProcessingInstructionImpl
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.XwtxmlPackageImpl#getProcessingInstruction()
+ * @generated
+ */
+ EClass PROCESSING_INSTRUCTION = eINSTANCE.getProcessingInstruction();
+
+ /**
+ * The meta object literal for the '<em><b>Data</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute PROCESSING_INSTRUCTION__DATA = eINSTANCE.getProcessingInstruction_Data();
+
+ }
+
+} // XwtxmlPackage
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/AttributeImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/AttributeImpl.java new file mode 100644 index 00000000000..484abc9659b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/AttributeImpl.java @@ -0,0 +1,187 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.AttributeImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class AttributeImpl extends NodeImpl implements Attribute {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AttributeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.ATTRIBUTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.ATTRIBUTE__VALUE, oldValue, value));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.ATTRIBUTE__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.ATTRIBUTE__VALUE:
+ setValue((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ATTRIBUTE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ATTRIBUTE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // AttributeImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CDATAImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CDATAImpl.java new file mode 100644 index 00000000000..958e6e6544e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CDATAImpl.java @@ -0,0 +1,52 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>CDATA</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CDATAImpl extends TextImpl implements CDATA {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CDATAImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.CDATA;
+ }
+
+} // CDATAImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CommentImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CommentImpl.java new file mode 100644 index 00000000000..142b64c2f2c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/CommentImpl.java @@ -0,0 +1,52 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Comment</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CommentImpl extends NodeImpl implements Comment {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected CommentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.COMMENT;
+ }
+
+} // CommentImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/DocumentTypeDeclarationImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/DocumentTypeDeclarationImpl.java new file mode 100644 index 00000000000..7b254856dbf --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/DocumentTypeDeclarationImpl.java @@ -0,0 +1,248 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Document Type Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl#getPublicID <em>Public ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.DocumentTypeDeclarationImpl#getSystemID <em>System ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DocumentTypeDeclarationImpl extends NodeImpl implements DocumentTypeDeclaration {
+ /**
+ * The default value of the '{@link #getPublicID() <em>Public ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPublicID()
+ * @generated
+ * @ordered
+ */
+ protected static final String PUBLIC_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPublicID() <em>Public ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getPublicID()
+ * @generated
+ * @ordered
+ */
+ protected String publicID = PUBLIC_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSystemID() <em>System ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getSystemID()
+ * @generated
+ * @ordered
+ */
+ protected static final String SYSTEM_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSystemID() <em>System ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getSystemID()
+ * @generated
+ * @ordered
+ */
+ protected String systemID = SYSTEM_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected DocumentTypeDeclarationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.DOCUMENT_TYPE_DECLARATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getPublicID() {
+ return publicID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setPublicID(String newPublicID) {
+ String oldPublicID = publicID;
+ publicID = newPublicID;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__PUBLIC_ID, oldPublicID, publicID));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getSystemID() {
+ return systemID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSystemID(String newSystemID) {
+ String oldSystemID = systemID;
+ systemID = newSystemID;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__SYSTEM_ID, oldSystemID, systemID));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__PUBLIC_ID:
+ return getPublicID();
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__SYSTEM_ID:
+ return getSystemID();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__PUBLIC_ID:
+ setPublicID((String) newValue);
+ return;
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__SYSTEM_ID:
+ setSystemID((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__PUBLIC_ID:
+ setPublicID(PUBLIC_ID_EDEFAULT);
+ return;
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__SYSTEM_ID:
+ setSystemID(SYSTEM_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__PUBLIC_ID:
+ return PUBLIC_ID_EDEFAULT == null ? publicID != null : !PUBLIC_ID_EDEFAULT.equals(publicID);
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION__SYSTEM_ID:
+ return SYSTEM_ID_EDEFAULT == null ? systemID != null : !SYSTEM_ID_EDEFAULT.equals(systemID);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (publicID: ");
+ result.append(publicID);
+ result.append(", systemID: ");
+ result.append(systemID);
+ result.append(')');
+ return result.toString();
+ }
+
+} // DocumentTypeDeclarationImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ElementImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ElementImpl.java new file mode 100644 index 00000000000..36128ebfcf5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ElementImpl.java @@ -0,0 +1,184 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ElementImpl#getChildren <em>Children</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ElementImpl extends NodeImpl implements Element {
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<Node> children;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<Node> getChildren() {
+ if (children == null) {
+ children = new EObjectContainmentWithInverseEList<Node>(Node.class, this, XwtxmlPackage.ELEMENT__CHILDREN, XwtxmlPackage.NODE__PARENT);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getChildren()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ return ((InternalEList<?>) getChildren()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ return getChildren();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends Node>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ getChildren().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ELEMENT__CHILDREN:
+ return children != null && !children.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ElementImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NamespaceImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NamespaceImpl.java new file mode 100644 index 00000000000..678f3f768bf --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NamespaceImpl.java @@ -0,0 +1,52 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Namespace</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class NamespaceImpl extends AttributeImpl implements Namespace {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NamespaceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.NAMESPACE;
+ }
+
+} // NamespaceImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NodeImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NodeImpl.java new file mode 100644 index 00000000000..9e91da1fcd6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/NodeImpl.java @@ -0,0 +1,305 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.NodeImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class NodeImpl extends MinimalEObjectImpl.Container implements Node {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NodeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.NODE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.NODE__NAME, oldName, name));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Element getParent() {
+ if (eContainerFeatureID() != XwtxmlPackage.NODE__PARENT) {
+ return null;
+ }
+ return (Element) eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetParent(Element newParent, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newParent, XwtxmlPackage.NODE__PARENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setParent(Element newParent) {
+ if (newParent != eInternalContainer() || (eContainerFeatureID() != XwtxmlPackage.NODE__PARENT && newParent != null)) {
+ if (EcoreUtil.isAncestor(this, newParent)) {
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ }
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null) {
+ msgs = eBasicRemoveFromContainer(msgs);
+ }
+ if (newParent != null) {
+ msgs = ((InternalEObject) newParent).eInverseAdd(this, XwtxmlPackage.ELEMENT__CHILDREN, Element.class, msgs);
+ }
+ msgs = basicSetParent(newParent, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ }
+ else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.NODE__PARENT, newParent, newParent));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__PARENT:
+ if (eInternalContainer() != null) {
+ msgs = eBasicRemoveFromContainer(msgs);
+ }
+ return basicSetParent((Element) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__PARENT:
+ return basicSetParent(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case XwtxmlPackage.NODE__PARENT:
+ return eInternalContainer().eInverseRemove(this, XwtxmlPackage.ELEMENT__CHILDREN, Element.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__NAME:
+ return getName();
+ case XwtxmlPackage.NODE__PARENT:
+ return getParent();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__NAME:
+ setName((String) newValue);
+ return;
+ case XwtxmlPackage.NODE__PARENT:
+ setParent((Element) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case XwtxmlPackage.NODE__PARENT:
+ setParent((Element) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.NODE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case XwtxmlPackage.NODE__PARENT:
+ return getParent() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} // NodeImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ProcessingInstructionImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ProcessingInstructionImpl.java new file mode 100644 index 00000000000..98293843398 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/ProcessingInstructionImpl.java @@ -0,0 +1,187 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Processing Instruction</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.ProcessingInstructionImpl#getData <em>Data</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProcessingInstructionImpl extends NodeImpl implements ProcessingInstruction {
+ /**
+ * The default value of the '{@link #getData() <em>Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected static final String DATA_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getData() <em>Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getData()
+ * @generated
+ * @ordered
+ */
+ protected String data = DATA_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProcessingInstructionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.PROCESSING_INSTRUCTION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getData() {
+ return data;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setData(String newData) {
+ String oldData = data;
+ data = newData;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.PROCESSING_INSTRUCTION__DATA, oldData, data));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.PROCESSING_INSTRUCTION__DATA:
+ return getData();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.PROCESSING_INSTRUCTION__DATA:
+ setData((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.PROCESSING_INSTRUCTION__DATA:
+ setData(DATA_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.PROCESSING_INSTRUCTION__DATA:
+ return DATA_EDEFAULT == null ? data != null : !DATA_EDEFAULT.equals(data);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (data: ");
+ result.append(data);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ProcessingInstructionImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/RootImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/RootImpl.java new file mode 100644 index 00000000000..4743defc6b5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/RootImpl.java @@ -0,0 +1,292 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl#getNamespaces <em>Namespaces</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl#getDtd <em>Dtd</em>}</li>
+ * <li>{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl.RootImpl#getLeadingPIs <em>Leading PIs</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RootImpl extends ElementImpl implements Root {
+ /**
+ * The cached value of the '{@link #getNamespaces() <em>Namespaces</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getNamespaces()
+ * @generated
+ * @ordered
+ */
+ protected EList<Namespace> namespaces;
+
+ /**
+ * The cached value of the '{@link #getDtd() <em>Dtd</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDtd()
+ * @generated
+ * @ordered
+ */
+ protected DocumentTypeDeclaration dtd;
+
+ /**
+ * The cached value of the '{@link #getLeadingPIs() <em>Leading PIs</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getLeadingPIs()
+ * @generated
+ * @ordered
+ */
+ protected EList<ProcessingInstruction> leadingPIs;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<Namespace> getNamespaces() {
+ if (namespaces == null) {
+ namespaces = new EObjectContainmentEList<Namespace>(Namespace.class, this, XwtxmlPackage.ROOT__NAMESPACES);
+ }
+ return namespaces;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public DocumentTypeDeclaration getDtd() {
+ return dtd;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetDtd(DocumentTypeDeclaration newDtd, NotificationChain msgs) {
+ DocumentTypeDeclaration oldDtd = dtd;
+ dtd = newDtd;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, XwtxmlPackage.ROOT__DTD, oldDtd, newDtd);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setDtd(DocumentTypeDeclaration newDtd) {
+ if (newDtd != dtd) {
+ NotificationChain msgs = null;
+ if (dtd != null) {
+ msgs = ((InternalEObject) dtd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XwtxmlPackage.ROOT__DTD, null, msgs);
+ }
+ if (newDtd != null) {
+ msgs = ((InternalEObject) newDtd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - XwtxmlPackage.ROOT__DTD, null, msgs);
+ }
+ msgs = basicSetDtd(newDtd, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ }
+ else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, XwtxmlPackage.ROOT__DTD, newDtd, newDtd));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<ProcessingInstruction> getLeadingPIs() {
+ if (leadingPIs == null) {
+ leadingPIs = new EObjectContainmentEList<ProcessingInstruction>(ProcessingInstruction.class, this, XwtxmlPackage.ROOT__LEADING_PIS);
+ }
+ return leadingPIs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case XwtxmlPackage.ROOT__NAMESPACES:
+ return ((InternalEList<?>) getNamespaces()).basicRemove(otherEnd, msgs);
+ case XwtxmlPackage.ROOT__DTD:
+ return basicSetDtd(null, msgs);
+ case XwtxmlPackage.ROOT__LEADING_PIS:
+ return ((InternalEList<?>) getLeadingPIs()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case XwtxmlPackage.ROOT__NAMESPACES:
+ return getNamespaces();
+ case XwtxmlPackage.ROOT__DTD:
+ return getDtd();
+ case XwtxmlPackage.ROOT__LEADING_PIS:
+ return getLeadingPIs();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case XwtxmlPackage.ROOT__NAMESPACES:
+ getNamespaces().clear();
+ getNamespaces().addAll((Collection<? extends Namespace>) newValue);
+ return;
+ case XwtxmlPackage.ROOT__DTD:
+ setDtd((DocumentTypeDeclaration) newValue);
+ return;
+ case XwtxmlPackage.ROOT__LEADING_PIS:
+ getLeadingPIs().clear();
+ getLeadingPIs().addAll((Collection<? extends ProcessingInstruction>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ROOT__NAMESPACES:
+ getNamespaces().clear();
+ return;
+ case XwtxmlPackage.ROOT__DTD:
+ setDtd((DocumentTypeDeclaration) null);
+ return;
+ case XwtxmlPackage.ROOT__LEADING_PIS:
+ getLeadingPIs().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case XwtxmlPackage.ROOT__NAMESPACES:
+ return namespaces != null && !namespaces.isEmpty();
+ case XwtxmlPackage.ROOT__DTD:
+ return dtd != null;
+ case XwtxmlPackage.ROOT__LEADING_PIS:
+ return leadingPIs != null && !leadingPIs.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // RootImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/TextImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/TextImpl.java new file mode 100644 index 00000000000..20e86bf12b1 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/TextImpl.java @@ -0,0 +1,52 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Text</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TextImpl extends NodeImpl implements Text {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TextImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return XwtxmlPackage.Literals.TEXT;
+ }
+
+} // TextImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlFactoryImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlFactoryImpl.java new file mode 100644 index 00000000000..7e20ba4ab15 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlFactoryImpl.java @@ -0,0 +1,235 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlFactory;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class XwtxmlFactoryImpl extends EFactoryImpl implements XwtxmlFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static XwtxmlFactory init() {
+ try {
+ XwtxmlFactory theXwtxmlFactory = (XwtxmlFactory) EPackage.Registry.INSTANCE.getEFactory(XwtxmlPackage.eNS_URI);
+ if (theXwtxmlFactory != null) {
+ return theXwtxmlFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new XwtxmlFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public XwtxmlFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case XwtxmlPackage.ATTRIBUTE:
+ return createAttribute();
+ case XwtxmlPackage.TEXT:
+ return createText();
+ case XwtxmlPackage.ELEMENT:
+ return createElement();
+ case XwtxmlPackage.ROOT:
+ return createRoot();
+ case XwtxmlPackage.NAMESPACE:
+ return createNamespace();
+ case XwtxmlPackage.COMMENT:
+ return createComment();
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION:
+ return createDocumentTypeDeclaration();
+ case XwtxmlPackage.CDATA:
+ return createCDATA();
+ case XwtxmlPackage.PROCESSING_INSTRUCTION:
+ return createProcessingInstruction();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Attribute createAttribute() {
+ AttributeImpl attribute = new AttributeImpl();
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Text createText() {
+ TextImpl text = new TextImpl();
+ return text;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Element createElement() {
+ ElementImpl element = new ElementImpl();
+ return element;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Root createRoot() {
+ RootImpl root = new RootImpl();
+ return root;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Namespace createNamespace() {
+ NamespaceImpl namespace = new NamespaceImpl();
+ return namespace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Comment createComment() {
+ CommentImpl comment = new CommentImpl();
+ return comment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public DocumentTypeDeclaration createDocumentTypeDeclaration() {
+ DocumentTypeDeclarationImpl documentTypeDeclaration = new DocumentTypeDeclarationImpl();
+ return documentTypeDeclaration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public CDATA createCDATA() {
+ CDATAImpl cdata = new CDATAImpl();
+ return cdata;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ProcessingInstruction createProcessingInstruction() {
+ ProcessingInstructionImpl processingInstruction = new ProcessingInstructionImpl();
+ return processingInstruction;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public XwtxmlPackage getXwtxmlPackage() {
+ return (XwtxmlPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static XwtxmlPackage getPackage() {
+ return XwtxmlPackage.eINSTANCE;
+ }
+
+} // XwtxmlFactoryImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlPackageImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlPackageImpl.java new file mode 100644 index 00000000000..2ece98dbe02 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/impl/XwtxmlPackageImpl.java @@ -0,0 +1,543 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlFactory;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class XwtxmlPackageImpl extends EPackageImpl implements XwtxmlPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass nodeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass attributeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass textEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass elementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass rootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass namespaceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass commentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass documentTypeDeclarationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass cdataEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass processingInstructionEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private XwtxmlPackageImpl() {
+ super(eNS_URI, XwtxmlFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link XwtxmlPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static XwtxmlPackage init() {
+ if (isInited) {
+ return (XwtxmlPackage) EPackage.Registry.INSTANCE.getEPackage(XwtxmlPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ XwtxmlPackageImpl theXwtxmlPackage = (XwtxmlPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof XwtxmlPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new XwtxmlPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theXwtxmlPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theXwtxmlPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theXwtxmlPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(XwtxmlPackage.eNS_URI, theXwtxmlPackage);
+ return theXwtxmlPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getNode() {
+ return nodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getNode_Name() {
+ return (EAttribute) nodeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getNode_Parent() {
+ return (EReference) nodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getAttribute() {
+ return attributeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getAttribute_Value() {
+ return (EAttribute) attributeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getText() {
+ return textEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getElement() {
+ return elementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getElement_Children() {
+ return (EReference) elementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getRoot() {
+ return rootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getRoot_Namespaces() {
+ return (EReference) rootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getRoot_Dtd() {
+ return (EReference) rootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getRoot_LeadingPIs() {
+ return (EReference) rootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getNamespace() {
+ return namespaceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getComment() {
+ return commentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getDocumentTypeDeclaration() {
+ return documentTypeDeclarationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getDocumentTypeDeclaration_PublicID() {
+ return (EAttribute) documentTypeDeclarationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getDocumentTypeDeclaration_SystemID() {
+ return (EAttribute) documentTypeDeclarationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getCDATA() {
+ return cdataEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getProcessingInstruction() {
+ return processingInstructionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getProcessingInstruction_Data() {
+ return (EAttribute) processingInstructionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public XwtxmlFactory getXwtxmlFactory() {
+ return (XwtxmlFactory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) {
+ return;
+ }
+ isCreated = true;
+
+ // Create classes and their features
+ nodeEClass = createEClass(NODE);
+ createEAttribute(nodeEClass, NODE__NAME);
+ createEReference(nodeEClass, NODE__PARENT);
+
+ attributeEClass = createEClass(ATTRIBUTE);
+ createEAttribute(attributeEClass, ATTRIBUTE__VALUE);
+
+ textEClass = createEClass(TEXT);
+
+ elementEClass = createEClass(ELEMENT);
+ createEReference(elementEClass, ELEMENT__CHILDREN);
+
+ rootEClass = createEClass(ROOT);
+ createEReference(rootEClass, ROOT__NAMESPACES);
+ createEReference(rootEClass, ROOT__DTD);
+ createEReference(rootEClass, ROOT__LEADING_PIS);
+
+ namespaceEClass = createEClass(NAMESPACE);
+
+ commentEClass = createEClass(COMMENT);
+
+ documentTypeDeclarationEClass = createEClass(DOCUMENT_TYPE_DECLARATION);
+ createEAttribute(documentTypeDeclarationEClass, DOCUMENT_TYPE_DECLARATION__PUBLIC_ID);
+ createEAttribute(documentTypeDeclarationEClass, DOCUMENT_TYPE_DECLARATION__SYSTEM_ID);
+
+ cdataEClass = createEClass(CDATA);
+
+ processingInstructionEClass = createEClass(PROCESSING_INSTRUCTION);
+ createEAttribute(processingInstructionEClass, PROCESSING_INSTRUCTION__DATA);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) {
+ return;
+ }
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ attributeEClass.getESuperTypes().add(this.getNode());
+ textEClass.getESuperTypes().add(this.getNode());
+ elementEClass.getESuperTypes().add(this.getNode());
+ rootEClass.getESuperTypes().add(this.getElement());
+ namespaceEClass.getESuperTypes().add(this.getAttribute());
+ commentEClass.getESuperTypes().add(this.getNode());
+ documentTypeDeclarationEClass.getESuperTypes().add(this.getNode());
+ cdataEClass.getESuperTypes().add(this.getText());
+ processingInstructionEClass.getESuperTypes().add(this.getNode());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(nodeEClass, Node.class, "Node", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 1, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getNode_Parent(), this.getElement(), this.getElement_Children(), "parent", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(attributeEClass, Attribute.class, "Attribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAttribute_Value(), ecorePackage.getEString(), "value", null, 1, 1, Attribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+
+ initEClass(textEClass, Text.class, "Text", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(elementEClass, Element.class, "Element", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getElement_Children(), this.getNode(), this.getNode_Parent(), "children", null, 0, -1, Element.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRoot_Namespaces(), this.getNamespace(), null, "namespaces", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_Dtd(), this.getDocumentTypeDeclaration(), null, "dtd", null, 0, 1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_LeadingPIs(), this.getProcessingInstruction(), null, "leadingPIs", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(namespaceEClass, Namespace.class, "Namespace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(commentEClass, Comment.class, "Comment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(documentTypeDeclarationEClass, DocumentTypeDeclaration.class, "DocumentTypeDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDocumentTypeDeclaration_PublicID(), ecorePackage.getEString(), "publicID", null, 0, 1, DocumentTypeDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDocumentTypeDeclaration_SystemID(), ecorePackage.getEString(), "systemID", null, 0, 1, DocumentTypeDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(cdataEClass, org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA.class, "CDATA", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(processingInstructionEClass, ProcessingInstruction.class, "ProcessingInstruction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getProcessingInstruction_Data(), ecorePackage.getEString(), "data", null, 1, 1, ProcessingInstruction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // XwtxmlPackageImpl
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlAdapterFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlAdapterFactory.java new file mode 100644 index 00000000000..c4d5c2ca25b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlAdapterFactory.java @@ -0,0 +1,329 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage
+ * @generated
+ */
+public class XwtxmlAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static XwtxmlPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public XwtxmlAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = XwtxmlPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected XwtxmlSwitch<Adapter> modelSwitch =
+ new XwtxmlSwitch<Adapter>() {
+ @Override
+ public Adapter caseNode(Node object) {
+ return createNodeAdapter();
+ }
+
+ @Override
+ public Adapter caseAttribute(Attribute object) {
+ return createAttributeAdapter();
+ }
+
+ @Override
+ public Adapter caseText(Text object) {
+ return createTextAdapter();
+ }
+
+ @Override
+ public Adapter caseElement(Element object) {
+ return createElementAdapter();
+ }
+
+ @Override
+ public Adapter caseRoot(Root object) {
+ return createRootAdapter();
+ }
+
+ @Override
+ public Adapter caseNamespace(Namespace object) {
+ return createNamespaceAdapter();
+ }
+
+ @Override
+ public Adapter caseComment(Comment object) {
+ return createCommentAdapter();
+ }
+
+ @Override
+ public Adapter caseDocumentTypeDeclaration(DocumentTypeDeclaration object) {
+ return createDocumentTypeDeclarationAdapter();
+ }
+
+ @Override
+ public Adapter caseCDATA(CDATA object) {
+ return createCDATAAdapter();
+ }
+
+ @Override
+ public Adapter caseProcessingInstruction(ProcessingInstruction object) {
+ return createProcessingInstructionAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject) target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node
+ * @generated
+ */
+ public Adapter createNodeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute
+ * @generated
+ */
+ public Adapter createAttributeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text <em>Text</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text
+ * @generated
+ */
+ public Adapter createTextAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element
+ * @generated
+ */
+ public Adapter createElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root
+ * @generated
+ */
+ public Adapter createRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace <em>Namespace</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace
+ * @generated
+ */
+ public Adapter createNamespaceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment <em>Comment</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment
+ * @generated
+ */
+ public Adapter createCommentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration <em>Document Type Declaration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration
+ * @generated
+ */
+ public Adapter createDocumentTypeDeclarationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA <em>CDATA</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA
+ * @generated
+ */
+ public Adapter createCDATAAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction <em>Processing Instruction</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction
+ * @generated
+ */
+ public Adapter createProcessingInstructionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} // XwtxmlAdapterFactory
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlSwitch.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlSwitch.java new file mode 100644 index 00000000000..9ca34a74435 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src-gen/org/eclipse/papyrus/views/properties/model/xwt/xwtxml/util/XwtxmlSwitch.java @@ -0,0 +1,402 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.xwtxml.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlPackage
+ * @generated
+ */
+public class XwtxmlSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static XwtxmlPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public XwtxmlSwitch() {
+ if (modelPackage == null) {
+ modelPackage = XwtxmlPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case XwtxmlPackage.NODE: {
+ Node node = (Node) theEObject;
+ T result = caseNode(node);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.ATTRIBUTE: {
+ Attribute attribute = (Attribute) theEObject;
+ T result = caseAttribute(attribute);
+ if (result == null) {
+ result = caseNode(attribute);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.TEXT: {
+ Text text = (Text) theEObject;
+ T result = caseText(text);
+ if (result == null) {
+ result = caseNode(text);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.ELEMENT: {
+ Element element = (Element) theEObject;
+ T result = caseElement(element);
+ if (result == null) {
+ result = caseNode(element);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.ROOT: {
+ Root root = (Root) theEObject;
+ T result = caseRoot(root);
+ if (result == null) {
+ result = caseElement(root);
+ }
+ if (result == null) {
+ result = caseNode(root);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.NAMESPACE: {
+ Namespace namespace = (Namespace) theEObject;
+ T result = caseNamespace(namespace);
+ if (result == null) {
+ result = caseAttribute(namespace);
+ }
+ if (result == null) {
+ result = caseNode(namespace);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.COMMENT: {
+ Comment comment = (Comment) theEObject;
+ T result = caseComment(comment);
+ if (result == null) {
+ result = caseNode(comment);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.DOCUMENT_TYPE_DECLARATION: {
+ DocumentTypeDeclaration documentTypeDeclaration = (DocumentTypeDeclaration) theEObject;
+ T result = caseDocumentTypeDeclaration(documentTypeDeclaration);
+ if (result == null) {
+ result = caseNode(documentTypeDeclaration);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.CDATA: {
+ CDATA cdata = (CDATA) theEObject;
+ T result = caseCDATA(cdata);
+ if (result == null) {
+ result = caseText(cdata);
+ }
+ if (result == null) {
+ result = caseNode(cdata);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case XwtxmlPackage.PROCESSING_INSTRUCTION: {
+ ProcessingInstruction processingInstruction = (ProcessingInstruction) theEObject;
+ T result = caseProcessingInstruction(processingInstruction);
+ if (result == null) {
+ result = caseNode(processingInstruction);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Node</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNode(Node object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Attribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAttribute(Attribute object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Text</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Text</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseText(Text object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseElement(Element object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Root</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRoot(Root object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Namespace</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Namespace</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamespace(Namespace object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Comment</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Comment</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseComment(Comment object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Document Type Declaration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Document Type Declaration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocumentTypeDeclaration(DocumentTypeDeclaration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>CDATA</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>CDATA</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCDATA(CDATA object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Processing Instruction</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Processing Instruction</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProcessingInstruction(ProcessingInstruction object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // XwtxmlSwitch
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/Activator.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/Activator.java new file mode 100644 index 00000000000..38fffbafb00 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/Activator.java @@ -0,0 +1,74 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.model.xwt;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.customization.properties.model.xwt"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The LogHelper for this plug-in
+ */
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (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;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/format/XMLFormatter.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/format/XMLFormatter.java new file mode 100644 index 00000000000..107560bd097 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/format/XMLFormatter.java @@ -0,0 +1,38 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.model.xwt.format;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.papyrus.views.properties.model.xwt.Activator;
+import org.eclipse.wst.xml.core.internal.formatter.XMLFormatterFormatProcessor;
+
+/**
+ * A Helper for formatting XML Files
+ *
+ * @author Camille Letavernier
+ */
+public class XMLFormatter {
+
+ public static void format(IFile file) {
+ XMLFormatterFormatProcessor processor = new XMLFormatterFormatProcessor();
+ try {
+ processor.formatFile(file);
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ } catch (CoreException ex) {
+ Activator.log.error(ex);
+ }
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLHandler.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLHandler.java new file mode 100644 index 00000000000..7707c298443 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLHandler.java @@ -0,0 +1,260 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.modisco;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.XwtxmlFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.ibm.icu.lang.UCharacter;
+
+/**
+ * A handler for reading xml files and instanciating a generic xml model.
+ */
+public class GenericXMLHandler extends DefaultHandler implements LexicalHandler {
+
+ /**
+ * Prefix for namespace attributes.
+ */
+ public static final String XMLNS = "xmlns"; //$NON-NLS-1$
+
+ /** A parameter key for indicating to ignore whitespace in text portions. */
+ public static final String OPTION_IGNORE_WHITESPACE = "OPTION_IGNORE_WHITESPACE"; //$NON-NLS-1$
+
+ /**
+ * A parameter key for indicating to minimize the memory size of obtained
+ * model. If set to true : comments are ignored, text portions with only
+ * indentation and line delimiters are ignored.
+ */
+ public static final String OPTION_LIGHTWEIGHT_MODEL = "OPTION_LIGHTWEIGHT_MODEL"; //$NON-NLS-1$
+
+ private final Map<String, Object> parameters;
+
+ private final Resource container;
+
+ private Root root;
+
+ private Element current;
+
+ private DocumentTypeDeclaration dtd;
+
+ private boolean nextIsCDATA = false;
+
+ private List<ProcessingInstruction> leadingPIs = null;
+
+ private Boolean ignoreWhiteSpace = null;
+
+ private Boolean lightweightModel = null;
+
+ /**
+ * Constructor for GenericXMLHandler.
+ *
+ * @param resource
+ * the model container.
+ */
+ public GenericXMLHandler(final Resource resource, final Map<String, Object> options) {
+ this.container = resource;
+ this.parameters = options;
+ }
+
+ @Override
+ public final void startElement(final String uri, final String localName, final String qName, final Attributes attrs) throws SAXException {
+ if (this.root == null) {
+ this.root = XwtxmlFactory.eINSTANCE.createRoot();
+ this.root.setName(qName);
+ this.container.getContents().add(this.root);
+ this.current = this.root;
+ if (this.dtd != null) {
+ this.root.setDtd(this.dtd);
+ }
+ if (this.leadingPIs != null) {
+ this.root.getLeadingPIs().addAll(this.leadingPIs);
+ }
+ } else {
+ Element newElement = XwtxmlFactory.eINSTANCE.createElement();
+ newElement.setName(qName);
+
+ this.current.getChildren().add(newElement);
+ this.current = newElement;
+ }
+
+ for (int i = 0; i < attrs.getLength(); i++) {
+ String name = attrs.getQName(i);
+ if (this.current == this.root && name.startsWith(GenericXMLHandler.XMLNS)) {
+ Namespace newNamespace = XwtxmlFactory.eINSTANCE.createNamespace();
+ if (name.length() == GenericXMLHandler.XMLNS.length()) {
+ newNamespace.setName(""); // xmlns= //$NON-NLS-1$
+ } else {
+ newNamespace.setName(name.substring(GenericXMLHandler.XMLNS.length() + 1));
+ // xmlns:XX=
+ }
+ newNamespace.setValue(attrs.getValue(i));
+
+ this.root.getNamespaces().add(newNamespace);
+ } else {
+ Attribute newAttribute = XwtxmlFactory.eINSTANCE.createAttribute();
+ newAttribute.setName(name);
+ newAttribute.setValue(attrs.getValue(i));
+
+ this.current.getChildren().add(newAttribute);
+ }
+ }
+ }
+
+ @Override
+ public final void endElement(final String uri, final String localName, final String qName) throws SAXException {
+ this.current = this.current.getParent();
+ }
+
+ @Override
+ public final void characters(final char[] ch, final int start, final int length) throws SAXException {
+ if (this.current != null) {
+ boolean hasContent = true;
+ if (isLightweightModel()) {
+ hasContent = false;
+ int index = start;
+ while (!hasContent && index < start + length) {
+ hasContent = !UCharacter.isWhitespace(ch[index]);
+ index++;
+ }
+ }
+
+ if (hasContent) {
+ String text = new String(ch, start, length);
+ if (isIgnoreWhitespace()) {
+ text = text.trim();
+ }
+
+ if (text.length() > 0) {
+ Text newElement;
+ if (this.nextIsCDATA) {
+ newElement = XwtxmlFactory.eINSTANCE.createCDATA();
+ } else {
+ newElement = XwtxmlFactory.eINSTANCE.createText();
+ }
+ newElement.setName(text);
+ this.current.getChildren().add(newElement);
+ }
+ }
+ }
+ }
+
+ @Override
+ public final void comment(final char[] ch, final int start, final int length) throws SAXException {
+ if (this.current != null && !isLightweightModel()) {
+ String text = new String(ch, start, length);
+
+ if (text.length() > 0) {
+ Comment newElement = XwtxmlFactory.eINSTANCE.createComment();
+ newElement.setName(text);
+ this.current.getChildren().add(newElement);
+ }
+ }
+ }
+
+ @Override
+ public final void startDTD(final String name, final String publicId, final String systemId) throws SAXException {
+ DocumentTypeDeclaration newDtd = XwtxmlFactory.eINSTANCE.createDocumentTypeDeclaration();
+ newDtd.setName(name);
+ newDtd.setPublicID(publicId);
+ newDtd.setSystemID(systemId);
+ this.dtd = newDtd;
+ if (this.root != null) {
+ this.root.setDtd(this.dtd);
+ }
+ }
+
+ private boolean isIgnoreWhitespace() {
+ if (this.ignoreWhiteSpace == null) {
+ if (this.parameters != null && this.parameters.get(GenericXMLHandler.OPTION_IGNORE_WHITESPACE) != null) {
+ this.ignoreWhiteSpace = (Boolean) this.parameters.get(GenericXMLHandler.OPTION_IGNORE_WHITESPACE);
+ } else {
+ this.ignoreWhiteSpace = false;
+ }
+ }
+
+ return this.ignoreWhiteSpace;
+ }
+
+ private boolean isLightweightModel() {
+ if (this.lightweightModel == null) {
+ if (this.parameters != null && this.parameters.get(GenericXMLHandler.OPTION_LIGHTWEIGHT_MODEL) != null) {
+ this.lightweightModel = (Boolean) this.parameters.get(GenericXMLHandler.OPTION_LIGHTWEIGHT_MODEL);
+ } else {
+ this.lightweightModel = false;
+ }
+ }
+
+ return this.lightweightModel;
+ }
+
+ @Override
+ public final void endCDATA() throws SAXException {
+ this.nextIsCDATA = false;
+ }
+
+ @Override
+ public final void processingInstruction(final String target, final String data) throws SAXException {
+ ProcessingInstruction newElement = XwtxmlFactory.eINSTANCE.createProcessingInstruction();
+ newElement.setName(target);
+ newElement.setData(data);
+
+ if (this.current != null) {
+ this.current.getChildren().add(newElement);
+ } else {
+ if (this.leadingPIs == null) {
+ this.leadingPIs = new ArrayList<ProcessingInstruction>();
+ }
+ this.leadingPIs.add(newElement);
+ }
+
+ }
+
+ @Override
+ public void endDTD() throws SAXException {
+ // nothing
+ }
+
+ @Override
+ public void endEntity(final String arg0) throws SAXException {
+ // nothing
+ }
+
+ @Override
+ public final void startCDATA() throws SAXException {
+ this.nextIsCDATA = true;
+ }
+
+ @Override
+ public void startEntity(final String arg0) throws SAXException {
+ // nothing
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLResourceImpl.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLResourceImpl.java new file mode 100644 index 00000000000..40d9314a7c8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLResourceImpl.java @@ -0,0 +1,105 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.modisco;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+import org.eclipse.papyrus.views.properties.model.xwt.Activator;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * A EMF Resource implementation which manages generic xml models serialization.
+ * XML Metamodel referenced here differs from
+ * http://www.eclipse.org/emf/2003/XMLType one.
+ *
+ * XML Metamodel referenced here is a subset of W3C XML concepts,
+ * e.g. element type declarations are not present.
+ *
+ */
+public class GenericXMLResourceImpl extends ResourceImpl {
+
+ /**
+ * Constructor for GenericXMLResourceImpl.
+ *
+ * @param uri
+ */
+ public GenericXMLResourceImpl(final URI uri) {
+ super(uri);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected final void doLoad(final InputStream inputStream, final Map<?, ?> options) throws IOException {
+ try {
+ SAXParserFactory f = SAXParserFactory.newInstance();
+ f.setValidating(false);
+ SAXParser p = f.newSAXParser();
+ DefaultHandler handler = new GenericXMLHandler(this, (Map<String, Object>) options);
+
+ final XMLReader reader = p.getXMLReader();
+ try {
+ reader.setProperty("http://xml.org/sax/properties/lexical-handler", //$NON-NLS-1$
+ handler);
+ } catch (SAXNotRecognizedException e) {
+ String message = "Default XML sax parser does not support lexical handling.\n" //$NON-NLS-1$
+ + "DTDs and comment informations will not be available."; //$NON-NLS-1$
+ Activator.log.warn(message);
+ }
+
+ try {
+ reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd" //$NON-NLS-1$
+ , false);
+ } catch (SAXNotRecognizedException e) {
+ // go on without this feature,
+ // UnknownHostException may occur when
+ // a external dtd is indicated
+ // but not accessible (e.g. if www is not available)
+ Activator.log.warn(e.getMessage());
+ }
+
+ p.parse(inputStream, handler);
+
+ } catch (ParserConfigurationException e) {
+ throw new IOException(e.getMessage());
+ } catch (SAXException e) {
+ throw new IOException(e.getMessage());
+ }
+
+ }
+
+ @Override
+ protected final void doSave(final OutputStream outputStream, final Map<?, ?> options) throws IOException {
+ GenericXMLWriter writer = new GenericXMLWriter(outputStream);
+ for (EObject topLevelObject : getContents()) {
+ writer.serialize((Element) topLevelObject);
+ }
+ writer.flush();
+ writer.close();
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLWriter.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLWriter.java new file mode 100644 index 00000000000..03642616ea5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/modisco/GenericXMLWriter.java @@ -0,0 +1,193 @@ +/**
+ * *******************************************************************************
+ * Copyright (c) 2009 Mia-Software.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Fabien Giquel (Mia-Software) - initial API and implementation
+ * *******************************************************************************
+ *
+ */
+package org.eclipse.papyrus.views.properties.model.xwt.modisco;
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Attribute;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.CDATA;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Comment;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.DocumentTypeDeclaration;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Element;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Node;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.ProcessingInstruction;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root;
+import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Text;
+
+/**
+ *
+ * A XML writer dedicated to MoDisco Generic XML models.
+ *
+ */
+public class GenericXMLWriter extends PrintWriter {
+
+ protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
+
+ private static final int STRING_BUFFER_OFFSET = 10;
+
+ /**
+ * The constructor wraps an outputStream.
+ *
+ * @param output
+ * @throws UnsupportedEncodingException
+ */
+ public GenericXMLWriter(final OutputStream output) throws UnsupportedEncodingException {
+ super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
+ println(GenericXMLWriter.XML_VERSION);
+ }
+
+ /**
+ * Serializes the element and its sub-elements.
+ *
+ * @param element
+ */
+ public final void serialize(final Element element) {
+ startTag(element);
+
+ if (element.getChildren() != null) {
+ for (Node child : element.getChildren()) {
+ if (child instanceof Element) {
+ serialize((Element) child);
+ } else if (child instanceof CDATA) {
+ String text = ((CDATA) child).getName();
+ print("<![CDATA[" + text + "]]>"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (child instanceof Text) {
+ String text = ((Text) child).getName();
+ print(GenericXMLWriter.getEscaped(text));
+ } else if (child instanceof Comment) {
+ String text = "<!--" + ((Comment) child).getName() + "-->"; //$NON-NLS-1$ //$NON-NLS-2$
+ print(text);
+ } else if (child instanceof ProcessingInstruction) {
+ printPI(((ProcessingInstruction) child));
+ }
+ }
+ }
+
+ endTag(element);
+ }
+
+ private void startTag(final Element element) {
+ if (element instanceof Root) {
+ Root root = (Root) element;
+ if (root.getDtd() != null) {
+ printDTD(root.getDtd());
+ }
+ if (root.getLeadingPIs() != null) {
+ for (ProcessingInstruction pi : root.getLeadingPIs()) {
+ printPI(pi);
+ println();
+ }
+ }
+ }
+ print("<"); //$NON-NLS-1$
+ print(element.getName());
+ if (element instanceof Root) {
+ Root root = (Root) element;
+ if (root.getNamespaces() != null) {
+ for (Namespace ns : root.getNamespaces()) {
+ if (ns.getName().length() > 0) {
+ printAttribute(GenericXMLHandler.XMLNS + ":" + ns.getName(), //$NON-NLS-1$
+ ns.getValue());
+ } else {
+ printAttribute(GenericXMLHandler.XMLNS, ns.getValue());
+ }
+ }
+ }
+ }
+ if (element.getChildren() != null) {
+ for (Node child : element.getChildren()) {
+ if (child instanceof Attribute) {
+ Attribute attr = (Attribute) child;
+ printAttribute(attr.getName(), attr.getValue());
+ }
+ }
+ }
+ print(">"); //$NON-NLS-1$
+ }
+
+ private void endTag(final Element element) {
+ print("</" + element.getName() + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private void printAttribute(final String key, final String value) {
+ print(" "); //$NON-NLS-1$
+ print(key);
+ print("=\""); //$NON-NLS-1$
+ print(GenericXMLWriter.getEscaped(value));
+ print("\""); //$NON-NLS-1$
+ }
+
+ private void printDTD(final DocumentTypeDeclaration dtd) {
+ print("\n<!DOCTYPE "); //$NON-NLS-1$
+ print(dtd.getName());
+ print("\n\t\""); //$NON-NLS-1$
+ print(dtd.getPublicID());
+ print("\"\n\t\""); //$NON-NLS-1$
+ print(dtd.getSystemID());
+ print("\">"); //$NON-NLS-1$
+ }
+
+ private void printPI(final ProcessingInstruction pi) {
+ print("<?"); //$NON-NLS-1$
+ print(pi.getName());
+ print(" "); //$NON-NLS-1$
+ print(pi.getData());
+ print("?>"); //$NON-NLS-1$
+ }
+
+ private static void appendEscapedChar(final StringBuffer buffer, final char c) {
+ String replacement = GenericXMLWriter.getReplacement(c);
+ if (replacement != null) {
+ buffer.append('&');
+ buffer.append(replacement);
+ buffer.append(';');
+ } else {
+ buffer.append(c);
+ }
+ }
+
+ private static String getEscaped(final String s) {
+ StringBuffer result = new StringBuffer(s.length() + GenericXMLWriter.STRING_BUFFER_OFFSET);
+ for (int i = 0; i < s.length(); ++i) {
+ GenericXMLWriter.appendEscapedChar(result, s.charAt(i));
+ }
+ return result.toString();
+ }
+
+ private static String getReplacement(final char c) {
+ // Encode special XML characters into the equivalent character
+ // references.
+ // These five are defined by default for all XML documents.
+ switch (c) {
+ case '<':
+ return "lt"; //$NON-NLS-1$
+ case '>':
+ return "gt"; //$NON-NLS-1$
+ case '"':
+ return "quot"; //$NON-NLS-1$
+ case '\'':
+ return "apos"; //$NON-NLS-1$
+ case '&':
+ return "amp"; //$NON-NLS-1$
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTModelFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTModelFactory.java new file mode 100644 index 00000000000..77c7bbcb0cc --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTModelFactory.java @@ -0,0 +1,29 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.model.xwt.resource;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * A Factory for reading XWT Files as EMF Resources
+ *
+ * @author Camille Letavernier
+ */
+public class XWTModelFactory implements Resource.Factory {
+
+ @Override
+ public Resource createResource(URI uri) {
+ return new XWTResource(uri);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTResource.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTResource.java new file mode 100644 index 00000000000..b470fcd5d76 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.model.xwt/src/org/eclipse/papyrus/views/properties/model/xwt/resource/XWTResource.java @@ -0,0 +1,340 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - bug 402049 + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.model.xwt.resource; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.ECollections; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceImpl; +import org.eclipse.m2m.qvt.oml.BasicModelExtent; +import org.eclipse.m2m.qvt.oml.ExecutionContextImpl; +import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic; +import org.eclipse.m2m.qvt.oml.ModelExtent; +import org.eclipse.m2m.qvt.oml.TransformationExecutor; +import org.eclipse.m2m.qvt.oml.util.Log; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.CompositeWidget; +import org.eclipse.papyrus.infra.properties.ui.UiPackage; +import org.eclipse.papyrus.infra.properties.ui.ValueAttribute; +import org.eclipse.papyrus.infra.properties.ui.WidgetAttribute; +import org.eclipse.papyrus.infra.properties.ui.util.PropertiesUtil; +import org.eclipse.papyrus.views.properties.model.xwt.Activator; +import org.eclipse.papyrus.views.properties.model.xwt.format.XMLFormatter; +import org.eclipse.papyrus.views.properties.model.xwt.modisco.GenericXMLResourceImpl; +import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Namespace; +import org.eclipse.papyrus.views.properties.model.xwt.xwtxml.Root; +import org.eclipse.papyrus.views.properties.runtime.ConfigurationManager; + +/** + * A Resource for representing XWT (XML Widget Toolkit) files + * as EObjects. + * Resulting EObjects are conform to the Papyrus property view UI Metamodel : + * http://www.eclipse.org/papyrus/properties/ui/0.9 + * + * The resource is based on MoDisco for reading and writing XML, + * and on QVTO to go from XML to EMF and vice-versa. + * + * @author Camille Letavernier + * + * @see UiPackage + */ +public class XWTResource extends ResourceImpl { + + private GenericXMLResourceImpl xmlResource; + + /** + * The "format" option. + * + * This option is a boolean, which default value is true + */ + public static final String OPTION_FORMAT = "format"; //$NON-NLS-1$ + + /** + * Comparators created to sort the namespaces and fix the bug 402049 + */ + private final NamespaceComparator comparator = new NamespaceComparator(); + + private final WidgetAttributeComparator widgetAttributeComparator = new WidgetAttributeComparator(); + /** + * + * Constructs a new XWTResource with the given URI + * + * @param uri + * The resource's URI + */ + public XWTResource(URI uri) { + super(uri); + xmlResource = new GenericXMLResourceImpl(uri); + } + + @Override + protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException { + xmlResource.load(inputStream, options); + Root root = (Root) xmlResource.getContents().get(0); + try { + CompositeWidget widget = xmlToUISection(root); + if (widget == null) { + Activator.log.warn("Cannot load the XWT Widget"); //$NON-NLS-1$ + } else { + getContents().add(widget); + } + } catch (Exception ex) { + Activator.log.error(ex); + } + } + + @Override + public void save(Map<?, ?> options) throws IOException { + if (options == null || options.isEmpty()) { + Map<String, String> optionsMap = new HashMap<String, String>(); + optionsMap.put(OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + super.save(optionsMap); + } else { + super.save(options); + } + + Object formatValue = options.get(OPTION_FORMAT); + if (formatValue == null || formatValue == Boolean.TRUE) { + if (uri.isPlatform()) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true))); + XMLFormatter.format(file); + } + } + } + + @Override + protected void doSave(OutputStream outputStream, Map<?, ?> options) throws IOException { + try { + if (getContents().isEmpty()) { + Activator.log.warn("Cannot save an Empty XWT resource : " + getURI()); //$NON-NLS-1$ + return; + } + Root root = uiSectionToXML((CompositeWidget) getContents().get(0)); + + xmlResource.getContents().clear(); + xmlResource.getContents().add(root); + xmlResource.save(outputStream, options); + } catch (IOException ex) { + Activator.log.error(ex); + throw ex; + } catch (Exception ex) { + Activator.log.error(ex); + } + } + + private Collection<Context> findContexts() { + Set<Context> rootContexts = new HashSet<Context>(); + if (resourceSet == null) { + return Collections.emptyList(); + } + + for (Resource resource : resourceSet.getResources()) { + if (!resource.getContents().isEmpty() && resource.getContents().get(0) instanceof Context) { + Context context = (Context) resource.getContents().get(0); + rootContexts.add(context); + } + } + + Set<Context> allContexts = new HashSet<Context>(); + + for (Context context : rootContexts) { + allContexts.addAll(PropertiesUtil.getDependencies(context)); + } + + return allContexts; + } + + private CompositeWidget xmlToUISection(Root genericXMLRoot) { + URI transformationURI = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/Transformation/XMLToUI.qvto", true); //$NON-NLS-1$ + TransformationExecutor executor = new TransformationExecutor(transformationURI); + + List<Context> contexts = new LinkedList<Context>(findContexts()); + + ModelExtent inXml = getModelExtent(genericXMLRoot); + ModelExtent inRoot = getModelExtent(ConfigurationManager.getInstance().getPropertiesRoot()); + ModelExtent inContexts = new BasicModelExtent(contexts); + ModelExtent outUI = new BasicModelExtent(); + + ExecutionContextImpl context = new ExecutionContextImpl(); + context.setLog(getLogger()); + context.setConfigProperty("keepModeling", true); //$NON-NLS-1$ + + ExecutionDiagnostic result = executor.execute(context, inXml, inRoot, inContexts, outUI); + + if (result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) { + List<EObject> outObjects = outUI.getContents(); + Object objectResult = outObjects.get(0); + if (!(objectResult instanceof CompositeWidget)) { + return null; + } + + //we sort the attribute to be sure to display them in the same order than the serialization, done to fix the bug 402049 + CompositeWidget widget = (CompositeWidget) outObjects.get(0); + ECollections.sort(widget.getAttributes(), this.widgetAttributeComparator); + + return widget; + } else { + IStatus status = BasicDiagnostic.toIStatus(result); + Activator.getDefault().getLog().log(status); + Activator.log.error(status.getException()); + } + + return null; + } + + private Log getLogger() { + return new Log() { + + @Override + public void log(int level, String message) { + Activator.getDefault().getLog().log(new Status(level, Activator.PLUGIN_ID, message)); + } + + @Override + public void log(int level, String message, Object param) { + log(level, message); + } + + + @Override + public void log(String message) { + log(IStatus.INFO, message); + } + + @Override + public void log(String message, Object param) { + log(message); + } + }; + } + + private Root uiSectionToXML(CompositeWidget widget) { + URI transformationURI = URI.createPlatformPluginURI(Activator.PLUGIN_ID + "/Transformation/UIToXML.qvto", true); //$NON-NLS-1$ + TransformationExecutor executor = new TransformationExecutor(transformationURI); + + ModelExtent inWidget = getModelExtent(widget); + ModelExtent outXML = new BasicModelExtent(); + + ExecutionContextImpl context = new ExecutionContextImpl(); + context.setConfigProperty("keepModeling", true); //$NON-NLS-1$ + context.setLog(getLogger()); + + ExecutionDiagnostic result = executor.execute(context, inWidget, outXML); + + if (result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) { + List<EObject> outObjects = outXML.getContents(); + Root root = (Root) outObjects.get(0); + + // we sort the namespaces to fix the bug 402049. + ECollections.sort(root.getNamespaces(), this.comparator); + + return root; + } else { + IStatus status = BasicDiagnostic.toIStatus(result); + Activator.getDefault().getLog().log(status); + } + return null; + } + + private ModelExtent getModelExtent(EObject source) { + if (source == null) { + return new BasicModelExtent(); + } + + EList<EObject> objects = new BasicEList<EObject>(); + objects.add(source); + ModelExtent extent = new BasicModelExtent(objects); + return extent; + } + + /** + * + * @author Vincent Lorenzo + * This comparator has been created to fix the bug 402049. This comparator is used during the save of the model. + */ + private static class NamespaceComparator implements Comparator<Namespace> { + + /** + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) + * + * @param o1 + * @param o2 + * @return + */ + @Override + public int compare(Namespace o1, Namespace o2) { + final String o1Name = o1.getName() != null ? o1.getName() : ""; + final String o2Name = o2.getName() != null ? o2.getName() : ""; + int res = o1Name.compareTo(o2Name); + if (res == 0) { + final String o1Value = o1.getValue() != null ? o1.getValue() : ""; + final String o2Value = o2.getValue() != null ? o2.getValue() : ""; + res = o1Value.compareTo(o2Value); + } + return res; + } + } + + /** + * + * @author Vincent Lorenzo + * This comparator has been created to fix the bug 402049. This comparator is used when we load the model, + * to be sure to display attribute in the same order than the saved one! + */ + private static class WidgetAttributeComparator implements Comparator<WidgetAttribute> { + + /** + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) + * + * @param o1 + * @param o2 + * @return + */ + @Override + public int compare(WidgetAttribute o1, WidgetAttribute o2) { + final String o1Name = o1.getName() != null ? o1.getName() : ""; + final String o2Name = o2.getName() != null ? o2.getName() : ""; + int res = o1Name.compareTo(o2Name); + if (res == 0) { + if (o1 instanceof ValueAttribute && o2 instanceof ValueAttribute) { + final String o1Value = ((ValueAttribute) o1).getValue() != null ? ((ValueAttribute) o1).getValue() : ""; + final String o2Value = ((ValueAttribute) o2).getValue() != null ? ((ValueAttribute) o2).getValue() : ""; + res = o1Value.compareTo(o2Value); + } + } + return res; + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.classpath b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.classpath new file mode 100644 index 00000000000..d9f32c1698a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry exported="true" kind="lib" path="bin" sourcepath="bin"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.project b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.project new file mode 100644 index 00000000000..38f39c47a45 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.project @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.papyrus.views.properties.toolsmiths</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.emf.facet.common.ProjectNature</nature> + <nature>org.eclipse.m2m.qvt.oml.project.QVTONature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.oomph.version.VersionNature</nature> + <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> + </natures> +</projectDescription> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.core.resources.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000000..42399c9989d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1
+encoding//src/org/eclipse/papyrus/views/properties/toolsmiths/messages/messages.properties=ISO-8859-1
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.jdt.core.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.jdt.core.prefs new file mode 100755 index 00000000000..62a08f4494d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,291 @@ +eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+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_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.jdt.ui.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..954281dbc31 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.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/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.pde.api.tools.prefs b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..23fb95e120f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/.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/properties/org.eclipse.papyrus.views.properties.toolsmiths/META-INF/MANIFEST.MF b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..74d80f46186 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Export-Package: org.eclipse.papyrus.views.properties.toolsmiths.editor, + org.eclipse.papyrus.views.properties.toolsmiths.modelelement, + org.eclipse.papyrus.views.properties.toolsmiths.providers, + org.eclipse.papyrus.views.properties.toolsmiths.storage.actions +Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)", + org.eclipse.papyrus.views.properties;bundle-version="[3.0.0,4.0.0)", + org.eclipse.papyrus.views.properties.model.xwt;bundle-version="[2.0.0,3.0.0)", + org.eclipse.emf.ecore.editor;bundle-version="[2.11.0,3.0.0)";visibility:=reexport, + org.eclipse.papyrus.infra.constraints.ui;bundle-version="[2.0.0,3.0.0)" +Bundle-Vendor: %Bundle-Vendor +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: ., + bin +Bundle-Version: 2.0.0.qualifier +Bundle-Name: %Bundle-Name +Bundle-Activator: org.eclipse.papyrus.views.properties.toolsmiths.Activator +Bundle-ManifestVersion: 2 +Bundle-Description: %pluginDescription +Bundle-SymbolicName: org.eclipse.papyrus.views.properties.toolsmiths;singleton:=true +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/Customization.ctx b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/Customization.ctx new file mode 100644 index 00000000000..b9d829393c6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/Customization.ctx @@ -0,0 +1,972 @@ +<?xml version="1.0" encoding="ASCII"?> +<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" xmi:id="_W38FcJLCEeWbp4A9_-WIrQ" name="Customization" label="Customization Models"> + <tabs xmi:id="_W38FcZLCEeWbp4A9_-WIrQ" label="Context" id="context" category="" priority="10"> + <sections xmi:id="_W38FcpLCEeWbp4A9_-WIrQ" name="Single Environment" sectionFile="ui/SingleEnvironment.xwt"> + <widget href="ui/SingleEnvironment.xwt#/"/> + </sections> + <sections xmi:id="_W38Fc5LCEeWbp4A9_-WIrQ" name="Multiple Environment" sectionFile="ui/MultipleEnvironment.xwt"> + <widget href="ui/MultipleEnvironment.xwt#/"/> + </sections> + <sections xmi:id="_W38FdJLCEeWbp4A9_-WIrQ" name="Single WidgetType" sectionFile="ui/SingleWidgetType.xwt"> + <widget href="ui/SingleWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38FdZLCEeWbp4A9_-WIrQ" name="Multiple WidgetType" sectionFile="ui/MultipleWidgetType.xwt"> + <widget href="ui/MultipleWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38FdpLCEeWbp4A9_-WIrQ" name="Single PropertyEditorType" sectionFile="ui/SinglePropertyEditorType.xwt"> + <widget href="ui/SinglePropertyEditorType.xwt#/"/> + </sections> + <sections xmi:id="_W38Fd5LCEeWbp4A9_-WIrQ" name="Multiple PropertyEditorType" sectionFile="ui/MultiplePropertyEditorType.xwt"> + <widget href="ui/MultiplePropertyEditorType.xwt#/"/> + </sections> + <sections xmi:id="_W38FeJLCEeWbp4A9_-WIrQ" name="Single CompositeWidgetType" sectionFile="ui/SingleCompositeWidgetType.xwt"> + <widget href="ui/SingleCompositeWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38FeZLCEeWbp4A9_-WIrQ" name="Multiple CompositeWidgetType" sectionFile="ui/MultipleCompositeWidgetType.xwt"> + <widget href="ui/MultipleCompositeWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38FepLCEeWbp4A9_-WIrQ" name="Single LayoutType" sectionFile="ui/SingleLayoutType.xwt"> + <widget href="ui/SingleLayoutType.xwt#/"/> + </sections> + <sections xmi:id="_W38Fe5LCEeWbp4A9_-WIrQ" name="Multiple LayoutType" sectionFile="ui/MultipleLayoutType.xwt"> + <widget href="ui/MultipleLayoutType.xwt#/"/> + </sections> + <sections xmi:id="_W38FfJLCEeWbp4A9_-WIrQ" name="Single ConstraintType" sectionFile="ui/SingleConstraintType.xwt"> + <widget href="ui/SingleConstraintType.xwt#/"/> + </sections> + <sections xmi:id="_W38FfZLCEeWbp4A9_-WIrQ" name="Multiple ConstraintType" sectionFile="ui/MultipleConstraintType.xwt"> + <widget href="ui/MultipleConstraintType.xwt#/"/> + </sections> + <sections xmi:id="_W38FfpLCEeWbp4A9_-WIrQ" name="Single ModelElementFactoryDescriptor" sectionFile="ui/SingleModelElementFactoryDescriptor.xwt"> + <widget href="ui/SingleModelElementFactoryDescriptor.xwt#/"/> + </sections> + <sections xmi:id="_W38Ff5LCEeWbp4A9_-WIrQ" name="Multiple ModelElementFactoryDescriptor" sectionFile="ui/MultipleModelElementFactoryDescriptor.xwt"> + <widget href="ui/MultipleModelElementFactoryDescriptor.xwt#/"/> + </sections> + <sections xmi:id="_W38FgJLCEeWbp4A9_-WIrQ" name="Single StandardWidgetType" sectionFile="ui/SingleStandardWidgetType.xwt"> + <widget href="ui/SingleStandardWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38sgJLCEeWbp4A9_-WIrQ" name="Multiple StandardWidgetType" sectionFile="ui/MultipleStandardWidgetType.xwt"> + <widget href="ui/MultipleStandardWidgetType.xwt#/"/> + </sections> + <sections xmi:id="_W38sgZLCEeWbp4A9_-WIrQ" name="Single Context" sectionFile="ui/SingleContext.xwt"> + <widget href="ui/SingleContext.xwt#/"/> + </sections> + <sections xmi:id="_W38sgpLCEeWbp4A9_-WIrQ" name="Multiple Context" sectionFile="ui/MultipleContext.xwt"> + <widget href="ui/MultipleContext.xwt#/"/> + </sections> + <sections xmi:id="_W38sg5LCEeWbp4A9_-WIrQ" name="Single DisplayUnit" sectionFile="ui/SingleDisplayUnit.xwt"> + <widget href="ui/SingleDisplayUnit.xwt#/"/> + </sections> + <sections xmi:id="_W38shJLCEeWbp4A9_-WIrQ" name="Multiple DisplayUnit" sectionFile="ui/MultipleDisplayUnit.xwt"> + <widget href="ui/MultipleDisplayUnit.xwt#/"/> + </sections> + <sections xmi:id="_W38shZLCEeWbp4A9_-WIrQ" name="Single View" sectionFile="ui/SingleView.xwt"> + <widget href="ui/SingleView.xwt#/"/> + </sections> + <sections xmi:id="_W38shpLCEeWbp4A9_-WIrQ" name="Multiple View" sectionFile="ui/MultipleView.xwt"> + <widget href="ui/MultipleView.xwt#/"/> + </sections> + <sections xmi:id="_W38sh5LCEeWbp4A9_-WIrQ" name="Single Tab" sectionFile="ui/SingleTab.xwt"> + <widget href="ui/SingleTab.xwt#/"/> + </sections> + <sections xmi:id="_W38siJLCEeWbp4A9_-WIrQ" name="Multiple Tab" sectionFile="ui/MultipleTab.xwt"> + <widget href="ui/MultipleTab.xwt#/"/> + </sections> + <sections xmi:id="_W38siZLCEeWbp4A9_-WIrQ" name="Single Section" sectionFile="ui/SingleSection.xwt"> + <widget href="ui/SingleSection.xwt#/"/> + </sections> + <sections xmi:id="_W38sipLCEeWbp4A9_-WIrQ" name="Multiple Section" sectionFile="ui/MultipleSection.xwt"> + <widget href="ui/MultipleSection.xwt#/"/> + </sections> + <sections xmi:id="_W38si5LCEeWbp4A9_-WIrQ" name="Single DataContextElement" sectionFile="ui/SingleDataContextElement.xwt"> + <widget href="ui/SingleDataContextElement.xwt#/"/> + </sections> + <sections xmi:id="_W38sjJLCEeWbp4A9_-WIrQ" name="Multiple DataContextElement" sectionFile="ui/MultipleDataContextElement.xwt"> + <widget href="ui/MultipleDataContextElement.xwt#/"/> + </sections> + <sections xmi:id="_W38sjZLCEeWbp4A9_-WIrQ" name="Single Property" sectionFile="ui/SingleProperty.xwt"> + <widget href="ui/SingleProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38sjpLCEeWbp4A9_-WIrQ" name="Multiple Property" sectionFile="ui/MultipleProperty.xwt"> + <widget href="ui/MultipleProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38sj5LCEeWbp4A9_-WIrQ" name="Single UnknownProperty" sectionFile="ui/SingleUnknownProperty.xwt"> + <widget href="ui/SingleUnknownProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38skJLCEeWbp4A9_-WIrQ" name="Multiple UnknownProperty" sectionFile="ui/MultipleUnknownProperty.xwt"> + <widget href="ui/MultipleUnknownProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38skZLCEeWbp4A9_-WIrQ" name="Single DataContextPackage" sectionFile="ui/SingleDataContextPackage.xwt"> + <widget href="ui/SingleDataContextPackage.xwt#/"/> + </sections> + <sections xmi:id="_W38skpLCEeWbp4A9_-WIrQ" name="Multiple DataContextPackage" sectionFile="ui/MultipleDataContextPackage.xwt"> + <widget href="ui/MultipleDataContextPackage.xwt#/"/> + </sections> + <sections xmi:id="_W38sk5LCEeWbp4A9_-WIrQ" name="Single DataContextRoot" sectionFile="ui/SingleDataContextRoot.xwt"> + <widget href="ui/SingleDataContextRoot.xwt#/"/> + </sections> + <sections xmi:id="_W38slJLCEeWbp4A9_-WIrQ" name="Multiple DataContextRoot" sectionFile="ui/MultipleDataContextRoot.xwt"> + <widget href="ui/MultipleDataContextRoot.xwt#/"/> + </sections> + <sections xmi:id="_W38slZLCEeWbp4A9_-WIrQ" name="Single ConstraintDescriptor" sectionFile="ui/SingleConstraintDescriptor.xwt"> + <widget href="ui/SingleConstraintDescriptor.xwt#/"/> + </sections> + <sections xmi:id="_W38slpLCEeWbp4A9_-WIrQ" name="Multiple ConstraintDescriptor" sectionFile="ui/MultipleConstraintDescriptor.xwt"> + <widget href="ui/MultipleConstraintDescriptor.xwt#/"/> + </sections> + <sections xmi:id="_W38sl5LCEeWbp4A9_-WIrQ" name="Single ConfigProperty" sectionFile="ui/SingleConfigProperty.xwt"> + <widget href="ui/SingleConfigProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38smJLCEeWbp4A9_-WIrQ" name="Multiple ConfigProperty" sectionFile="ui/MultipleConfigProperty.xwt"> + <widget href="ui/MultipleConfigProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38smZLCEeWbp4A9_-WIrQ" name="Single ValueProperty" sectionFile="ui/SingleValueProperty.xwt"> + <widget href="ui/SingleValueProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38smpLCEeWbp4A9_-WIrQ" name="Multiple ValueProperty" sectionFile="ui/MultipleValueProperty.xwt"> + <widget href="ui/MultipleValueProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38sm5LCEeWbp4A9_-WIrQ" name="Single ReferenceProperty" sectionFile="ui/SingleReferenceProperty.xwt"> + <widget href="ui/SingleReferenceProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38snJLCEeWbp4A9_-WIrQ" name="Multiple ReferenceProperty" sectionFile="ui/MultipleReferenceProperty.xwt"> + <widget href="ui/MultipleReferenceProperty.xwt#/"/> + </sections> + <sections xmi:id="_W38snZLCEeWbp4A9_-WIrQ" name="Single Element" sectionFile="ui/SingleElement.xwt"> + <widget href="ui/SingleElement.xwt#/"/> + </sections> + <sections xmi:id="_W39TkJLCEeWbp4A9_-WIrQ" name="Multiple Element" sectionFile="ui/MultipleElement.xwt"> + <widget href="ui/MultipleElement.xwt#/"/> + </sections> + <sections xmi:id="_W39TkZLCEeWbp4A9_-WIrQ" name="Single UIComponent" sectionFile="ui/SingleUIComponent.xwt"> + <widget href="ui/SingleUIComponent.xwt#/"/> + </sections> + <sections xmi:id="_W39TkpLCEeWbp4A9_-WIrQ" name="Multiple UIComponent" sectionFile="ui/MultipleUIComponent.xwt"> + <widget href="ui/MultipleUIComponent.xwt#/"/> + </sections> + <sections xmi:id="_W39Tk5LCEeWbp4A9_-WIrQ" name="Single Widget" sectionFile="ui/SingleWidget.xwt"> + <widget href="ui/SingleWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39TlJLCEeWbp4A9_-WIrQ" name="Multiple Widget" sectionFile="ui/MultipleWidget.xwt"> + <widget href="ui/MultipleWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39TlZLCEeWbp4A9_-WIrQ" name="Single StandardWidget" sectionFile="ui/SingleStandardWidget.xwt"> + <widget href="ui/SingleStandardWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39TlpLCEeWbp4A9_-WIrQ" name="Multiple StandardWidget" sectionFile="ui/MultipleStandardWidget.xwt"> + <widget href="ui/MultipleStandardWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39Tl5LCEeWbp4A9_-WIrQ" name="Single PropertyEditor" sectionFile="ui/SinglePropertyEditor.xwt"> + <widget href="ui/SinglePropertyEditor.xwt#/"/> + </sections> + <sections xmi:id="_W39TmJLCEeWbp4A9_-WIrQ" name="Multiple PropertyEditor" sectionFile="ui/MultiplePropertyEditor.xwt"> + <widget href="ui/MultiplePropertyEditor.xwt#/"/> + </sections> + <sections xmi:id="_W39TmZLCEeWbp4A9_-WIrQ" name="Single CompositeWidget" sectionFile="ui/SingleCompositeWidget.xwt"> + <widget href="ui/SingleCompositeWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39TmpLCEeWbp4A9_-WIrQ" name="Multiple CompositeWidget" sectionFile="ui/MultipleCompositeWidget.xwt"> + <widget href="ui/MultipleCompositeWidget.xwt#/"/> + </sections> + <sections xmi:id="_W39Tm5LCEeWbp4A9_-WIrQ" name="Single Layout" sectionFile="ui/SingleLayout.xwt"> + <widget href="ui/SingleLayout.xwt#/"/> + </sections> + <sections xmi:id="_W39TnJLCEeWbp4A9_-WIrQ" name="Multiple Layout" sectionFile="ui/MultipleLayout.xwt"> + <widget href="ui/MultipleLayout.xwt#/"/> + </sections> + <sections xmi:id="_W39TnZLCEeWbp4A9_-WIrQ" name="Single WidgetAttribute" sectionFile="ui/SingleWidgetAttribute.xwt"> + <widget href="ui/SingleWidgetAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39TnpLCEeWbp4A9_-WIrQ" name="Multiple WidgetAttribute" sectionFile="ui/MultipleWidgetAttribute.xwt"> + <widget href="ui/MultipleWidgetAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39Tn5LCEeWbp4A9_-WIrQ" name="Single ValueAttribute" sectionFile="ui/SingleValueAttribute.xwt"> + <widget href="ui/SingleValueAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39ToJLCEeWbp4A9_-WIrQ" name="Multiple ValueAttribute" sectionFile="ui/MultipleValueAttribute.xwt"> + <widget href="ui/MultipleValueAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39ToZLCEeWbp4A9_-WIrQ" name="Single ReferenceAttribute" sectionFile="ui/SingleReferenceAttribute.xwt"> + <widget href="ui/SingleReferenceAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39TopLCEeWbp4A9_-WIrQ" name="Multiple ReferenceAttribute" sectionFile="ui/MultipleReferenceAttribute.xwt"> + <widget href="ui/MultipleReferenceAttribute.xwt#/"/> + </sections> + <sections xmi:id="_W39To5LCEeWbp4A9_-WIrQ" name="Single UnknownComponent" sectionFile="ui/SingleUnknownComponent.xwt"> + <widget href="ui/SingleUnknownComponent.xwt#/"/> + </sections> + <sections xmi:id="_W39TpJLCEeWbp4A9_-WIrQ" name="Multiple UnknownComponent" sectionFile="ui/MultipleUnknownComponent.xwt"> + <widget href="ui/MultipleUnknownComponent.xwt#/"/> + </sections> + <sections xmi:id="_W39TpZLCEeWbp4A9_-WIrQ" name="GroupAttributes" sectionFile="ui/GroupAttributes.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W396oJLCEeWbp4A9_-WIrQ" name="isGroup"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W396oZLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isGroup"/> + </properties> + </constraints> + <widget href="ui/GroupAttributes.xwt#/"/> + </sections> + <sections xmi:id="_W396opLCEeWbp4A9_-WIrQ" name="EcoreInstanceOf" sectionFile="ui/EcoreInstanceOf.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W396o5LCEeWbp4A9_-WIrQ" name="isEcoreInstanceOf"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W396pJLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isEcoreInstanceOf"/> + </properties> + </constraints> + <widget href="ui/EcoreInstanceOf.xwt#/"/> + </sections> + <sections xmi:id="_W396pZLCEeWbp4A9_-WIrQ" name="UMLInstanceOf" sectionFile="ui/UMLInstanceOf.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W396ppLCEeWbp4A9_-WIrQ" name="isUMLInstanceOf"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W396p5LCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isUmlInstanceOf"/> + </properties> + </constraints> + <widget href="ui/UMLInstanceOf.xwt#/"/> + </sections> + <sections xmi:id="_W396qJLCEeWbp4A9_-WIrQ" name="OCLQuery" sectionFile="ui/OCLQuery.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W396qZLCEeWbp4A9_-WIrQ" name="isOCLQueryConstraint"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W396qpLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isOclQuery"/> + </properties> + </constraints> + <widget href="ui/OCLQuery.xwt#/"/> + </sections> + <sections xmi:id="_W396q5LCEeWbp4A9_-WIrQ" name="Stereotype" sectionFile="ui/Stereotype.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W396rJLCEeWbp4A9_-WIrQ" name="isStereotypeConstraint"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W396rZLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isStereotype"/> + </properties> + </constraints> + <widget href="ui/Stereotype.xwt#/"/> + </sections> + <sections xmi:id="_W3-hsJLCEeWbp4A9_-WIrQ" name="GridLayout" sectionFile="ui/GridLayout.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-hsZLCEeWbp4A9_-WIrQ" name="isGridLayout"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W3-hspLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isGridLayout"/> + </properties> + </constraints> + <widget href="ui/GridLayout.xwt#/"/> + </sections> + <sections xmi:id="_W3-hs5LCEeWbp4A9_-WIrQ" name="Label" sectionFile="ui/Label.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-htJLCEeWbp4A9_-WIrQ" name="isSWTLabel"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W3-htZLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isLabel"/> + </properties> + </constraints> + <widget href="ui/Label.xwt#/"/> + </sections> + <sections xmi:id="_W3-htpLCEeWbp4A9_-WIrQ" name="Single ToggleButton" sectionFile="ui/Single ToggleButton.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-ht5LCEeWbp4A9_-WIrQ" name="isSingleToggleButton"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W3-huJLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isToggleButton"/> + </properties> + </constraints> + <widget href="ui/Single ToggleButton.xwt#/"/> + </sections> + <sections xmi:id="_W3-huZLCEeWbp4A9_-WIrQ" name="SingleFileSelector" sectionFile="ui/SingleFileSelector.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-hupLCEeWbp4A9_-WIrQ" name="isSingleFileSelector"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W3-hu5LCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isFileSelector"/> + </properties> + </constraints> + <widget href="ui/SingleFileSelector.xwt#/"/> + </sections> + <sections xmi:id="_W3-hvJLCEeWbp4A9_-WIrQ" name="Single IntegerSpinner" sectionFile="ui/Single IntegerSpinner.xwt"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-hvZLCEeWbp4A9_-WIrQ" name="isIntegerSpinner"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.2"/> + <properties xsi:type="constraints:ReferenceProperty" xmi:id="_W3-hvpLCEeWbp4A9_-WIrQ" name="query"> + <value href="custom.querySet#isIntegerSpinner"/> + </properties> + </constraints> + <widget href="ui/Single IntegerSpinner.xwt#/"/> + </sections> + <sections xmi:id="_W3-hv5LCEeWbp4A9_-WIrQ" name="SingleCompositeConstraint" sectionFile="ui/SingleCompositeConstraint.xwt"> + <widget href="ui/SingleCompositeConstraint.xwt#/"/> + </sections> + <sections xmi:id="_W3-hwJLCEeWbp4A9_-WIrQ" name="MultipleCompositeConstraint" sectionFile="ui/MultipleCompositeConstraint.xwt"> + <widget href="ui/MultipleCompositeConstraint.xwt#/"/> + </sections> + </tabs> + <views xmi:id="_W3-hwZLCEeWbp4A9_-WIrQ" name="Single Environment" sections="_W38FcpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3-hwpLCEeWbp4A9_-WIrQ" name="isSingleEnvironment"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IwJLCEeWbp4A9_-WIrQ" name="className" value="Environment"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IwZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_IwpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Environment" sections="_W38Fc5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_Iw5LCEeWbp4A9_-WIrQ" name="isMultipleEnvironment"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IxJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IxZLCEeWbp4A9_-WIrQ" name="className" value="Environment"/> + </constraints> + </views> + <views xmi:id="_W3_IxpLCEeWbp4A9_-WIrQ" name="Single WidgetType" sections="_W38FdJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_Ix5LCEeWbp4A9_-WIrQ" name="isSingleWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IyJLCEeWbp4A9_-WIrQ" name="className" value="WidgetType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IyZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_IypLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple WidgetType" sections="_W38FdZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_Iy5LCEeWbp4A9_-WIrQ" name="isMultipleWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IzJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_IzZLCEeWbp4A9_-WIrQ" name="className" value="WidgetType"/> + </constraints> + </views> + <views xmi:id="_W3_IzpLCEeWbp4A9_-WIrQ" name="Single PropertyEditorType" sections="_W38FdpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_Iz5LCEeWbp4A9_-WIrQ" name="isSinglePropertyEditorType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I0JLCEeWbp4A9_-WIrQ" name="className" value="PropertyEditorType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I0ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_I0pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple PropertyEditorType" sections="_W38Fd5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_I05LCEeWbp4A9_-WIrQ" name="isMultiplePropertyEditorType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I1JLCEeWbp4A9_-WIrQ" name="className" value="PropertyEditorType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I1ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_I1pLCEeWbp4A9_-WIrQ" name="Single CompositeWidgetType" sections="_W38FeJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_I15LCEeWbp4A9_-WIrQ" name="isSingleCompositeWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I2JLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I2ZLCEeWbp4A9_-WIrQ" name="className" value="CompositeWidgetType"/> + </constraints> + </views> + <views xmi:id="_W3_I2pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple CompositeWidgetType" sections="_W38FeZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_I25LCEeWbp4A9_-WIrQ" name="isMultipleCompositeWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I3JLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_I3ZLCEeWbp4A9_-WIrQ" name="className" value="CompositeWidgetType"/> + </constraints> + </views> + <views xmi:id="_W3_I3pLCEeWbp4A9_-WIrQ" name="Single LayoutType" sections="_W38FepLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_I35LCEeWbp4A9_-WIrQ" name="isSingleLayoutType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v0JLCEeWbp4A9_-WIrQ" name="className" value="LayoutType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v0ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v0pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple LayoutType" sections="_W38Fe5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v05LCEeWbp4A9_-WIrQ" name="isMultipleLayoutType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v1JLCEeWbp4A9_-WIrQ" name="className" value="LayoutType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v1ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v1pLCEeWbp4A9_-WIrQ" name="Single ConstraintType" sections="_W38FfJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v15LCEeWbp4A9_-WIrQ" name="isSingleConstraintType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v2JLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v2ZLCEeWbp4A9_-WIrQ" name="className" value="ConstraintType"/> + </constraints> + </views> + <views xmi:id="_W3_v2pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ConstraintType" sections="_W38FfZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v25LCEeWbp4A9_-WIrQ" name="isMultipleConstraintType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v3JLCEeWbp4A9_-WIrQ" name="className" value="ConstraintType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v3ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v3pLCEeWbp4A9_-WIrQ" name="Single ModelElementFactoryDescriptor" sections="_W38FfpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v35LCEeWbp4A9_-WIrQ" name="isSingleModelElementFactoryDescriptor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v4JLCEeWbp4A9_-WIrQ" name="className" value="ModelElementFactoryDescriptor"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v4ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v4pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ModelElementFactoryDescriptor" sections="_W38Ff5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v45LCEeWbp4A9_-WIrQ" name="isMultipleModelElementFactoryDescriptor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v5JLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v5ZLCEeWbp4A9_-WIrQ" name="className" value="ModelElementFactoryDescriptor"/> + </constraints> + </views> + <views xmi:id="_W3_v5pLCEeWbp4A9_-WIrQ" name="Single StandardWidgetType" sections="_W38FgJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v55LCEeWbp4A9_-WIrQ" name="isSingleStandardWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v6JLCEeWbp4A9_-WIrQ" name="className" value="StandardWidgetType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v6ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v6pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple StandardWidgetType" sections="_W38sgJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v65LCEeWbp4A9_-WIrQ" name="isMultipleStandardWidgetType"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v7JLCEeWbp4A9_-WIrQ" name="className" value="StandardWidgetType"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v7ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/environment/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v7pLCEeWbp4A9_-WIrQ" name="Single Context" sections="_W38sgZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v75LCEeWbp4A9_-WIrQ" name="isSingleContext"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v8JLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v8ZLCEeWbp4A9_-WIrQ" name="className" value="Context"/> + </constraints> + </views> + <views xmi:id="_W3_v8pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Context" sections="_W38sgpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v85LCEeWbp4A9_-WIrQ" name="isMultipleContext"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v9JLCEeWbp4A9_-WIrQ" name="className" value="Context"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v9ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v9pLCEeWbp4A9_-WIrQ" name="Single DisplayUnit" sections="_W38sg5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v95LCEeWbp4A9_-WIrQ" name="isSingleDisplayUnit"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v-JLCEeWbp4A9_-WIrQ" name="className" value="DisplayUnit"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v-ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v-pLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple DisplayUnit" sections="_W38shJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W3_v-5LCEeWbp4A9_-WIrQ" name="isMultipleDisplayUnit"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v_JLCEeWbp4A9_-WIrQ" name="className" value="DisplayUnit"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W3_v_ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <views xmi:id="_W3_v_pLCEeWbp4A9_-WIrQ" name="Single View" sections="_W38shZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW4JLCEeWbp4A9_-WIrQ" name="isSingleView"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW4ZLCEeWbp4A9_-WIrQ" name="className" value="View"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW4pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4AW45LCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple View" sections="_W38shpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW5JLCEeWbp4A9_-WIrQ" name="isMultipleView"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW5ZLCEeWbp4A9_-WIrQ" name="className" value="View"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW5pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4AW55LCEeWbp4A9_-WIrQ" name="Single Tab" sections="_W38sh5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW6JLCEeWbp4A9_-WIrQ" name="isSingleTab"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW6ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW6pLCEeWbp4A9_-WIrQ" name="className" value="Tab"/> + </constraints> + </views> + <views xmi:id="_W4AW65LCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Tab" sections="_W38siJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW7JLCEeWbp4A9_-WIrQ" name="isMultipleTab"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW7ZLCEeWbp4A9_-WIrQ" name="className" value="Tab"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW7pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4AW75LCEeWbp4A9_-WIrQ" name="Single Section" sections="_W38siZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW8JLCEeWbp4A9_-WIrQ" name="isSingleSection"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW8ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW8pLCEeWbp4A9_-WIrQ" name="className" value="Section"/> + </constraints> + </views> + <views xmi:id="_W4AW85LCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Section" sections="_W38sipLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW9JLCEeWbp4A9_-WIrQ" name="isMultipleSection"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW9ZLCEeWbp4A9_-WIrQ" name="className" value="Section"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW9pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4AW95LCEeWbp4A9_-WIrQ" name="Single DataContextElement" sections="_W38si5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW-JLCEeWbp4A9_-WIrQ" name="isSingleDataContextElement"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW-ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW-pLCEeWbp4A9_-WIrQ" name="className" value="DataContextElement"/> + </constraints> + </views> + <views xmi:id="_W4AW-5LCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple DataContextElement" sections="_W38sjJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4AW_JLCEeWbp4A9_-WIrQ" name="isMultipleDataContextElement"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW_ZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4AW_pLCEeWbp4A9_-WIrQ" name="className" value="DataContextElement"/> + </constraints> + </views> + <views xmi:id="_W4A98JLCEeWbp4A9_-WIrQ" name="Single Property" sections="_W38sjZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A98ZLCEeWbp4A9_-WIrQ" name="isSingleProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A98pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A985LCEeWbp4A9_-WIrQ" name="className" value="Property"/> + </constraints> + </views> + <views xmi:id="_W4A99JLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Property" sections="_W38sjpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A99ZLCEeWbp4A9_-WIrQ" name="isMultipleProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A99pLCEeWbp4A9_-WIrQ" name="className" value="Property"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A995LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4A9-JLCEeWbp4A9_-WIrQ" name="Single UnknownProperty" sections="_W38sj5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A9-ZLCEeWbp4A9_-WIrQ" name="isSingleUnknownProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A9-pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A9-5LCEeWbp4A9_-WIrQ" name="className" value="UnknownProperty"/> + </constraints> + </views> + <views xmi:id="_W4A9_JLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple UnknownProperty" sections="_W38skJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A9_ZLCEeWbp4A9_-WIrQ" name="isMultipleUnknownProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A9_pLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A9_5LCEeWbp4A9_-WIrQ" name="className" value="UnknownProperty"/> + </constraints> + </views> + <views xmi:id="_W4A-AJLCEeWbp4A9_-WIrQ" name="Single DataContextPackage" sections="_W38skZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-AZLCEeWbp4A9_-WIrQ" name="isSingleDataContextPackage"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-ApLCEeWbp4A9_-WIrQ" name="className" value="DataContextPackage"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-A5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + </constraints> + </views> + <views xmi:id="_W4A-BJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple DataContextPackage" sections="_W38skpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-BZLCEeWbp4A9_-WIrQ" name="isMultipleDataContextPackage"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-BpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-B5LCEeWbp4A9_-WIrQ" name="className" value="DataContextPackage"/> + </constraints> + </views> + <views xmi:id="_W4A-CJLCEeWbp4A9_-WIrQ" name="Single DataContextRoot" sections="_W38sk5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-CZLCEeWbp4A9_-WIrQ" name="isSingleDataContextRoot"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-CpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-C5LCEeWbp4A9_-WIrQ" name="className" value="DataContextRoot"/> + </constraints> + </views> + <views xmi:id="_W4A-DJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple DataContextRoot" sections="_W38slJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-DZLCEeWbp4A9_-WIrQ" name="isMultipleDataContextRoot"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-DpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/contexts/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-D5LCEeWbp4A9_-WIrQ" name="className" value="DataContextRoot"/> + </constraints> + </views> + <views xmi:id="_W4A-EJLCEeWbp4A9_-WIrQ" name="Single ConstraintDescriptor" sections="_W38slZLCEeWbp4A9_-WIrQ _W396opLCEeWbp4A9_-WIrQ _W396pZLCEeWbp4A9_-WIrQ _W396qJLCEeWbp4A9_-WIrQ _W396q5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-EZLCEeWbp4A9_-WIrQ" name="isSingleConstraintDescriptor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-EpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-E5LCEeWbp4A9_-WIrQ" name="className" value="ConstraintDescriptor"/> + </constraints> + </views> + <views xmi:id="_W4A-FJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ConstraintDescriptor" sections="_W38slpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4A-FZLCEeWbp4A9_-WIrQ" name="isMultipleConstraintDescriptor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-FpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4A-F5LCEeWbp4A9_-WIrQ" name="className" value="ConstraintDescriptor"/> + </constraints> + </views> + <views xmi:id="_W4BlAJLCEeWbp4A9_-WIrQ" name="Single ConfigProperty" sections="_W38sl5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlAZLCEeWbp4A9_-WIrQ" name="isSingleConfigProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlApLCEeWbp4A9_-WIrQ" name="className" value="ConfigProperty"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlA5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlBJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ConfigProperty" sections="_W38smJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlBZLCEeWbp4A9_-WIrQ" name="isMultipleConfigProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlBpLCEeWbp4A9_-WIrQ" name="className" value="ConfigProperty"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlB5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlCJLCEeWbp4A9_-WIrQ" name="Single ValueProperty" sections="_W38smZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlCZLCEeWbp4A9_-WIrQ" name="isSingleValueProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlCpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlC5LCEeWbp4A9_-WIrQ" name="className" value="ValueProperty"/> + </constraints> + </views> + <views xmi:id="_W4BlDJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ValueProperty" sections="_W38smpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlDZLCEeWbp4A9_-WIrQ" name="isMultipleValueProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlDpLCEeWbp4A9_-WIrQ" name="className" value="ValueProperty"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlD5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlEJLCEeWbp4A9_-WIrQ" name="Single ReferenceProperty" sections="_W38sm5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlEZLCEeWbp4A9_-WIrQ" name="isSingleReferenceProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlEpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlE5LCEeWbp4A9_-WIrQ" name="className" value="ReferenceProperty"/> + </constraints> + </views> + <views xmi:id="_W4BlFJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ReferenceProperty" sections="_W38snJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlFZLCEeWbp4A9_-WIrQ" name="isMultipleReferenceProperty"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlFpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlF5LCEeWbp4A9_-WIrQ" name="className" value="ReferenceProperty"/> + </constraints> + </views> + <views xmi:id="_W4BlGJLCEeWbp4A9_-WIrQ" name="Single Element" sections="_W38snZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlGZLCEeWbp4A9_-WIrQ" name="isSingleElement"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlGpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlG5LCEeWbp4A9_-WIrQ" name="className" value="Element"/> + </constraints> + </views> + <views xmi:id="_W4BlHJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Element" sections="_W39TkJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlHZLCEeWbp4A9_-WIrQ" name="isMultipleElement"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlHpLCEeWbp4A9_-WIrQ" name="className" value="Element"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlH5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlIJLCEeWbp4A9_-WIrQ" name="Single UIComponent" sections="_W39TkZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlIZLCEeWbp4A9_-WIrQ" name="isSingleUIComponent"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlIpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlI5LCEeWbp4A9_-WIrQ" name="className" value="UIComponent"/> + </constraints> + </views> + <views xmi:id="_W4BlJJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple UIComponent" sections="_W39TkpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlJZLCEeWbp4A9_-WIrQ" name="isMultipleUIComponent"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlJpLCEeWbp4A9_-WIrQ" name="className" value="UIComponent"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlJ5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlKJLCEeWbp4A9_-WIrQ" name="Single Widget" sections="_W39Tk5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlKZLCEeWbp4A9_-WIrQ" name="isSingleWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlKpLCEeWbp4A9_-WIrQ" name="className" value="Widget"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlK5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlLJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Widget" sections="_W39TlJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlLZLCEeWbp4A9_-WIrQ" name="isMultipleWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlLpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlL5LCEeWbp4A9_-WIrQ" name="className" value="Widget"/> + </constraints> + </views> + <views xmi:id="_W4BlMJLCEeWbp4A9_-WIrQ" name="Single StandardWidget" sections="_W39TlZLCEeWbp4A9_-WIrQ _W3-hs5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlMZLCEeWbp4A9_-WIrQ" name="isSingleStandardWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlMpLCEeWbp4A9_-WIrQ" name="className" value="StandardWidget"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4BlM5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4BlNJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple StandardWidget" sections="_W39TlpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4BlNZLCEeWbp4A9_-WIrQ" name="isMultipleStandardWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMEJLCEeWbp4A9_-WIrQ" name="className" value="StandardWidget"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMEZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CMEpLCEeWbp4A9_-WIrQ" name="Single PropertyEditor" sections="_W39Tl5LCEeWbp4A9_-WIrQ _W3-htpLCEeWbp4A9_-WIrQ _W3-huZLCEeWbp4A9_-WIrQ _W3-hvJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CME5LCEeWbp4A9_-WIrQ" name="isSinglePropertyEditor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMFJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMFZLCEeWbp4A9_-WIrQ" name="className" value="PropertyEditor"/> + </constraints> + </views> + <views xmi:id="_W4CMFpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple PropertyEditor" sections="_W39TmJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMF5LCEeWbp4A9_-WIrQ" name="isMultiplePropertyEditor"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMGJLCEeWbp4A9_-WIrQ" name="className" value="PropertyEditor"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMGZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CMGpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Single CompositeWidget" sections="_W39TmZLCEeWbp4A9_-WIrQ _W39TpZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMG5LCEeWbp4A9_-WIrQ" name="isSingleCompositeWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMHJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMHZLCEeWbp4A9_-WIrQ" name="className" value="CompositeWidget"/> + </constraints> + </views> + <views xmi:id="_W4CMHpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple CompositeWidget" sections="_W39TmpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMH5LCEeWbp4A9_-WIrQ" name="isMultipleCompositeWidget"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMIJLCEeWbp4A9_-WIrQ" name="className" value="CompositeWidget"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMIZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CMIpLCEeWbp4A9_-WIrQ" name="Single Layout" sections="_W39Tm5LCEeWbp4A9_-WIrQ _W3-hsJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMI5LCEeWbp4A9_-WIrQ" name="isSingleLayout"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMJJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMJZLCEeWbp4A9_-WIrQ" name="className" value="Layout"/> + </constraints> + </views> + <views xmi:id="_W4CMJpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple Layout" sections="_W39TnJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMJ5LCEeWbp4A9_-WIrQ" name="isMultipleLayout"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMKJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMKZLCEeWbp4A9_-WIrQ" name="className" value="Layout"/> + </constraints> + </views> + <views xmi:id="_W4CMKpLCEeWbp4A9_-WIrQ" name="Single WidgetAttribute" sections="_W39TnZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMK5LCEeWbp4A9_-WIrQ" name="isSingleWidgetAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMLJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMLZLCEeWbp4A9_-WIrQ" name="className" value="WidgetAttribute"/> + </constraints> + </views> + <views xmi:id="_W4CMLpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple WidgetAttribute" sections="_W39TnpLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CML5LCEeWbp4A9_-WIrQ" name="isMultipleWidgetAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMMJLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMMZLCEeWbp4A9_-WIrQ" name="className" value="WidgetAttribute"/> + </constraints> + </views> + <views xmi:id="_W4CMMpLCEeWbp4A9_-WIrQ" name="Single ValueAttribute" sections="_W39Tn5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMM5LCEeWbp4A9_-WIrQ" name="isSingleValueAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMNJLCEeWbp4A9_-WIrQ" name="className" value="ValueAttribute"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMNZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CMNpLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ValueAttribute" sections="_W39ToJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMN5LCEeWbp4A9_-WIrQ" name="isMultipleValueAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMOJLCEeWbp4A9_-WIrQ" name="className" value="ValueAttribute"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMOZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CMOpLCEeWbp4A9_-WIrQ" name="Single ReferenceAttribute" sections="_W39ToZLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CMO5LCEeWbp4A9_-WIrQ" name="isSingleReferenceAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMPJLCEeWbp4A9_-WIrQ" name="className" value="ReferenceAttribute"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CMPZLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CzIJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple ReferenceAttribute" sections="_W39TopLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CzIZLCEeWbp4A9_-WIrQ" name="isMultipleReferenceAttribute"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzIpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzI5LCEeWbp4A9_-WIrQ" name="className" value="ReferenceAttribute"/> + </constraints> + </views> + <views xmi:id="_W4CzJJLCEeWbp4A9_-WIrQ" name="Single UnknownComponent" sections="_W39To5LCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CzJZLCEeWbp4A9_-WIrQ" name="isSingleUnknownComponent"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzJpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzJ5LCEeWbp4A9_-WIrQ" name="className" value="UnknownComponent"/> + </constraints> + </views> + <views xmi:id="_W4CzKJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="Multiple UnknownComponent" sections="_W39TpJLCEeWbp4A9_-WIrQ" automaticContext="true"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CzKZLCEeWbp4A9_-WIrQ" name="isMultipleUnknownComponent"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzKpLCEeWbp4A9_-WIrQ" name="className" value="UnknownComponent"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzK5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/properties/ui/0.9"/> + </constraints> + </views> + <views xmi:id="_W4CzLJLCEeWbp4A9_-WIrQ" name="SingleCompositeConstraint" sections="_W3-hv5LCEeWbp4A9_-WIrQ"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CzLZLCEeWbp4A9_-WIrQ" name="isSingleCompositeConstraint"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzLpLCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzL5LCEeWbp4A9_-WIrQ" name="className" value="CompositeConstraint"/> + </constraints> + </views> + <views xmi:id="_W4CzMJLCEeWbp4A9_-WIrQ" elementMultiplicity="-1" name="MultipleCompositeConstraint" sections="_W3-hwJLCEeWbp4A9_-WIrQ"> + <constraints xsi:type="constraints:SimpleConstraint" xmi:id="_W4CzMZLCEeWbp4A9_-WIrQ" name="isMultipleCompositeConstraint"> + <constraintType href="ppe:/environment/org.eclipse.papyrus.infra.properties.ui/model/Environment.xmi#//@constraintTypes.0"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzMpLCEeWbp4A9_-WIrQ" name="className" value="CompositeConstraint"/> + <properties xsi:type="constraints:ValueProperty" xmi:id="_W4CzM5LCEeWbp4A9_-WIrQ" name="nsUri" value="http://www.eclipse.org/papyrus/constraints/0.9"/> + </constraints> + </views> + <dataContexts xmi:id="_W4CzNJLCEeWbp4A9_-WIrQ" name="properties" label="properties"> + <elements xsi:type="contexts:DataContextPackage" xmi:id="_W4CzNZLCEeWbp4A9_-WIrQ" name="environment"> + <elements xmi:id="_W4CzNpLCEeWbp4A9_-WIrQ" name="Environment"> + <properties xmi:id="_W4CzN5LCEeWbp4A9_-WIrQ" name="modelElementFactories" type="Reference" multiplicity="-1"/> + <properties xmi:id="_W4CzOJLCEeWbp4A9_-WIrQ" name="constraintTypes" type="Reference" multiplicity="-1"/> + <properties xmi:id="_W4CzOZLCEeWbp4A9_-WIrQ" name="widgetTypes" type="Reference" multiplicity="-1"/> + <properties xmi:id="_W4CzOpLCEeWbp4A9_-WIrQ" name="propertyEditorTypes" type="Reference" multiplicity="-1"/> + <properties xmi:id="_W4CzO5LCEeWbp4A9_-WIrQ" name="compositeWidgetTypes" type="Reference" multiplicity="-1"/> + <properties xmi:id="_W4CzPJLCEeWbp4A9_-WIrQ" name="layoutTypes" type="Reference" multiplicity="-1"/> + </elements> + <elements xmi:id="_W4CzPZLCEeWbp4A9_-WIrQ" name="PropertyEditorType" supertypes="_W4CzQJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4CzPpLCEeWbp4A9_-WIrQ" name="type" type="Enumeration"/> + <properties xmi:id="_W4CzP5LCEeWbp4A9_-WIrQ" name="multiplicity" type="Integer"/> + </elements> + <elements xmi:id="_W4CzQJLCEeWbp4A9_-WIrQ" name="WidgetType"> + <properties xmi:id="_W4DaMJLCEeWbp4A9_-WIrQ" name="label"/> + <properties xmi:id="_W4DaMZLCEeWbp4A9_-WIrQ" name="widgetClass"/> + </elements> + <elements xmi:id="_W4DaMpLCEeWbp4A9_-WIrQ" name="CompositeWidgetType" supertypes="_W4CzQJLCEeWbp4A9_-WIrQ"/> + <elements xmi:id="_W4DaM5LCEeWbp4A9_-WIrQ" name="LayoutType" supertypes="_W4CzQJLCEeWbp4A9_-WIrQ"/> + <elements xmi:id="_W4DaNJLCEeWbp4A9_-WIrQ" name="ConstraintType"> + <properties xmi:id="_W4DaNZLCEeWbp4A9_-WIrQ" name="label"/> + <properties xmi:id="_W4DaNpLCEeWbp4A9_-WIrQ" name="constraintClass"/> + </elements> + <elements xmi:id="_W4DaN5LCEeWbp4A9_-WIrQ" name="ModelElementFactoryDescriptor"> + <properties xmi:id="_W4DaOJLCEeWbp4A9_-WIrQ" name="name"/> + <properties xmi:id="_W4DaOZLCEeWbp4A9_-WIrQ" name="factoryClass"/> + </elements> + <elements xmi:id="_W4DaOpLCEeWbp4A9_-WIrQ" name="StandardWidgetType" supertypes="_W4CzQJLCEeWbp4A9_-WIrQ"/> + </elements> + <elements xsi:type="contexts:DataContextPackage" xmi:id="_W4DaO5LCEeWbp4A9_-WIrQ" name="contexts"> + <elements xmi:id="_W4DaPJLCEeWbp4A9_-WIrQ" name="Context"> + <properties xmi:id="_W4DaPZLCEeWbp4A9_-WIrQ" name="name" description="The name of the Configuration"/> + <properties xmi:id="_atbwUJLCEeWbp4A9_-WIrQ" name="label" description="The optional user-presentable label of the Configuration (if different from the name)."/> + <properties xmi:id="_W4DaPpLCEeWbp4A9_-WIrQ" name="views" type="Reference" multiplicity="-1" description="The list of views for this Configuration"/> + <properties xmi:id="_W4DaP5LCEeWbp4A9_-WIrQ" name="tabs" type="Reference" multiplicity="-1" description="The list of tabs for this Configuration"/> + <properties xmi:id="_W4DaQJLCEeWbp4A9_-WIrQ" name="dataContexts" type="Reference" multiplicity="-1" description="The list of Data Contexts used by this configuration"/> + <properties xmi:id="_W4DaQZLCEeWbp4A9_-WIrQ" name="dependencies" type="Reference" multiplicity="-1" description="The list of Configurations on which this configuration depends"/> + </elements> + <elements xmi:id="_W4DaQpLCEeWbp4A9_-WIrQ" name="DisplayUnit"> + <properties xmi:id="_W4DaQ5LCEeWbp4A9_-WIrQ" name="constraints" type="Reference" multiplicity="-1" description="The constraints associated to this Display Unit. The unit will be displayed only if at least one constraint is matched"/> + </elements> + <elements xmi:id="_W4DaRJLCEeWbp4A9_-WIrQ" name="View" supertypes="_W4DaQpLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4DaRZLCEeWbp4A9_-WIrQ" name="name" description="The name of this view"/> + <properties xmi:id="_W4DaRpLCEeWbp4A9_-WIrQ" name="sections" type="Reference" multiplicity="-1" description="The list of sections for this view"/> + <properties xmi:id="_W4DaR5LCEeWbp4A9_-WIrQ" name="automaticContext" label="" type="Boolean" description="deprecated"/> + <properties xmi:id="_W4DaSJLCEeWbp4A9_-WIrQ" name="datacontexts" type="Reference" multiplicity="-1" description="deprecated"/> + <properties xmi:id="_W4DaSZLCEeWbp4A9_-WIrQ" name="elementMultiplicity" label="" type="Integer" description="The number of selected elements for which this view should be displayed. May be 1 (Single element), -1 (Any number of elements) or any positive integer (For a strict number of elements)"/> + </elements> + <elements xmi:id="_W4DaSpLCEeWbp4A9_-WIrQ" name="Tab"> + <properties xmi:id="_W4DaS5LCEeWbp4A9_-WIrQ" name="label" description="The tab's label"/> + <properties xmi:id="_W4DaTJLCEeWbp4A9_-WIrQ" name="id" description="The tab's id. The ID should be unique within its category"/> + <properties xmi:id="_W4DaTZLCEeWbp4A9_-WIrQ" name="category" description="The tab's category"/> + <properties xmi:id="_W4DaTpLCEeWbp4A9_-WIrQ" name="image" label="" description="The tab's image. The path should be of the form /<plug-in id>/<path to the image>"/> + <properties xmi:id="_W4DaT5LCEeWbp4A9_-WIrQ" name="afterTab" label="" type="Reference" description="The tab after which this tab will be displayed. The afterTab's category should be the same as this tab's category"/> + <properties xmi:id="_W4DaUJLCEeWbp4A9_-WIrQ" name="sections" type="Reference" multiplicity="-1" description="The list of sections that can be displayed in this tab"/> + <properties xmi:id="_W4DaUZLCEeWbp4A9_-WIrQ" name="indented" label="" type="Boolean" description="Indicates if this tab should be indented. The preview isn't available for indentation"/> + <properties xmi:id="_W4DaUpLCEeWbp4A9_-WIrQ" name="priority" type="Integer" description="Indicates the priority for this tab. A lower priority means the tab will be placed before the other tabs. 0 is the highest priority, 100 is a very low priority."/> + </elements> + <elements xmi:id="_W4DaU5LCEeWbp4A9_-WIrQ" name="Section" supertypes="_W4DaQpLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4DaVJLCEeWbp4A9_-WIrQ" name="name" description="The section's name. It should be unique within this Configuration"/> + <properties xmi:id="_W4DaVZLCEeWbp4A9_-WIrQ" name="tab" type="Reference" description="The tab in which this section will be displayed"/> + <properties xmi:id="_W4DaVpLCEeWbp4A9_-WIrQ" name="sectionFile" description="The XWT file containing this section's UI declaration"/> + <properties xmi:id="_W4DaV5LCEeWbp4A9_-WIrQ" name="widget" label="" type="Reference" description="The SWT Widget representing this section"/> + </elements> + <elements xmi:id="_W4DaWJLCEeWbp4A9_-WIrQ" name="DataContextElement"> + <properties xmi:id="_W4DaWZLCEeWbp4A9_-WIrQ" name="name" label="" description="The name of this Data Context element"/> + <properties xmi:id="_W4DaWpLCEeWbp4A9_-WIrQ" name="properties" label="" type="Reference" multiplicity="-1" description="The list of properties of this Element"/> + <properties xmi:id="_W4DaW5LCEeWbp4A9_-WIrQ" name="package" type="Reference" description="This element's package"/> + <properties xmi:id="_W4DaXJLCEeWbp4A9_-WIrQ" name="supertypes" type="Reference" multiplicity="-1" description="This element's direct supertypes"/> + </elements> + <elements xmi:id="_W4DaXZLCEeWbp4A9_-WIrQ" name="Property"> + <properties xmi:id="_W4DaXpLCEeWbp4A9_-WIrQ" name="name" label="" description="The name of the property"/> + <properties xmi:id="_W4DaX5LCEeWbp4A9_-WIrQ" name="label" description="The label of this property"/> + <properties xmi:id="_W4DaYJLCEeWbp4A9_-WIrQ" name="type" type="Enumeration" description="The type of this property"/> + <properties xmi:id="_W4DaYZLCEeWbp4A9_-WIrQ" name="contextElement" type="Reference" description="The element to which this property belongs"/> + <properties xmi:id="_W4DaYpLCEeWbp4A9_-WIrQ" name="multiplicity" type="Integer" description="The multiplicity of this property."/> + <properties xmi:id="_W4DaY5LCEeWbp4A9_-WIrQ" name="description"/> + </elements> + <elements xmi:id="_W4DaZJLCEeWbp4A9_-WIrQ" name="UnknownProperty" supertypes="_W4DaXZLCEeWbp4A9_-WIrQ"/> + <elements xmi:id="_W4DaZZLCEeWbp4A9_-WIrQ" name="DataContextPackage" supertypes="_W4DaWJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4DaZpLCEeWbp4A9_-WIrQ" name="elements" type="Reference" multiplicity="-1" description="The list of Data Context elements contained into this package"/> + </elements> + <elements xmi:id="_W4EBQJLCEeWbp4A9_-WIrQ" name="DataContextRoot" supertypes="_W4DaZZLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBQZLCEeWbp4A9_-WIrQ" name="label" label="" description="The label of this Data Context root"/> + <properties xmi:id="_W4EBQpLCEeWbp4A9_-WIrQ" name="modelElementFactory" type="Reference" description="The factory used to instantiate to ModelElements associated to all the DataContext Elements inside this DataContext Root"/> + </elements> + <elements xmi:id="_W4EBQ5LCEeWbp4A9_-WIrQ" name="ConstraintDescriptor"> + <properties xmi:id="_W4EBRJLCEeWbp4A9_-WIrQ" name="name" description="The name of this constraint descriptor"/> + <properties xmi:id="_W4EBRZLCEeWbp4A9_-WIrQ" name="display" type="Reference" description="The display unit (View or Section) associated to this constraint."/> + <properties xmi:id="_W4EBRpLCEeWbp4A9_-WIrQ" name="constraints" type="Reference" multiplicity="-1" description="The sub-constraints of this constraint (Used for Composite constraints - Not implemented yet)"/> + <properties xmi:id="_W4EBR5LCEeWbp4A9_-WIrQ" name="overriddenConstraints" type="Reference" multiplicity="-1" description="The constraints overridden by this constraint. If two constraints match a given selection, a constraint may override another one. In such a case, the overridden constraint's displayUnit won't be displayed. This property is dedicated to manual resolution of constraints : the Constraint classes may also implement an automatic resolution of conflicts"/> + <properties xmi:id="_W4EBSJLCEeWbp4A9_-WIrQ" name="overrideable" type="Boolean" description="If set to false, this constraint cannot be automatically overridden by other constraints. Only constraints which explicitly specify they need to override this constraint (Through the "overriddenConstraints" property) will be able to disable it."/> + </elements> + <elements xmi:id="_W4EBSZLCEeWbp4A9_-WIrQ" name="ConfigProperty"> + <properties xmi:id="_W4EBSpLCEeWbp4A9_-WIrQ" name="name" description="The name of the property"/> + </elements> + <elements xmi:id="_W4EBS5LCEeWbp4A9_-WIrQ" name="ValueProperty" supertypes="_W4EBSZLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBTJLCEeWbp4A9_-WIrQ" name="value" description="The value of the property"/> + </elements> + <elements xmi:id="_W4EBTZLCEeWbp4A9_-WIrQ" name="ReferenceProperty" supertypes="_W4EBSZLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBTpLCEeWbp4A9_-WIrQ" name="value" label="" type="Reference" description="The value of the property"/> + </elements> + <elements xmi:id="_W4EBT5LCEeWbp4A9_-WIrQ" name="CompositeConstraint" supertypes="_W4EBQ5LCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBUJLCEeWbp4A9_-WIrQ" name="constraints" type="Reference" multiplicity="-1" description="The sub-constraints owned by this composite constraint. The composite constraint is matched if and only if all its sub-constraints are matched."/> + </elements> + <elements xmi:id="_W4EBUZLCEeWbp4A9_-WIrQ" name="SimpleConstraint" supertypes="_W4EBQ5LCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBUpLCEeWbp4A9_-WIrQ" name="constraintType" type="Reference" description="The type of this constraint"/> + <properties xmi:id="_W4EBU5LCEeWbp4A9_-WIrQ" name="properties" label="" type="Reference" multiplicity="-1" description="The list of properties used to instantiate this constraint (key - value pairs)"/> + </elements> + </elements> + <elements xsi:type="contexts:DataContextPackage" xmi:id="_W4EBVJLCEeWbp4A9_-WIrQ" name="ui"> + <elements xmi:id="_W4EBVZLCEeWbp4A9_-WIrQ" name="Element"/> + <elements xmi:id="_W4EBVpLCEeWbp4A9_-WIrQ" name="UIComponent" supertypes="_W4EBVZLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBV5LCEeWbp4A9_-WIrQ" name="attributes" type="Reference" multiplicity="-1" description="The attributes used to instantiate this element. Set of key - value pairs."/> + </elements> + <elements xmi:id="_W4EBWJLCEeWbp4A9_-WIrQ" name="Widget" supertypes="_W4EBVpLCEeWbp4A9_-WIrQ"/> + <elements xmi:id="_W4EBWZLCEeWbp4A9_-WIrQ" name="StandardWidget" supertypes="_W4EBWJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBWpLCEeWbp4A9_-WIrQ" name="widgetType" type="Reference" description="The type of this widget"/> + </elements> + <elements xmi:id="_W4EBW5LCEeWbp4A9_-WIrQ" name="PropertyEditor" supertypes="_W4EBWJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBXJLCEeWbp4A9_-WIrQ" name="property" type="Reference" description="The property that this editor will edit"/> + <properties xmi:id="_W4EBXZLCEeWbp4A9_-WIrQ" name="readOnly" type="Boolean" description="Indicates if this editor should be read-only. Note that in some cases, the read only state may be applied at runtime, independently of this field's value"/> + <properties xmi:id="_W4EBXpLCEeWbp4A9_-WIrQ" name="widgetType" type="Reference" description="The type of this widget"/> + <properties xmi:id="_W4EBX5LCEeWbp4A9_-WIrQ" name="showLabel" type="Boolean" description="If set to false, the property editor's label won't be displayed"/> + <properties xmi:id="_W4EBYJLCEeWbp4A9_-WIrQ" name="customLabel" label="Custom label" description="Defines a custom label for this editor. The custom label will replace the property's default label (Only for this property editor)"/> + </elements> + <elements xmi:id="_W4EBYZLCEeWbp4A9_-WIrQ" name="CompositeWidget" supertypes="_W4EBWJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBYpLCEeWbp4A9_-WIrQ" name="layout" type="Reference" description="The layout of this widget"/> + <properties xmi:id="_W4EBY5LCEeWbp4A9_-WIrQ" name="widgets" type="Reference" multiplicity="-1" description="The widgets directly contained into this Composite"/> + <properties xmi:id="_W4EBZJLCEeWbp4A9_-WIrQ" name="widgetType" type="Reference" description="The type of this Composite widget."/> + </elements> + <elements xmi:id="_W4EBZZLCEeWbp4A9_-WIrQ" name="Layout" supertypes="_W4EBVpLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBZpLCEeWbp4A9_-WIrQ" name="layoutType" label="" type="Reference" description="The type of this Layout"/> + </elements> + <elements xmi:id="_W4EBZ5LCEeWbp4A9_-WIrQ" name="WidgetAttribute" supertypes="_W4EBVZLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBaJLCEeWbp4A9_-WIrQ" name="name" description="The name of the attribute"/> + </elements> + <elements xmi:id="_W4EBaZLCEeWbp4A9_-WIrQ" name="ValueAttribute" supertypes="_W4EBZ5LCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBapLCEeWbp4A9_-WIrQ" name="value" description="The litteral value of this attribute"/> + </elements> + <elements xmi:id="_W4EBa5LCEeWbp4A9_-WIrQ" name="ReferenceAttribute" supertypes="_W4EBZ5LCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBbJLCEeWbp4A9_-WIrQ" name="value" type="Reference" description="The value of this attribute"/> + </elements> + <elements xmi:id="_W4EBbZLCEeWbp4A9_-WIrQ" name="UnknownComponent" supertypes="_W4EBWJLCEeWbp4A9_-WIrQ"> + <properties xmi:id="_W4EBbpLCEeWbp4A9_-WIrQ" name="typeName" description="The fully-qualified name of this element"/> + </elements> + </elements> + <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.customization.properties/Model/CustomizationEnvironment.xmi#//@modelElementFactories.2"/> + </dataContexts> + <dataContexts xmi:id="_W4EoUJLCEeWbp4A9_-WIrQ" name="Custom" label="Custom"> + <elements xsi:type="contexts:DataContextPackage" xmi:id="_W4EoUZLCEeWbp4A9_-WIrQ" name="Attribute"> + <elements xmi:id="_W4EoUpLCEeWbp4A9_-WIrQ" name="GridLayout"> + <properties xmi:id="_W4EoU5LCEeWbp4A9_-WIrQ" name="numColumns" label="" type="Integer" description="The number of columns of this layout"/> + <properties xmi:id="_W4EoVJLCEeWbp4A9_-WIrQ" name="makeColumnsEqualWidth" description="Indicates if all columns should have the same width"/> + </elements> + <elements xmi:id="_W4EoVZLCEeWbp4A9_-WIrQ" name="Group"> + <properties xmi:id="_W4EoVpLCEeWbp4A9_-WIrQ" name="text" description="The label of this Group container"/> + </elements> + <elements xmi:id="_W4EoV5LCEeWbp4A9_-WIrQ" name="Text"> + <properties xmi:id="_W4EoWJLCEeWbp4A9_-WIrQ" name="text" description="The text to display"/> + </elements> + <elements xmi:id="_W4EoWZLCEeWbp4A9_-WIrQ" name="Label"> + <properties xmi:id="_W4EoWpLCEeWbp4A9_-WIrQ" name="text" label="Text" description="The text to display"/> + </elements> + <elements xmi:id="_W4EoW5LCEeWbp4A9_-WIrQ" name="BooleanToggle"> + <properties xmi:id="_W4EoXJLCEeWbp4A9_-WIrQ" name="image" label="Image"/> + </elements> + <elements xmi:id="_W4EoXZLCEeWbp4A9_-WIrQ" name="FileSelector"> + <properties xmi:id="_W4EoXpLCEeWbp4A9_-WIrQ" name="allowWorkspace"/> + <properties xmi:id="_W4EoX5LCEeWbp4A9_-WIrQ" name="allowFileSystem"/> + <properties xmi:id="_W4EoYJLCEeWbp4A9_-WIrQ" name="filteredExtension"/> + </elements> + <elements xmi:id="_W4EoYZLCEeWbp4A9_-WIrQ" name="IntegerSpinner"> + <properties xmi:id="_W4EoYpLCEeWbp4A9_-WIrQ" name="minimum" label="" description="The minimum value that this spinner can return"/> + <properties xmi:id="_W4EoY5LCEeWbp4A9_-WIrQ" name="maximum" description="The maximum value that this spinner can return"/> + <properties xmi:id="_W4EoZJLCEeWbp4A9_-WIrQ" name="increment" description="The increment value for this spinner"/> + </elements> + </elements> + <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.customization.properties/Model/CustomizationEnvironment.xmi#//@modelElementFactories.0"/> + </dataContexts> + <dataContexts xmi:id="_W4EoZZLCEeWbp4A9_-WIrQ" name="Properties" label="Properties"> + <elements xmi:id="_W4EoZpLCEeWbp4A9_-WIrQ" name="EcoreInstanceOf"> + <properties xmi:id="_W4EoZ5LCEeWbp4A9_-WIrQ" name="className" label="Class Name" description="The name of the Class"/> + <properties xmi:id="_W4EoaJLCEeWbp4A9_-WIrQ" name="nsUri" label="NS URI" description="The namespace URI (NsURI) of the EPackage containing the Class"/> + </elements> + <elements xmi:id="_W4EoaZLCEeWbp4A9_-WIrQ" name="UMLInstanceOf"> + <properties xmi:id="_W4EoapLCEeWbp4A9_-WIrQ" name="umlClassName" label="UML Class name" description="The name of the UML Metaclass"/> + </elements> + <elements xmi:id="_W4Eoa5LCEeWbp4A9_-WIrQ" name="OCLQuery"> + <properties xmi:id="_W4EobJLCEeWbp4A9_-WIrQ" name="query" label="Query" type="Reference" description="The EMF Query"/> + </elements> + <elements xmi:id="_W4EobZLCEeWbp4A9_-WIrQ" name="Stereotype"> + <properties xmi:id="_W4EobpLCEeWbp4A9_-WIrQ" name="stereotypeName" label="Stereotype name" description="The fully qualified name of the Stereotype. The separator is "::". For example : MyProfile::MyPackage::MyStereotype"/> + </elements> + <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.customization.properties/Model/CustomizationEnvironment.xmi#//@modelElementFactories.1"/> + </dataContexts> +</contexts:Context> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/CustomizationEnvironment.xmi b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/CustomizationEnvironment.xmi new file mode 100644 index 00000000000..89723b198ad --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/CustomizationEnvironment.xmi @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="ASCII"?>
+<environment:Environment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <modelElementFactories name="Generic Attribute" factoryClass="org.eclipse.papyrus.customization.properties.modelelement.GenericAttributeModelElementFactory"/>
+ <modelElementFactories name="Generic Property" factoryClass="org.eclipse.papyrus.customization.properties.modelelement.GenericPropertyModelElementFactory"/>
+ <modelElementFactories name="Customization Factory" factoryClass="org.eclipse.papyrus.customization.properties.modelelement.CustomizationModelElementFactory"/>
+</environment:Environment>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/custom.querySet b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/custom.querySet new file mode 100644 index 00000000000..75254880e42 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/custom.querySet @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="custom">
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/properties/contexts/0.9#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/properties/ui/0.9#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/constraints/0.9#/"/>
+ <queries xsi:type="query:OCLModelQuery" name="isGroup" lowerBound="1" query="widgetType.widgetClass = 'Group' and widgetType.namespace.oclIsUndefined()">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isUmlInstanceOf" description="" lowerBound="1" query="self.constraintType.constraintClass = 'org.eclipse.papyrus.uml.properties.constraints.UmlInstanceOfConstraint'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/constraints/0.9#//ConstraintDescriptor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isEcoreInstanceOf" lowerBound="1" query="self.constraintType.constraintClass = 'org.eclipse.papyrus.infra.constraints.constraints.EMFInstanceOfConstraint'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/constraints/0.9#//ConstraintDescriptor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isOclQuery" lowerBound="1" query="self.constraintType.constraintClass = 'org.eclipse.papyrus.infra.constraints.constraints.EMFQueryConstraint'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/constraints/0.9#//ConstraintDescriptor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isStereotype" description="" lowerBound="1" query="self.constraintType.constraintClass = 'org.eclipse.papyrus.uml.properties.constraints.HasStereotypeConstraint'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/constraints/0.9#//ConstraintDescriptor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isGridLayout" lowerBound="1" query="layoutType.widgetClass = 'GridLayout' or (layoutType.widgetClass = 'PropertiesLayout' and layoutType.namespace.name = 'ppel')">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//Layout"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isLabel" description="Tests if a standard widget is an SWT Label" lowerBound="1" query="self.widgetType.widgetClass = 'Label' and widgetType.namespace.oclIsUndefined()">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//StandardWidget"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isToggleButton" description="Tests if the given PropertyEditor is a ToggleButton" lowerBound="1" query="widgetType.widgetClass = 'BooleanToggle' and widgetType.namespace.name = 'ppe'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isFileSelector" description="Tests if a PropertyEditor is a File Selector" lowerBound="1" query="widgetType.widgetClass = 'StringFileSelector' and widgetType.namespace.name = 'ppe'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="isIntegerSpinner" description="Tests if a PropertyEditor is an IntegerSpinner" lowerBound="1" query="widgetType.widgetClass = 'IntegerSpinner' and widgetType.namespace.name = 'ppe'">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/EcoreInstanceOf.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/EcoreInstanceOf.xwt new file mode 100644 index 00000000000..4f2ca209c7f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/EcoreInstanceOf.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Properties:EcoreInstanceOf:nsUri"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="Properties:EcoreInstanceOf:className"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GridLayout.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GridLayout.xwt new file mode 100644 index 00000000000..75552b3e77b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GridLayout.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:GridLayout:numColumns"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:GridLayout:makeColumnsEqualWidth"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GroupAttributes.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GroupAttributes.xwt new file mode 100644 index 00000000000..3457939042a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/GroupAttributes.xwt @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" property="Custom:Attribute:Group:text"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Label.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Label.xwt new file mode 100644 index 00000000000..2f436234901 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Label.xwt @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" property="Custom:Attribute:Label:text"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiValueEditor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiValueEditor.xwt new file mode 100644 index 00000000000..ecfb345c842 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiValueEditor.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeConstraint.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeConstraint.xwt new file mode 100644 index 00000000000..9a7e1fa5a69 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeConstraint.xwt @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:BooleanRadio + property="properties:contexts:ConstraintDescriptor:overrideable" + input="{Binding}"></ppe:BooleanRadio> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidget.xwt new file mode 100644 index 00000000000..ea80dc152d3 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidget.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidgetType.xwt new file mode 100644 index 00000000000..f4901c841cb --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleCompositeWidgetType.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConfigProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConfigProperty.xwt new file mode 100644 index 00000000000..eeb57fccfee --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConfigProperty.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintDescriptor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintDescriptor.xwt new file mode 100644 index 00000000000..44e7668c57c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintDescriptor.xwt @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:contexts:SimpleConstraint:constraintType"></ppe:ReferenceDialog> + <ppe:BooleanRadio input="{Binding}" + property="properties:contexts:ConstraintDescriptor:overrideable"></ppe:BooleanRadio> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintType.xwt new file mode 100644 index 00000000000..b59dfca08dd --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleConstraintType.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleContext.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleContext.xwt new file mode 100644 index 00000000000..d29eb166273 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleContext.xwt @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextElement.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextElement.xwt new file mode 100644 index 00000000000..b59dfca08dd --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextElement.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextPackage.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextPackage.xwt new file mode 100644 index 00000000000..b326a599944 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextPackage.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextRoot.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextRoot.xwt new file mode 100644 index 00000000000..4823cb7f9f8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDataContextRoot.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDisplayUnit.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDisplayUnit.xwt new file mode 100644 index 00000000000..888d37c19e2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleDisplayUnit.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleElement.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleElement.xwt new file mode 100644 index 00000000000..57a68696545 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleElement.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleEnvironment.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleEnvironment.xwt new file mode 100644 index 00000000000..ef9124f3f62 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleEnvironment.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayout.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayout.xwt new file mode 100644 index 00000000000..c0874fd4a4e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayout.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayoutType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayoutType.xwt new file mode 100644 index 00000000000..2d855ce6e31 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleLayoutType.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleModelElementFactoryDescriptor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleModelElementFactoryDescriptor.xwt new file mode 100644 index 00000000000..888d37c19e2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleModelElementFactoryDescriptor.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleProperty.xwt new file mode 100644 index 00000000000..5a2bff87d5d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleProperty.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:Property:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" property="properties:contexts:Property:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditor.xwt new file mode 100644 index 00000000000..85b22d1b9fc --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditor.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:BooleanRadio input="{Binding}" + property="properties:ui:PropertyEditor:readOnly"></ppe:BooleanRadio> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditorType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditorType.xwt new file mode 100644 index 00000000000..1e1ce55c893 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultiplePropertyEditorType.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:environment:PropertyEditorType:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" + property="properties:environment:PropertyEditorType:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceAttribute.xwt new file mode 100644 index 00000000000..2aa17dec317 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceAttribute.xwt @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceProperty.xwt new file mode 100644 index 00000000000..2aa17dec317 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleReferenceProperty.xwt @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleSection.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleSection.xwt new file mode 100644 index 00000000000..ef9124f3f62 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleSection.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidget.xwt new file mode 100644 index 00000000000..999006b6a5d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidget.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidgetType.xwt new file mode 100644 index 00000000000..888d37c19e2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleStandardWidgetType.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleTab.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleTab.xwt new file mode 100644 index 00000000000..c01f4920e23 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleTab.xwt @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:BooleanRadio input="{Binding}" + property="properties:contexts:Tab:indented"></ppe:BooleanRadio> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUIComponent.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUIComponent.xwt new file mode 100644 index 00000000000..d724e35c8f6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUIComponent.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownComponent.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownComponent.xwt new file mode 100644 index 00000000000..aca6adeb591 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownComponent.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownProperty.xwt new file mode 100644 index 00000000000..194176bba2a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleUnknownProperty.xwt @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:Property:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" property="properties:contexts:Property:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueAttribute.xwt new file mode 100644 index 00000000000..2d855ce6e31 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueAttribute.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueProperty.xwt new file mode 100644 index 00000000000..4823cb7f9f8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleValueProperty.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleView.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleView.xwt new file mode 100644 index 00000000000..fcdc6cecc49 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleView.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:View:elementMultiplicity"></ppe:IntegerEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidget.xwt new file mode 100644 index 00000000000..ef9124f3f62 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidget.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetAttribute.xwt new file mode 100644 index 00000000000..1081dd3ca3e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetAttribute.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetType.xwt new file mode 100644 index 00000000000..889aedc1cd4 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/MultipleWidgetType.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/OCLQuery.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/OCLQuery.xwt new file mode 100644 index 00000000000..b05756714ad --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/OCLQuery.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="Properties:OCLQuery:query"></ppe:ReferenceDialog> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single IntegerSpinner.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single IntegerSpinner.xwt new file mode 100644 index 00000000000..70d8d9ecc80 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single IntegerSpinner.xwt @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:IntegerSpinner:minimum"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:IntegerSpinner:maximum"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:IntegerSpinner:increment"></ppe:StringEditor> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single ToggleButton.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single ToggleButton.xwt new file mode 100644 index 00000000000..97d40d16114 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Single ToggleButton.xwt @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringFileSelector allowWorkspace="true" + allowFileSystem="false" input="{Binding}" property="Custom:Attribute:BooleanToggle:image"></ppe:StringFileSelector> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeConstraint.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeConstraint.xwt new file mode 100644 index 00000000000..ab46521e5d9 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeConstraint.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor property="properties:contexts:ConstraintDescriptor:name" + input="{Binding}"></ppe:StringEditor> + <ppe:BooleanRadio + property="properties:contexts:ConstraintDescriptor:overrideable" + input="{Binding}"></ppe:BooleanRadio> + <ppe:MultiReference + property="properties:contexts:CompositeConstraint:constraints" input="{Binding}"></ppe:MultiReference> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:ConstraintDescriptor:overriddenConstraints"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidget.xwt new file mode 100644 index 00000000000..d7000a6af7f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidget.xwt @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:ui:CompositeWidget:widgetType"></ppe:ReferenceDialog> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidgetType.xwt new file mode 100644 index 00000000000..3e1923e230e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleCompositeWidgetType.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:widgetClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConfigProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConfigProperty.xwt new file mode 100644 index 00000000000..480290feda2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConfigProperty.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:ConfigProperty:name"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintDescriptor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintDescriptor.xwt new file mode 100644 index 00000000000..87325acdff8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintDescriptor.xwt @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:ConstraintDescriptor:name"></ppe:StringEditor> + <ppe:ReferenceDialog input="{Binding}" + property="properties:contexts:SimpleConstraint:constraintType"></ppe:ReferenceDialog> + <ppe:BooleanRadio input="{Binding}" + property="properties:contexts:ConstraintDescriptor:overrideable"></ppe:BooleanRadio> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:ConstraintDescriptor:overriddenConstraints"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintType.xwt new file mode 100644 index 00000000000..d8e64c2144f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleConstraintType.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:ConstraintType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:ConstraintType:constraintClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleContext.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleContext.xwt new file mode 100644 index 00000000000..6fa64a11192 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleContext.xwt @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Context:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Context:label" customLabel="UI Label"></ppe:StringEditor> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:Context:dependencies"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextElement.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextElement.xwt new file mode 100644 index 00000000000..95ccfe2f613 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextElement.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:DataContextElement:name"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:DataContextElement:supertypes"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextPackage.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextPackage.xwt new file mode 100644 index 00000000000..640c285b3c8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextPackage.xwt @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:DataContextElement:name"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:DataContextElement:supertypes"></ppe:MultiReference> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:Property:contextElement"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextRoot.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextRoot.xwt new file mode 100644 index 00000000000..6d0d25806b0 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDataContextRoot.xwt @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:DataContextElement:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:DataContextRoot:label"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:contexts:DataContextRoot:modelElementFactory"></ppe:ReferenceDialog> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:DataContextElement:supertypes"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDisplayUnit.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDisplayUnit.xwt new file mode 100644 index 00000000000..a3c1615504a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleDisplayUnit.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleElement.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleElement.xwt new file mode 100644 index 00000000000..b59dfca08dd --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleElement.xwt @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleEnvironment.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleEnvironment.xwt new file mode 100644 index 00000000000..fe2fc17996b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleEnvironment.xwt @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleFileSelector.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleFileSelector.xwt new file mode 100644 index 00000000000..600af2b83f0 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleFileSelector.xwt @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:FileSelector:allowWorkspace"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="Custom:Attribute:FileSelector:allowFileSystem"></ppe:StringEditor> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayout.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayout.xwt new file mode 100644 index 00000000000..4412c18d910 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayout.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:ui:Layout:layoutType"></ppe:ReferenceDialog> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayoutType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayoutType.xwt new file mode 100644 index 00000000000..dd712596e7b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleLayoutType.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:widgetClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleModelElementFactoryDescriptor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleModelElementFactoryDescriptor.xwt new file mode 100644 index 00000000000..74a6dad2fd5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleModelElementFactoryDescriptor.xwt @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:ModelElementFactoryDescriptor:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:ModelElementFactoryDescriptor:factoryClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleProperty.xwt new file mode 100644 index 00000000000..2dfbcd6f32c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleProperty.xwt @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Property:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Property:label"></ppe:StringEditor> + <ppe:StringMultiline input="{Binding}" + property="properties:contexts:Property:description"></ppe:StringMultiline> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:Property:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" property="properties:contexts:Property:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditor.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditor.xwt new file mode 100644 index 00000000000..fd8856808d9 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditor.xwt @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:BooleanRadio input="{Binding}" + property="properties:ui:PropertyEditor:readOnly"></ppe:BooleanRadio> + <ppe:BooleanRadio input="{Binding}" + property="properties:ui:PropertyEditor:showLabel"></ppe:BooleanRadio> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:ui:PropertyEditor:property"></ppe:ReferenceDialog> + <ppe:ReferenceDialog input="{Binding}" + property="properties:ui:PropertyEditor:widgetType"></ppe:ReferenceDialog> + <ppe:StringEditor input="{Binding}" + property="properties:ui:PropertyEditor:customLabel"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditorType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditorType.xwt new file mode 100644 index 00000000000..7afd55d2e18 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SinglePropertyEditorType.xwt @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:widgetClass"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:environment:PropertyEditorType:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" + property="properties:environment:PropertyEditorType:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceAttribute.xwt new file mode 100644 index 00000000000..c97e2d952c6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceAttribute.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:ui:WidgetAttribute:name"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceProperty.xwt new file mode 100644 index 00000000000..8232bd6050c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleReferenceProperty.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:ConfigProperty:name"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:contexts:ReferenceProperty:value"></ppe:ReferenceDialog> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleSection.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleSection.xwt new file mode 100644 index 00000000000..8dfa1dff974 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleSection.xwt @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Section:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Section:sectionFile"></ppe:StringEditor> + <ppe:ReferenceCombo input="{Binding}" + property="properties:contexts:Section:tab"></ppe:ReferenceCombo> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:DisplayUnit:constraints"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidget.xwt new file mode 100644 index 00000000000..71f471445c9 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidget.xwt @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:ReferenceDialog input="{Binding}" + property="properties:ui:StandardWidget:widgetType"></ppe:ReferenceDialog> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidgetType.xwt new file mode 100644 index 00000000000..7829d44c162 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleStandardWidgetType.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:widgetClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleTab.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleTab.xwt new file mode 100644 index 00000000000..be2a5582b84 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleTab.xwt @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Tab:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" property="properties:contexts:Tab:id"></ppe:StringEditor> + <ppe:StringFileSelector input="{Binding}" + allowWorkspace="true" allowFileSystem="false" property="properties:contexts:Tab:image"></ppe:StringFileSelector> + <ppe:BooleanRadio input="{Binding}" + property="properties:contexts:Tab:indented"></ppe:BooleanRadio> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Tab:category"></ppe:StringEditor> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:Tab:priority"></ppe:IntegerEditor> + <ppe:ReferenceCombo input="{Binding}" + property="properties:contexts:Tab:afterTab"></ppe:ReferenceCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUIComponent.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUIComponent.xwt new file mode 100644 index 00000000000..38d559f3a67 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUIComponent.xwt @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:MultiReference input="{Binding}" + property="properties:ui:UIComponent:attributes"> + </ppe:MultiReference> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownComponent.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownComponent.xwt new file mode 100644 index 00000000000..7e9310a3618 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownComponent.xwt @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:ui:UnknownComponent:typeName"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownProperty.xwt new file mode 100644 index 00000000000..e03bab652f1 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleUnknownProperty.xwt @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Property:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:Property:label"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:Property:multiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:EnumCombo input="{Binding}" property="properties:contexts:Property:type"></ppe:EnumCombo> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueAttribute.xwt new file mode 100644 index 00000000000..74c45cd3024 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueAttribute.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:ui:WidgetAttribute:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:ui:ValueAttribute:value"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueProperty.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueProperty.xwt new file mode 100644 index 00000000000..7509693bb30 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleValueProperty.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:ConfigProperty:name"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:ValueProperty:value"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleView.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleView.xwt new file mode 100644 index 00000000000..0150bb6828d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleView.xwt @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:contexts:View:name"></ppe:StringEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:IntegerEditor input="{Binding}" + property="properties:contexts:View:elementMultiplicity"></ppe:IntegerEditor> + </Composite> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:MultiReference input="{Binding}" + property="properties:contexts:DisplayUnit:constraints"></ppe:MultiReference> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidget.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidget.xwt new file mode 100644 index 00000000000..7f560843155 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidget.xwt @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation" + xmlns:ppec="clr-namespace:org.eclipse.papyrus.infra.properties.ui.creation" + xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetAttribute.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetAttribute.xwt new file mode 100644 index 00000000000..80648fcca97 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetAttribute.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:ui:WidgetAttribute:name"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetType.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetType.xwt new file mode 100644 index 00000000000..150169e284b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/SingleWidgetType.xwt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:label"></ppe:StringEditor> + <ppe:StringEditor input="{Binding}" + property="properties:environment:WidgetType:widgetClass"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Stereotype.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Stereotype.xwt new file mode 100644 index 00000000000..faa7aaa35fc --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/Stereotype.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Properties:Stereotype:stereotypeName"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/UMLInstanceOf.xwt b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/UMLInstanceOf.xwt new file mode 100644 index 00000000000..7f45c6f5769 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Model/ui/UMLInstanceOf.xwt @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets" + xmlns:ppel="clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout" + xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <Composite> + <Composite.layout> + <ppel:PropertiesLayout></ppel:PropertiesLayout> + </Composite.layout> + <ppe:StringEditor input="{Binding}" + property="Properties:UMLInstanceOf:umlClassName"></ppe:StringEditor> + </Composite> +</Composite>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/OSGI-INF/l10n/bundle.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/OSGI-INF/l10n/bundle.properties new file mode 100644 index 00000000000..969757d0342 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,23 @@ +#Properties file for org.eclipse.papyrus.customization.properties
+Bundle-Name = Papyrus properties customization
+Bundle-Vendor = Eclipse Modeling Project
+editor.name = Properties View Editor
+customize.command.label = Customize Properties view
+customize.command.mnemonic = C
+customize.command.tooltip = Customize the content of the Properties View
+customize.command.description = This command allows customization of the content of the properties view
+customize.command.name = Customize properties view
+view.name = Customization Preview
+perspective.name = Properties View Customization
+page.name = Properties View Customization
+command.description = Customize the Properties view
+command.name = Customize properties view
+command.description.0 = Toggles the customization's Preview view
+command.name.0 = Toggle preview
+command.description.1 = Toggles the DataContext display
+command.name.1 = Toggle DataContext
+toolbar.label = Papyrus customization toolbar
+command.label = Toggle preview
+command.tooltip = Toggles the customization's Preview view
+command.label.0 = Toggle DataContext
+command.tooltip.0 = Toggles the display of DataContext in the UIEditor view
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Contexts.querySet b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Contexts.querySet new file mode 100644 index 00000000000..42d79112c23 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Contexts.querySet @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="Contexts" description="">
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/properties/contexts/0.9#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/properties/ui/0.9#/"/>
+ <queries xsi:type="query:OCLModelQuery" name="Tab label" description="Tab label" lowerBound="1" query="if label.oclIsUndefined() or label = '' then '<<Unnamed>>' else label endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Tab"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="View label" description="View label" lowerBound="1" query="if name = null or name = '' then '<<Unnamed>>' else name endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//View"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Context label" description="Context label" lowerBound="1" query="if name = null or name = '' then '<<Unnamed>>' else name endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Section label" description="Section label" lowerBound="1" query="if name = null or name = '' then '<<Unnamed>>' else name.concat(if tab.oclIsUndefined() then ' [<<Undefined>>]' else ' ['.concat(tab.label).concat(']') endif) endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Section"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Property editor label" description="Returns the PropertyEditor label" lowerBound="1" query="if property.oclIsUndefined() then '<<Undefined>>' else if property.label.oclIsUndefined() or property.label = '' then property.name else _property.label endif endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Composite label" lowerBound="1" query="if widgetType = null then '<<Undefined>>' else widgetType.label endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Layout label" description="Layout label" lowerBound="1" query="if layoutType = null then '<<Undefined>>' else layoutType.label endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//Layout"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Attribute label" lowerBound="1" query="if name = null or name = '' then '<<Undefined>>' else name endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//WidgetAttribute"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="Property label" description="Property label" lowerBound="1" query="if label.oclIsUndefined() or label = '' then name else label endif">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Property"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="DataContextElement label" description="DataContextElement label" lowerBound="1" query="name">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="showDataContext-j" description="Tests if the data contexts should be displayed" lowerBound="1" implementationClassName="org.eclipse.papyrus.customization.properties.query.ShowContextQuery">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="showDataContext" description="" lowerBound="1" query="true">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </queries>
+ <queries xsi:type="query:OCLModelQuery" name="HasPrototype" description="HasPrototype" lowerBound="1" query="not self.prototype.oclIsUndefined()">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Ui.querySet b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Ui.querySet new file mode 100644 index 00000000000..b49354963c5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/Query/Ui.querySet @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?>
+<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="Ui">
+ <associatedMetamodels href="http://www.eclipse.org/papyrus/properties/ui/0.9#/"/>
+ <queries xsi:type="query:OCLModelQuery" name="isReferenceAttribute" description="Tests if an attribute is a ReferenceAttribute" lowerBound="1" query="self.oclIsKindOf(ReferenceAttribute)">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/papyrus/properties/ui/0.9#//WidgetAttribute"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesContext.custom b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesContext.custom new file mode 100644 index 00000000000..a9d2f9665f4 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesContext.custom @@ -0,0 +1,575 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<custom:Customization
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet"
+ xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery"
+ xmlns:oclQuery="http://www.eclipse.org/papyrus/emf/facet/query/ocl/0.3.incubation/oclquery"
+ name="Properties Context"
+ nsURI="http://www.eclipse.org/papyrus/properties/contexts/custom"
+ nsPrefix="propctx"
+ documentation=""
+ mustBeLoadedByDefault="true">
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomContext">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ oclExpression="if name = null or name = '' then '<<Unnamed>>' else name endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </value>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context/views"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="'Views'">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </value>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context/dataContexts"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="'Data contexts'">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <facetOperations
+ name="image"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context/views"/>
+ <value
+ xsi:type="javaQuery:JavaQuery"
+ canBeCached="true"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.ViewsImageQuery"/>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context/dataContexts"/>
+ <value
+ xsi:type="javaQuery:JavaQuery"
+ canBeCached="true"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.DataContextsImageQuery"/>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ </facetOperations>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context/tabs"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Context"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomDataContextRoot">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextRoot"/>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomDataContextPackage">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextPackage"/>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextPackage/elements"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextPackage"/>
+ </value>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement/properties"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomDataContextElement">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement"/>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement/properties"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="name">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//DataContextElement"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomProperty">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Property"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if label.oclIsUndefined() or label = '' then name else label endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Property"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomSection">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Section"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if name = null or name = '' then '<<Unnamed>>' else name.concat(if tab.oclIsUndefined() then ' [<<Undefined>>]' else ' ['.concat(tab.label).concat(']') endif) endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Section"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Section/widget"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Section"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomTab">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Tab"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if label.oclIsUndefined() or label = '' then '<<Unnamed>>' else label endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//Tab"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomView">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//View"/>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//View/sections"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//View"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if name = null or name = '' then '<<Unnamed>>' else name endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/contexts/0.9#//View"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+</custom:Customization>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesUI.custom b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesUI.custom new file mode 100644 index 00000000000..7cdc1aa342e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/PropertiesUI.custom @@ -0,0 +1,330 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<custom:Customization
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet"
+ xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery"
+ xmlns:oclQuery="http://www.eclipse.org/papyrus/emf/facet/query/ocl/0.3.incubation/oclquery"
+ name="Properties UI"
+ nsURI="http://www.eclipse.org/papyrus/properties/ui/custom"
+ nsPrefix="propui"
+ mustBeLoadedByDefault="true">
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomCompositeWidget">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//UIComponent/attributes"/>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget/layout"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ </value>
+ </cases>
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget/widgets"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if widgetType = null then '<<Undefined>>' else widgetType.label endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//CompositeWidget"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomWidgetAttribute">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//WidgetAttribute"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="if name = null or name = '' then '<<Undefined>>' else name endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//WidgetAttribute"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomReferenceAttribute">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//ReferenceAttribute"/>
+ <facetOperations
+ name="collapseLink">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <case
+ xsi:type="ecore:EReference"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//ReferenceAttribute/value"/>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ canBeCached="true"
+ oclExpression="true">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//ReferenceAttribute"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomLayout">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//Layout"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ oclExpression="if layoutType = null then '<<Undefined>>' else layoutType.label endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//Layout"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomPropertyEditor">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ <facetOperations
+ name="label"
+ lowerBound="1">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
+ </eParameters>
+ <query
+ xsi:type="custom:ETypedElementSwitchQuery">
+ <cases>
+ <value
+ xsi:type="oclQuery:OclQuery"
+ oclExpression="if property.oclIsUndefined() then '<<Undefined>>' else if property.label.oclIsUndefined() or property.label = '' then property.name else _property.label endif endif">
+ <context
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//PropertyEditor"/>
+ </value>
+ </cases>
+ </query>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ </facetOperations>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomStandardWidget">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//StandardWidget"/>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="CustomUIComponent">
+ <extendedMetaclass
+ href="http://www.eclipse.org/papyrus/properties/ui/0.9#//UIComponent"/>
+ <facetOperations
+ name="visibleReferences"
+ upperBound="-1">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.customization.properties.query.GetVisibleFeaturesQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
+ </facetOperations>
+ <extendedFacets
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ </eClassifiers>
+</custom:Customization>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/environment.uiCustom b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/environment.uiCustom new file mode 100644 index 00000000000..a4524c6dc0a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/UICustom/environment.uiCustom @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="ASCII"?>
+<uicustom:MetamodelView
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:uicustom="http://www.eclipse.org/EmfFacet/infra/browser/custom/0.8"
+ metamodelURI="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <types metaclassName="environment.Environment">
+ <customizedFeatures
+ customizedFeature="metaclassVisible">
+ <defaultValue
+ xsi:type="uicustom:StaticFeatureValue"
+ value="false"/>
+ </customizedFeatures>
+ <references
+ referenceName="eAnnotations">
+ <customizedFeatures>
+ <defaultValue
+ xsi:type="uicustom:StaticFeatureValue"
+ value="false"/>
+ </customizedFeatures>
+ </references>
+ </types>
+</uicustom:MetamodelView>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/about.html b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/about.html new file mode 100644 index 00000000000..82d49bf5f81 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/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 ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). 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, "Program" 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 ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/build.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/build.properties new file mode 100644 index 00000000000..01011f2809a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/build.properties @@ -0,0 +1,15 @@ +#
+#Mon Sep 12 09:30:04 CEST 2011
+bin.includes = .,\
+ plugin.xml,\
+ META-INF/,\
+ about.html,\
+ icons/,\
+ Query/,\
+ UICustom/,\
+ Model/,\
+ OSGI-INF/
+output..=bin/
+src.includes = about.html,\
+ schema/
+source..=src/
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Context.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Context.gif Binary files differnew file mode 100644 index 00000000000..9b09a7e4986 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Context.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Customization.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Customization.gif Binary files differnew file mode 100644 index 00000000000..0b1be97b8cf --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/Customization.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContext.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContext.gif Binary files differnew file mode 100644 index 00000000000..48581fa9451 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContext.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContexts.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContexts.gif Binary files differnew file mode 100644 index 00000000000..94b389f9da0 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/DataContexts.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/MultiView.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/MultiView.gif Binary files differnew file mode 100644 index 00000000000..2e85ba1b6f2 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/MultiView.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/error.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/error.gif Binary files differnew file mode 100644 index 00000000000..9b048d60532 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/error.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/papyrus.png b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/papyrus.png Binary files differnew file mode 100644 index 00000000000..0f74e27b483 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/papyrus.png diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/preview.png b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/preview.png Binary files differnew file mode 100644 index 00000000000..4ccd82e526d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/preview.png diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/refresh.gif b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/refresh.gif Binary files differnew file mode 100644 index 00000000000..634306d4c62 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/icons/refresh.gif diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.properties new file mode 100644 index 00000000000..b362066cb46 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.properties @@ -0,0 +1,12 @@ +################################################################################# +# Copyright (c) 2015 CEA LIST. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - initial API and implementation +##################################################################################) + +pluginDescription=This plug-in contains the tools for customizing the property view : - An editor for Property view configuration models, with a real-time preview - A Property view configuration for this editor
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.xml new file mode 100644 index 00000000000..f1665ed105b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/plugin.xml @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse version="3.4"?> + +<plugin> + <extension-point id="contextStorage" name="Context Storage Action Providers" schema="schema/contextStorage.exsd"/> + + <!-- TODO: EMF-FACET update uicustom + <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration"> + <browserCustomization file="UICustom/context.uiCustom" loadByDefault="true"> + </browserCustomization> + </extension> + <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration"> + <browserCustomization file="UICustom/environment.uiCustom" loadByDefault="true"/> + </extension> + <extension point="org.eclipse.emf.facet.infra.browser.custom.core.registration"> + <browserCustomization file="UICustom/ui.uiCustom" loadByDefault="true"/> + </extension> + <extension point="org.eclipse.emf.facet.infra.query.registration"> + <modelqueryset file="Query/Contexts.querySet"/> + </extension> + <extension + point="org.eclipse.emf.facet.infra.query.registration"> + <modelqueryset + file="Query/Ui.querySet"> + </modelqueryset> + </extension--> + <extension point="org.eclipse.ui.editors"> + <editor class="org.eclipse.papyrus.views.properties.toolsmiths.editor.UIEditor" contributorClass="org.eclipse.papyrus.views.properties.toolsmiths.editor.ContextEditorActionBarContributor" default="true" extensions="ctx" icon="platform:/plugin/org.eclipse.papyrus.infra.properties.edit/icons/full/obj16/Context.gif" id="org.eclipse.papyrus.customization.properties.UIEditor" name="%editor.name"> + </editor> + </extension> + <extension point="org.eclipse.emf.ecore.uri_mapping"> + <mapping source="pathmap://PPECustom/" target="platform:/plugin/org.eclipse.papyrus.customization.properties/Model/"> + </mapping> + </extension> + <extension point="org.eclipse.papyrus.infra.properties.environments"> + <environment environmentModel="Model/CustomizationEnvironment.xmi"> + </environment> + </extension> + <extension point="org.eclipse.papyrus.infra.properties.contexts"> + <context contextModel="Model/Customization.ctx"> + </context> + </extension> + <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor"> + <propertyContributor contributorId="CustomizationPropertyView" labelProvider="org.eclipse.papyrus.infra.properties.ui.providers.PropertiesHeaderLabelProvider" tabDescriptorProvider="org.eclipse.papyrus.infra.properties.ui.xwt.XWTTabDescriptorProvider"> + <propertyCategory + category="org.eclipse.papyrus"> + </propertyCategory> + </propertyContributor> + </extension> + <extension + point="org.eclipse.ui.views"> + <view + allowMultiple="true" + category="org.eclipse.papyrus.views.category" + class="org.eclipse.papyrus.views.properties.toolsmiths.editor.preview.Preview" + icon="icons/preview.png" + id="org.eclipse.papyrus.customization.properties.preview" + name="%view.name" + restorable="true"> + </view> + </extension> + <extension + point="org.eclipse.ui.perspectives"> + <perspective + class="org.eclipse.papyrus.views.properties.toolsmiths.perspective.CustomizationPerspectiveFactory" + icon="icons/Customization.gif" + id="org.eclipse.papyrus.customization.properties.perspective" + name="%perspective.name"> + </perspective> + </extension> + <extension + point="org.eclipse.core.runtime.preferences"> + <initializer + class="org.eclipse.papyrus.views.properties.toolsmiths.preferences.CustomizationPreferencesInitializer"> + </initializer> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory" + class="org.eclipse.papyrus.views.properties.toolsmiths.preferences.CustomizationPreferencePage" + id="org.eclipse.papyrus.customization.properties.preferences" + name="%page.name"> + </page> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.views.properties.toolsmiths.ui.OpenCustomization" + commandId="org.eclipse.papyrus.customization.properties.customize"> + </handler> + <handler + class="org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.TogglePreviewAction" + commandId="org.eclipse.papyrus.customization.properties.TogglePreview"> + </handler> + <handler + class="org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ToggleDataContextAction" + commandId="org.eclipse.papyrus.customization.properties.ToggleDataContext"> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="%command.description" + id="org.eclipse.papyrus.customization.properties.customize" + name="%command.name"> + </command> + <command + description="%command.description.0" + id="org.eclipse.papyrus.customization.properties.TogglePreview" + name="%command.name.0"> + <state + class="org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.TogglePreviewState" + id="org.eclipse.ui.commands.toggleState"> + </state> + </command> + <command + description="%command.description.1" + id="org.eclipse.papyrus.customization.properties.ToggleDataContext" + name="%command.name.1"> + <state + class="org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ToggleDataContextState" + id="org.eclipse.papyrus.customizatio.propertiesn.displayContextState"> + </state> + </command> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="menu:org.eclipse.ui.views.PropertySheet"> + <command + commandId="org.eclipse.papyrus.customization.properties.customize" + icon="icons/Customization.gif" + id="org.eclipse.papyrus.customization.properties.customizehandler" + label="%customize.command.label" + mnemonic="%customize.command.mnemonic" + mode="FORCE_TEXT" + style="push" + tooltip="%customize.command.tooltip"> + <visibleWhen + checkEnabled="true"> + </visibleWhen> + </command> + </menuContribution> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipse.ui.main.toolbar"> + <toolbar + id="org.eclipes.papyrus.customization.properties" + label="%toolbar.label"> + <command + commandId="org.eclipse.papyrus.customization.properties.TogglePreview" + icon="icons/preview.png" + id="org.eclipse.papyrus.customization.properties.togglePreview" + label="%command.label" + style="toggle" + tooltip="%command.tooltip"> + <visibleWhen> + <with + variable="activeEditorId"> + <equals + value="org.eclipse.papyrus.customization.properties.UIEditor"> + </equals> + </with> + </visibleWhen> + </command> + <command + commandId="org.eclipse.papyrus.customization.properties.ToggleDataContext" + icon="icons/DataContexts.gif" + id="org.eclipse.papyrus.customization.properties.toggleDataContext" + label="%command.label.0" + style="toggle" + tooltip="%command.tooltip.0"> + <visibleWhen> + <with + variable="activeEditorId"> + <equals + value="org.eclipse.papyrus.customization.properties.UIEditor"> + </equals> + </with> + </visibleWhen> + </command> + </toolbar> + </menuContribution> + </extension> + + <extension + point="org.eclipse.papyrus.views.properties.toolsmiths.contextStorage"> + <actionProvider + class="org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace.WorkspaceContextStorageActionProvider"> + </actionProvider> + </extension> + <extension + point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration"> + <modeldeclaration + file="UICustom/PropertiesContext.custom"> + </modeldeclaration> + <modeldeclaration + file="UICustom/PropertiesUI.custom"> + </modeldeclaration> + </extension> +</plugin> diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/pom.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/pom.xml new file mode 100644 index 00000000000..d7996460275 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/pom.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>org.eclipse.papyrus.views-properties</artifactId> + <groupId>org.eclipse.papyrus</groupId> + <version>0.0.1-SNAPSHOT</version> + </parent> + <artifactId>org.eclipse.papyrus.views.properties.toolsmiths</artifactId> + <version>2.0.0-SNAPSHOT</version> + <packaging>eclipse-plugin</packaging> +</project>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/schema/contextStorage.exsd b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/schema/contextStorage.exsd new file mode 100644 index 00000000000..e1f8b356a81 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/schema/contextStorage.exsd @@ -0,0 +1,125 @@ +<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.customization.properties.contextStorage" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.customization.properties" id="contextStorage" name="Context Storage Action Providers"/>
+ </appinfo>
+ <documentation>
+ Pluggable providers actions for manipulation of contexts in the customization dialog.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ <documentation>
+ [Enter description]
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="actionProvider"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="actionProvider">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A provider of actions for manipulation of contexts in a particular kind of (pluggable) context storage.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.customization.properties.storage.actions.IContextStorageActionProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Papyrus 0.10.0.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter documentation]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ The <tt>org.eclipse.papyrus.customization.properties.storage.actions.workspace.WorkspaceContextStorageActionProvider</tt> class implements the action provider for contexts stored in the local workspace.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+ </documentation>
+ </annotation>
+
+</schema>
\ No newline at end of file diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/Activator.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/Activator.java new file mode 100644 index 00000000000..0fd20b4326a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/Activator.java @@ -0,0 +1,165 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManager; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationCatalogManagerFactory; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager; +import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManagerFactory; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custom.Customization; +import org.eclipse.papyrus.infra.core.log.LogHelper; +import org.eclipse.papyrus.infra.emf.CustomizationComparator; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +import com.google.common.collect.Sets; + +/** The activator class controls the plug-in life cycle */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "org.eclipse.papyrus.customization.properties"; //$NON-NLS-1$ + + /** + * The Preview view ID + */ + public static final String PREVIEW_ID = "org.eclipse.papyrus.customization.properties.preview"; //$NON-NLS-1$ + + /** + * The Customization perspective ID + */ + public static final String CUSTOMIZATION_PERSPECTIVE_ID = "org.eclipse.papyrus.customization.properties.perspective"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The plug-in logger + */ + public static LogHelper log; + + @Override + public void start(final BundleContext context) throws Exception { + super.start(context); + Activator.plugin = this; + log = new LogHelper(plugin); + } + + @Override + public void stop(final BundleContext context) throws Exception { + Activator.plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return Activator.plugin; + } + + private ICustomizationManager fCustomizationManager; + + /** + * + * @return the customization manager in charge to adapt element in modisco + */ + public ICustomizationManager getCustomizationManager() { + if (this.fCustomizationManager == null) { + this.fCustomizationManager = ICustomizationManagerFactory.DEFAULT.getOrCreateICustomizationManager(new ResourceSetImpl()); + init(this.fCustomizationManager); + } + return this.fCustomizationManager; + } + + private void init(final ICustomizationManager customizationManager) { + // the appearance can be customized here: + + // FIXME: One of the default custom files in Papyrus has a side effect to call resolveAll on the resource set. While this is generally not a problem in Papyrus, + // it becomes critical with the properties view customization, as the resource set contains hundreds of proxies to xwt files (Which are really expensive to load) + // The query which tries to (indirectly) resolve all: org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.IsDiagramContainer, by using EMFHelper.getUsages() + // Find more details in Bug 493623 + Set<String> enabledCustomizations = Sets.newHashSet("Properties Context", "Properties UI"); + + try { + + // load customizations defined as default through the customization + // extension + ICustomizationCatalogManager customCatalog = ICustomizationCatalogManagerFactory.DEFAULT.getOrCreateCustomizationCatalogManager(customizationManager.getResourceSet()); + + List<Customization> registryAllCustomizations = customCatalog.getRegisteredCustomizations(); + List<Customization> orderedCustomizationList = registryAllCustomizations.stream() + .filter((c) -> enabledCustomizations.contains(c.getName())) + .sorted(new CustomizationComparator()) + .collect(Collectors.toList()); + + customizationManager.getManagedCustomizations().addAll(orderedCustomizationList); + + } catch (Throwable e) { + log.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error initializing customizations", e)); //$NON-NLS-1$ + } + } + + /** + * @return The IPath representing the plugin's preferences folder location + */ + public IPath getPreferencesPath() { + return getStateLocation(); + } + + /** + * Returns the image at the given path from this plugin + * + * @param path + * the path of the image to be displayed + * @return The Image at the given location, or null if it couldn't be found + */ + public Image getImage(String path) { + return getImage(PLUGIN_ID, path); + } + + /** + * Returns the image from the given image descriptor + * + * @param pluginId + * The plugin in which the image is located + * @param path + * The path to the image from the plugin + * @return + * The Image at the given location, or null if it couldn't be found + */ + public Image getImage(String pluginId, String path) { + final ImageRegistry registry = getImageRegistry(); + String key = pluginId + "/" + path; //$NON-NLS-1$ + Image image = registry.get(key); + if (image == null) { + registry.put(key, AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path)); + image = registry.get(key); + } + return image; + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ContextEditorActionBarContributor.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ContextEditorActionBarContributor.java new file mode 100644 index 00000000000..e713426f76f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ContextEditorActionBarContributor.java @@ -0,0 +1,344 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.eclipse.emf.ecore.presentation.EcoreActionBarContributor;
+import org.eclipse.emf.edit.ui.action.CopyAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.CutAction;
+import org.eclipse.emf.edit.ui.action.DeleteAction;
+import org.eclipse.emf.edit.ui.action.PasteAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.Section;
+import org.eclipse.papyrus.infra.properties.contexts.Tab;
+import org.eclipse.papyrus.infra.properties.contexts.View;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CreateSectionAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CreateSectionWidgetAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.MoDiscoCopyAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.MoDiscoCutAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.MoDiscoDeleteAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.MoDiscoPasteAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ToggleDataContextAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ValidationAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * The Action bar contributor for the Context Editor
+ * Mainly serves as an Adapter for the Ecore actions, as the Ecore actions are
+ * not natively compatible with the EMF Facet tree objects
+ *
+ * @author Camille Letavernier
+ */
+public class ContextEditorActionBarContributor extends EcoreActionBarContributor {
+
+ private int i = 0;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ContextEditorActionBarContributor() {
+ super();
+ validateAction = new ValidationAction();
+ }
+
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ super.addGlobalActions(menuManager);
+ }
+
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ }
+
+ @Override
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> result = super.generateCreateChildActions(descriptors, selection);
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection sSelection = (IStructuredSelection) selection;
+ if (sSelection.size() == 1) {
+ Object firstElement = sSelection.getFirstElement();
+ if (firstElement instanceof View) {
+ result.addAll(createChildForView(selection, (View) sSelection.getFirstElement()));
+ } else if (firstElement instanceof Section) {
+ result.addAll(createChildForSection(selection));
+ } else if (firstElement instanceof Tab) {
+ removeChildActionsForTab(result);
+ } else if (firstElement instanceof Context) {
+ removeChildActionsForContext(result);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> result = super.generateCreateSiblingActions(descriptors, selection);
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection sSelection = (IStructuredSelection) selection;
+ if (sSelection.size() == 1) {
+ Object firstElement = sSelection.getFirstElement();
+ if (firstElement instanceof Section) {
+ removeSiblingActionsForSection(result);
+ createSiblingActionsForSection(sSelection, (Section) firstElement);
+ } else if (firstElement instanceof View || firstElement instanceof Tab) {
+ removeSiblingActionsForViewAndTab(result);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Remove the unused actions from the Tab's create child section
+ *
+ * @param actions
+ * The actions generated by the Ecore action bar
+ */
+ protected void removeChildActionsForTab(Collection<IAction> actions) {
+ Iterator<IAction> iterator = actions.iterator();
+ while (iterator.hasNext()) {
+ IAction action = iterator.next();
+ if (action instanceof CreateChildAction) {
+ CreateChildAction createChildAction = (CreateChildAction) action;
+ if (createChildAction.getText().equals("Section")) { //It's the only relevant property we have access to... //$NON-NLS-1$
+ iterator.remove();
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove the unused actions from the Context's create child section
+ *
+ * @param actions
+ * The actions generated by the Ecore action bar
+ */
+ protected void removeChildActionsForContext(Collection<IAction> actions) {
+ Iterator<IAction> iterator = actions.iterator();
+ while (iterator.hasNext()) {
+ IAction action = iterator.next();
+ if (action instanceof CreateChildAction) {
+ CreateChildAction createChildAction = (CreateChildAction) action;
+ if (!ToggleDataContextAction.showDataContext) {
+ if (createChildAction.getText().equals("Data Context Root")) { //It's the only relevant property we have access to... //$NON-NLS-1$
+ iterator.remove();
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove the unused actions from the Tab and View's create sibling section
+ *
+ * @param actions
+ * The actions generated by the Ecore action bar
+ */
+ protected void removeSiblingActionsForViewAndTab(Collection<IAction> actions) {
+ Iterator<IAction> iterator = actions.iterator();
+ while (iterator.hasNext()) {
+ IAction action = iterator.next();
+ if (action instanceof CreateSiblingAction) {
+ CreateSiblingAction createSiblingAction = (CreateSiblingAction) action;
+ if (createSiblingAction.getText().equals("Data Context Root")) { //It's the only relevant property we have access to... //$NON-NLS-1$
+ iterator.remove();
+ }
+ }
+ }
+ }
+
+ /**
+ * Remove the unused actions from the Section's create sibling section
+ *
+ * @param actions
+ * The actions generated by the Ecore action bar
+ */
+ protected void removeSiblingActionsForSection(Collection<IAction> actions) {
+ Iterator<IAction> iterator = actions.iterator();
+ while (iterator.hasNext()) {
+ IAction action = iterator.next();
+ if (action instanceof CreateSiblingAction) {
+ CreateSiblingAction createSiblingAction = (CreateSiblingAction) action;
+ if (createSiblingAction.getText().equals("Section")) { //It's the only relevant property we have access to... //$NON-NLS-1$
+ iterator.remove();
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds new actions in the Section's create sibling section
+ *
+ * @param selection
+ * The current selection
+ * @param section
+ * The section for which we want to add new actions
+ * @return
+ * The list of newly created {@link IAction}s
+ */
+ protected Collection<IAction> createSiblingActionsForSection(ISelection selection, Section section) {
+ Collection<IAction> actions = new LinkedList<IAction>();
+
+ // TODO : We need to retrieve the view owning the section. It is only possible with an access to the
+ // ITreeElements, which we don't have here. Find a way to retrieve it.
+
+ // String sectionName = getSectionName(view.getContext());
+ // String sectionFile = getSectionFile(sectionName);
+ // IAction action = new CreateSectionAction(selection, sectionName, sectionFile);
+ // actions.add(action);
+
+ return actions;
+ }
+
+ /**
+ * Adds new actions in the View's create child section
+ *
+ * @param selection
+ * The current selection
+ * @param view
+ * The View for which we want to add new actions
+ * @return
+ * The list of newly created {@link IAction}s
+ */
+ protected Collection<IAction> createChildForView(ISelection selection, View view) {
+ Collection<IAction> actions = new LinkedList<IAction>();
+ if (view.getContext() == null) {
+ return actions;
+ }
+
+ String sectionName = getSectionName(view.getContext());
+ String sectionFile = getSectionFile(sectionName);
+ IAction action = new CreateSectionAction(selection, sectionName, sectionFile);
+ actions.add(action);
+
+ return actions;
+ }
+
+ /**
+ * Generate a name for a new section in the given context
+ *
+ * @param context
+ * The context in which the new section will be created
+ * @return
+ * The generated name (Which should be unique in the given context)
+ */
+ protected String getSectionName(Context context) {
+ String name;
+ while (true) {
+ name = "Section " + i; //$NON-NLS-1$
+ if (isValidName(name, context)) {
+ return name;
+ }
+ i++;
+ }
+ }
+
+ /**
+ * Tests if a section name is valid
+ *
+ * @param sectionName
+ * The name to test
+ * @param context
+ * The Context in which the section name will be used
+ * @return
+ * True is the name is a valid section name
+ */
+ protected boolean isValidName(String sectionName, Context context) {
+ for (Tab tab : context.getTabs()) {
+ for (Section section : tab.getSections()) {
+ if (section.getName().equals(sectionName)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Return the path of the section file from a section name
+ *
+ * @param sectionName
+ * The name of the section
+ * @return
+ * The path to the section's XWT file
+ */
+ protected String getSectionFile(String sectionName) {
+ return "ui/" + sectionName + ".xwt"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Adds new actions to the Section's create child section
+ *
+ * @param selection
+ * The current seleection
+ * @return
+ * The newly created {@link IAction}s
+ */
+ protected Collection<IAction> createChildForSection(ISelection selection) {
+ Collection<IAction> actions = new LinkedList<IAction>();
+
+ actions.add(new CreateSectionWidgetAction(selection));
+
+ return actions;
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection newSelection = ActionUtil.getAdaptedSelection(event.getSelection());
+
+ SelectionChangedEvent newEvent = new SelectionChangedEvent(event.getSelectionProvider(), newSelection);
+
+ super.selectionChanged(newEvent);
+ }
+
+ @Override
+ protected DeleteAction createDeleteAction() {
+ return new MoDiscoDeleteAction(removeAllReferencesOnDelete());
+ }
+
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return false; // When true, the whole model is loaded on "delete" actions, including *.xwt files
+ // (Which cannot contain references to the deleted element, and are really slow to load)
+ }
+
+ @Override
+ protected CutAction createCutAction() {
+ return new MoDiscoCutAction();
+ }
+
+ @Override
+ protected CopyAction createCopyAction() {
+ return new MoDiscoCopyAction();
+ }
+
+ @Override
+ protected PasteAction createPasteAction() {
+ return new MoDiscoPasteAction();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/MoDiscoDropAdapter.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/MoDiscoDropAdapter.java new file mode 100644 index 00000000000..073ec97eb5f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/MoDiscoDropAdapter.java @@ -0,0 +1,66 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * An adapter for Drag & Drop in the Context editor. The default Ecore drag & drop
+ * is not compatible with the EMF Facet Tree Elements
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoDropAdapter extends EditingDomainViewerDropAdapter {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * The Editing domain for this Drop Adapter
+ * @param viewer
+ * The Viewer for this Drop Adapter
+ */
+ public MoDiscoDropAdapter(EditingDomain domain, Viewer viewer) {
+ super(domain, viewer);
+ }
+
+ @Override
+ protected Collection<?> extractDragSource(Object object) {
+ if (object instanceof ISelection) {
+ return super.extractDragSource(ActionUtil.getAdaptedSelection((ISelection) object));
+ } else {
+ return super.extractDragSource(object);
+ }
+ }
+
+ @Override
+ protected Object extractDropTarget(Widget item) {
+ Object dropTarget = super.extractDropTarget(item);
+ EObject eObject = EMFHelper.getEObject(dropTarget);
+ if (eObject != null) {
+ return eObject;
+ }
+
+ return dropTarget;
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ResourceEditorInput.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ResourceEditorInput.java new file mode 100644 index 00000000000..9c8ffed346c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ResourceEditorInput.java @@ -0,0 +1,85 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.editor; + +import org.eclipse.emf.common.ui.URIEditorInput; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.IPersistableElement; + + +/** + * A non-persistable editor input that is used to open an editor on a {@link Resource} that + * has already been loaded in a {@link ResourceSet}. + */ +public class ResourceEditorInput extends URIEditorInput { + + private final Resource resource; + + private String name; + + public ResourceEditorInput(Resource resource) { + this(resource, null); + } + + public ResourceEditorInput(Resource resource, String name) { + super(resource.getURI(), name); + + this.resource = resource; + this.name = name; + } + + public final Resource getResource() { + return resource; + } + + @Override + public boolean exists() { + ResourceSet rset = resource.getResourceSet(); + + // if the resource isn't in a resource set, assume that it cannot be properly + // loaded/saved from persistent storage and, therefore, it doesn't exist + return (rset != null) && rset.getURIConverter().exists(resource.getURI(), null); + } + + @Override + public ImageDescriptor getImageDescriptor() { + return null; + } + + @Override + public String getName() { + if (name == null) { + name = resource.getURI().lastSegment(); + } + + return name; + } + + /** + * Unlike the superclass, I am not persistable because a {@link Resource} is a transient + * object. + * + * @return {@code false} + */ + @Override + public IPersistableElement getPersistable() { + return null; + } + + @Override + public String getToolTipText() { + return resource.getURI().toString(); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/UIEditor.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/UIEditor.java new file mode 100644 index 00000000000..f3360ca9383 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/UIEditor.java @@ -0,0 +1,535 @@ +/***************************************************************************** + * Copyright (c) 2010, 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.editor; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.EventObject; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.presentation.EcoreEditor; +import org.eclipse.emf.ecore.presentation.EcoreEditorPlugin; +import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.URIConverter; +import org.eclipse.emf.ecore.resource.URIHandler; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.xmi.XMLResource; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.MoDiscoDropAdapter; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.ResourceEditorInput; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.ViewFilter; +import org.eclipse.papyrus.infra.properties.catalog.PropertiesURIHandler; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.internal.ui.runtime.IInternalConfigurationManager; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.properties.ui.widgets.layout.GridData; +import org.eclipse.papyrus.infra.properties.ui.widgets.layout.PropertiesLayout; +import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor; +import org.eclipse.papyrus.infra.widgets.editors.ICommitListener; +import org.eclipse.papyrus.infra.widgets.editors.StringEditor; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.preview.Preview; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.ContextContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.ContextLabelProvider; +import org.eclipse.swt.SWT; +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.Transfer; +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IPerspectiveDescriptor; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.WorkbenchException; +import org.eclipse.ui.dialogs.SaveAsDialog; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheetPage; +import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; + +/** + * A customization editor for Contexts from the Papyrus Property View. + * The Editor is based on the Ecore reflective editor and the EMF Facet + * customizable content & label providers + * + * @author Camille Letavernier + */ +public class UIEditor extends EcoreEditor implements ITabbedPropertySheetPageContributor, CommandStackListener { + + private Set<Preview> previews = new HashSet<>(); + + private TreeViewer selectionViewer; + + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + getContainer().setBackground(getContainer().getDisplay().getSystemColor(SWT.COLOR_WHITE)); + getContainer().setBackgroundMode(SWT.INHERIT_DEFAULT); + + Composite gParent = new Composite(getContainer(), SWT.NONE); + gParent.setLayout(new FillLayout()); + + // SashForm parent = new SashForm(gParent, SWT.VERTICAL | SWT.V_SCROLL | SWT.H_SCROLL); + // parent.setLayout(new FillLayout()); + + Composite parent = new Composite(gParent, SWT.NONE); + parent.setLayout(new PropertiesLayout()); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + + final ViewFilter filter = new ViewFilter(); + + final StringEditor filterPattern = new StringEditor(parent, SWT.NONE, Messages.UIEditor_FilterViews); + filterPattern.addCommitListener(new ICommitListener() { + + @Override + public void commit(AbstractEditor editor) { + filter.setPattern((String) filterPattern.getValue()); + selectionViewer.refresh(); + } + + }); + + Tree tree = new Tree(parent, SWT.BORDER | SWT.MULTI); + tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + selectionViewer = new TreeViewer(tree); + selectionViewer.setFilters(new ViewerFilter[] { filter }); + setCurrentViewer(selectionViewer); + ContextContentProvider contentProvider = new ContextContentProvider(); + // contentProvider.getCustomizationManager().installCustomPainter(tree); + + ILabelProvider labelProvider = new ContextLabelProvider(); + + editingDomain.getCommandStack().addCommandStackListener(this); + + selectionViewer.setContentProvider(contentProvider); + selectionViewer.setLabelProvider(labelProvider); + + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(gParent); + setPageText(pageIndex, "Model"); //$NON-NLS-1$ + + setActivePage(0); + + // Preview preview = new Preview(this); + // preview.createPartControl(parent); + // addPreview(preview); + + parent.layout(); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener(new ControlAdapter() { + + boolean guard = false; + + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + updateProblemIndication(); + + changePerspective(); + + // FIXME ppe:/ conversion + // This is a hack. The ppe:/ URIs are not correctly converted when the model is saved. + getEditingDomain().getResourceSet().getURIConverter().getURIHandlers().add(0, new PropertiesURIHandler()); + } + + protected void changePerspective() { + IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + if (activePage == null) { + return; + } + + IPerspectiveDescriptor descriptor = activePage.getPerspective(); + + if (descriptor.getId().equals(Activator.CUSTOMIZATION_PERSPECTIVE_ID)) { + return; + } + + boolean openPerspective = false; + + // if(CustomizationPreferencePage.askForConfirmation()) { + // int defaultIndex = CustomizationPreferencePage.openCustomizationPerspective() ? 0 : 1; + // System.out.println(getContainer().getShell()); + // MessageDialog confirmationDialog = new MessageDialog(getContainer().getShell(), Messages.UIEditor_ChangePerspective, null, Messages.UIEditor_ChangePerspectiveMessage, MessageDialog.QUESTION, new String[]{ IDialogConstants.YES_LABEL, + // IDialogConstants.NO_LABEL }, defaultIndex); + // confirmationDialog.open(); + // openPerspective = confirmationDialog.getReturnCode() == 0; + // } else { + // openPerspective = CustomizationPreferencePage.openCustomizationPerspective(); + // } + + if (openPerspective) { + try { + PlatformUI.getWorkbench().showPerspective(Activator.CUSTOMIZATION_PERSPECTIVE_ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); + } catch (WorkbenchException ex) { + Activator.log.error(ex); + } + } + } + + @Override + protected void createContextMenuForGen(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$ + contextMenu.add(new Separator("additions")); //$NON-NLS-1$ + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu = contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new MoDiscoDropAdapter(editingDomain, viewer)); + } + + @Override + protected void updateProblemIndication() { + super.updateProblemIndication(); + // if (updateProblemIndication){ + // for (Diagnostic diag : resourceToDiagnosticMap.values()){ + // if (diag.getSeverity() != Diagnostic.OK) + // Activator.log.error(diag.getMessage(), diag.getException()); + // } + // } + } + + private boolean isSaving = false; + + protected synchronized boolean isSaving() { + return isSaving; + } + + protected synchronized void setSaving(boolean saving) { + this.isSaving = saving; + } + + @Override + public void doSave(IProgressMonitor progressMonitor) { + if (editingDomain.getResourceToReadOnlyMap() == null) { + editingDomain.setResourceToReadOnlyMap(new HashMap<Resource, Boolean>()); + } + + Map<Resource, Boolean> readOnlyMap = editingDomain.getResourceToReadOnlyMap(); + ResourceSet resourceSet = getEditingDomain().getResourceSet(); + + for (Resource resource : resourceSet.getResources()) { + if (readOnlyMap.containsKey(resource)) { + continue; + } + + URIHandler handler = resourceSet.getURIConverter().getURIHandler(resource.getURI()); + Map<String, Object> options = new HashMap<>(); + options.put(URIConverter.OPTION_URI_CONVERTER, resourceSet.getURIConverter()); + try { + OutputStream os = handler.createOutputStream(resource.getURI(), options); + readOnlyMap.put(resource, os == null); + if (os != null) { + os.close(); + } + } catch (IOException ex) { + // Currently, createOutputStream() fails on a NPE if the resource is read-only. + // Only log a warning, since the editor is currently not able to properly check for + // read-only state without calling createOutputStream + // See Bug 351146 for potential options regarding a proper fix + Activator.log.warn("Trying to save a read-only resource: " + resource.getURI()); + readOnlyMap.put(resource, true); + } + } + + setSaving(true); + try { + super.doSave(progressMonitor); + } finally { + setSaving(false); + } + refreshContext(); + } + + /** + * @see org.eclipse.emf.ecore.presentation.EcoreEditor#handleChangedResources() + * + */ + @Override + protected void handleChangedResources() { + if (!isSaving()) { + super.handleChangedResources(); + } + } + + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.create(); + saveAsDialog.setMessage(EcoreEditorPlugin.INSTANCE.getString("_UI_SaveAs_message")); //$NON-NLS-1$ + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + ResourceSet resourceSet = editingDomain.getResourceSet(); + Resource currentResource = resourceSet.getResources().get(0); + String currentExtension = currentResource.getURI().fileExtension(); + + URI currentURI = currentResource.getURI(); + URI newURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true); + String newExtension = newURI.fileExtension(); + + if (currentExtension.equals(ECORE_FILE_EXTENSION) && newExtension.equals(EMOF_FILE_EXTENSION) || currentExtension.equals(EMOF_FILE_EXTENSION) && newExtension.equals(ECORE_FILE_EXTENSION)) { + Resource newResource = resourceSet.createResource(newURI); + newResource.getContents().addAll(currentResource.getContents()); + resourceSet.getResources().remove(0); + resourceSet.getResources().move(0, newResource); + } else { + // System.out.println("Replace " + currentURI + " by " + newURI); + currentResource.setURI(newURI); + } + + IFileEditorInput modelFile = new FileEditorInput(file); + setInputWithNotify(modelFile); + setPartName(file.getName()); + + Context context = getContext(); + if (context != null) { + EcoreUtil.resolveAll(context); + for (Resource resource : currentResource.getResourceSet().getResources()) { + if (resource != currentResource) { + if (isRelative(currentURI, resource)) { + URI newResourceURI = resource.getURI().deresolve(currentURI).resolve(newURI); + // System.out.println("Replace " + resource.getURI() + " by " + newResourceURI); + resource.setURI(newResourceURI); + } + } + } + } + + doSave(getActionBars().getStatusLineManager().getProgressMonitor()); + } + } + } + + private boolean isRelative(URI baseURI, Resource resource) { + URI resourceURI = resource.getURI(); + URI uri = resourceURI.deresolve(baseURI); + if (uri.isRelative()) { + if (!(uri.toString().startsWith("..") || uri.toString().startsWith("/"))) { //$NON-NLS-1$ //$NON-NLS-2$ + return true; + } + } + return false; + } + + protected Context getContext() { + EObject object = getEditingDomain().getResourceSet().getResources().get(0).getContents().get(0); + if (object instanceof Context) { + return (Context) object; + } + return null; + } + + private void refreshContext() { + Context context = getContext(); + if (context != null) { + ((IInternalConfigurationManager) PropertiesRuntime.getConfigurationManager()).refresh(context); + } + } + + @Override + public IPropertySheetPage getPropertySheetPage() { + if (iPropertySheetPage == null) { + iPropertySheetPage = new TabbedPropertySheetPage(this); + } + return iPropertySheetPage; + } + + @Override + public String getContributorId() { + return "CustomizationPropertyView"; //$NON-NLS-1$ + } + + /** + * Registers a Preview to this Editor + * + * @param preview + */ + public void addPreview(Preview preview) { + previews.add(preview); + selectionViewer.addSelectionChangedListener(preview); + preview.selectionChanged(new SelectionChangedEvent(this, this.currentViewer.getSelection())); + } + + /** + * Unregisters a Preview from this editor + * + * @param preview + */ + public void removePreview(Preview preview) { + previews.remove(preview); + selectionViewer.removeSelectionChangedListener(preview); + } + + @Override + public void dispose() { + for (Preview preview : previews) { + selectionViewer.removeSelectionChangedListener(preview); + } + previews.clear(); + if (iPropertySheetPage != null) { + iPropertySheetPage.dispose(); + } + super.dispose(); + } + + /** + * The Property sheet page for this editor + */ + protected IPropertySheetPage iPropertySheetPage; + + @Override + public void commandStackChanged(EventObject event) { + getViewer().refresh(); + for (Preview preview : previews) { + preview.displayView(); + } + } + + @Override + public void createModel() { + if (getEditorInput() instanceof ResourceEditorInput) { + // override the editing domain with one that uses the resource's + // resource set, which already exists + + ResourceSet resourceSet = ((ResourceEditorInput) getEditorInput()).getResource().getResourceSet(); + + if (resourceSet != null) { + editingDomain = new AdapterFactoryEditingDomain(editingDomain.getAdapterFactory(), editingDomain.getCommandStack(), resourceSet); + } + } + + ResourceSet resourceSet = editingDomain.getResourceSet(); + resourceSet.getLoadOptions().put(XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION, false); + + super.createModel(); + } + + @Override + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener(new CommandStackListener() { + + @Override + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec(new Runnable() { + + @Override + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack) event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext();) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Replace the parent editing domain with a standard one. We don't want to override the isReadOnly() method. + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ViewFilter.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ViewFilter.java new file mode 100644 index 00000000000..dff84105980 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/ViewFilter.java @@ -0,0 +1,120 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextPackage;
+import org.eclipse.papyrus.infra.properties.contexts.View;
+import org.eclipse.ui.internal.misc.StringMatcher;
+
+/**
+ * A Filter for the UIEditor. The Filter can match Views and DataContextElements
+ * An object is matched if it directly matches the filter, or if one of its parents
+ * match it, or if one of his children (at any level) match it.
+ *
+ * @author Camille Letavernier
+ */
+public class ViewFilter extends ViewerFilter {
+
+ private StringMatcher matcher;
+
+ /**
+ * Sets the pattern for this filter
+ *
+ * @param pattern
+ */
+ public void setPattern(String pattern) {
+ matcher = new StringMatcher("*" + pattern + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if (matcher == null) {
+ return true;
+ }
+
+ EObject semantic = EMFHelper.getEObject(element);
+
+ if (semantic != null) {
+ if (semantic instanceof View) {
+ String viewName = ((View) semantic).getName();
+ if (viewName == null) {
+ return true;
+ }
+ return matcher.match(viewName);
+ } else if (semantic instanceof DataContextPackage) {
+ // FIXME : The filter doesn't work correctly for displaying a DataContextElement in a Package
+ return select((DataContextPackage) semantic);
+ } else if (semantic instanceof DataContextElement) {
+ return select((DataContextElement) semantic);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * An element is displayed if its name matches the filter, or if one of its
+ * children's or parent's name match it
+ *
+ * @param dataContextPackage
+ * @return
+ */
+ private boolean select(DataContextPackage dataContextPackage) {
+ if (dataContextPackage.getName() == null) {
+ return true;
+ }
+
+ if (matcher.match(dataContextPackage.getName())) {
+ return true;
+ }
+
+ for (DataContextElement subElement : dataContextPackage.getElements()) {
+ if (subElement instanceof DataContextPackage) {
+ if (select((DataContextPackage) subElement)) {
+ return true;
+ }
+ }
+
+ if (select(subElement)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private boolean select(DataContextElement dataContextElement) {
+ if (dataContextElement.getName() == null) {
+ return true;
+ }
+
+ if (matcher.match(dataContextElement.getName())) {
+ return true;
+ }
+
+ DataContextPackage dataContextPackage = dataContextElement.getPackage();
+ while (dataContextPackage != null) {
+ if (matcher.match(dataContextPackage.getName())) {
+ return true;
+ }
+
+ dataContextPackage = dataContextPackage.getPackage();
+ }
+
+ return false;
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CompoundCommandActionDelegate.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CompoundCommandActionDelegate.java new file mode 100644 index 00000000000..6481d19b6eb --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CompoundCommandActionDelegate.java @@ -0,0 +1,66 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * An EMF Compound Command with support for Images, Tooltip text and description
+ * (From CommandActionDelegate)
+ * The first sub-command should be a CommandActionDelegate
+ *
+ * @author Camille Letavernier
+ */
+public class CompoundCommandActionDelegate extends CompoundCommand implements CommandActionDelegate {
+
+ private Image image;
+
+ public CompoundCommandActionDelegate() {
+ }
+
+ /**
+ * Sets the Image for this command
+ *
+ * @param image
+ * The image to display on the command
+ */
+ public void setImage(Image image) {
+ this.image = image;
+ }
+
+ @Override
+ public Object getImage() {
+ if (image == null) {
+ return ((CommandActionDelegate) getCommandList().get(0)).getImage();
+ } else {
+ return image;
+ }
+ }
+
+ @Override
+ public String getText() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getText();
+ }
+
+ @Override
+ public String getToolTipText() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getToolTipText();
+ }
+
+ @Override
+ public String getDescription() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getDescription();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateResourceCommand.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateResourceCommand.java new file mode 100644 index 00000000000..e98e90f2195 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateResourceCommand.java @@ -0,0 +1,113 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+
+/**
+ * A command to create an EMF resource
+ *
+ * @author Camille Letavernier
+ */
+public class CreateResourceCommand extends AbstractCommand implements CommandActionDelegate {
+
+ private EObject object;
+
+ private URI uri;
+
+ private ResourceSet resourceSet;
+
+ private boolean fileAlreadyExists = true;
+
+ private Resource resource;
+
+ /**
+ *
+ * Constructor. A Command to create an EMF Resource. The command can be undone.
+ *
+ * @param object
+ * The EObject to persist in the resource
+ * @param uri
+ * The location of the resource
+ * @param resourceSet
+ * The resourceSet in which the resource should be created
+ */
+ public CreateResourceCommand(EObject object, URI uri, ResourceSet resourceSet) {
+ super("Create new " + object.eClass().getName(), "Creates a new " + object.eClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ this.object = object;
+ this.uri = uri;
+ this.resourceSet = resourceSet;
+ }
+
+ @Override
+ public void execute() {
+ resource = resourceSet.getResource(uri, false);
+ if (resource == null) {
+ Activator.log.debug("+++ Creating " + uri);
+ fileAlreadyExists = false;
+ resource = resourceSet.createResource(uri);
+ } else {
+ Activator.log.debug("+++ " + resource.getURI() + " already exists");
+ }
+ resource.getContents().add(object);
+ }
+
+ @Override
+ public void redo() {
+ execute();
+ }
+
+ @Override
+ public void undo() {
+ // Do not unload the resource if it was created before this command was executed
+ if (!fileAlreadyExists) {
+ Activator.log.debug("--- Deleting " + resource.getURI());
+ try {
+ resourceSet.getResources().remove(resource);
+ resource.delete(Collections.emptyMap());
+ } catch (IOException ex) {
+ Activator.log.error(ex);
+ }
+ } else {
+ Activator.log.debug("--- " + resource.getURI() + " will not be deleted");
+ }
+ }
+
+ @Override
+ public Object getImage() {
+ return null;
+ }
+
+ @Override
+ public String getText() {
+ return getLabel();
+ }
+
+ @Override
+ public String getToolTipText() {
+ return getDescription();
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionAction.java new file mode 100644 index 00000000000..75d06c146c4 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionAction.java @@ -0,0 +1,205 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.command.UnexecutableCommand; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.emf.edit.command.CommandParameter; +import org.eclipse.emf.edit.command.CreateChildCommand; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.ui.action.StaticSelectionCommandAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CompoundCommandActionDelegate; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CreateResourceCommand; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.ContextsFactory; +import org.eclipse.papyrus.infra.properties.contexts.Section; +import org.eclipse.papyrus.infra.properties.contexts.View; +import org.eclipse.papyrus.infra.properties.ui.CompositeWidget; +import org.eclipse.papyrus.infra.properties.ui.Layout; +import org.eclipse.papyrus.infra.properties.ui.UiFactory; +import org.eclipse.papyrus.infra.properties.ui.ValueAttribute; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; + +/** + * A Command for create a {@link Section} in the given View. + * + * In the physical EMF Model, the section is owned by a Tab, and referenced + * by one or more views. However, in the logical model used by the Customization + * editor (Which is slightly different to be simpler), the view directly owns the + * section, and the section refers to its Tab. + * + * This command creates the section in the default Tab, and creates a reference + * from the view to the section. + * + * It also instantiates the XWT Resource associated to this sections, and fills + * it with a default Composite widget and Layout. + * + * The command can be undone in a single operation. + * + * @author Camille Letavernier + * + */ +public class CreateSectionAction extends StaticSelectionCommandAction { + + private IStructuredSelection selection; + + private String sectionName, sectionFile; + + /** + * Constructor. + * + * Creates a new CreateSectionAction, with the given name and file. + * The sectionFile is a relative path from the section's URI, which is + * the same as it's owning view. + * + * @param selection + * The current selection + * @param sectionName + * The new section's name + * @param sectionFile + * The path to the section's XWT resource + */ + public CreateSectionAction(ISelection selection, String sectionName, String sectionFile) { + this.sectionName = sectionName; + this.sectionFile = sectionFile; + + if (selection instanceof IStructuredSelection) { + this.selection = (IStructuredSelection) selection; + configureAction(selection); + } + } + + @Override + protected Command createActionCommand(EditingDomain editingDomain, Collection<?> collection) { + Object selectedElement = selection.getFirstElement(); + View view = null; + if (selectedElement instanceof View) { + view = (View) selectedElement; + } + + if (view == null) { + return UnexecutableCommand.INSTANCE; + } + + EObject tab = null; + + for (Section section : view.getSections()) { + if (section.getTab() != null) { + tab = section.getTab(); + break; + } + } + + if (tab == null) { + Context context = (Context) view.eContainer(); + if (context.getTabs().size() > 0) { + tab = context.getTabs().get(0); + } + } + + if (tab == null) { + return UnexecutableCommand.INSTANCE; + } + + Section newSection = ContextsFactory.eINSTANCE.createSection(); + newSection.setName(getSectionName()); + + CompositeWidget newWidget = createWidget(); + + CommandParameter tabParameter = new CommandParameter(tab, tab.eClass().getEStructuralFeature("sections"), newSection); //$NON-NLS-1$ + + Command createInTab = CreateChildCommand.create(editingDomain, tab, tabParameter, collection); + Command addInView = AddCommand.create(editingDomain, view, view.eClass().getEStructuralFeature("sections"), newSection); //$NON-NLS-1$ + Command createWidgetResource = getCreateResourceCommand(newWidget, newSection, view.eResource()); + Command setWidget = getSetWidgetCommand(newWidget, newSection); + + + CompoundCommand createActionCommand = new CompoundCommandActionDelegate(); + createActionCommand.append(createInTab); + createActionCommand.append(addInView); + createActionCommand.append(createWidgetResource); + createActionCommand.append(setWidget); + + return createActionCommand; + } + + private CompositeWidget createWidget() { + CompositeWidget newWidget = UiFactory.eINSTANCE.createCompositeWidget(); + + + for (Map.Entry<String, String> entry : getNamespaces().entrySet()) { + ValueAttribute attribute = UiFactory.eINSTANCE.createValueAttribute(); + attribute.setName(entry.getKey()); + attribute.setValue(entry.getValue()); + newWidget.getAttributes().add(attribute); + } + + newWidget.setWidgetType(PropertiesRuntime.getConfigurationManager().getDefaultCompositeType()); + + Layout layout = UiFactory.eINSTANCE.createLayout(); + layout.setLayoutType(PropertiesRuntime.getConfigurationManager().getDefaultLayoutType()); + newWidget.setLayout(layout); + + return newWidget; + } + + private Map<String, String> getNamespaces() { + Map<String, String> namespaces = new HashMap<String, String>(); + namespaces.put("xmlns", "http://www.eclipse.org/xwt/presentation"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:x", "http://www.eclipse.org/xwt"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:ppe", "clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:ppel", "clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"); //$NON-NLS-1$ //$NON-NLS-2$ + return namespaces; + } + + private Command getCreateResourceCommand(CompositeWidget newWidget, Section section, Resource baseResource) { + URI widgetURI; + if (section.getSectionFile() == null || section.getSectionFile().equals("")) { //$NON-NLS-1$ + section.setSectionFile(getSectionFile()); + } + + widgetURI = URI.createURI(section.getSectionFile()); + widgetURI = widgetURI.resolve(baseResource.getURI()); + Command createWidget = new CreateResourceCommand(newWidget, widgetURI, baseResource.getResourceSet()); + + return createWidget; + } + + private Command getSetWidgetCommand(CompositeWidget newWidget, Section section) { + if (section.getWidget() == null) { + return SetCommand.create(editingDomain, section, section.eClass().getEStructuralFeature("widget"), newWidget); //$NON-NLS-1$ + } else { + return UnexecutableCommand.INSTANCE; + } + } + + private String getSectionFile() { + return sectionFile; + } + + private String getSectionName() { + return sectionName; + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionWidgetAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionWidgetAction.java new file mode 100644 index 00000000000..a373af3a2b5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/CreateSectionWidgetAction.java @@ -0,0 +1,130 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.UnexecutableCommand; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.ui.action.StaticSelectionCommandAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CompoundCommandActionDelegate; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.CreateResourceCommand; +import org.eclipse.papyrus.infra.properties.contexts.Section; +import org.eclipse.papyrus.infra.properties.ui.CompositeWidget; +import org.eclipse.papyrus.infra.properties.ui.Layout; +import org.eclipse.papyrus.infra.properties.ui.UiFactory; +import org.eclipse.papyrus.infra.properties.ui.ValueAttribute; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.widgets.Activator; + +/** + * An Action to create a section's XWT Resource, with a default Composite + * and layout. + * + * @author Camille Letavernier + */ +public class CreateSectionWidgetAction extends StaticSelectionCommandAction { + + private Section section; + + /** + * Constructor. + * + * @param selection + * The current selection. The first element should be a Section. + */ + public CreateSectionWidgetAction(ISelection selection) { + if (selection instanceof IStructuredSelection) { + IStructuredSelection sSelection = (IStructuredSelection) selection; + + Object selectedElement = sSelection.getFirstElement(); + + if (selectedElement instanceof Section) { + section = (Section) selectedElement; + } + } + configureAction(selection); + } + + @Override + protected Command createActionCommand(EditingDomain editingDomain, Collection<?> collection) { + if (section == null) { + return UnexecutableCommand.INSTANCE; + } + + CompositeWidget newWidget = createWidget(); + + CompoundCommandActionDelegate createActionCommand = new CompoundCommandActionDelegate(); + createActionCommand.setImage(Activator.getDefault().getImage("org.eclipse.papyrus.infra.properties.edit", "icons/full/obj16/CompositeWidget.gif")); //$NON-NLS-1$//$NON-NLS-2$ + createActionCommand.append(getCreateResourceCommand(newWidget)); + createActionCommand.append(getSetWidgetCommand(newWidget)); + + return createActionCommand; + } + + private CompositeWidget createWidget() { + CompositeWidget newWidget = UiFactory.eINSTANCE.createCompositeWidget(); + + + for (Map.Entry<String, String> entry : getNamespaces().entrySet()) { + ValueAttribute attribute = UiFactory.eINSTANCE.createValueAttribute(); + attribute.setName(entry.getKey()); + attribute.setValue(entry.getValue()); + newWidget.getAttributes().add(attribute); + } + + newWidget.setWidgetType(PropertiesRuntime.getConfigurationManager().getDefaultCompositeType()); + + Layout layout = UiFactory.eINSTANCE.createLayout(); + layout.setLayoutType(PropertiesRuntime.getConfigurationManager().getDefaultLayoutType()); + newWidget.setLayout(layout); + + return newWidget; + } + + private Map<String, String> getNamespaces() { + Map<String, String> namespaces = new HashMap<String, String>(); + namespaces.put("xmlns", "http://www.eclipse.org/xwt/presentation"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:x", "http://www.eclipse.org/xwt"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:ppe", "clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets"); //$NON-NLS-1$ //$NON-NLS-2$ + namespaces.put("xmlns:ppel", "clr-namespace:org.eclipse.papyrus.infra.properties.ui.widgets.layout"); //$NON-NLS-1$ //$NON-NLS-2$ + return namespaces; + } + + private Command getCreateResourceCommand(CompositeWidget newWidget) { + URI widgetURI; + if (section.getSectionFile() == null || section.getSectionFile().equals("")) { //$NON-NLS-1$ + section.setSectionFile(section.getName() + ".xwt"); //$NON-NLS-1$ + } + + widgetURI = URI.createURI(section.getSectionFile()); + widgetURI = widgetURI.resolve(section.eResource().getURI()); + Command createWidget = new CreateResourceCommand(newWidget, widgetURI, section.eResource().getResourceSet()); + + return createWidget; + } + + private Command getSetWidgetCommand(CompositeWidget newWidget) { + if (section.getWidget() == null) { + return SetCommand.create(editingDomain, section, section.eClass().getEStructuralFeature("widget"), newWidget); //$NON-NLS-1$ + } else { + return UnexecutableCommand.INSTANCE; + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCopyAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCopyAction.java new file mode 100644 index 00000000000..e8642b486bd --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCopyAction.java @@ -0,0 +1,51 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.CopyAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Copy" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoCopyAction extends CopyAction {
+
+ /**
+ * Constructor.
+ */
+ public MoDiscoCopyAction() {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * The Editing domain on which the action will be executed
+ */
+ public MoDiscoCopyAction(EditingDomain domain) {
+ super(domain);
+ }
+
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ Collection<?> newSelection = ActionUtil.getAdaptedSelection(selection);
+ return super.createCommand(newSelection);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCutAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCutAction.java new file mode 100644 index 00000000000..6f521eae776 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoCutAction.java @@ -0,0 +1,53 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.CutAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Cut" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoCutAction extends CutAction {
+
+ /**
+ * Constructor.
+ */
+ public MoDiscoCutAction() {
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * The Editing domain on which the command will be executed
+ */
+ public MoDiscoCutAction(EditingDomain domain) {
+ super(domain);
+ }
+
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ Collection<?> newSelection = ActionUtil.getAdaptedSelection(selection);
+ return super.createCommand(newSelection);
+ }
+
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoDeleteAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoDeleteAction.java new file mode 100644 index 00000000000..991ed1cda2e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoDeleteAction.java @@ -0,0 +1,79 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.DeleteAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Delete" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoDeleteAction extends DeleteAction {
+
+ /**
+ * Constructor.
+ *
+ * @param domain
+ * The editing domain on which the action will be called
+ * @param removeAllReferences
+ * If true, all references to the deleted object will be removed.
+ * This causes the whole resourceSet to be loaded, which may
+ * lead to performance issues.
+ */
+ public MoDiscoDeleteAction(EditingDomain domain, boolean removeAllReferences) {
+ super(domain, removeAllReferences);
+ }
+
+ /**
+ * Constructor. All references to the deleted object will be removed.
+ *
+ * @param domain
+ * The editing domain on which the action will be called
+ */
+ public MoDiscoDeleteAction(EditingDomain domain) {
+ super(domain);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param removeAllReferences
+ * If true, all references to the deleted object will be removed.
+ * This causes the whole resourceSet to be loaded, which may
+ * lead to performance issues.
+ */
+ public MoDiscoDeleteAction(boolean removeAllReferences) {
+ super(removeAllReferences);
+ }
+
+ /**
+ * Constructor. All references to the deleted object will be removed.
+ */
+ public MoDiscoDeleteAction() {
+ super();
+ }
+
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ Collection<?> newSelection = ActionUtil.getAdaptedSelection(selection);
+ return super.createCommand(newSelection);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoPasteAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoPasteAction.java new file mode 100644 index 00000000000..95cdef769d1 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/MoDiscoPasteAction.java @@ -0,0 +1,52 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.PasteAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Paste" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class MoDiscoPasteAction extends PasteAction {
+
+ /**
+ * Constructor.
+ */
+ public MoDiscoPasteAction() {
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param domain
+ * The editing domain on which the command will be called
+ */
+ public MoDiscoPasteAction(EditingDomain domain) {
+ super(domain);
+ }
+
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ Collection<?> newSelection = ActionUtil.getAdaptedSelection(selection);
+ return super.createCommand(newSelection);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/StrictCompoundCommandActionDelegate.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/StrictCompoundCommandActionDelegate.java new file mode 100644 index 00000000000..51b4f0c696e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/StrictCompoundCommandActionDelegate.java @@ -0,0 +1,67 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.emf.common.command.StrictCompoundCommand;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * An EMF Compound Command with support for Images, Tooltip text and description
+ * (From CommandActionDelegate)
+ * The first sub-command should be a CommandActionDelegate
+ *
+ * @author Camille Letavernier
+ */
+public class StrictCompoundCommandActionDelegate extends StrictCompoundCommand implements CommandActionDelegate {
+
+ private Image image;
+
+ public StrictCompoundCommandActionDelegate() {
+ super.isPessimistic = true;
+ }
+
+ /**
+ * Sets the Image for this command
+ *
+ * @param image
+ * The image to display on the command
+ */
+ public void setImage(Image image) {
+ this.image = image;
+ }
+
+ @Override
+ public Object getImage() {
+ if (image == null) {
+ return ((CommandActionDelegate) getCommandList().get(0)).getImage();
+ } else {
+ return image;
+ }
+ }
+
+ @Override
+ public String getText() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getText();
+ }
+
+ @Override
+ public String getToolTipText() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getToolTipText();
+ }
+
+ @Override
+ public String getDescription() {
+ return ((CommandActionDelegate) getCommandList().get(0)).getDescription();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextAction.java new file mode 100644 index 00000000000..d61dfeb6f5b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextAction.java @@ -0,0 +1,48 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.UIEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * An action to toggle the display of the DataContextElements in the UIEditor
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class ToggleDataContextAction extends AbstractHandler {
+
+ /**
+ * Indicates if the DataContextElements should be displayed
+ */
+ public static boolean showDataContext = false;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ showDataContext = !showDataContext;
+ IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (editor instanceof UIEditor) {
+ UIEditor uiEditor = (UIEditor) editor;
+ uiEditor.getViewer().refresh();
+ }
+
+ // State state = event.getCommand().getState("org.eclipse.papyrus.customization.properties.displayContextState"); //$NON-NLS-1$
+ // state.setValue(showDataContext);
+ return null;
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextState.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextState.java new file mode 100644 index 00000000000..2674dcbcac5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ToggleDataContextState.java @@ -0,0 +1,19 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.core.commands.State;
+
+
+public class ToggleDataContextState extends State {
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewAction.java new file mode 100644 index 00000000000..0fb24f154b5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewAction.java @@ -0,0 +1,69 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.ViewPart;
+
+/**
+ * An action to toggle the UIEditor Preview
+ *
+ * @author Camille Letavernier
+ */
+public class TogglePreviewAction extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ // System.out.println("Toggle");
+
+ event.getCommand().getState("org.eclipse.papyrus.customization.properties.previewstate"); //$NON-NLS-1$
+
+ IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ if (activePage == null) {
+ return null;
+ }
+
+ // System.out.println("ActivePage is " + activePage);
+
+ IViewReference viewReference = null;
+
+ for (IViewReference reference : activePage.getViewReferences()) {
+ if (reference.getId().equals(Activator.PREVIEW_ID)) {
+ viewReference = reference;
+ }
+ }
+
+ try {
+ if (viewReference == null) {
+ // System.out.println("Opening view");
+ activePage.showView(Activator.PREVIEW_ID);
+ } else {
+ // System.out.println("Closing view");
+ activePage.hideView((ViewPart) viewReference.getPart(false));
+ }
+ } catch (PartInitException ex) {
+ Activator.log.error(ex);
+ }
+
+ return null;
+ }
+
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewState.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewState.java new file mode 100644 index 00000000000..dee7bd18e63 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/TogglePreviewState.java @@ -0,0 +1,151 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.core.commands.State;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.preview.Preview;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * A State to determine if the Preview view is opened in the current perspective
+ * The State should listen on the workbench an update itself when the perspective
+ * changes, or when the preview is opened or closed
+ *
+ * @FIXME : the state is not correctly retrieved
+ * @author Camille Letavernier
+ */
+public class TogglePreviewState extends State implements IWindowListener, IPartListener {
+
+ private boolean isPreviewOpen;
+
+ public TogglePreviewState() {
+ // System.out.println("Building ToggleState");
+ //
+ // IWorkbench workbench = PlatformUI.getWorkbench();
+ //
+ // workbench.addWindowListener(this);
+ // for(IWorkbenchWindow window : workbench.getWorkbenchWindows()) {
+ // System.out.println("Listening on " + window);
+ // window.getPartService().addPartListener(this);
+ // }
+ // refreshState();
+ }
+
+ private void refreshState() {
+ // isPreviewOpen = false;
+ // System.out.println("Refresh state");
+ //
+ // IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ // if(window != null) {
+ // IWorkbenchPage page = window.getActivePage();
+ //
+ // if(page != null) {
+ // for(IViewReference reference : page.getViewReferences()) {
+ // if(reference.getId().equals(Activator.PREVIEW_ID)) {
+ // isPreviewOpen = true;
+ // break;
+ // }
+ // }
+ // }
+ // }
+ //
+ // System.out.println("IsOpen : " + isPreviewOpen);
+ //
+ // setValue(isPreviewOpen);
+ }
+
+ @Override
+ public Object getValue() {
+ return isPreviewOpen;
+ }
+
+ // IWindowListener
+
+ @Override
+ public void windowOpened(IWorkbenchWindow window) {
+ // System.out.println("Listening on " + window);
+ window.getPartService().addPartListener(this);
+ refreshState();
+ }
+
+ @Override
+ public void windowClosed(IWorkbenchWindow window) {
+ // window.removePageListener(this);
+ window.getPartService().removePartListener(this);
+ }
+
+ // IPageListener
+ //
+ // public void pageOpened(IWorkbenchPage page) {
+ // page.addPartListener(this);
+ // }
+ //
+ // public void pageClosed(IWorkbenchPage page) {
+ // page.removePartListener(this);
+ // }
+
+ // IPartListener
+
+ @Override
+ public void partOpened(IWorkbenchPart part) {
+ if (part instanceof Preview) {
+ // System.out.println("Closing preview");
+ refreshState();
+ }
+ }
+
+ @Override
+ public void partClosed(IWorkbenchPart part) {
+ if (part instanceof Preview) {
+ // System.out.println("Closing preview");
+ refreshState();
+ }
+ }
+
+ // Ignored methods
+
+ @Override
+ public void partActivated(IWorkbenchPart part) {
+ // System.out.println("Part activated");
+ // refreshState();
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart part) {
+ // Nothing
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart part) {
+ // System.out.println("Part activated");
+ // refreshState();
+ }
+
+ @Override
+ public void windowActivated(IWorkbenchWindow window) {
+ // Nothing
+ }
+
+ @Override
+ public void windowDeactivated(IWorkbenchWindow window) {
+ // Nothing
+ }
+
+ public void pageActivated(IWorkbenchPage page) {
+ // Nothing
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ValidationAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ValidationAction.java new file mode 100644 index 00000000000..b05ec80afb8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/actions/ValidationAction.java @@ -0,0 +1,30 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.editor.actions;
+
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ActionUtil;
+
+/**
+ * An adapter for the EMF "Validate" Action, compatible with the
+ * MoDisco customizable content provider.
+ *
+ * @author Camille Letavernier
+ */
+public class ValidationAction extends ValidateAction {
+
+ @Override
+ public boolean updateSelection(IStructuredSelection selection) {
+ return super.updateSelection((IStructuredSelection) ActionUtil.getAdaptedSelection(selection));
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/preview/Preview.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/preview/Preview.java new file mode 100644 index 00000000000..0b3fc19f836 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/editor/preview/Preview.java @@ -0,0 +1,522 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Use URIs to support non-URL-compatible storage (CDO) + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.editor.preview; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URL; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.runtime.IPath; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.papyrus.views.properties.model.xwt.resource.XWTResource; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.UIEditor; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.contexts.Section; +import org.eclipse.papyrus.infra.properties.contexts.Tab; +import org.eclipse.papyrus.infra.properties.contexts.View; +import org.eclipse.papyrus.infra.properties.ui.runtime.DefaultDisplayEngine; +import org.eclipse.papyrus.infra.properties.ui.runtime.DisplayEngine; +import org.eclipse.papyrus.infra.properties.ui.widgets.layout.PropertiesLayout; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; +import org.eclipse.swt.custom.CTabItem; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.part.ViewPart; + +/** + * The Preview section of the Customization editor. + * Displays the given view in a Tab Folder. + * The preview uses the same Display Engine as the Property view, which should lead + * to the same results, with a few exceptions : + * - The Tab Folder has an Horizontal layout for its tabs, while the property view has + * a vertical layout + * - The preview is read-only : all actions are disabled. This means that it is + * not possible to preview dialogs, for example + * - The Enum and References fields are empty + * - Some buttons may be marked as disabled, but will be available at runtime (Or vice-versa) + * - The dynamic sections are always displayed + * + * The preview can be disabled for performance issues + * + * @author Camille Letavernier + */ +public class Preview extends ViewPart implements ISelectionChangedListener, IPartListener { + + private Composite parent; + + private ScrolledComposite scrolledParent; + + private CTabFolder contents; + + private DisplayEngine displayEngine; + + private String selectedTab; + + private boolean enabled = true; + + private View currentView; + + private Label previewTitle; + + private Label previewDisabled; + + private Set<UIEditor> currentEditors = new HashSet<UIEditor>(); + + private IWorkbenchPage activePage; + + /** + * Constructor. + * Constructs a new Preview in a View. The preview will change depending + * on the current active UIEditor. + */ + public Preview() { + } + + /** + * Constructor. + * Constructs a new Preview in an editor (Embedded preview) + * + * @param editor + */ + public Preview(UIEditor editor) { + this.currentEditors.add(editor); + } + + /** + * Creates the preview control in the given composite. + * + * @param container + * The SWT Composite in which the preview should be displayed + */ + @Override + public void createPartControl(Composite container) { + scrolledParent = new ScrolledComposite(container, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); + scrolledParent.getVerticalBar().setIncrement(10); + scrolledParent.setBackground(new Color(scrolledParent.getDisplay(), 255, 255, 255)); + scrolledParent.setBackgroundMode(SWT.INHERIT_DEFAULT); + scrolledParent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + parent = new Composite(scrolledParent, SWT.NONE); + parent.setLayout(new GridLayout(1, false)); + + scrolledParent.setContent(parent); + + Composite controls = new Composite(parent, SWT.NONE); + controls.setLayout(new GridLayout(5, false)); + controls.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + GridData data; + + // Label preview = new Label(controls, SWT.NONE); + // preview.setImage(Activator.getDefault().getImage("/icons/preview.png")); //$NON-NLS-1$ + // data = new GridData(SWT.CENTER, SWT.BEGINNING, false, false); + // preview.setLayoutData(data); + + // Label previewText = new Label(controls, SWT.NONE); + // previewText.setText(Messages.Preview_preview); + // data = new GridData(SWT.CENTER, SWT.BEGINNING, false, false); + // previewText.setLayoutData(data); + + previewTitle = new Label(controls, SWT.NONE); + data = new GridData(SWT.CENTER, SWT.BEGINNING, false, false); + previewTitle.setLayoutData(data); + + // final Button togglePreview = new Button(controls, SWT.CHECK); + // togglePreview.setText(Messages.Preview_disablePreview); + // togglePreview.addSelectionListener(new SelectionListener() { + // + // public void widgetSelected(SelectionEvent e) { + // enabled = !enabled; + // displayView(); + // } + // + // public void widgetDefaultSelected(SelectionEvent e) { + // //Nothing + // } + // + // }); + + previewDisabled = new Label(parent, SWT.NONE); + previewDisabled.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + contents = new CTabFolder(parent, SWT.VERTICAL); + + // If currentEditors is empty, the preview is displayed in a view and + // should listen to the workbench to know about the activeEditor + if (currentEditors.isEmpty()) { + + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window != null) { + activePage = window.getActivePage(); + if (activePage != null) { + IEditorPart editorPart = activePage.getActiveEditor(); + if (editorPart instanceof UIEditor) { + setEditor((UIEditor) editorPart); + } + + activePage.addPartListener(this); + } else { + Activator.log.warn("There is no active page"); //$NON-NLS-1$ + } + } else { + Activator.log.warn("There is no current window"); //$NON-NLS-1$ + } + } + + displayView(); + } + + /** + * Sets the current Editor + * + * @param editor + */ + public void setEditor(UIEditor editor) { + editor.addPreview(this); + currentEditors.add(editor); + } + + private void refreshDisplay() { + Point size = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT); + if (scrolledParent.getSize().x > 0) { + size.x = scrolledParent.getSize().x - 30; + } + parent.setSize(size); + } + + /** + * Saves the section's XWT Resource in a temporary file, which + * can then be interpreted by XWT. Returns the URL to this file. + * + * @param section + * The section for which we want to persist the XWT Resource + * @return + * The URL to the XWT Resource + */ + private URL saveTmp(Section section) { + if (section.getSectionFile() == null || section.getWidget() == null) { + return null; + } + + IPath path = Activator.getDefault().getPreferencesPath(); + path = path.append("/preview/"); //$NON-NLS-1$ + try { + File previewDirectory = path.toFile(); + if (!previewDirectory.exists()) { + previewDirectory.mkdirs(); + } + + File xwtFile = path.append(section.getSectionFile()).toFile(); + + if (!xwtFile.exists()) { + xwtFile.getParentFile().mkdirs(); + xwtFile.createNewFile(); + } + + OutputStream os = new FileOutputStream(xwtFile); + try { + Map<Object, Object> options = new HashMap<Object, Object>(); + // The outputstream cannot be formatted. If format is true, this is + // the real file (and not the preview file) that will be formatted + options.put(XWTResource.OPTION_FORMAT, false); + if (section.getWidget() == null || section.getWidget().eResource() == null) { + return null; + } + section.getWidget().eResource().save(os, options); + return xwtFile.toURI().toURL(); + } finally { + os.close(); + } + } catch (IOException ex) { + Activator.log.error(ex); + } + + return null; + } + + /** + * Sets the view to display in the preview + * + * @param view + * The view to display + */ + public void setView(View view) { + this.currentView = view; + if (view != null) { + if (view.getName() == null) { + previewTitle.setText(Messages.Preview_Unnamed); + } else { + previewTitle.setText(view.getName()); + } + } else { + previewTitle.setText(""); //$NON-NLS-1$ + } + + previewTitle.getParent().layout(); + displayView(); + } + + private void setPreviewError(String message) { + if (message != null) { + previewDisabled.setText(message); + previewDisabled.setVisible(true); + } else { + previewDisabled.setVisible(false); + } + refreshDisplay(); + } + + /** + * Display the current view. When the view to display has changed, + * you should call {@link #setView(View)} instead. + */ + public void displayView() { + contents.dispose(); + + if (!enabled) { + setPreviewError(Messages.Preview_previewIsDisabled); + return; + } + + if (currentView == null) { + setPreviewError(Messages.Preview_noSelectedView); + return; + } + + setPreviewError(null); + + if (displayEngine != null) { + // Dispose of the old engine before employing a new one + displayEngine.dispose(); + } + + displayEngine = new DefaultDisplayEngine(); + Map<Tab, Composite> tabs = new HashMap<Tab, Composite>(); + + contents = new CTabFolder(parent, SWT.NONE); + contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + boolean activeTab = false; + + for (Tab tab : getTabs(currentView)) { + CTabItem tabItem = new CTabItem(contents, SWT.NONE); + tabItem.setText(tab.getLabel()); + + if (tab.getLabel().equals(selectedTab) || !activeTab) { + contents.setSelection(tabItem); + activeTab = true; + } + + Composite tabControl = new Composite(contents, SWT.NONE); + tabControl.setLayout(new PropertiesLayout()); + + tabItem.setControl(tabControl); + + tabs.put(tab, tabControl); + tabControl.setEnabled(false); + + contents.addListener(SWT.Selection, new Listener() { + + @Override + public void handleEvent(Event event) { + selectedTab = contents.getSelection().getText(); + } + + }); + } + + for (Section section : currentView.getSections()) { + Composite tabControl = tabs.get(section.getTab()); + if (tabControl == null) { + Activator.log.warn("The section doesn't have a tab"); // Bug in section deletion: it is still referenced by the views + continue; + } + Composite pView = new Composite(tabControl, SWT.NONE); + pView.setLayout(new GridLayout(1, false)); + URL sectionURL = saveTmp(section); + if (sectionURL != null) { + displayEngine.createSection(pView, section, URI.createURI(sectionURL.toExternalForm(), true), null); + } + } + + refreshDisplay(); + } + + private Collection<Tab> getTabs(View view) { + + List<Tab> tabs = new LinkedList<Tab>(); + + for (Section section : view.getSections()) { + Tab tab = section.getTab(); + if (tab != null && !tabs.contains(tab)) { + tabs.add(tab); + } + } + + Collections.sort(tabs, new Comparator<Tab>() { + + @Override + public int compare(Tab tab1, Tab tab2) { + Tab afterTab1 = tab1.getAfterTab(); + Tab afterTab2 = tab2.getAfterTab(); + + if (isAfter(tab1, afterTab2, new HashSet<Tab>())) { + return -1; + } + + if (isAfter(tab2, afterTab1, new HashSet<Tab>())) { + return 1; + } + + return 0; + } + + }); + + return tabs; + } + + private boolean isAfter(Tab tab1, Tab tab2, Set<Tab> checkedTabs) { + if (checkedTabs.contains(tab2)) { + Activator.log.warn("Loop in the afterTabs"); //$NON-NLS-1$ + return false; + } + + checkedTabs.add(tab2); + + if (tab2 == null) { + return false; + } + + if (tab1.equals(tab2)) { + return true; + } + + return isAfter(tab1, tab2.getAfterTab(), checkedTabs); + } + + /** + * The preview listens on + * + * @param event + * The SelectionChangedEvent + */ + @Override + public void selectionChanged(SelectionChangedEvent event) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + if (selection.size() == 1) { + TreeElement child = null; + TreeElement treeElement = (TreeElement) selection.getFirstElement(); + + do { + EObject semantic = EMFHelper.getEObject(treeElement); + if (semantic instanceof View) { + setView((View) semantic); + return; + } + + child = treeElement; + treeElement = treeElement.getParent(); + } while (child != treeElement && treeElement != null); + } + } + + /** + * Activate or deactivate the preview + * + * @param enabled + * If true, the preview will be activated. Otherwise, it will + * be disabled + */ + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + @Override + public void setFocus() { + parent.setFocus(); + } + + @Override + public void partActivated(IWorkbenchPart part) { + if (part instanceof UIEditor) { + setEditor((UIEditor) part); + } + } + + @Override + public void partBroughtToTop(IWorkbenchPart part) { + // Nothing + } + + @Override + public void partClosed(IWorkbenchPart part) { + // Nothing + } + + @Override + public void partDeactivated(IWorkbenchPart part) { + // Nothing + } + + @Override + public void partOpened(IWorkbenchPart part) { + // Nothing + } + + @Override + public void dispose() { + for (UIEditor editor : currentEditors) { + editor.removePreview(this); + } + if (activePage != null) { + activePage.removePartListener(this); + } + super.dispose(); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/Messages.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/Messages.java new file mode 100644 index 00000000000..bb328c0ae7a --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/Messages.java @@ -0,0 +1,113 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO)
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.messages;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.customization.properties.messages.messages"; //$NON-NLS-1$
+
+ public static String CopyContextAction_Copying;
+
+ public static String CopyContextAction_InitializingTheCopyOf;
+
+ public static String CopyContextAction_ThisMayTakeSomeTime;
+
+ public static String CopyContextAction_To;
+
+ public static String CustomizationDialog_0;
+
+ public static String CustomizationDialog_1;
+
+ public static String CustomizationDialog_2;
+
+ public static String CustomizationDialog_cannotDeletePluginContext;
+
+ public static String CustomizationDialog_configurationName;
+
+ public static String CustomizationDialog_configurationNameNotEmpty;
+
+ public static String CustomizationDialog_configurationWithSameNameExists;
+
+ public static String CustomizationDialog_copy;
+
+ public static String CustomizationDialog_copyToWorkspace;
+
+ public static String CustomizationDialog_copyOf;
+
+ public static String CustomizationDialog_createNewCopyByCopy;
+
+ public static String CustomizationDialog_customization;
+
+ public static String CustomizationDialog_delete;
+
+ public static String CustomizationDialog_deleteContext;
+
+ public static String CustomizationDialog_deleteContextConfirmation1;
+
+ public static String CustomizationDialog_deleteContextConfirmation2;
+
+ public static String CustomizationDialog_edit;
+
+ public static String CustomizationDialog_editSelectedContext;
+
+ public static String CustomizationDialog_enterConfigurationName;
+
+ public static String CustomizationDialog_plugin;
+
+ public static String CustomizationDialog_removeSelectedContext;
+
+ public static String CustomizationDialog_selectContextToEdit;
+
+ public static String CustomizationPreferencePage_AskForConfirmation;
+
+ public static String CustomizationPreferencePage_OpenCustomizationPerspective;
+
+ public static String CustomizationPreferencePage_PropertyViewCustomizationPreferences;
+
+ public static String InputDialog_enterConfigurationName;
+
+ public static String Preview_disablePreview;
+
+ public static String Preview_noSelectedView;
+
+ public static String Preview_preview;
+
+ public static String Preview_previewIsDisabled;
+
+ public static String Preview_Unnamed;
+
+ public static String UIEditor_ChangePerspective;
+
+ public static String UIEditor_ChangePerspectiveMessage;
+
+ public static String UIEditor_FilterViews;
+
+ public static String WorkspaceContextDeleteAction_0;
+
+ public static String WorkspaceContextDeleteAction_1;
+
+ public static String WorkspaceContextEditAction_0;
+
+ public static String WorkspaceContextEditAction_1;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/messages.properties b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/messages.properties new file mode 100644 index 00000000000..42177f86668 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/messages/messages.properties @@ -0,0 +1,54 @@ +#############################################################################
+# Copyright (c) 2011, 2013 CEA LIST.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO)
+#############################################################################
+CopyContextAction_Copying=Copying
+CopyContextAction_InitializingTheCopyOf=Initializing the copy of
+CopyContextAction_ThisMayTakeSomeTime=. This may take some time
+CopyContextAction_To=\ to
+CustomizationDialog_0=Edit Context
+CustomizationDialog_1=Unable to edit context: unknown or unsupported context storage type.
+CustomizationDialog_2=Unable to delete context: unknown or unsupported context storage type.
+CustomizationDialog_cannotDeletePluginContext=Read-only contexts cannot be deleted
+CustomizationDialog_configurationName=Configuration name
+CustomizationDialog_configurationNameNotEmpty=The name of the configuration shouldn't be empty
+CustomizationDialog_configurationWithSameNameExists=A configuration with the same name already exists
+CustomizationDialog_copy=Copy...
+CustomizationDialog_copyToWorkspace=Copy to Workspace...
+CustomizationDialog_copyOf=Copy of
+CustomizationDialog_createNewCopyByCopy=Create a new Context by copying the selected Context into the workspace (not shared)
+CustomizationDialog_customization=Customization
+CustomizationDialog_delete=Delete
+CustomizationDialog_deleteContext=Delete context
+CustomizationDialog_deleteContextConfirmation1=Are you sure you want to delete the Property View context
+CustomizationDialog_deleteContextConfirmation2=\ ? This choice is irreversible. If you simply want to deactivate this context, you can do so in Preferences > Papyrus > Property views
+CustomizationDialog_edit=Edit
+CustomizationDialog_editSelectedContext=Edits the selected Context. This option is only available for writeable Contexts
+CustomizationDialog_enterConfigurationName=Enter the new configuration name
+CustomizationDialog_plugin=\ (Read-only)
+CustomizationDialog_removeSelectedContext=Removes the selected Context. This option is only available for writeable Contexts
+CustomizationDialog_selectContextToEdit=Select a context to edit. Read-only contexts should be copied before they can be edited.
+CustomizationPreferencePage_AskForConfirmation=Ask for confirmation
+CustomizationPreferencePage_OpenCustomizationPerspective=Open customization perspective
+CustomizationPreferencePage_PropertyViewCustomizationPreferences=Property view customization preferences
+InputDialog_enterConfigurationName=Enter the new configuration's name :
+Preview_disablePreview=Disable preview
+Preview_noSelectedView=There is no selected view to display
+Preview_preview=Preview
+Preview_previewIsDisabled=Preview is disabled
+Preview_Unnamed=<<Unnamed>>
+UIEditor_ChangePerspective=Change perspective ?
+UIEditor_ChangePerspectiveMessage=This editor is associated to the Customization perspective. Do you want to open this perspective now ?
+UIEditor_FilterViews=Filter views :
+WorkspaceContextDeleteAction_0=Delete context model from the local workspace
+WorkspaceContextDeleteAction_1=Deleting the property view configuration:
+WorkspaceContextEditAction_0=Open editor on context model in the local workspace
+WorkspaceContextEditAction_1=Opening the properties view configuration:
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElement.java new file mode 100644 index 00000000000..08dbc22a159 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElement.java @@ -0,0 +1,234 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.modelelement; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.databinding.observable.IObservable; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.SectionNameObservableValue; +import org.eclipse.papyrus.infra.constraints.ConstraintsPackage; +import org.eclipse.papyrus.infra.constraints.ui.providers.ConstraintTypeContentProvider; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.ContextsPackage; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.contexts.Section; +import org.eclipse.papyrus.infra.properties.environment.EnvironmentPackage; +import org.eclipse.papyrus.infra.properties.ui.PropertyEditor; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.DataSource; +import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.ModelElement; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.ContainmentBrowseStrategy; +import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory; +import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.papyrus.infra.widgets.strategy.IStrategyBasedContentProvider; +import org.eclipse.papyrus.infra.widgets.strategy.ProviderBasedBrowseStrategy; +import org.eclipse.papyrus.infra.widgets.strategy.StrategyBasedContentProvider; +import org.eclipse.papyrus.infra.widgets.strategy.TreeBrowseStrategy; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.ConstraintDescriptorContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.ContextLabelProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.DataContextElementContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.DependencyContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.EnvironmentContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.PropertyContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.PropertyEditorTypeContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.TabContentProvider; + +/** + * A {@link ModelElement} for customization specific properties + * For performance issues, the default EMF Content Providers cannot + * be used, as they usually load the whole ResourceSet, which is + * really expensive in a Context Model : most of the resources + * are XWT Files which are expensive to load, and never contain + * any referenceable object. Hence, this ModelElement replaces + * most EMF Content Providers by custom ones, much lighter. When such + * a content provider cannot be found, the default EMF one is used. + * + * @author Camille Letavernier + */ +public class CustomizationModelElement extends AbstractModelElement { + + protected EMFModelElement delegate; + + private static Map<EClassifier, IStaticContentProvider> providers; + + /** + * Constructs a new ModelElement. + * + * @param delegate + * If this model element cannot handle a given property, it will + * delegate the call to a standard EMF ModelElement + */ + public CustomizationModelElement(EMFModelElement delegate) { + this.delegate = delegate; + if (providers == null) { + initializeProviders(); + } + } + + private static void initializeProviders() { + providers = new HashMap<EClassifier, IStaticContentProvider>(); + providers.put(EnvironmentPackage.eINSTANCE.getCompositeWidgetType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_CompositeWidgetTypes())); + providers.put(EnvironmentPackage.eINSTANCE.getStandardWidgetType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_WidgetTypes())); + providers.put(EnvironmentPackage.eINSTANCE.getLayoutType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_LayoutTypes())); + providers.put(EnvironmentPackage.eINSTANCE.getModelElementFactoryDescriptor(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_ModelElementFactories())); + providers.put(EnvironmentPackage.eINSTANCE.getPropertyEditorType(), new EnvironmentContentProvider(EnvironmentPackage.eINSTANCE.getEnvironment_PropertyEditorTypes())); + + providers.put(org.eclipse.papyrus.infra.constraints.environment.EnvironmentPackage.eINSTANCE.getConstraintType(), new ConstraintTypeContentProvider()); + } + + @Override + public IObservable doGetObservable(String propertyPath) { + EStructuralFeature feature = delegate.getFeature(propertyPath); + if (ContextsPackage.eINSTANCE.getSection_Name() == feature) { + return new SectionNameObservableValue(delegate.getSource(), feature, delegate.getDomain()); + } + return delegate.getObservable(propertyPath); + } + + @Override + public IStaticContentProvider getContentProvider(String propertyPath) { + EStructuralFeature feature = delegate.getFeature(propertyPath); + if (feature == null) { + return EmptyContentProvider.instance; + } + + IStaticContentProvider provider = findProvider(feature); + + if (provider == null) { + return delegate.getContentProvider(propertyPath); + } + + if (provider instanceof ITreeContentProvider) { + IStrategyBasedContentProvider strategyProvider = getStrategyProvider((ITreeContentProvider) provider); + + if (feature.getEType() == EnvironmentPackage.eINSTANCE.getPropertyEditorType()) { + return new PropertyEditorTypeContentProvider(strategyProvider, (PropertyEditor) delegate.getSource()); + } else { + return new EMFGraphicalContentProvider(strategyProvider, PropertiesRuntime.getConfigurationManager().getResourceSet(), "history_" + feature.getName()); + } + } + return provider; + } + + protected IStrategyBasedContentProvider getStrategyProvider(ITreeContentProvider provider) { + TreeBrowseStrategy browseStrategy = new ProviderBasedBrowseStrategy(provider); + TreeBrowseStrategy revealStrategy = new ContainmentBrowseStrategy(provider); + + return new StrategyBasedContentProvider(browseStrategy, revealStrategy); + } + + protected IStaticContentProvider findProvider(EStructuralFeature feature) { + EClassifier classifier = feature.getEType(); + if (providers.containsKey(classifier)) { + return providers.get(classifier); + } else if (classifier == ContextsPackage.eINSTANCE.getProperty()) { + return new PropertyContentProvider(delegate.getSource()); + } else if (classifier == ContextsPackage.eINSTANCE.getTab()) { + // Sections can only be moved to tabs from non-plugin contexts + boolean editableTabsOnly = delegate.getSource() instanceof Section; + return new TabContentProvider(delegate.getSource(), editableTabsOnly); + } else if (classifier instanceof EClass && EMFHelper.isSubclass((EClass) classifier, ConstraintsPackage.eINSTANCE.getConstraintDescriptor())) { + return new ConstraintDescriptorContentProvider(delegate.getSource(), (EClass) classifier); + } else if (isDataContextElement(classifier)) { + return new DataContextElementContentProvider((DataContextElement) delegate.getSource()); + } else if (classifier == ContextsPackage.eINSTANCE.getContext()) { + return new DependencyContentProvider((Context) delegate.getSource()); + } + + return null; + } + + private boolean isDataContextElement(EClassifier classifier) { + if (classifier == ContextsPackage.eINSTANCE.getDataContextElement()) { + return true; + } + + if (classifier instanceof EClass) { + EClass eClass = (EClass) classifier; + return eClass.getEAllSuperTypes().contains(ContextsPackage.eINSTANCE.getDataContextElement()); + } + + return false; + } + + @Override + public ILabelProvider getLabelProvider(String propertyPath) { + return new ContextLabelProvider(); + } + + @Override + public boolean isOrdered(String propertyPath) { + return delegate.isOrdered(propertyPath); + } + + @Override + public boolean isUnique(String propertyPath) { + return delegate.isUnique(propertyPath); + } + + @Override + public boolean isMandatory(String propertyPath) { + return delegate.isMandatory(propertyPath); + } + + @Override + public boolean isEditable(String propertyPath) { + if (delegate.getFeature(propertyPath) == ContextsPackage.eINSTANCE.getSection_SectionFile()) { + return false; + } + return delegate.isEditable(propertyPath); + } + + @Override + public ReferenceValueFactory getValueFactory(String propertyPath) { + return delegate.getValueFactory(propertyPath); + } + + @Override + public boolean getDirectCreation(String propertyPath) { + return delegate.getDirectCreation(propertyPath); + } + + @Override + public boolean forceRefresh(String localPropertyPath) { + return false; + } + + @Override + public Object getDefaultValue(String propertyPath) { + return delegate.getDefaultValue(propertyPath); + } + + @Override + public void setDataSource(DataSource source) { + delegate.setDataSource(source); + } + + @Override + public void dispose() { + super.dispose(); + delegate.dispose(); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElementFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElementFactory.java new file mode 100644 index 00000000000..a027f9ee674 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/CustomizationModelElementFactory.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.modelelement; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.CustomizationModelElement; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractEMFModelElementFactory; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractModelElementFactory; +import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.EMFModelElementFactory; + +/** + * A Factory for build {@link CustomizationModelElement}s + * + * @author Camille Letavernier + */ +public class CustomizationModelElementFactory extends AbstractModelElementFactory<CustomizationModelElement> { + + private static final EMFModelElementFactory emfFactory = new EMFModelElementFactory(); + + @Override + protected CustomizationModelElement doCreateFromSource(Object sourceElement, DataContextElement context) { + return new CustomizationModelElement((EMFModelElement) emfFactory.createFromSource(sourceElement, context)); + } + + @Override + protected void updateModelElement(CustomizationModelElement modelElement, Object newSourceElement) { + EObject eObject = EMFHelper.getEObject(newSourceElement); + if (eObject == null) { + throw new IllegalArgumentException("Cannot resolve EObject selection: " + newSourceElement); + } + + AbstractEMFModelElementFactory.updateEMFModelElement(modelElement.delegate, eObject); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElement.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElement.java new file mode 100644 index 00000000000..8f3253965cd --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElement.java @@ -0,0 +1,146 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.modelelement; + +import java.util.Collection; +import java.util.Iterator; + +import org.eclipse.core.databinding.observable.value.IObservableValue; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericAttributeModelElementFactory; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericAttributeObservable; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericPropertyModelElementFactory; +import org.eclipse.papyrus.infra.constraints.ConfigProperty; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource; +import org.eclipse.papyrus.infra.properties.ui.WidgetAttribute; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractModelElement; +import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService; +import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; + +/** + * XWT relies a lot on reflectivity, as it is based on an XML syntax. + * However, in some cases, we like to have real attributes, to use them as + * specific properties in the Property view. + * + * This ModelElement is a bridge between reflective properties and predefined + * properties. + * + * It has been designed to use pre-defined {@link ConfigProperty} and {@link WidgetAttribute}, but can also be used for other EMF classes based on + * a key/value pair. + * + * For example, some layouts need a "numColumns" property, but not all of them. + * In fact, this property is specific to the "GridLayout" and + * "PropertiesLayout". This property is defined via a key/value pair + * (i.e. a {@link WidgetAttribute} which name is "numColumns" and the value is the + * number of columns). However, in the property view, we want to display a field "Number + * of Columns" when we select a GridLayout or PropertiesLayout. + * + * The same goes for Constraints : EMFInstanceOf needs a "nsUri" and + * "className" {@link ConfigProperty}, while "UmlInstanceOf" needs a + * "umlClassName" {@link ConfigProperty}. + * + * + * @see GenericPropertyModelElementFactory + * @see GenericAttributeModelElementFactory + * + * @author Camille Letavernier + */ +public class GenericAttributeModelElement extends AbstractModelElement { + + protected EObject source; + + protected EditingDomain domain; + + private EStructuralFeature createIn; + + private EFactory createFrom; + + private EClass createAsValue; + + private EClass createAsReference; + + /** + * + * Constructs a new ModelElement for handling generic, reflective properties + * + * @param source + * The EObject being edited + * @param domain + * The Editing domain on which the commands will be executed + * @param createIn + * The Feature in which the new value will be created + * @param createFrom + * The EFactory used to instantiate the value + * @param createAsValue + * The EClass used to instantiate the value, if the value is an instance of datatype + * @param createAsReference + * The EClass used to instantiate the value, if the value is a reference to an instance of EClass + */ + public GenericAttributeModelElement(EObject source, EditingDomain domain, EStructuralFeature createIn, EFactory createFrom, EClass createAsValue, EClass createAsReference) { + this.source = source; + this.domain = domain; + this.createIn = createIn; + this.createFrom = createFrom; + this.createAsValue = createAsValue; + this.createAsReference = createAsReference; + } + + @Override + public IObservableValue doGetObservable(String propertyPath) { + return new GenericAttributeObservable(source, domain, createIn, createFrom, createAsValue, createAsReference, propertyPath); + } + + @Override + public IStaticContentProvider getContentProvider(String propertyPath) { + return new AbstractStaticContentProvider() { + + @Override + public Object[] getElements() { + Collection<EObject> result = ItemPropertyDescriptor.getReachableObjectsOfType(source, EcorePackage.eINSTANCE.getEObject()); + Iterator<EObject> iterator = result.iterator(); + while (iterator.hasNext()) { + EObject eObject = iterator.next(); + if (!(eObject instanceof org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.extensible.Query)) { + iterator.remove(); + } + } + return result.toArray(); + } + }; + } + + @Override + public ILabelProvider getLabelProvider(String propertyPath) { + try { + return ServiceUtilsForResource.getInstance().getServiceRegistry(source.eResource()).getService(LabelProviderService.class).getLabelProvider(); + } catch (ServiceException ex) { + return new LabelProvider(); + } + } + + @Override + public Object getDefaultValue(String propertyPath) { + return ""; //$NON-NLS-1$ + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElementFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElementFactory.java new file mode 100644 index 00000000000..513bd61d57f --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeModelElementFactory.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.modelelement; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericAttributeModelElement; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.ui.UiFactory; +import org.eclipse.papyrus.infra.properties.ui.UiPackage; +import org.eclipse.papyrus.infra.properties.ui.WidgetAttribute; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractModelElementFactory; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; + +/** + * A ModelElementFactory for handling {@link WidgetAttribute} properties + * + * @author Camille Letavernier + */ +public class GenericAttributeModelElementFactory extends AbstractModelElementFactory<GenericAttributeModelElement> { + + // Source : Group + // context : Custom:Attribute:Group + @Override + protected GenericAttributeModelElement doCreateFromSource(Object sourceElement, DataContextElement context) { + EObject source = EMFHelper.getEObject(sourceElement); + if (source == null) { + Activator.log.warn("Unable to resolve the source element to an EObject"); //$NON-NLS-1$ + return null; + } + + EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source); + + EClass valueAttribute = UiPackage.eINSTANCE.getValueAttribute(); + EClass referenceAttribute = UiPackage.eINSTANCE.getReferenceAttribute(); + EStructuralFeature attributes = UiPackage.eINSTANCE.getUIComponent_Attributes(); + + return new GenericAttributeModelElement(source, domain, attributes, UiFactory.eINSTANCE, valueAttribute, referenceAttribute); + } + + // public List<ModelElement> createFromDataSource(ModelElement currentElement, DataSource source, String propertyPath, DataContextElement context) { + // throw new UnsupportedOperationException(); + // } + + @Override + protected void updateModelElement(GenericAttributeModelElement modelElement, Object newSourceElement) { + EObject eObject = EMFHelper.getEObject(newSourceElement); + if (eObject == null) { + throw new IllegalArgumentException("Cannot resolve EObject selection: " + newSourceElement); + } + modelElement.source = eObject; + modelElement.domain = EMFHelper.resolveEditingDomain(eObject); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeObservable.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeObservable.java new file mode 100644 index 00000000000..34d06864ea5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericAttributeObservable.java @@ -0,0 +1,198 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.modelelement;
+
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.CreateChildCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericAttributeModelElement;
+
+/**
+ * An observable value for manipulating reflective properties
+ * (Based on a key/value pair). The modifications are based on EMF
+ * commands.
+ *
+ * @see GenericAttributeModelElement
+ *
+ * @author Camille Letavernier
+ */
+public class GenericAttributeObservable extends AbstractObservableValue {
+
+ private EObject source;
+
+ private EditingDomain domain;
+
+ private EStructuralFeature createIn;
+
+ private EFactory createFrom;
+
+ private EClass createAsValue;
+
+ private EClass createAsReference;
+
+ private String propertyPath;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * The EObject being edited
+ * @param domain
+ * The Editing domain on which the commands will be executed
+ * @param createIn
+ * The Feature in which the value will be set
+ * @param createFrom
+ * The Factory used to instantiate the new value
+ * @param createAsValue
+ * The EClass that will be instantiated for the new value, if it is an attribute
+ * @param createAsReference
+ * The EClass that will be instantiated for the new value, if it is a reference
+ * @param propertyPath
+ * The value of the "name" attribute (Which is the "key" of the property)
+ */
+ public GenericAttributeObservable(EObject source, EditingDomain domain, EStructuralFeature createIn, EFactory createFrom, EClass createAsValue, EClass createAsReference, String propertyPath) {
+ this.source = source;
+ this.domain = domain;
+ this.createIn = createIn;
+ this.createFrom = createFrom;
+ this.createAsValue = createAsValue;
+ this.createAsReference = createAsReference;
+ this.propertyPath = propertyPath;
+ }
+
+ @Override
+ public Object getValueType() {
+ return Object.class;
+ }
+
+ @Override
+ protected Object doGetValue() {
+ EObject attribute = findAttribute();
+ if (attribute == null) {
+ return null;
+ }
+ Object result = attribute.eGet(attribute.eClass().getEStructuralFeature("value")); //$NON-NLS-1$
+ return result;
+ }
+
+ /**
+ * Browse the existing attributes in the given feature, and returns the
+ * one with the same name, if it exists, or null otherwise.
+ *
+ * @return The attribute being edited, if it already exists, or null otherwise
+ */
+ @SuppressWarnings("unchecked")
+ protected EObject findAttribute() {
+ EList<? extends EObject> allAttributes = (EList<? extends EObject>) source.eGet(createIn);
+ for (EObject attribute : allAttributes) {
+ if (createAsValue.isInstance(attribute) || createAsReference.isInstance(attribute)) {
+ if (attribute.eGet(attribute.eClass().getEStructuralFeature("name")).equals(propertyPath)) { //$NON-NLS-1$
+ return attribute;
+ }
+ }
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void doSetValue(final Object value) {
+ final Object oldValue = doGetValue();
+
+ if (value != null && value.equals(oldValue)) {
+ return;
+ }
+
+ EObject attribute = findAttribute();
+ EList<? extends EObject> collection = (EList<? extends EObject>) source.eGet(createIn);
+
+ CompoundCommand command = new CompoundCommand(String.format("Set %s value", propertyPath)) {
+
+ @Override
+ public boolean prepare() {
+ // Only test the first command's canExecute(), as the following ones depend on the execution of the first one
+ // Can we use a StrictCompoundCommand here ?
+ if (commandList.isEmpty()) {
+ return true;
+ }
+ return commandList.get(0).canExecute();
+ }
+ };
+
+ if (value == null || value.equals("")) { //$NON-NLS-1$
+ if (attribute != null) {
+ RemoveCommand rCommand = new RemoveCommand(domain, collection, attribute);
+ command.append(rCommand);
+ }
+ } else {
+ if (attribute == null) {
+ if (value instanceof String) {
+ attribute = createFrom.create(createAsValue);
+ } else {
+ attribute = createFrom.create(createAsReference);
+ }
+
+ CreateChildCommand crCommand = new CreateChildCommand(domain, source, createIn, attribute, null);
+ command.append(crCommand);
+
+ EStructuralFeature feature = attribute.eClass().getEStructuralFeature("name"); //$NON-NLS-1$
+
+ SetCommand setCommand = new SetCommand(domain, attribute, feature, propertyPath);
+
+ command.append(setCommand);
+ }
+
+ EStructuralFeature feature = attribute.eClass().getEStructuralFeature("value"); //$NON-NLS-1$
+
+ SetCommand setCommand = new SetCommand(domain, attribute, feature, value);
+ command.append(setCommand);
+ }
+
+ domain.getCommandStack().execute(command);
+
+ ValueDiff diff = new ValueDiff() {
+
+ @Override
+ public Object getOldValue() {
+ return oldValue;
+ }
+
+ @Override
+ public Object getNewValue() {
+ return value;
+ }
+ };
+
+ fireValueChange(diff);
+ }
+
+ @Override
+ protected void fireValueChange(ValueDiff diff) {
+ super.fireValueChange(diff);
+ }
+
+ @Override
+ protected void fireChange() {
+ super.fireChange();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericPropertyModelElementFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericPropertyModelElementFactory.java new file mode 100644 index 00000000000..7a5925a10c6 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/GenericPropertyModelElementFactory.java @@ -0,0 +1,70 @@ +/***************************************************************************** + * Copyright (c) 2010, 2014 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 417409 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.modelelement; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.papyrus.views.properties.toolsmiths.modelelement.GenericAttributeModelElement; +import org.eclipse.papyrus.infra.constraints.ConfigProperty; +import org.eclipse.papyrus.infra.constraints.ConstraintsFactory; +import org.eclipse.papyrus.infra.constraints.ConstraintsPackage; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.contexts.DataContextElement; +import org.eclipse.papyrus.infra.properties.ui.modelelement.AbstractModelElementFactory; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; + +/** + * A ModelElementFactory for handling {@link ConfigProperty} properties + * + * @author Camille Letavernier + */ +public class GenericPropertyModelElementFactory extends AbstractModelElementFactory<GenericAttributeModelElement> { + + // Source : Group + // context : Custom:Attribute:Group + @Override + protected GenericAttributeModelElement doCreateFromSource(Object sourceElement, DataContextElement context) { + + EObject source = EMFHelper.getEObject(sourceElement); + if (source == null) { + Activator.log.warn("Unable to resolve the source element to an EObject"); //$NON-NLS-1$ + return null; + } + + EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(source); + + EClass valueProperty = ConstraintsPackage.eINSTANCE.getValueProperty(); + EClass referenceProperty = ConstraintsPackage.eINSTANCE.getReferenceProperty(); + EStructuralFeature attributes = ConstraintsPackage.eINSTANCE.getSimpleConstraint_Properties(); + + return new GenericAttributeModelElement(source, domain, attributes, ConstraintsFactory.eINSTANCE, valueProperty, referenceProperty); + } + + // public List<ModelElement> createFromDataSource(ModelElement currentElement, DataSource source, String propertyPath, DataContextElement context) { + // throw new UnsupportedOperationException(); + // } + + @Override + protected void updateModelElement(GenericAttributeModelElement modelElement, Object newSourceElement) { + EObject eObject = EMFHelper.getEObject(newSourceElement); + if (eObject == null) { + throw new IllegalArgumentException("Cannot resolve EObject selection: " + newSourceElement); + } + modelElement.source = eObject; + modelElement.domain = EMFHelper.resolveEditingDomain(eObject); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/SectionNameObservableValue.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/SectionNameObservableValue.java new file mode 100644 index 00000000000..03dc6c016d3 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/modelelement/SectionNameObservableValue.java @@ -0,0 +1,97 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.modelelement;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.properties.contexts.ContextsPackage;
+import org.eclipse.papyrus.infra.properties.contexts.Section;
+import org.eclipse.papyrus.infra.ui.emf.databinding.EMFObservableValue;
+
+/**
+ * An ObservableValue for handling changes in a section's name.
+ * The section is linked to an external XWT Resource with the same
+ * name. When the section's name changes, the XWT resource should
+ * be moved as well, and the section's sectionFile property should
+ * be updated.
+ *
+ * @author Camille Letavernier
+ */
+public class SectionNameObservableValue extends EMFObservableValue {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param eObject
+ * The EObject (Section) being edited
+ * @param eStructuralFeature
+ * The feature ("name") being editing
+ * @param domain
+ * The editing domain on which the commands will be called
+ */
+ public SectionNameObservableValue(EObject eObject, EStructuralFeature eStructuralFeature, EditingDomain domain) {
+ super(eObject, eStructuralFeature, domain);
+ }
+
+ @Override
+ public void doSetValue(Object value) {
+ CompoundCommand command = new CompoundCommand();
+ String name = (String) value;
+ command.append(getSetCommand(name));
+ command.append(getMoveCommand(name));
+ command.append(getSetSectionFileCommand(name));
+ domain.getCommandStack().execute(command);
+ }
+
+ /**
+ * Returns a command to change the section's sectionFile when the name changes
+ *
+ * @param name
+ * The name of the section we are editing
+ * @return
+ * The command to change the section's sectionFile
+ */
+ protected Command getSetSectionFileCommand(String name) {
+ return new SetCommand(domain, eObject, ContextsPackage.eINSTANCE.getSection_SectionFile(), "ui/" + name + ".xwt"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Returns the EMF command to move the section's XWT Resource
+ *
+ * @param name
+ * The new name of the section
+ * @return
+ * The EMF command to move the section's XWT Resource
+ */
+ protected Command getMoveCommand(String name) {
+ Section section = (Section) eObject;
+
+ // TODO : Create a command for that
+ if (section.getWidget() != null) {
+ URI newURI = URI.createURI("ui/" + name + ".xwt"); //$NON-NLS-1$ //$NON-NLS-2$
+ newURI = newURI.resolve(section.eResource().getURI());
+ ResourceSet resourceSet = section.eResource().getResourceSet();
+ Resource newResource = resourceSet.createResource(newURI);
+ newResource.getContents().add(section.getWidget());
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/perspective/CustomizationPerspectiveFactory.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/perspective/CustomizationPerspectiveFactory.java new file mode 100644 index 00000000000..b8aff816959 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/perspective/CustomizationPerspectiveFactory.java @@ -0,0 +1,36 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.perspective;
+
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * A Factory for instantiating the Customization perspective
+ *
+ * @author Camille Letavernier
+ */
+public class CustomizationPerspectiveFactory implements IPerspectiveFactory {
+
+ private final static String PROPERTIES = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+
+ private final static String PROJECT_EXPLORER = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
+
+ @Override
+ public void createInitialLayout(IPageLayout layout) {
+ layout.addView(PROJECT_EXPLORER, IPageLayout.LEFT, 0.20f, layout.getEditorArea());
+ layout.addView(PROPERTIES, IPageLayout.BOTTOM, 0.7f, layout.getEditorArea());
+ layout.addView(Activator.PREVIEW_ID, IPageLayout.BOTTOM, 0.6f, layout.getEditorArea());
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencePage.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencePage.java new file mode 100644 index 00000000000..84a4ead60f0 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencePage.java @@ -0,0 +1,121 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * This page handles preferences for dialog boxes
+ *
+ * @author Camille Letavernier
+ */
+public class CustomizationPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /**
+ *
+ */
+ public final static String OPEN_CUSTOMIZATION_PERSPECTIVE = "openCustomizationPerspective"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public final static String ASK_FOR_CONFIRMATION = "askForConfirmation"; //$NON-NLS-1$
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CustomizationPreferencePage() {
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param style
+ */
+ public CustomizationPreferencePage(int style) {
+ super(style);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param title
+ * @param style
+ */
+ public CustomizationPreferencePage(String title, int style) {
+ super(title, style);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param title
+ * @param image
+ * @param style
+ */
+ public CustomizationPreferencePage(String title, ImageDescriptor image, int style) {
+ super(title, image, style);
+ }
+
+ @Override
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription(Messages.CustomizationPreferencePage_PropertyViewCustomizationPreferences);
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(OPEN_CUSTOMIZATION_PERSPECTIVE, Messages.CustomizationPreferencePage_OpenCustomizationPerspective, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(ASK_FOR_CONFIRMATION, Messages.CustomizationPreferencePage_AskForConfirmation, getFieldEditorParent()));
+ }
+
+ /**
+ * Indicates if the customization perspective should be opened
+ *
+ * @return true if the customization perspective should be opened
+ */
+ public static boolean openCustomizationPerspective() {
+ return Activator.getDefault().getPreferenceStore().getBoolean(OPEN_CUSTOMIZATION_PERSPECTIVE);
+ }
+
+ /**
+ * Indicates if a dialog should ask the user for a confirmation before opening
+ * the customization perspective
+ *
+ * @return true if a user confirmation is needed
+ */
+ public static boolean askForConfirmation() {
+ return Activator.getDefault().getPreferenceStore().getBoolean(ASK_FOR_CONFIRMATION);
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencesInitializer.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencesInitializer.java new file mode 100644 index 00000000000..9f06fa2485d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/preferences/CustomizationPreferencesInitializer.java @@ -0,0 +1,33 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.views.properties.toolsmiths.preferences.CustomizationPreferencePage;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+
+/**
+ * The initializer for @see {@link CustomizationPreferencePage}
+ *
+ * @author Camille Letavernier
+ */
+public class CustomizationPreferencesInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ store.setDefault(CustomizationPreferencePage.OPEN_CUSTOMIZATION_PERSPECTIVE, true);
+ store.setDefault(CustomizationPreferencePage.ASK_FOR_CONFIRMATION, true);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/AbstractContextualContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/AbstractContextualContentProvider.java new file mode 100644 index 00000000000..09e7cbc79f9 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/AbstractContextualContentProvider.java @@ -0,0 +1,72 @@ +/***************************************************************************** + * Copyright (c) 2010, 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.providers; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.util.PropertiesUtil; +import org.eclipse.papyrus.infra.tools.util.ListHelper; +import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider; +import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; + +/** + * An abstract implementation of {@link IStaticContentProvider} for + * content providers which rely on the available {@link Context}s + * to retrieve their elements. + * + * @author Camille Letavernier + * + */ +public abstract class AbstractContextualContentProvider extends SemanticEMFContentProvider implements IStaticContentProvider { + + /** + * The list of available contexts in the current model + */ + protected Collection<Context> contexts; + + /** + * + * Constructor. + * + * @param source + * The EObject used to retrieve the available contexts + */ + protected AbstractContextualContentProvider(EObject source) { + super(findContexts(source).toArray(new Context[0]), Activator.getDefault().getCustomizationManager()); + contexts = ListHelper.asList((Context[]) roots); + } + + private static List<Context> findContexts(EObject source) { + List<Context> contexts = new LinkedList<>(); + + Context rootContext = null; + if (source.eResource() != null) { + for (Resource resource : source.eResource().getResourceSet().getResources()) { + if (!resource.getContents().isEmpty() && resource.getContents().get(0) instanceof Context) { + rootContext = (Context) resource.getContents().get(0); + contexts.add(rootContext); + break; + } + } + } + + return PropertiesUtil.getDependencies(rootContext); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ConstraintDescriptorContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ConstraintDescriptorContentProvider.java new file mode 100644 index 00000000000..67f60130202 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ConstraintDescriptorContentProvider.java @@ -0,0 +1,80 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.providers;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.views.properties.toolsmiths.providers.AbstractContextualContentProvider;
+import org.eclipse.papyrus.infra.constraints.ConstraintDescriptor;
+import org.eclipse.papyrus.infra.constraints.DisplayUnit;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.Section;
+import org.eclipse.papyrus.infra.properties.contexts.Tab;
+import org.eclipse.papyrus.infra.properties.contexts.View;
+
+/**
+ * A ContentProvider for retrieving the available ConstraintDescriptors
+ *
+ *
+ * @author Camille Letavernier
+ */
+public class ConstraintDescriptorContentProvider extends AbstractContextualContentProvider {
+
+ private EClass type;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * The source Object used to retrieve the available ConstraintDescriptors
+ */
+ public ConstraintDescriptorContentProvider(EObject source, EClass type) {
+ super(source);
+ this.type = type;
+ }
+
+ @Override
+ public Object[] getElements() {
+ List<ConstraintDescriptor> result = new LinkedList<ConstraintDescriptor>();
+ for (Context context : contexts) {
+ for (View view : context.getViews()) {
+ result.addAll(getFilteredConstraintsFromDisplayUnit(view));
+ }
+ for (Tab tab : context.getTabs()) {
+ for (Section section : tab.getSections()) {
+ result.addAll(getFilteredConstraintsFromDisplayUnit(section));
+ }
+ }
+ }
+ return result.toArray();
+ }
+
+ private List<ConstraintDescriptor> getFilteredConstraintsFromDisplayUnit(DisplayUnit unit) {
+ List<ConstraintDescriptor> result = new LinkedList<ConstraintDescriptor>();
+ for (ConstraintDescriptor constraint : unit.getConstraints()) {
+ if (type.isInstance(constraint)) {
+ result.add(constraint);
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getElements();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextContentProvider.java new file mode 100644 index 00000000000..296f721888b --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextContentProvider.java @@ -0,0 +1,74 @@ +/***************************************************************************** + * Copyright (c) 2010, 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 485220 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.providers; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.papyrus.emf.facet.custom.ui.internal.CustomizedTreeContentProvider; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.util.PropertiesUtil; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; + +/** + * The customization editor's content provider. Based on the EMF Facet + * customizable content provider, + * + * @author Camille Letavernier + */ +public class ContextContentProvider extends CustomizedTreeContentProvider { + + /** + * Constructor. + */ + public ContextContentProvider() { + super(Activator.getDefault().getCustomizationManager()); + } + + /** + * @param inputElement + * : A ResourceSet + * @return The root EObjects from the input ResourceSet + */ + @Override + public EObject[] getRootElements(Object inputElement) { + if (inputElement instanceof ResourceSet) { + ResourceSet resourceSet = (ResourceSet) inputElement; + + if (resourceSet.getResources().isEmpty()) { + return null; + } + + Set<EObject> elements = new LinkedHashSet<>(); + + elements.addAll(resourceSet.getResources().get(0).getContents()); + Set<Context> allContexts = new LinkedHashSet<>(); + for (EObject element : elements) { + if (element instanceof Context) { + allContexts.addAll(PropertiesUtil.getDependencies((Context) element)); + } + } + elements.addAll(allContexts); + return elements.toArray(new EObject[elements.size()]); + } + return null; + } + + @Override + public boolean hasChildren(Object element) { + return getChildren(element).length > 0; + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextLabelProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextLabelProvider.java new file mode 100644 index 00000000000..f870975cd79 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/ContextLabelProvider.java @@ -0,0 +1,98 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.providers;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
+import org.eclipse.papyrus.emf.facet.custom.ui.internal.DecoratingCustomizedLabelProvider;
+import org.eclipse.papyrus.emf.facet.custom.ui.internal.ResolvingCustomizedLabelProvider;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * The customization editor's label provider. Based on the EMF Facet
+ * customizable label provider,
+ *
+ * @author Camille Letavernier
+ */
+public class ContextLabelProvider extends ResolvingCustomizedLabelProvider {
+
+ /**
+ * Constructor.
+ */
+ public ContextLabelProvider() {
+ super(new DecoratingCustomizedLabelProvider(Activator.getDefault().getCustomizationManager()));
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (!(element instanceof EObjectTreeElement) && element instanceof EObject) {
+ try {
+ // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
+ // method.setAccessible(true);
+ // AppearanceConfiguration result = (AppearanceConfiguration)method.invoke(Activator.getDefault().getCustomizationManager());
+ // ITreeElement treeElement = new ModelElementItem((EObject)element, null, result);
+
+ // Customized label provider can be applied directly on element non useful to create a EObjectTreeElement
+ String text = super.getText(element);
+ return text;
+ } catch (SecurityException ex) {
+ Activator.log.error(ex);
+ }
+ // catch (NoSuchMethodException ex) {
+ // Activator.log.error(ex);
+ // } catch (IllegalArgumentException ex) {
+ // Activator.log.error(ex);
+ // } catch (IllegalAccessException ex) {
+ // Activator.log.error(ex);
+ // } catch (InvocationTargetException ex) {
+ // Activator.log.error(ex);
+ // }
+ }
+ if (element != null) {
+ return super.getText(element);
+ } else {
+ return "";
+ }
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (!(element instanceof EObjectTreeElement) && element instanceof EObject) {
+ try {
+ // Method method = CustomizationManager.class.getDeclaredMethod("getAppearanceConfiguration");//$NON-NLS-1$
+ // method.setAccessible(true);
+ // AppearanceConfiguration result = (AppearanceConfiguration)method.invoke(Activator.getDefault().getCustomizationManager());
+ // ITreeElement treeElement = new ModelElementItem((EObject)element, null, result);
+
+ // Customized label provider can be applied directly on element non useful to create a EObjectTreeElement
+ Image image = super.getImage(element);
+ return image;
+ } catch (SecurityException ex) {
+ Activator.log.error(ex);
+ }
+ // catch (NoSuchMethodException ex) {
+ // Activator.log.error(ex);
+ // } catch (IllegalArgumentException ex) {
+ // Activator.log.error(ex);
+ // } catch (IllegalAccessException ex) {
+ // Activator.log.error(ex);
+ // } catch (InvocationTargetException ex) {
+ // Activator.log.error(ex);
+ // }
+ }
+ return super.getImage(element);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DataContextElementContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DataContextElementContentProvider.java new file mode 100644 index 00000000000..a4cf983040e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DataContextElementContentProvider.java @@ -0,0 +1,130 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.providers;
+
+import java.text.Collator;
+import java.text.RuleBasedCollator;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextPackage;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextRoot;
+import org.eclipse.papyrus.infra.widgets.providers.AbstractFilteredContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * A ContentProvider for retrieving the available DataContextElements
+ *
+ * @author Camille Letavernier
+ */
+public class DataContextElementContentProvider extends AbstractFilteredContentProvider implements IStaticContentProvider {
+
+ private List<DataContextElement> elements;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param element
+ */
+ public DataContextElementContentProvider(DataContextElement element) {
+ Context context = findContext(element);
+
+ Set<Context> allContexts = new HashSet<Context>();
+
+ if (context != null) {
+ getAllContexts(context, allContexts);
+ }
+
+ Set<DataContextElement> allElements = new HashSet<DataContextElement>();
+ for (Context ctx : allContexts) {
+ for (DataContextRoot root : ctx.getDataContexts()) {
+ getAllElements(root, allElements);
+ }
+ }
+
+ elements = new LinkedList<DataContextElement>(allElements);
+ Collections.sort(elements, new Comparator<DataContextElement>() {
+
+ private Collator collator = RuleBasedCollator.getInstance();
+
+ @Override
+ public int compare(DataContextElement element1, DataContextElement element2) {
+ String name1 = element1.getName();
+ String name2 = element2.getName();
+ if (name1 == null && name2 == null) {
+ return 0;
+ }
+ if (name1 == null) {
+ return -1;
+ }
+ if (name2 == null) {
+ return 1;
+ }
+ return collator.compare(name1, name2);
+ }
+
+ });
+
+ showIfHasVisibleParent = true;
+ }
+
+ private void getAllElements(DataContextElement fromElement, Collection<DataContextElement> result) {
+ if (result.contains(fromElement)) {
+ return;
+ }
+
+ result.add(fromElement);
+ if (fromElement instanceof DataContextPackage) {
+ DataContextPackage fromPackage = (DataContextPackage) fromElement;
+ for (DataContextElement element : fromPackage.getElements()) {
+ getAllElements(element, result);
+ }
+ }
+ }
+
+ private void getAllContexts(Context fromContext, Collection<Context> result) {
+ if (result.contains(fromContext)) {
+ return;
+ }
+
+ result.add(fromContext);
+ for (Context context : fromContext.getDependencies()) {
+ getAllContexts(context, result);
+ }
+ }
+
+ private Context findContext(DataContextElement element) {
+ if (element.getPackage() == null) {
+ return (Context) element.eContainer();
+ }
+ return findContext(element.getPackage());
+ }
+
+ @Override
+ public Object[] getElements() {
+ return elements.toArray(new DataContextElement[elements.size()]);
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getElements();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DependencyContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DependencyContentProvider.java new file mode 100644 index 00000000000..517af6e6c29 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/DependencyContentProvider.java @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2011 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.providers; + +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider; + +/** + * A Content provider returning the list of registered contexts + * + * @author Camille Letavernier + */ +public class DependencyContentProvider extends AbstractStaticContentProvider { + + private Context source; + + public DependencyContentProvider(Context source) { + this.source = source; + } + + @Override + public Object[] getElements() { + List<Context> registeredContexts = new LinkedList<Context>(PropertiesRuntime.getConfigurationManager().getContexts()); + List<Context> localContexts = new LinkedList<Context>(); + for (Resource resource : source.eResource().getResourceSet().getResources()) { + for (EObject element : resource.getContents()) { + if (element instanceof Context && !registeredContexts.contains(element)) { + localContexts.add((Context) element); + } + } + } + + registeredContexts.addAll(localContexts); + + return registeredContexts.toArray(); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/EnvironmentContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/EnvironmentContentProvider.java new file mode 100644 index 00000000000..373e3e442de --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/EnvironmentContentProvider.java @@ -0,0 +1,59 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.providers;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.properties.environment.Environment;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.views.properties.runtime.ConfigurationManager;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+
+/**
+ * A Content provider for returning objects for the registered environments
+ *
+ * @author Camille Letavernier
+ */
+public class EnvironmentContentProvider extends SemanticEMFContentProvider implements IStaticContentProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param feature
+ * The EStructuralFeature used to retrieve the elements from the
+ * different environments.
+ */
+ public EnvironmentContentProvider(EStructuralFeature feature) {
+ super(null, feature, getRoots(feature), Activator.getDefault().getCustomizationManager());
+ }
+
+ private static EObject[] getRoots(EStructuralFeature feature) {
+ if (!(feature.getEType() instanceof EClass)) {
+ Activator.log.warn("The feature " + feature + " cannot be handled by this content provider");
+ return new EObject[0];
+ }
+
+ List<Object> allObjects = new LinkedList<>();
+ for (Environment environment : ConfigurationManager.getInstance().getPropertiesRoot().getEnvironments()) {
+ allObjects.addAll((List<?>) environment.eGet(feature));
+ }
+ return allObjects.toArray(new EObject[0]);
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyContentProvider.java new file mode 100644 index 00000000000..f28aaba7df1 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyContentProvider.java @@ -0,0 +1,116 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.providers;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.views.properties.toolsmiths.providers.AbstractContextualContentProvider;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextElement;
+import org.eclipse.papyrus.infra.properties.contexts.DataContextPackage;
+import org.eclipse.papyrus.infra.properties.contexts.Property;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+
+/**
+ * A Content provider to retrieve all available properties in the current
+ * contexts
+ *
+ * @author Camille Letavernier
+ */
+public class PropertyContentProvider extends AbstractContextualContentProvider implements IHierarchicContentProvider {
+
+ /**
+ * Constructor.
+ *
+ * @param source
+ * The source from which the contexts will be retrieved
+ */
+ public PropertyContentProvider(EObject source) {
+ super(source);
+ }
+
+ @Override
+ public Object[] getElements() {
+ return contexts.toArray();
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getElements();
+ }
+
+
+ @Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof Context) {
+ Context parent = (Context) parentElement;
+ return parent.getDataContexts().toArray();
+ } else if (parentElement instanceof DataContextElement) {
+ List result = new LinkedList();
+ if (parentElement instanceof DataContextPackage) {
+ DataContextPackage contextPackage = (DataContextPackage) parentElement;
+ result.addAll(contextPackage.getElements());
+ }
+ DataContextElement element = (DataContextElement) parentElement;
+ result.addAll(element.getProperties());
+ Iterator<?> it = result.iterator();
+ while (it.hasNext()) {
+ Object value = it.next();
+ if (isEmpty(value)) {
+ it.remove();
+ }
+ }
+ return result.toArray();
+ } else {
+ return new Object[0];
+ }
+ }
+
+ protected boolean isEmpty(Object element) {
+ if (element instanceof DataContextPackage) {
+ DataContextPackage dcPackage = (DataContextPackage) element;
+ return dcPackage.getElements().isEmpty() && dcPackage.getProperties().isEmpty();
+ } else if (element instanceof DataContextElement) {
+ return ((DataContextElement) element).getProperties().isEmpty();
+ } else if (element instanceof Context) {
+ return ((Context) element).getDataContexts().isEmpty();
+ }
+
+ return false;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof Property) {
+ return ((Property) element).getContextElement();
+ } else if (element instanceof DataContextElement) {
+ return ((DataContextElement) element).getPackage();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return element instanceof Property;
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyEditorTypeContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyEditorTypeContentProvider.java new file mode 100644 index 00000000000..58abd5af25d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/PropertyEditorTypeContentProvider.java @@ -0,0 +1,114 @@ +/***************************************************************************** + * Copyright (c) 2012 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.providers; + +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.papyrus.infra.properties.environment.PropertyEditorType; +import org.eclipse.papyrus.infra.properties.ui.PropertyEditor; +import org.eclipse.papyrus.infra.properties.ui.widgets.layout.PropertiesLayout; +import org.eclipse.papyrus.infra.ui.emf.providers.EMFGraphicalContentProvider; +import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor; +import org.eclipse.papyrus.infra.widgets.editors.BooleanToggle; +import org.eclipse.papyrus.infra.widgets.editors.ICommitListener; +import org.eclipse.papyrus.infra.widgets.providers.AbstractTreeFilter; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; + + +public class PropertyEditorTypeContentProvider extends EMFGraphicalContentProvider implements ICommitListener { + + private PropertyEditor source; + + private BooleanToggle filterButton; + + private PropertyEditorTypeViewerFilter currentFilter; + + public PropertyEditorTypeContentProvider(IStructuredContentProvider semanticProvider, PropertyEditor source) { + super(semanticProvider, source.eResource().getResourceSet(), getHistoryId(source)); + this.source = source; + this.currentFilter = new PropertyEditorTypeViewerFilter(); + } + + private static String getHistoryId(PropertyEditor source) { + return "history_propertyEditorType_" + source.eResource().getURI(); + } + + @Override + public void createBefore(Composite parent) { + Composite self = new Composite(parent, SWT.NONE); + self.setLayout(new PropertiesLayout()); + + filterButton = new BooleanToggle(self); + filterButton.setText("Filter"); + filterButton.setValue(currentFilter.getFilter()); + filterButton.addCommitListener(this); + super.createBefore(self); + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + if (super.viewer != null) { + super.viewer.removeFilter(currentFilter); + } + super.inputChanged(viewer, oldInput, newInput); + super.viewer.addFilter(currentFilter); + } + + @Override + public void commit(AbstractEditor editor) { + currentFilter.setFilter(filterButton.getValue()); + if (super.viewer != null) { + super.viewer.refresh(); + } + } + + private class PropertyEditorTypeViewerFilter extends AbstractTreeFilter { + + private boolean filter = true; + + @Override + public boolean isVisible(Viewer viewer, Object parentElement, Object element) { + if (!filter) { + return true; + } + + Object adaptedValue = getAdaptedValue(element); + if (adaptedValue instanceof PropertyEditorType) { + PropertyEditorType editorType = (PropertyEditorType) adaptedValue; + if (source.getProperty() == null) { + return true; + } + return editorType.getType() == source.getProperty().getType() && isMultiplicityEquivalent(editorType.getMultiplicity(), source.getProperty().getMultiplicity()); + } + + return false; + } + + private boolean isMultiplicityEquivalent(int multiplicity, int multiplicity2) { + if (multiplicity < 0 || multiplicity > 1) { + return multiplicity2 < 0 || multiplicity2 > 1; + } + + return multiplicity == 1 && multiplicity2 == 1; + } + + public boolean getFilter() { + return filter; + } + + public void setFilter(boolean filter) { + this.filter = filter; + clearCache(); + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/TabContentProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/TabContentProvider.java new file mode 100644 index 00000000000..16090fe62d8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/providers/TabContentProvider.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.providers; + +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.papyrus.views.properties.toolsmiths.providers.AbstractContextualContentProvider; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.Tab; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; + +/** + * A Content provider used to retrieve all tabs from the available contexts + * + * @author Camille Letavernier + * + */ +public class TabContentProvider extends AbstractContextualContentProvider { + + private boolean editableTabsOnly; + + /** + * Constructor. + * + * @param source + * The EObject used to retrieve the current context + * @param editableTabsOnly + * If true, only the tabs from editable contexts will be returned, + * i.e. the plug-in contexts will be ignored + */ + public TabContentProvider(EObject source, boolean editableTabsOnly) { + super(source); + } + + @Override + public Object[] getElements() { + List<Tab> tabs = new LinkedList<Tab>(); + for (Context context : contexts) { + if (isValidContext(context)) { + tabs.addAll(context.getTabs()); + } + } + return tabs.toArray(); + } + + private boolean isValidContext(Context context) { + if (editableTabsOnly) { + return !PropertiesRuntime.getConfigurationManager().isPlugin(context); + } + return true; + } + + @Override + public Object[] getElements(Object inputElement) { + return getElements(); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/DataContextsImageQuery.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/DataContextsImageQuery.java new file mode 100644 index 00000000000..f789ff8c860 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/DataContextsImageQuery.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.query; + +import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage; +import org.eclipse.papyrus.emf.facet.custom.ui.internal.custompt.URIImage; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; +import org.eclipse.papyrus.infra.properties.contexts.Context; + +public class DataContextsImageQuery implements IJavaQuery2<Context, IImage> { + @Override + public IImage evaluate(final Context context, + final IParameterValueList2 parameterValues, + final IFacetManager facetManager) + throws DerivedTypedElementException { + return new URIImage("platform:/plugin/org.eclipse.papyrus.customization.properties/icons/DataContexts.gif"); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/GetVisibleFeaturesQuery.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/GetVisibleFeaturesQuery.java new file mode 100644 index 00000000000..10db604c395 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/GetVisibleFeaturesQuery.java @@ -0,0 +1,119 @@ +/***************************************************************************** + * Copyright (c) 2016 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.views.properties.toolsmiths.query; + +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; +import org.eclipse.papyrus.infra.constraints.ConstraintsPackage; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.ContextsPackage; +import org.eclipse.papyrus.infra.properties.contexts.util.ContextsSwitch; +import org.eclipse.papyrus.infra.properties.ui.UiPackage; +import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ToggleDataContextAction; + +/** + * @author Camille Letavernier + * + */ +public class GetVisibleFeaturesQuery implements IJavaQuery2<EObject, List<EReference>> { + + static Set<EReference> allExcludedReferences = new HashSet<EReference>(); + + static { + allExcludedReferences.add(ConstraintsPackage.Literals.DISPLAY_UNIT__CONSTRAINTS); + allExcludedReferences.add(EcorePackage.Literals.EMODEL_ELEMENT__EANNOTATIONS); + + allExcludedReferences.add(ContextsPackage.Literals.CONTEXT__DEPENDENCIES); + allExcludedReferences.add(ContextsPackage.Literals.DATA_CONTEXT_ROOT__MODEL_ELEMENT_FACTORY); + allExcludedReferences.add(ContextsPackage.Literals.DATA_CONTEXT_ELEMENT__PACKAGE); + allExcludedReferences.add(ContextsPackage.Literals.DATA_CONTEXT_ELEMENT__SUPERTYPES); + allExcludedReferences.add(ContextsPackage.Literals.PROPERTY__CONTEXT_ELEMENT); + allExcludedReferences.add(ContextsPackage.Literals.SECTION__TAB); + allExcludedReferences.add(ContextsPackage.Literals.TAB__AFTER_TAB); + allExcludedReferences.add(ContextsPackage.Literals.TAB__SECTIONS); + allExcludedReferences.add(ContextsPackage.Literals.VIEW__CONTEXT); + allExcludedReferences.add(ContextsPackage.Literals.VIEW__DATACONTEXTS); + + allExcludedReferences.add(UiPackage.Literals.COMPOSITE_WIDGET__WIDGET_TYPE); + allExcludedReferences.add(UiPackage.Literals.UI_COMPONENT__ATTRIBUTES); + allExcludedReferences.add(UiPackage.Literals.LAYOUT__LAYOUT_TYPE); + allExcludedReferences.add(UiPackage.Literals.PROPERTY_EDITOR__PROPERTY); + allExcludedReferences.add(UiPackage.Literals.PROPERTY_EDITOR__WIDGET_TYPE); + allExcludedReferences.add(UiPackage.Literals.PROPERTY_EDITOR__UNRESOLVED_PROPERTY); + allExcludedReferences.add(UiPackage.Literals.STANDARD_WIDGET__WIDGET_TYPE); + } + + /** + * @see org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2#evaluate(org.eclipse.emf.ecore.EObject, org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2, org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager) + * + * @param source + * @param parameterValues + * @param facetManager + * @return + * @throws DerivedTypedElementException + */ + @Override + public List<EReference> evaluate(EObject source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException { + if (source.eClass().getEPackage() == ContextsPackage.eINSTANCE) { + return new ContextsSwitch<List<EReference>>() { + @Override + public List<EReference> caseContext(Context object) { + return filter(object.eClass(), filterContextReferences(object)); + } + + @Override + public java.util.List<EReference> defaultCase(EObject object) { + return filter(object.eClass(), ref -> true); + }; + + }.doSwitch(source); + } else if (source.eClass().getEPackage() == UiPackage.eINSTANCE) { + return filter(source.eClass(), ref -> true); + } + + return Collections.emptyList(); + } + + protected Predicate<EReference> filterContextReferences(Context object) { + return ref -> { + if (ref == ContextsPackage.Literals.CONTEXT__DATA_CONTEXTS) { // Show DataContexts only if the corresponding action is enabled + return ToggleDataContextAction.showDataContext; + } else if (ref == ContextsPackage.Literals.CONTEXT__PROTOTYPE) { // Show the Prototype reference only if it is set + return object.getPrototype() != null; + } + return true; + }; + } + + private List<EReference> filter(EClass eClass, Predicate<EReference> filter) { + return eClass.getEAllReferences().stream() + .filter(ref -> !allExcludedReferences.contains(ref)) + .filter(filter) + .collect(Collectors.toList()); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ShowContextQuery.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ShowContextQuery.java new file mode 100644 index 00000000000..2b4cc96e28d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ShowContextQuery.java @@ -0,0 +1,35 @@ +/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.query;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.editor.actions.ToggleDataContextAction;
+
+/**
+ * A Query to test if the DataContextElements should be displayed in the UIEditor
+ *
+ * @author Camille Letavernier
+ */
+public class ShowContextQuery implements IJavaQuery2<Context, Boolean> {
+
+
+ @Override
+ public Boolean evaluate(Context source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ Boolean result = ToggleDataContextAction.showDataContext;
+ return result;
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ViewsImageQuery.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ViewsImageQuery.java new file mode 100644 index 00000000000..685e75bc15e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/query/ViewsImageQuery.java @@ -0,0 +1,30 @@ +/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.query; + +import org.eclipse.papyrus.emf.facet.custom.metamodel.custompt.IImage; +import org.eclipse.papyrus.emf.facet.custom.ui.internal.custompt.URIImage; +import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager; +import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException; +import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2; +import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2; +import org.eclipse.papyrus.infra.properties.contexts.Context; + +public class ViewsImageQuery implements IJavaQuery2<Context, IImage> { + @Override + public IImage evaluate(final Context context, + final IParameterValueList2 parameterValues, + final IFacetManager facetManager) + throws DerivedTypedElementException { + return new URIImage("platform:/plugin/org.eclipse.papyrus.customization.properties/icons/MultiView.gif"); //$NON-NLS-1$ + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/AbstractContextStorageActionProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/AbstractContextStorageActionProvider.java new file mode 100644 index 00000000000..efeca3b01a8 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/AbstractContextStorageActionProvider.java @@ -0,0 +1,67 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextStorageActionProvider; + +/** + * This is the AbstractContextStorageActionProvider type. Enjoy. + */ +public abstract class AbstractContextStorageActionProvider implements IContextStorageActionProvider { + + private IContextCopyAction copyAction; + + private IContextEditAction editAction; + + private IContextDeleteAction deleteAction; + + public AbstractContextStorageActionProvider() { + super(); + } + + @Override + public IContextCopyAction getContextCopyAction() { + if (copyAction == null) { + copyAction = createContextCopyAction(); + } + + return copyAction; + } + + protected abstract IContextCopyAction createContextCopyAction(); + + @Override + public IContextEditAction getContextEditAction() { + if (editAction == null) { + editAction = createContextEditAction(); + } + + return editAction; + } + + protected abstract IContextEditAction createContextEditAction(); + + @Override + public IContextDeleteAction getContextDeleteAction() { + if (deleteAction == null) { + deleteAction = createContextDeleteAction(); + } + + return deleteAction; + } + + protected abstract IContextDeleteAction createContextDeleteAction(); + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionRegistry.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionRegistry.java new file mode 100644 index 00000000000..6fb5264aa2d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionRegistry.java @@ -0,0 +1,140 @@ +/***************************************************************************** + * Copyright (c) 2013, 2014 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 422257 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextStorageActionProvider; +import org.eclipse.papyrus.infra.core.utils.OneTimeRegistryReader; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; + +/** + * This is the ContextStorageActionRegistry type. Enjoy. + */ +public class ContextStorageActionRegistry { + + private static final String EXT_POINT = "contextStorage"; //$NON-NLS-1$ + + private final List<IContextStorageActionProvider> providers = new java.util.ArrayList<IContextStorageActionProvider>(); + + public ContextStorageActionRegistry() { + super(); + + new MyRegistryReader().readRegistry(); + } + + public List<IContextStorageActionProvider> getStorageActionProviders() { + return Collections.unmodifiableList(providers); + } + + public IContextStorageActionProvider getStorageActionProvider(Context context) { + IContextStorageActionProvider result = IContextStorageActionProvider.READ_ONLY; + + for (IContextStorageActionProvider next : providers) { + if (next.providesFor(context)) { + result = next; + break; + } + } + + return result; + } + + public IContextCopyAction getContextCopyAction(Context context) { + return getStorageActionProvider(context).getContextCopyAction(); + } + + public IContextEditAction getContextEditAction(Context context) { + return getStorageActionProvider(context).getContextEditAction(); + } + + public IContextDeleteAction getContextDeleteAction(Context context) { + return getStorageActionProvider(context).getContextDeleteAction(); + } + + // + // Nested types + // + + private class MyRegistryReader extends OneTimeRegistryReader { + + private static final String A_CLASS = "class"; //$NON-NLS-1$ + + private static final String E_ACTION_PROVIDER = "actionProvider"; //$NON-NLS-1$ + + private Map<IContextStorageActionProvider, IConfigurationElement> providerElements = new java.util.HashMap<IContextStorageActionProvider, IConfigurationElement>(); + + MyRegistryReader() { + super(Platform.getExtensionRegistry(), Activator.PLUGIN_ID, EXT_POINT); + } + + @Override + public void readRegistry() { + super.readRegistry(); + + // sort any providers contributed by this plug-in to the front + Collections.sort(providers, new Comparator<IContextStorageActionProvider>() { + + @Override + public int compare(IContextStorageActionProvider o1, IContextStorageActionProvider o2) { + int result = 0; + + if (isOurs(o1)) { + result = isOurs(o2) ? 0 : -1; + } else if (isOurs(o2)) { + result = +1; + } + + return result; + } + }); + } + + private boolean isOurs(IContextStorageActionProvider provider) { + boolean result = false; + + IConfigurationElement config = providerElements.get(provider); + if (config != null) { + Activator.PLUGIN_ID.equals(config.getContributor().getName()); + } + + return result; + } + + @Override + protected boolean readElement(IConfigurationElement element) { + boolean result = true; + + if (E_ACTION_PROVIDER.equals(element.getName())) { + try { + providers.add((IContextStorageActionProvider) element.createExecutableExtension(A_CLASS)); + } catch (Exception e) { + result = false; + Activator.log.error("Failed to instantiate context storage action provider extension.", e); //$NON-NLS-1$ + } + } + + return result; + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionUtil.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionUtil.java new file mode 100644 index 00000000000..a693cc31b3c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/ContextStorageActionUtil.java @@ -0,0 +1,100 @@ +/***************************************************************************** + * Copyright (c) 2010, 2015 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factored out some methods from existing code for reuse (CDO) + * Christian W. Damus - bug 482927 + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.ContextsPackage; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; + + +/** + * Utility operations useful in the construction of context storage actions, especially copy. + */ +public class ContextStorageActionUtil { + + // not instantiable by clients + private ContextStorageActionUtil() { + super(); + } + + public static void initializeCopy(Context source, IProgressMonitor monitor) { + monitor.beginTask(Messages.CopyContextAction_InitializingTheCopyOf + source.getUserLabel() + Messages.CopyContextAction_ThisMayTakeSomeTime, IProgressMonitor.UNKNOWN); + // EcoreUtil.resolveAll(source); //This method is too expensive + resolveAllResources(source); // Ignores the *.xwt files. We will copy them manually. + monitor.done(); + } + + /** + * Lightweight method for loading a resource set + * This method ignores the *.xwt files, which do not contain any useful + * cross-reference (As they can only reference Environment files), and are + * really expensive to load. + */ + private static void resolveAllResources(Context source) { + resolveAllResources(source, new HashSet<EObject>()); + } + + /** + * Lightweight method for loading a resource set + * This method ignores the *.xwt files, which do not contain any useful + * cross-reference (As they can only reference Environment files), and are + * really expensive to load. + */ + private static void resolveAllResources(EObject source, Set<EObject> visitedEObjects) { + if (!visitedEObjects.add(source)) { + return; + } + + for (EReference reference : source.eClass().getEAllReferences()) { + // Do not load *.xwt resources + // These files do not contain any useful cross-reference, and are really expensive to load + if (reference == ContextsPackage.eINSTANCE.getSection_Widget()) { + continue; + } + + Object value = source.eGet(reference); + if (value instanceof EList) { + for (Object object : (EList<?>) value) { + if (object instanceof EObject) { + resolveAllResources((EObject) object, visitedEObjects); + } + } + } else if (value instanceof EObject) { + resolveAllResources((EObject) value, visitedEObjects); + } + } + } + + public static boolean isRelative(Resource base, Resource resource) { + URI baseURI = base.getURI(); + URI resourceURI = resource.getURI(); + URI uri = resourceURI.deresolve(baseURI); + if (uri.isRelative()) { + if (!(uri.toString().startsWith("..") || uri.toString().startsWith("/"))) { //$NON-NLS-1$ //$NON-NLS-2$ + return true; + } + } + return false; + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextCopyAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextCopyAction.java new file mode 100644 index 00000000000..961d2804eec --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextCopyAction.java @@ -0,0 +1,60 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.runtime.IConfigurationManager; + + +/** + * An action that may be contributed to the Properties View customization dialog on the <tt>org.eclipse.papyrus.customization.properties.contextStorage</tt> extension point + * to implement copying a {@link Context} to the corresponding storage provider. + */ +public interface IContextCopyAction { + + /** + * Queries the (translated) label to show in a copy button in the Properties customization dialog. + * + * @return the label to show in the copy button in the customization dialog + */ + String getLabel(); + + /** + * Queries the (translated) tool tip to show on a copy button in the Properties customization dialog. + * + * @return the optional tool tip to show on the copy button in the customization dialog. + * May be {@code null} + */ + String getToolTip(); + + /** + * Copy an existing context to a new one with the given name. + * The new context is registered to the {@link IConfigurationManager}. + * + * @param source + * The source Context to copy + * @param targetName + * The name of the new context + * @param monitor + * A monitor to track the progress of the copy operation. Will not be {@code null} + * @return + * The new Context + * + * @throws CoreException + * If an error occurred : the previous context cannot be read, or + * the new context cannot be created + */ + Context copy(Context source, String targetName, IProgressMonitor monitor) throws CoreException; + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextDeleteAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextDeleteAction.java new file mode 100644 index 00000000000..24577ba1c2e --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextDeleteAction.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.papyrus.infra.properties.contexts.Context; + + +/** + * An action that may be contributed to the Properties View customization dialog on the <tt>org.eclipse.papyrus.customization.properties.contextStorage</tt> extension point + * to support deletion of a {@link Context} from the associated storage. + */ +public interface IContextDeleteAction { + + /** + * Queries the (translated) tool tip to show on the "Remove" button in the Properties + * customization dialog for {@link Context}s in the storage providers supported by the + * extension. + * + * @return the optional tool tip to show on the "Edit..." button in the customization dialog. + * May be {@code null} + */ + String getToolTip(); + + /** + * Delete a {@code context} from its persistent storage. + * + * @param context + * The {@link Context} to delete + * @param monitor + * A monitor to track the progress of the delete operation. Will not be {@code null} + * + * @throws CoreException + * On failure to delete the {@code context} + */ + void delete(Context context, IProgressMonitor monitor) throws CoreException; + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextEditAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextEditAction.java new file mode 100644 index 00000000000..b9eeb32ec22 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextEditAction.java @@ -0,0 +1,48 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.papyrus.infra.properties.contexts.Context; + + +/** + * An action that may be contributed to the Properties View customization dialog on the <tt>org.eclipse.papyrus.customization.properties.contextStorage</tt> extension point + * to support opening an editor on the {@link Context} in the associated storage. + */ +public interface IContextEditAction { + + /** + * Queries the (translated) tool tip to show on the "Edit..." button in the Properties + * customization dialog for {@link Context}s in the storage providers supported by the + * extension. + * + * @return the optional tool tip to show on the "Edit..." button in the customization dialog. + * May be {@code null} + */ + String getToolTip(); + + /** + * Open an editor to edit an context. + * + * @param context + * The {@link Context} to edit + * @param monitor + * A monitor to track the progress of the open-editor operation. Will not be {@code null} + * + * @throws CoreException + * On failure to open an editor on the {@code context} + */ + void openEditor(Context context, IProgressMonitor monitor) throws CoreException; + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextStorageActionProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextStorageActionProvider.java new file mode 100644 index 00000000000..50e99a84884 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/IContextStorageActionProvider.java @@ -0,0 +1,80 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions; + +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextStorageActionProvider; +import org.eclipse.papyrus.infra.properties.contexts.Context; + + +/** + * A provider of actions to the Properties View customization dialog on the <tt>org.eclipse.papyrus.customization.properties.contextStorage</tt> extension point to implement {@linkplain IContextCopyAction copying}, {@linkplain IContextEditAction editing}, + * and {@linkplain IContextDeleteAction deletion} of {@link Context} to the corresponding storage + * provider. + * + * @see IContextCopyAction + * @see IContextEditAction + * @see IContextDeleteAction + */ +public interface IContextStorageActionProvider { + + IContextStorageActionProvider READ_ONLY = new ReadOnlyContextStorageActionProvider(); + + /** + * Queries whether I provide edit and delete actions for the a {@code context}. + * + * @param context + * a context selected by the user to act on + * + * @return whether I provide actions for it + */ + boolean providesFor(Context context); + + IContextCopyAction getContextCopyAction(); + + IContextEditAction getContextEditAction(); + + IContextDeleteAction getContextDeleteAction(); + + // + // Nested types + // + + class ReadOnlyContextStorageActionProvider implements IContextStorageActionProvider { + + @Override + public boolean providesFor(Context context) { + // I am the final fall-back that provides no editing capability, so I always return false + return false; + } + + @Override + public IContextCopyAction getContextCopyAction() { + // I am not actually provided on the extension point, so this isn't needed + return null; + } + + @Override + public IContextEditAction getContextEditAction() { + // I can't edit anything, so this isn't needed + return null; + } + + @Override + public IContextDeleteAction getContextDeleteAction() { + // I can't edit anything, so this isn't needed + return null; + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextCopyAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextCopyAction.java new file mode 100644 index 00000000000..6b8f7a3a5c5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextCopyAction.java @@ -0,0 +1,257 @@ +/***************************************************************************** + * Copyright (c) 2010, 2015 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + * Christian W. Damus (CEA) - bug 422257 + * Christian W. Damus - bug 482927 + * + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace; + +import static org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.ContextStorageActionUtil.initializeCopy; +import static org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.ContextStorageActionUtil.isRelative; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.papyrus.infra.emf.utils.EMFHelper; +import org.eclipse.papyrus.infra.properties.catalog.PropertiesURIHandler; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.contexts.Section; +import org.eclipse.papyrus.infra.properties.contexts.Tab; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.properties.ui.util.PropertiesUtil; +import org.eclipse.papyrus.views.properties.runtime.ConfigurationManager; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; + +/** + * An action to build a new Property view context from an existing one. + * + * @author Camille Letavernier + */ +public class WorkspaceContextCopyAction implements IContextCopyAction { + + @Override + public String getLabel() { + return Messages.CustomizationDialog_copyToWorkspace; + } + + @Override + public String getToolTip() { + return Messages.CustomizationDialog_createNewCopyByCopy; + } + + /** + * Copy an existing context to a new one with the given name. + * The new context is registered to the {@link ConfigurationManager}. + * To enable the edition of the context, an invisible project is created + * in the workspace. The files are stored in the runtime plugin's preference + * folder. + * + * @param source + * The source Context to copy + * @param targetName + * The name of the new context + * @return + * The new Context + * + * @throws CoreException + * If an error occured : the previous context cannot be read, or + * the new context cannot be created + */ + @Override + public Context copy(Context source, String targetName, IProgressMonitor monitor) throws CoreException { + SubMonitor sub = SubMonitor.convert(monitor, 1); + + Context result = null; + + final ResourceSet resourceSet = new ResourceSetImpl(); + try { + IPath targetDirectoryPath = org.eclipse.papyrus.views.properties.Activator.getDefault().getPreferencesPath().append("/" + targetName); //$NON-NLS-1$ + final File targetDirectory = targetDirectoryPath.toFile(); + if (targetDirectory.exists()) { + throw new IOException("A context with this name already exists"); //$NON-NLS-1$ + } + URI targetModelUri = URI.createFileURI(targetDirectory.toString() + "/" + targetName + ".ctx"); //$NON-NLS-1$ //$NON-NLS-2$ + + Context sourceContext = (Context) EMFHelper.loadEMFModel(resourceSet, source.eResource().getURI()); + + IStatus copyResult = copyAll(sourceContext, new File(targetDirectory, targetName + ".ctx"), sub.newChild(1, SubMonitor.SUPPRESS_NONE)); //$NON-NLS-1$ + + if (copyResult.isOK()) { + result = PropertiesRuntime.getConfigurationManager().getContext(targetModelUri); + + result.setName(targetName); + result.setPrototype(source); + result.eResource().save(Collections.EMPTY_MAP); + } else if (copyResult.getSeverity() != IStatus.CANCEL) { + throw new CoreException(copyResult); + } + } catch (IOException e) { + throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e)); + } finally { + EMFHelper.unload(resourceSet); + sub.done(); + } + + return result; + } + + private IStatus copyAll(Context source, File target, IProgressMonitor monitor) { + SubMonitor sub = SubMonitor.convert(monitor, 100); + + initializeCopy(source, sub.newChild(10)); + + return doCopy(source, target, sub.newChild(90)); + } + + private IStatus doCopy(Context source, File target, IProgressMonitor monitor) { + IStatus result = Status.OK_STATUS; + + final File targetDirectory = target.getParentFile(); + final String targetName = target.getName(); + + try { + Resource sourceResource = source.eResource(); + targetDirectory.mkdirs(); + + int filesToCopy = sourceResource.getResourceSet().getResources().size(); + List<Context> contexts = new LinkedList<Context>(); + for (Context context : PropertiesUtil.getDependencies(source)) { + if (isRelative(sourceResource, context.eResource())) { + contexts.add(context); + for (Tab tab : context.getTabs()) { + filesToCopy += tab.getSections().size(); + } + } + } + + monitor.beginTask(Messages.CopyContextAction_Copying + source.getUserLabel() + Messages.CopyContextAction_To + targetName, filesToCopy); + + // Copy of the context + copy(sourceResource, target); + monitor.worked(1); + + // Copy of the dependent resources which are located in the same folder + // (or subfolders) + for (Resource resource : source.eResource().getResourceSet().getResources()) { + if (monitor.isCanceled()) { + return Status.CANCEL_STATUS; + } + if ((resource != sourceResource) && isRelative(sourceResource, resource)) { + copy(resource, targetDirectory, source, targetName); + } + monitor.worked(1); + } + + // Copy the XWT files (they haven't been loaded in the resource set) + for (Context context : contexts) { + for (Tab tab : context.getTabs()) { + for (Section section : tab.getSections()) { + if (monitor.isCanceled()) { + return Status.CANCEL_STATUS; + } + copy(section.getSectionFile(), targetDirectory, source); + monitor.worked(1); + } + } + } + + monitor.done(); + } catch (IOException ex) { + Activator.log.error(ex); + result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An error occured during the copy of " + source.getName(), ex); //$NON-NLS-1$ + monitor.done(); + } + + return result; + } + + protected void copy(String xwtFileName, File targetDirectory, Context source) { + File target = new File(targetDirectory, xwtFileName); + URI sourceURI = URI.createURI(xwtFileName).resolve(source.eResource().getURI()); + PropertiesURIHandler uriHandler = new PropertiesURIHandler(); + if (uriHandler.canHandle(sourceURI)) { + sourceURI = uriHandler.getConvertedURI(sourceURI); + } + + try { + // TODO: Use resource set's URIConverter to get a stream + java.net.URL netURL = new java.net.URL(sourceURI.toString()); + InputStream is = netURL.openStream(); + copy(is, target); + } catch (MalformedURLException ex) { + Activator.log.error(ex); + } catch (IOException ex) { + Activator.log.error(ex); + } + } + + protected void copy(Resource resource, File target) throws IOException { + // TODO: Use resource set's URIConverter to get a stream + PropertiesURIHandler uriHandler = new PropertiesURIHandler(); + URI uri = resource.getURI(); + if (uriHandler.canHandle(uri)) { + uri = uriHandler.getConvertedURI(uri); + } + copy(new URL(uri.toString()).openStream(), target); + } + + private void copy(Resource resource, File directory, EObject source, String targetName) throws IOException { + URI relativeURI = resource.getURI().deresolve(source.eResource().getURI()); + if (relativeURI.toString().equals("")) { //$NON-NLS-1$ + relativeURI = URI.createURI(targetName + ".ctx"); //$NON-NLS-1$ + } + File target = new File(directory, relativeURI.toString()); + copy(resource, target); + } + + // Strict copy : we read directly the file, instead of interpreting it as a Model + private void copy(InputStream source, File target) throws IOException { + if (!target.getParentFile().exists()) { + target.getParentFile().mkdirs(); + } + + FileWriter out = new FileWriter(target); + try { + int c; + + while ((c = source.read()) != -1) { + out.write(c); + } + + } catch (IOException ex) { + throw ex; + } finally { + source.close(); + out.close(); + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextDeleteAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextDeleteAction.java new file mode 100644 index 00000000000..a211179a76c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextDeleteAction.java @@ -0,0 +1,72 @@ +/***************************************************************************** + * Copyright (c) 2011, 2015 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + * Christian W. Damus - bug 482927 + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace; + +import java.io.File; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.internal.ui.runtime.IInternalConfigurationManager; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; + +/** + * An action to delete an existing context. This action cannot be undone. + * If you simply want to disable an existing context, see {@link IInternalConfigurationManager#disableContext(Context, boolean)} + * + * @author Camille Letavernier + */ +public class WorkspaceContextDeleteAction implements IContextDeleteAction { + + @Override + public String getToolTip() { + return Messages.WorkspaceContextDeleteAction_0; + } + + /** + * Deletes the given context. + * + * @param context + * The context to delete + */ + @Override + public void delete(final Context context, IProgressMonitor monitor) throws CoreException { + final File directory = new File(context.eResource().getURI().toFileString()).getParentFile(); + + SubMonitor sub = SubMonitor.convert(monitor, Messages.WorkspaceContextDeleteAction_1 + context.getUserLabel(), IProgressMonitor.UNKNOWN); + try { + delete(directory); + } finally { + sub.done(); + } + } + + /** + * Recursively deletes a file or directory + * + * @param file + * The file or directory to delete recusively + */ + private void delete(File file) { + if (file.isDirectory()) { + for (File subFile : file.listFiles()) { + delete(subFile); + } + + } + file.delete(); + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextEditAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextEditAction.java new file mode 100644 index 00000000000..7d1c5d5783d --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextEditAction.java @@ -0,0 +1,64 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 2015 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO)
+ * Christian W. Damus - bug 482927
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction;
+import org.eclipse.papyrus.views.properties.toolsmiths.util.ProjectUtil;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * An action to edit an existing context.
+ * The context must not be read-only, which means it should not have been
+ * registered via a plug-in extension
+ *
+ * @author Camille Letavernier
+ */
+public class WorkspaceContextEditAction implements IContextEditAction {
+
+ @Override
+ public String getToolTip() {
+ return Messages.WorkspaceContextEditAction_0;
+ }
+
+ /**
+ * Opens an Eclipse Editor to edit the given context.
+ *
+ * @param context
+ * The context to edit
+ * @throws Exception
+ * If the context cannot be edited
+ */
+ @Override
+ public void openEditor(final Context context, IProgressMonitor monitor) throws CoreException {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.WorkspaceContextEditAction_1 + context.getUserLabel(), IProgressMonitor.UNKNOWN);
+
+ try {
+ runOpenEditor(context);
+ } finally {
+ sub.done();
+ }
+ }
+
+ protected void runOpenEditor(Context context) throws CoreException {
+ IFile contextFile = ProjectUtil.getContextFile(context);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(contextFile), "org.eclipse.papyrus.customization.properties.UIEditor", true); //$NON-NLS-1$ ;
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextStorageActionProvider.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextStorageActionProvider.java new file mode 100644 index 00000000000..39490c81768 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/storage/actions/workspace/WorkspaceContextStorageActionProvider.java @@ -0,0 +1,55 @@ +/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * CEA LIST - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace.WorkspaceContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace.WorkspaceContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace.WorkspaceContextEditAction; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.AbstractContextStorageActionProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction; + + +/** + * This is the WorkspaceContextStorageActionProvider type. Enjoy. + */ +public class WorkspaceContextStorageActionProvider extends AbstractContextStorageActionProvider { + + public WorkspaceContextStorageActionProvider() { + super(); + } + + @Override + public boolean providesFor(Context context) { + Resource resource = context.eResource(); + return (resource != null) && resource.getURI().isPlatformResource() || resource.getURI().isFile(); + } + + @Override + protected IContextCopyAction createContextCopyAction() { + return new WorkspaceContextCopyAction(); + } + + @Override + protected IContextEditAction createContextEditAction() { + return new WorkspaceContextEditAction(); + } + + @Override + protected IContextDeleteAction createContextDeleteAction() { + return new WorkspaceContextDeleteAction(); + } + +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CopyContextAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CopyContextAction.java new file mode 100644 index 00000000000..bbc72b759e5 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CopyContextAction.java @@ -0,0 +1,100 @@ +/***************************************************************************** + * Copyright (c) 2010, 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.ui; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.internal.ui.runtime.IInternalConfigurationManager; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.statushandlers.StatusManager; + +/** + * An action to build a new Property view context from an existing one. + * + * @author Camille Letavernier + */ +public class CopyContextAction { + + private IContextCopyAction delegate; + + public CopyContextAction(IContextCopyAction delegate) { + super(); + + this.delegate = delegate; + } + + /** + * Copy an existing context to a new one with the given name. + * The new context is registered to the {@link ConfigurationManager}. + * To enable the edition of the context, an invisible project is created + * in the workspace. The files are stored in the runtime plugin's preference + * folder. + * + * @param source + * The source Context to copy + * @param targetName + * The name of the new context + * @param activate + * If true, the new context will be activated and available immediately, + * while the previous one will be disabled to avoid conflicts + * @return + * The new Context or {@code null} if it was not created (because of error or user cancellation + */ + public Context copy(final Context source, final String targetName, final boolean activate) { + final Context[] result = { null }; + + ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell()); + try { + dialog.run(true, true, new IRunnableWithProgress() { + + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + try { + result[0] = delegate.copy(source, targetName, monitor); + + if (result[0] != null) { + IInternalConfigurationManager mgr = (IInternalConfigurationManager) PropertiesRuntime.getConfigurationManager(); + mgr.addContext(result[0], activate); + if (activate) { + mgr.disableContext(source, true); + } + } + } catch (CoreException ex) { + throw new InvocationTargetException(ex); + } + } + + }); + } catch (InvocationTargetException ex) { + if (ex.getTargetException() instanceof CoreException) { + CoreException ce = (CoreException) ex.getTargetException(); + Activator.log.error(ce); + StatusManager.getManager().handle(ce.getStatus(), StatusManager.SHOW); + } else { + Activator.log.error(ex); + } + } catch (InterruptedException ex) { + Activator.log.error(ex); + } + + return result[0]; + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CustomizationDialog.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CustomizationDialog.java new file mode 100644 index 00000000000..eb95a5a898c --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/CustomizationDialog.java @@ -0,0 +1,338 @@ +/***************************************************************************** + * Copyright (c) 2010, 2015 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: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + * Christian W. Damus - bug 482927 + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.ui; + +import java.util.Collection; + +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.IInputValidator; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.TrayDialog; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.views.properties.toolsmiths.ui.CopyContextAction; +import org.eclipse.papyrus.views.properties.toolsmiths.ui.EditContextAction; +import org.eclipse.papyrus.views.properties.toolsmiths.ui.RemoveContextAction; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.infra.widgets.editors.InputDialog; +import org.eclipse.papyrus.infra.widgets.providers.CollectionContentProvider; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.messages.Messages; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.ContextStorageActionRegistry; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextCopyAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextStorageActionProvider; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.List; +import org.eclipse.swt.widgets.Shell; + +/** + * A Dialog to display the operations available to customize + * the property view, such as "Copy", "Edit" or "Delete" an + * existing configuration. + * + * @author Camille Letavernier + */ +public class CustomizationDialog extends TrayDialog implements SelectionListener { + + private final ContextStorageActionRegistry actionRegistry; + + private List availableContexts; + + private ListViewer availableContextsViewer; + + private java.util.List<Button> copyContextButtons; + + private Button editContext; + + private Button removeContext; + + /** + * + * Constructor. + * + * @param shell + * The shell in which the dialog will be opened + */ + public CustomizationDialog(final Shell shell) { + super(shell); + + this.actionRegistry = new ContextStorageActionRegistry(); + } + + @Override + public void create() { + super.create(); + super.getShell().setText(Messages.CustomizationDialog_customization); + super.getShell().setImage(Activator.getDefault().getImage("/icons/papyrus.png")); //$NON-NLS-1$ + + Composite contents = new Composite(getDialogArea(), SWT.NONE); + contents.setLayout(new GridLayout(2, false)); + contents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + Label label = new Label(contents, SWT.NONE); + label.setText(Messages.CustomizationDialog_selectContextToEdit); + label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); + + Collection<Context> contexts = PropertiesRuntime.getConfigurationManager().getCustomizableContexts(); + + availableContexts = new List(contents, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL); + availableContexts.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + availableContextsViewer = new ListViewer(availableContexts); + availableContextsViewer.setContentProvider(CollectionContentProvider.instance); + availableContextsViewer.setLabelProvider(new LabelProvider() { + + @Override + public String getText(final Object element) { + if (element != null && element instanceof Context) { + Context context = (Context) element; + return context.getUserLabel() + (PropertiesRuntime.getConfigurationManager().isPlugin(context) ? Messages.CustomizationDialog_plugin : ""); //$NON-NLS-1$ + } + return super.getText(element); + } + }); + availableContextsViewer.setInput(contexts); + availableContexts.addSelectionListener(this); + + Composite controls = new Composite(contents, SWT.NONE); + controls.setLayout(new FillLayout(SWT.VERTICAL)); + + Collection<IContextStorageActionProvider> providers = actionRegistry.getStorageActionProviders(); + copyContextButtons = new java.util.ArrayList<Button>(providers.size()); + for (IContextStorageActionProvider next : providers) { + IContextCopyAction copyAction = next.getContextCopyAction(); + if (copyAction != null) { + Button copyContext = new Button(controls, SWT.PUSH); + copyContext.setText(copyAction.getLabel()); + copyContext.setToolTipText(copyAction.getToolTip()); + copyContext.setData(copyAction); + copyContext.setEnabled(false); + copyContext.addSelectionListener(this); + + copyContextButtons.add(copyContext); + } + } + if (copyContextButtons.size() == 1) { + // special case: use a simpler label than "Copy to Workspace..." + copyContextButtons.get(0).setText(Messages.CustomizationDialog_copy); + } + + editContext = new Button(controls, SWT.PUSH); + editContext.setText(Messages.CustomizationDialog_edit); + editContext.setToolTipText(Messages.CustomizationDialog_editSelectedContext); + editContext.setEnabled(false); + editContext.addSelectionListener(this); + + removeContext = new Button(controls, SWT.PUSH); + removeContext.setText(Messages.CustomizationDialog_delete); + removeContext.setToolTipText(Messages.CustomizationDialog_removeSelectedContext); + removeContext.setEnabled(false); + removeContext.addSelectionListener(this); + + availableContextsViewer.addSelectionChangedListener(new ISelectionChangedListener() { + + @Override + public void selectionChanged(final SelectionChangedEvent event) { + IStructuredSelection selection = (IStructuredSelection) event.getSelection(); + boolean activate = false; + + IContextStorageActionProvider provider = null; + if (!selection.isEmpty()) { + Context context = (Context) selection.getFirstElement(); + activate = !PropertiesRuntime.getConfigurationManager().isPlugin(context); + provider = actionRegistry.getStorageActionProvider(context); + } + + editContext.setEnabled(activate); + IContextEditAction editAction = provider.getContextEditAction(); + editContext.setToolTipText((editAction == null) ? null : editAction.getToolTip()); + for (Button next : copyContextButtons) { + next.setEnabled(!selection.isEmpty()); + } + removeContext.setEnabled(activate); + IContextDeleteAction deleteAction = provider.getContextDeleteAction(); + removeContext.setToolTipText((deleteAction == null) ? null : deleteAction.getToolTip()); + } + + }); + + // generateContext = new Button(controls, SWT.PUSH); + // generateContext.setText("Generate"); + // generateContext.setToolTipText("Generates a new Context from a Metamodel"); + // generateContext.setEnabled(false); + + getShell().pack(); + } + + protected void editAction() { + IStructuredSelection selection = (IStructuredSelection) availableContextsViewer.getSelection(); + if (selection.isEmpty()) { + return; + } + + Object element = selection.getFirstElement(); + if (element instanceof Context) { + Context sourceContext = (Context) element; + + IContextEditAction editAction = actionRegistry.getContextEditAction(sourceContext); + if (editAction == null) { + MessageDialog.openError(getShell(), Messages.CustomizationDialog_0, Messages.CustomizationDialog_1); + return; + } + + try { + EditContextAction action = new EditContextAction(editAction); + action.openEditor(sourceContext); + close(); + } catch (Exception ex) { + Activator.log.error("An error occured while initializing the customization editor", ex); //$NON-NLS-1$ + return; + } + } + } + + protected void copyAction(IContextCopyAction copyAction) { + IStructuredSelection selection = (IStructuredSelection) availableContextsViewer.getSelection(); + if (selection.isEmpty()) { + return; + } + + Object element = selection.getFirstElement(); + if (element instanceof Context) { + Context sourceContext = (Context) element; + CopyContextAction action = new CopyContextAction(copyAction); + + try { + InputDialog dialog = new InputDialog(getShell(), Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_enterConfigurationName, Messages.CustomizationDialog_copyOf + sourceContext.getName(), new IInputValidator() { + + @Override + public String isValid(final String newText) { + if (newText.trim().equals("")) { //$NON-NLS-1$ + return Messages.CustomizationDialog_configurationNameNotEmpty; + } + if (PropertiesRuntime.getConfigurationManager().getContext(newText) != null) { + return Messages.CustomizationDialog_configurationWithSameNameExists; + } + return null; + } + + }); + dialog.setTitle(Messages.CustomizationDialog_configurationName); + int result = dialog.open(); + if (result == Window.OK) { + String targetName = dialog.getText(); + Context newContext = action.copy(sourceContext, targetName, false); + if (newContext != null) { + availableContextsViewer.setInput(PropertiesRuntime.getConfigurationManager().getContexts()); + availableContextsViewer.setSelection(new StructuredSelection(newContext), true); + } + } + } catch (Exception ex) { + Activator.log.error(ex); + } + } + } + + protected void deleteAction() { + IStructuredSelection selection = (IStructuredSelection) availableContextsViewer.getSelection(); + if (selection.isEmpty()) { + return; + } + + Object element = selection.getFirstElement(); + if (element instanceof Context) { + Context sourceContext = (Context) element; + if (PropertiesRuntime.getConfigurationManager().isPlugin(sourceContext)) { + Activator.log.warn(Messages.CustomizationDialog_cannotDeletePluginContext); + // Plugin context cannot be deleted + return; + } + + IContextDeleteAction deleteAction = actionRegistry.getContextDeleteAction(sourceContext); + if (deleteAction == null) { + MessageDialog.openError(getShell(), Messages.CustomizationDialog_deleteContext, Messages.CustomizationDialog_2); + return; + } + + MessageDialog dialog = new MessageDialog(getShell(), Messages.CustomizationDialog_deleteContext, null, Messages.CustomizationDialog_deleteContextConfirmation1 + sourceContext.getUserLabel() + Messages.CustomizationDialog_deleteContextConfirmation2, + MessageDialog.CONFIRM, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2); + int result = dialog.open(); + if (result == 0) { // 0 is "Yes" (It is *not* the same 0 as Window.OK) + RemoveContextAction action = new RemoveContextAction(deleteAction); + action.removeContext(sourceContext); + availableContextsViewer.setInput(PropertiesRuntime.getConfigurationManager().getContexts()); + } + } + } + + @Override + protected int getShellStyle() { + return super.getShellStyle() | SWT.RESIZE; + } + + @Override + protected Composite getDialogArea() { + return (Composite) super.getDialogArea(); + } + + + @Override + public void widgetSelected(final SelectionEvent e) { + if (e.widget == editContext) { + editAction(); + } else if (e.widget == removeContext) { + deleteAction(); + } else if (e.widget.getData() instanceof IContextCopyAction) { + copyAction((IContextCopyAction) e.widget.getData()); + } + } + + @Override + public void widgetDefaultSelected(final SelectionEvent e) { + if (e.widget == availableContexts) { + IStructuredSelection selection = (IStructuredSelection) availableContextsViewer.getSelection(); + if (!selection.isEmpty()) { + Context context = (Context) selection.getFirstElement(); + if (PropertiesRuntime.getConfigurationManager().isPlugin(context)) { + if (copyContextButtons.size() == 1) { + copyAction((IContextCopyAction) copyContextButtons.get(0).getData()); + } + } else { + editAction(); + } + } + } + } + + @Override + public boolean isResizable() { + return true; + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/EditContextAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/EditContextAction.java new file mode 100644 index 00000000000..b9533301da1 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/EditContextAction.java @@ -0,0 +1,71 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO)
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextEditAction;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * An action to edit an existing context.
+ * The context must not be read-only, which means it should not have been
+ * registered via a plug-in extension
+ *
+ * @author Camille Letavernier
+ */
+public class EditContextAction {
+
+ private IContextEditAction delegate;
+
+ public EditContextAction(IContextEditAction delegate) {
+ super();
+
+ this.delegate = delegate;
+ }
+
+ /**
+ * Opens an Eclipse Editor to edit the given context.
+ *
+ * @param context
+ * The context to edit
+ * @throws Exception
+ * If the context cannot be edited
+ */
+ public void openEditor(final Context context) {
+
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());
+ try {
+ dialog.run(false, false, new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ delegate.openEditor(context, monitor);
+ } catch (CoreException ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ });
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/OpenCustomization.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/OpenCustomization.java new file mode 100644 index 00000000000..6cb70731827 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/OpenCustomization.java @@ -0,0 +1,67 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.ui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.papyrus.views.properties.toolsmiths.ui.CustomizationDialog;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * A Handler for the "OpenCustomization" Action.
+ * Opens the {@link CustomizationDialog}
+ *
+ * @author Camille Letavernier
+ */
+public class OpenCustomization extends AbstractHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ final Shell shell = HandlerUtil.getActiveShellChecked(event);
+
+ // The first opening might take some time, as the Property view ConfigurationManager may not be initialized yet
+
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell);
+ try {
+ dialog.run(false, false, new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask("Opening the property view customization page", IProgressMonitor.UNKNOWN);
+ runOpenCustomizationDialog(shell);
+ monitor.done();
+ }
+
+ });
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+
+ return null;
+ }
+
+ protected void runOpenCustomizationDialog(Shell shell) {
+ Dialog dialog = new CustomizationDialog(shell);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+ }
+
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/RemoveContextAction.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/RemoveContextAction.java new file mode 100644 index 00000000000..971b7890a46 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/ui/RemoveContextAction.java @@ -0,0 +1,72 @@ +/***************************************************************************** + * Copyright (c) 2011, 2013 CEA LIST. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation + * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO) + *****************************************************************************/ +package org.eclipse.papyrus.views.properties.toolsmiths.ui; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.papyrus.infra.properties.contexts.Context; +import org.eclipse.papyrus.infra.properties.internal.ui.runtime.IInternalConfigurationManager; +import org.eclipse.papyrus.infra.properties.ui.runtime.PropertiesRuntime; +import org.eclipse.papyrus.views.properties.toolsmiths.Activator; +import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.IContextDeleteAction; +import org.eclipse.swt.widgets.Display; + +/** + * An action to delete an existing context. This action cannot be undone. + * If you simply want to disable an existing context, see {@link ConfigurationManager#disableContext(Context)} + * + * @author Camille Letavernier + */ +public class RemoveContextAction { + + private IContextDeleteAction delegate; + + public RemoveContextAction(IContextDeleteAction delegate) { + super(); + + this.delegate = delegate; + } + + /** + * Deletes the given context. + * + * @param sourceContext + * The context to delete + */ + public void removeContext(final Context sourceContext) { + // TODO : Close editors for the context being deleted + ProgressMonitorDialog dialog = new ProgressMonitorDialog(Display.getCurrent().getActiveShell()); + try { + dialog.run(false, false, new IRunnableWithProgress() { + + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + try { + IInternalConfigurationManager mgr = (IInternalConfigurationManager) PropertiesRuntime.getConfigurationManager(); + delegate.delete(sourceContext, monitor); + mgr.deleteContext(sourceContext); + } catch (CoreException ex) { + Activator.log.error(ex); + } + } + + }); + } catch (Exception ex) { + Activator.log.error(ex); + } + } +} diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ActionUtil.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ActionUtil.java new file mode 100644 index 00000000000..4033fec91ad --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ActionUtil.java @@ -0,0 +1,85 @@ +/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.util;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+
+/**
+ * Utility class for Actions
+ *
+ * @author Camille Letavernier
+ *
+ */
+public class ActionUtil {
+
+ /**
+ * EMF can only handle collections of EObjects. However, as the
+ * customization plugin relies a lot on EMF Facet, we often have to handle
+ * objects that can be adapted to EObjects, but are not EObjects
+ * themselves. This method adapts a collections of such objects to their
+ * underlying EObjects, so that EMF can handle them.
+ * Objects that cannot be adapted remain as-is in the collection.
+ *
+ * @param selection
+ * The collection to adapt
+ * @return
+ * The adapted selection
+ */
+ public static Collection<Object> getAdaptedSelection(Collection<? extends Object> selection) {
+ Collection<Object> newSelection = new LinkedList<Object>();
+ for (Object o : selection) {
+ EObject semantic = EMFHelper.getEObject(o);
+ newSelection.add(semantic == null ? o : semantic);
+ }
+ return newSelection;
+ }
+
+ /**
+ * EMF can only handle ISelection containing EObjects. However, as the
+ * customization plugin relies a lot on EMF Facet, we often have to handle
+ * objects that can be adapted to EObjects, but are not EObjects
+ * themselves. This method adapts a ISelection of such objects to their
+ * underlying EObjects, so that EMF can handle them.
+ * Objects that cannot be adapted remain as-is in the selection.
+ *
+ * @param sourceSelection
+ * The selection to adapt
+ * @return
+ * The adapted selection
+ */
+ public static ISelection getAdaptedSelection(ISelection sourceSelection) {
+ if (sourceSelection instanceof StructuredSelection) {
+ StructuredSelection currentSelection = (StructuredSelection) sourceSelection;
+ List<Object> newSelection = new LinkedList<Object>();
+
+ Iterator<?> it = currentSelection.iterator();
+ while (it.hasNext()) {
+ Object object = it.next();
+ EObject eObject = EMFHelper.getEObject(object);
+ newSelection.add(eObject == null ? object : eObject);
+ }
+
+ StructuredSelection selection = new StructuredSelection(newSelection);
+ return selection;
+ } else {
+ return sourceSelection;
+ }
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ProjectUtil.java b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ProjectUtil.java new file mode 100644 index 00000000000..7ac3b142998 --- /dev/null +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties.toolsmiths/src/org/eclipse/papyrus/views/properties/toolsmiths/util/ProjectUtil.java @@ -0,0 +1,134 @@ +/*****************************************************************************
+ * Copyright (c) 2010, 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Factor out workspace storage for pluggable storage providers (CDO)
+ *****************************************************************************/
+package org.eclipse.papyrus.views.properties.toolsmiths.util;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.papyrus.infra.properties.contexts.Context;
+import org.eclipse.papyrus.infra.properties.contexts.Section;
+import org.eclipse.papyrus.views.properties.toolsmiths.Activator;
+import org.eclipse.papyrus.views.properties.toolsmiths.storage.actions.workspace.WorkspaceContextCopyAction;
+
+/**
+ * The Eclipse Editors can only handle files from the workspace. However, when
+ * customizing a Property view, we don't want to pollute the user's workspace.
+ * The Customization Editor uses a hidden Project. The files are physically
+ * stored in the plugin's preferences folder, in the workspace metadata.
+ * These methods cannot be applied on contexts registered via plugin extensions,
+ * as they are read-only. For such contexts, you need to first copy them,
+ * and edit the copy.
+ *
+ * @see WorkspaceContextCopyAction
+ *
+ * @author Camille Letavernier
+ */
+public class ProjectUtil {
+
+ /**
+ * The name of the customization's hidden project
+ */
+ public static final String CUSTOM_PROJECT_NAME = "org.eclipse.papyrus.customization.properties.internal"; //$NON-NLS-1$
+
+ /**
+ *
+ * @param context
+ * The context we want to edit
+ * @return
+ * The IFile containing the given context. This IFile can be passed
+ * to an Eclipse editor
+ * @throws CoreException
+ * If an error occured
+ */
+ public static IFile getContextFile(Context context) throws CoreException {
+ IFolder projectFolder = getContextFolder(context);
+
+ IFile contextFile = projectFolder.getFile(context.getName() + ".ctx"); //$NON-NLS-1$
+
+ return contextFile;
+ }
+
+ /**
+ * @return the hidden IProject used by the customization plugin
+ * @throws CoreException
+ * If an error occured
+ */
+ public static IProject getContextProject() throws CoreException {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject custom = workspace.getRoot().getProject(CUSTOM_PROJECT_NAME);
+ if (!custom.exists()) {
+ IProjectDescription description = workspace.newProjectDescription(CUSTOM_PROJECT_NAME);
+ IPath customProjectPath = Activator.getDefault().getPreferencesPath().append("/" + CUSTOM_PROJECT_NAME); //$NON-NLS-1$
+ description.setLocation(customProjectPath);
+ custom.create(description, null);
+ custom.open(null);
+ }
+
+ if (!custom.isOpen()) {
+ custom.open(null);
+ }
+
+ custom.setHidden(true);
+ workspace.getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+
+ return custom;
+ }
+
+ /**
+ * Return the IFolder containing the given context
+ *
+ * @param context
+ * The context for which we want to get its IFolder
+ * @return
+ * The IFolder containing the given context
+ * @throws CoreException
+ * If an error occured
+ */
+ public static IFolder getContextFolder(Context context) throws CoreException {
+ IProject project = getContextProject();
+
+ IFolder projectFolder = project.getFolder(context.getName());
+
+ if (!projectFolder.exists()) {
+ String referencedFolderPath = new File(context.eResource().getURI().toFileString()).getParent();
+ projectFolder.createLink(new Path(referencedFolderPath), IResource.REPLACE, null);
+ }
+
+ return projectFolder;
+ }
+
+ /**
+ * Return the IFile containing the section's XWT Resource
+ *
+ * @param section
+ * The section we want to edit
+ * @return
+ * The IFile containing the section's XWT Resource
+ * @throws CoreException
+ * If an error occured
+ */
+ public static IFile getSectionFile(Section section) throws CoreException {
+ IFolder projectFolder = getContextFolder((Context) (section.eContainer()).eContainer());
+ IFile sectionFile = projectFolder.getFile(section.getSectionFile());
+ return sectionFile;
+ }
+}
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/pom.xml b/plugins/views/properties/org.eclipse.papyrus.views.properties/pom.xml index 974dcd1395c..5819fd470bc 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/pom.xml +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/pom.xml @@ -1,11 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<project>
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> +
<parent>
<artifactId>org.eclipse.papyrus.views-properties</artifactId>
<groupId>org.eclipse.papyrus</groupId>
<version>0.0.1-SNAPSHOT</version>
- </parent>
+ </parent> +
<artifactId>org.eclipse.papyrus.views.properties</artifactId>
<version>3.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
diff --git a/plugins/views/properties/pom.xml b/plugins/views/properties/pom.xml index e7405bfdb60..319428527b5 100644 --- a/plugins/views/properties/pom.xml +++ b/plugins/views/properties/pom.xml @@ -1,17 +1,22 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<project> +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <artifactId>org.eclipse.papyrus.views-properties</artifactId> - <packaging>pom</packaging> + <parent> <groupId>org.eclipse.papyrus</groupId> <artifactId>org.eclipse.papyrus.views</artifactId> <version>0.0.1-SNAPSHOT</version> </parent> + <artifactId>org.eclipse.papyrus.views-properties</artifactId> + <packaging>pom</packaging> + <name>Papyrus Properties View</name> <description>The plug-ins comprising the Papyrus Properties view configuration management and storage. For the Properties UI framework, refer to the /plugins/infra/properties module.</description> <modules> <module>org.eclipse.papyrus.views.properties</module> + <module>org.eclipse.papyrus.views.properties.model.xwt</module> + <module>org.eclipse.papyrus.views.properties.toolsmiths</module> </modules> </project> |