Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2018-01-09 10:09:46 +0000
committerQuentin Le Menez2018-01-09 13:18:15 +0000
commitd98116b5b376f18b6cf626ba4158a35fe9a4a64e (patch)
tree4458c9c5ada0a216b385813a56ea9a9b8c7b6509 /plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors
parent453e99bc2dcbd5fabad100f9d0d5f682013c3b19 (diff)
downloadorg.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.gz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.tar.xz
org.eclipse.papyrus-d98116b5b376f18b6cf626ba4158a35fe9a4a64e.zip
Bug 515367 - [releng] Uniformization of the end of lines to Unix standard
- Format the EOL of all the files matched by: grep -rIUs . | xargs -Ifile dos2unix -k 'file' Change-Id: I5c41d540a9a67b50de9b912ab35e16cc9a912961 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.classpath14
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs590
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/API.README.txt40
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/META-INF/MANIFEST.MF58
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/about.html54
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/build.properties44
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.ecore60
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.genmodel70
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors24
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.properties36
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.xml104
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/celleditors.exsd240
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/commandFactories.exsd222
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/compositeEditorFactories.exsd266
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/AbstractCellEditorComposite.java268
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/CellEditorsUtils.java130
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICellEditorsRegistry.java158
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactoriesRegistry.java74
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactory.java60
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICompositeEditorFactory.java92
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IListener.java32
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditHandler.java42
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditor.java100
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorContainer.java50
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorValidator.java36
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEAttributeCellEditor.java92
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEReferenceCellEditor.java122
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryFeatureCellEditor.java80
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IValidator.java50
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget.java68
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget2.java86
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registries/ICompositeEditorFactoriesRegistry.java76
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registry/ICompositeEditorFactoriesRegistry.java66
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Activator.java138
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CellEditorsRegistry.java678
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CommandFactoriesRegistry.java198
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/DefaultCommandFactory.java124
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Messages.java106
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditor.java160
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditorContainer.java76
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/composite/registries/CompositeEditorFactoriesRegistry.java244
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/EEnumCellEditor.java124
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryAttributeCellEditor.java108
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryReferenceCellEditor.java110
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/UnaryReferenceCellEditor.java106
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/AbstractIResourceComposite.java298
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIFileComposite.java150
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIProjectComposite.java154
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIResourceComposite.java110
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumComposite.java266
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumeratorComposite.java134
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/UnaryReferenceCellEditorComposite.java502
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIFileCompositeFactory.java58
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIProjectCompositeFactory.java54
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIResourceCompositeFactory.java58
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/messages.properties76
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AbstractNaryEditingDialog.java282
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AssignableValuesContentProvider.java162
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/EditingUtils.java168
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/FeatureValuesInput.java64
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/ModelCellsEditingSupport.java260
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryAttributeEditingDialog.java750
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryReferenceEditingDialog.java980
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/AbstractModelCellEditor.java202
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/BasicCellEditor.java120
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorDeclarations.java100
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorFactory.java156
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorPackage.java1072
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/NaryFeatureCellEditor.java122
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/UnaryReferenceCellEditor.java120
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/AbstractModelCellEditorImpl.java518
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/BasicCellEditorImpl.java366
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorDeclarationsImpl.java322
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorFactoryImpl.java288
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorPackageImpl.java762
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/NaryFeatureCellEditorImpl.java366
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/UnaryReferenceCellEditorImpl.java372
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/util/ModelCellEditorAdapterFactory.java422
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/util/ModelCellEditorSwitch.java476
79 files changed, 7993 insertions, 7993 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.classpath b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.classpath
index 45f024e850e..304e86186aa 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.classpath
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs
index 73da3815343..0de02b374f2 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs
@@ -1,295 +1,295 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=260
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=false
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=260
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/API.README.txt b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/API.README.txt
index 70003f15323..4bb20ffce1d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/API.README.txt
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/API.README.txt
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339723 - Add x-friend on EMF Facet internal package
- * Nicolas Guyomar (Mia-Software) - Bug 340976 - Missing x-friend in celleditors plug-in
- *******************************************************************************/
-
-org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.util
- x-friends:="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit" for EMF Facet internal use
-
-org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core
- x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable" for EMF Facet internal use
-
-org.eclipse.papyrus.emf.facet.widgets.celleditors.internal
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339723 - Add x-friend on EMF Facet internal package
+ * Nicolas Guyomar (Mia-Software) - Bug 340976 - Missing x-friend in celleditors plug-in
+ *******************************************************************************/
+
+org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.util
+ x-friends:="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit" for EMF Facet internal use
+
+org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core
+ x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable" for EMF Facet internal use
+
+org.eclipse.papyrus.emf.facet.widgets.celleditors.internal
x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable" for EMF Facet internal use \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/META-INF/MANIFEST.MF b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/META-INF/MANIFEST.MF
index 243e393c9ad..52aca66cee1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/META-INF/MANIFEST.MF
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/META-INF/MANIFEST.MF
@@ -1,29 +1,29 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.emf.facet.widgets.celleditors,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable",
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries;x-internal:=true,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable",
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;x-internal:=true,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;x-internal:=true,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;x-internal:=true,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl;x-internal:=true,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.util;x-friends:="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit"
-Require-Bundle: org.eclipse.papyrus.emf.facet.widgets;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.ui.workbench;bundle-version="[3.108.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.papyrus.emf.facet.util.core;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.emf.facet.util.emf.core;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.emf.facet.util.emf.ui;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.emf.facet.efacet.metamodel;bundle-version="[1.2.0,2.0.0)"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Version: 1.2.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.emf.facet.widgets.celleditors;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.emf.facet.widgets.celleditors,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable",
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries;x-internal:=true,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;x-friends:="org.eclipse.papyrus.emf.facet.widgets.nattable",
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;x-internal:=true,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;x-internal:=true,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;x-internal:=true,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl;x-internal:=true,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.util;x-friends:="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit"
+Require-Bundle: org.eclipse.papyrus.emf.facet.widgets;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.ui.workbench;bundle-version="[3.108.0,4.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.papyrus.emf.facet.util.core;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.emf.facet.util.emf.core;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.emf.facet.util.emf.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.emf.facet.efacet.metamodel;bundle-version="[1.2.0,2.0.0)"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.emf.facet.widgets.celleditors;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/about.html b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/about.html
index 5307f42da98..1899b56c7a1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/about.html
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>November 26, 2010</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 26, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
</html> \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/build.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/build.properties
index 25ae2eece28..e2786e1822b 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/build.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/build.properties
@@ -1,22 +1,22 @@
-###############################################################################
-# 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:
-# Nicolas Bros (Mia-Software) - initial API and implementation
-###############################################################################
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties,\
- schema/,\
- model/,\
- about.html,\
- org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-src.includes = about.html
+###############################################################################
+# 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:
+# Nicolas Bros (Mia-Software) - initial API and implementation
+###############################################################################
+bin.includes = .,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ schema/,\
+ model/,\
+ about.html,\
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.ecore b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.ecore
index 3df2dec1ac4..cd04bcb8b09 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.ecore
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.ecore
@@ -1,30 +1,30 @@
-<?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="modelCellEditor"
- nsURI="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"
- nsPrefix="modelCellEditor">
- <eClassifiers xsi:type="ecore:EClass" name="ModelCellEditorDeclarations">
- <eStructuralFeatures xsi:type="ecore:EReference" name="modelCellEditors" upperBound="-1"
- eType="#//AbstractModelCellEditor" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="AbstractModelCellEditor" abstract="true">
- <eOperations name="getModelCellEditorImpl" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="cellType" lowerBound="1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClassifier"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="cellId" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="BasicCellEditor" eSuperTypes="#//AbstractModelCellEditor">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="basicCellEditorImpl" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="UnaryReferenceCellEditor" eSuperTypes="#//AbstractModelCellEditor">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="unaryReferenceCellEditorImpl"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="NaryFeatureCellEditor" eSuperTypes="#//AbstractModelCellEditor">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="naryFeatureCellEditorImpl"
- lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
-</ecore:EPackage>
+<?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="modelCellEditor"
+ nsURI="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"
+ nsPrefix="modelCellEditor">
+ <eClassifiers xsi:type="ecore:EClass" name="ModelCellEditorDeclarations">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="modelCellEditors" upperBound="-1"
+ eType="#//AbstractModelCellEditor" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractModelCellEditor" abstract="true">
+ <eOperations name="getModelCellEditorImpl" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="cellType" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClassifier"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="cellId" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BasicCellEditor" eSuperTypes="#//AbstractModelCellEditor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="basicCellEditorImpl" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="UnaryReferenceCellEditor" eSuperTypes="#//AbstractModelCellEditor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="unaryReferenceCellEditorImpl"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NaryFeatureCellEditor" eSuperTypes="#//AbstractModelCellEditor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="naryFeatureCellEditorImpl"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.genmodel b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.genmodel
index f7e217a43e7..d809fc14bc0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.genmodel
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/model/celleditors.genmodel
@@ -1,35 +1,35 @@
-<?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" copyrightText="Copyright (c) 2010 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Nicolas Bros (Mia-Software) - initial API and implementation"
- modelDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors/src" editDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors.edit/src"
- editorDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors.editor/src" modelPluginID="org.eclipse.papyrus.emf.facet.widgets.celleditors"
- modelName="Celleditors" modelPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.CelleditorsPlugin"
- editPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit.CelleditorsEditPlugin"
- editorPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.editor.CelleditorsEditorPlugin"
- testSuiteClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.tests.CelleditorsAllTests"
- importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
- editPluginID="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit" classNamePattern="">
- <foreignModel>celleditors.ecore</foreignModel>
- <genPackages prefix="ModelCellEditor" basePackage="org.eclipse.papyrus.emf.facet.widgets.celleditors"
- disposableProviderFactory="true" contentTypeIdentifier="" fileExtensions="modelcelleditors"
- ecorePackage="celleditors.ecore#/">
- <genClasses ecoreClass="celleditors.ecore#//ModelCellEditorDeclarations">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference celleditors.ecore#//ModelCellEditorDeclarations/modelCellEditors"/>
- </genClasses>
- <genClasses image="false" ecoreClass="celleditors.ecore#//AbstractModelCellEditor">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference celleditors.ecore#//AbstractModelCellEditor/cellType"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//AbstractModelCellEditor/cellId"/>
- <genOperations ecoreOperation="celleditors.ecore#//AbstractModelCellEditor/getModelCellEditorImpl"/>
- </genClasses>
- <genClasses ecoreClass="celleditors.ecore#//BasicCellEditor">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//BasicCellEditor/basicCellEditorImpl"/>
- </genClasses>
- <genClasses ecoreClass="celleditors.ecore#//UnaryReferenceCellEditor">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//UnaryReferenceCellEditor/unaryReferenceCellEditorImpl"/>
- </genClasses>
- <genClasses ecoreClass="celleditors.ecore#//NaryFeatureCellEditor">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//NaryFeatureCellEditor/naryFeatureCellEditorImpl"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
+<?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" copyrightText="Copyright (c) 2010 CEA LIST.&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Nicolas Bros (Mia-Software) - initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors/src" editDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors.edit/src"
+ editorDirectory="/org.eclipse.papyrus.emf.facet.widgets.celleditors.editor/src" modelPluginID="org.eclipse.papyrus.emf.facet.widgets.celleditors"
+ modelName="Celleditors" modelPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.CelleditorsPlugin"
+ editPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit.CelleditorsEditPlugin"
+ editorPluginClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.editor.CelleditorsEditorPlugin"
+ testSuiteClass="org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.tests.CelleditorsAllTests"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ editPluginID="org.eclipse.papyrus.emf.facet.widgets.celleditors.edit" classNamePattern="">
+ <foreignModel>celleditors.ecore</foreignModel>
+ <genPackages prefix="ModelCellEditor" basePackage="org.eclipse.papyrus.emf.facet.widgets.celleditors"
+ disposableProviderFactory="true" contentTypeIdentifier="" fileExtensions="modelcelleditors"
+ ecorePackage="celleditors.ecore#/">
+ <genClasses ecoreClass="celleditors.ecore#//ModelCellEditorDeclarations">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference celleditors.ecore#//ModelCellEditorDeclarations/modelCellEditors"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="celleditors.ecore#//AbstractModelCellEditor">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference celleditors.ecore#//AbstractModelCellEditor/cellType"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//AbstractModelCellEditor/cellId"/>
+ <genOperations ecoreOperation="celleditors.ecore#//AbstractModelCellEditor/getModelCellEditorImpl"/>
+ </genClasses>
+ <genClasses ecoreClass="celleditors.ecore#//BasicCellEditor">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//BasicCellEditor/basicCellEditorImpl"/>
+ </genClasses>
+ <genClasses ecoreClass="celleditors.ecore#//UnaryReferenceCellEditor">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//UnaryReferenceCellEditor/unaryReferenceCellEditorImpl"/>
+ </genClasses>
+ <genClasses ecoreClass="celleditors.ecore#//NaryFeatureCellEditor">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute celleditors.ecore#//NaryFeatureCellEditor/naryFeatureCellEditorImpl"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors
index 2d5bcde729f..5be8e8e451e 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<modelCellEditor:ModelCellEditorDeclarations 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:modelCellEditor="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor">
- <modelCellEditors xsi:type="modelCellEditor:UnaryReferenceCellEditor" cellId="unaryref_cell" unaryReferenceCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.UnaryReferenceCellEditor">
- <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </modelCellEditors>
- <modelCellEditors xsi:type="modelCellEditor:NaryFeatureCellEditor" cellId="naryref_cell" naryFeatureCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.NaryReferenceCellEditor">
- <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </modelCellEditors>
- <modelCellEditors xsi:type="modelCellEditor:NaryFeatureCellEditor" cellId="naryattr_cell" naryFeatureCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.NaryAttributeCellEditor">
- <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EDataType"/>
- </modelCellEditors>
-</modelCellEditor:ModelCellEditorDeclarations>
+<?xml version="1.0" encoding="UTF-8"?>
+<modelCellEditor:ModelCellEditorDeclarations 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:modelCellEditor="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor">
+ <modelCellEditors xsi:type="modelCellEditor:UnaryReferenceCellEditor" cellId="unaryref_cell" unaryReferenceCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.UnaryReferenceCellEditor">
+ <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </modelCellEditors>
+ <modelCellEditors xsi:type="modelCellEditor:NaryFeatureCellEditor" cellId="naryref_cell" naryFeatureCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.NaryReferenceCellEditor">
+ <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </modelCellEditors>
+ <modelCellEditors xsi:type="modelCellEditor:NaryFeatureCellEditor" cellId="naryattr_cell" naryFeatureCellEditorImpl="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.NaryAttributeCellEditor">
+ <cellType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EDataType"/>
+ </modelCellEditors>
+</modelCellEditor:ModelCellEditorDeclarations>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.properties
index 457e771d78f..7757a98f1d5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.properties
@@ -1,19 +1,19 @@
-###############################################################################
-# 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:
-# Nicolas Bros (Mia-Software) - initial API and implementation
-# Nicolas Guyomar (Mia-Software) - Bug 339899 - everything must be externalized before UI freeze
-###############################################################################
-
-pluginName = Papyrus EMF Facet Celleditors Model
-providerName = Eclipse Modeling Project
-
-celleditors.content-type.name = EMFFacet Model Cell Editors
-celleditors.extension-point.name = Model Cell Editors
-compositeEditors.extension-point.name = Composite Cell Editor Factories
+###############################################################################
+# 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:
+# Nicolas Bros (Mia-Software) - initial API and implementation
+# Nicolas Guyomar (Mia-Software) - Bug 339899 - everything must be externalized before UI freeze
+###############################################################################
+
+pluginName = Papyrus EMF Facet Celleditors Model
+providerName = Eclipse Modeling Project
+
+celleditors.content-type.name = EMFFacet Model Cell Editors
+celleditors.extension-point.name = Model Cell Editors
+compositeEditors.extension-point.name = Composite Cell Editor Factories
command.factories.extension-point.name = Command Factories \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.xml b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.xml
index 74a63179f7c..fcacb8b0ab3 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.xml
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/plugin.xml
@@ -1,52 +1,52 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
-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:
- Nicolas Bros (Mia-Software) - initial API and implementation
- Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- Nicolas Guyomar (Mia-Software) - Bug 339899 - everything must be externalized before UI freeze
--->
-
-<plugin>
- <extension-point id="celleditors" name="%celleditors.extension-point.name" schema="schema/celleditors.exsd"/>
- <extension-point id="commandFactories" name="%command.factories.extension-point.name" schema="schema/commandFactories.exsd"/>
- <extension-point id="compositeEditorFactories" name="%compositeEditors.extension-point.name" schema="schema/compositeEditorFactories.exsd"/>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"
- class="org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage"
- genModel="model/celleditors.genmodel"/>
- </extension>
-
- <!-- so that model editors know they can open it -->
- <extension
- point="org.eclipse.core.contenttype.contentTypes">
- <content-type
- base-type="org.eclipse.emf.ecore.xmi"
- file-extensions="modelCellEditors"
- id="org.eclipse.papyrus.emf.facet.modelCellEditors.contenttype"
- name="%celleditors.content-type.name"
- priority="normal">
- </content-type>
- </extension>
-
- <extension point="org.eclipse.papyrus.emf.facet.widgets.celleditors.celleditors">
- <cellEditorsModel path="org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors"/>
- </extension>
-
- <extension point="org.eclipse.papyrus.emf.facet.widgets.celleditors.compositeEditorFactories">
- <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIResourceCompositeFactory"/>
- <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIFileCompositeFactory"/>
- <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIProjectCompositeFactory"/>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+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:
+ Nicolas Bros (Mia-Software) - initial API and implementation
+ Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ Nicolas Guyomar (Mia-Software) - Bug 339899 - everything must be externalized before UI freeze
+-->
+
+<plugin>
+ <extension-point id="celleditors" name="%celleditors.extension-point.name" schema="schema/celleditors.exsd"/>
+ <extension-point id="commandFactories" name="%command.factories.extension-point.name" schema="schema/commandFactories.exsd"/>
+ <extension-point id="compositeEditorFactories" name="%compositeEditors.extension-point.name" schema="schema/compositeEditorFactories.exsd"/>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"
+ class="org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage"
+ genModel="model/celleditors.genmodel"/>
+ </extension>
+
+ <!-- so that model editors know they can open it -->
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.emf.ecore.xmi"
+ file-extensions="modelCellEditors"
+ id="org.eclipse.papyrus.emf.facet.modelCellEditors.contenttype"
+ name="%celleditors.content-type.name"
+ priority="normal">
+ </content-type>
+ </extension>
+
+ <extension point="org.eclipse.papyrus.emf.facet.widgets.celleditors.celleditors">
+ <cellEditorsModel path="org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors"/>
+ </extension>
+
+ <extension point="org.eclipse.papyrus.emf.facet.widgets.celleditors.compositeEditorFactories">
+ <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIResourceCompositeFactory"/>
+ <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIFileCompositeFactory"/>
+ <compositeEditorFactory class="org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories.CoreIProjectCompositeFactory"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/celleditors.exsd b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/celleditors.exsd
index dcb1351c10b..7c2db27ea75 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/celleditors.exsd
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/celleditors.exsd
@@ -1,120 +1,120 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.emf.facet.widgets.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.papyrus.emf.facet.widgets.celleditors" id="celleditors" name="Model Cell Editors"/>
- </appInfo>
- <documentation>
- Use this extension point to register new cell editors.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="cellEditorsModel"/>
- </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="cellEditorsModel">
- <complexType>
- <attribute name="path" type="string" use="required">
- <annotation>
- <documentation>
- The path of a model describing model cell editors.
-This model must be an instance of metamodel &quot;http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor&quot;.
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 0.1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.celleditors&quot;&gt;
- &lt;cellEditorsModel path=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors&quot;/&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiinfo"/>
- </appInfo>
- <documentation>
- The extension is defined in two parts : the extension in the plugin.xml that refers to a model, and the model that defines the cell editors themselves.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- Default cell editors can be found in plug-in org.eclipse.papyrus.emf.facet.widgets.celleditors.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.emf.facet.widgets.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.papyrus.emf.facet.widgets.celleditors" id="celleditors" name="Model Cell Editors"/>
+ </appInfo>
+ <documentation>
+ Use this extension point to register new cell editors.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="cellEditorsModel"/>
+ </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="cellEditorsModel">
+ <complexType>
+ <attribute name="path" type="string" use="required">
+ <annotation>
+ <documentation>
+ The path of a model describing model cell editors.
+This model must be an instance of metamodel &quot;http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor&quot;.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="resource"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ &lt;pre&gt;
+&lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.celleditors&quot;&gt;
+ &lt;cellEditorsModel path=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.modelcelleditors&quot;/&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ The extension is defined in two parts : the extension in the plugin.xml that refers to a model, and the model that defines the cell editors themselves.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ Default cell editors can be found in plug-in org.eclipse.papyrus.emf.facet.widgets.celleditors.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/commandFactories.exsd b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/commandFactories.exsd
index 8261444f19f..9938b8a5bf9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/commandFactories.exsd
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/commandFactories.exsd
@@ -1,111 +1,111 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.emf.facet.widgets.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.papyrus.emf.facet.widgets.celleditors" id="commandFactories" name="Command Factories"/>
- </appInfo>
- <documentation>
- Use this extension point to specify a Command factory that must be used when creating emf.edit Commands for a specific editing domain.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="commandFactory"/>
- </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="commandFactory">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The implementation class of a Command factory.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 0.1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.commandFactories&quot;&gt;
- &lt;commandFactory class=&quot;com.example.MyCommandFactory&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiinfo"/>
- </appInfo>
- <documentation>
- Command factories must implement ICommandFactory, to provide a specialized Command for each editing operation.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- 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
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.emf.facet.widgets.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.papyrus.emf.facet.widgets.celleditors" id="commandFactories" name="Command Factories"/>
+ </appInfo>
+ <documentation>
+ Use this extension point to specify a Command factory that must be used when creating emf.edit Commands for a specific editing domain.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="commandFactory"/>
+ </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="commandFactory">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation class of a Command factory.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.commandFactories&quot;&gt;
+ &lt;commandFactory class=&quot;com.example.MyCommandFactory&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ Command factories must implement ICommandFactory, to provide a specialized Command for each editing operation.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/compositeEditorFactories.exsd b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/compositeEditorFactories.exsd
index 58666a5b882..9ebc67d3f3d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/compositeEditorFactories.exsd
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/schema/compositeEditorFactories.exsd
@@ -1,133 +1,133 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.emf.facet.widget.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.papyrus.emf.facet.widget.celleditors" id="compositeEditorFactories" name="Composite cell editor factories"/>
- </appinfo>
- <documentation>
- Use this extension point to provide new composite cell editors factories, that are used to find the right cell editor composite to use for a given type. Each factory handles a single type.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="compositeEditorFactory"/>
- </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="compositeEditorFactory">
- <annotation>
- <documentation>
- Defines a factory to create composite cell editors for a specific type.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A factory implementation to create composite cell editors for a specific type handled by the factory. The factory must implement CompositeEditorFactory.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 0.9.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.compositeEditorFactories&quot;&gt;
- &lt;compositeEditorFactory class=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories.CoreIResourceCompositeFactory&quot;/&gt;
- &lt;compositeEditorFactory class=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories.CoreIFileCompositeFactory&quot;/&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- &lt;p&gt;
-Composite cell editor factories must implement &lt;tt&gt; org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.CompositeEditorFactory&amp;lt;T&amp;gt;&lt;/tt&gt;
-&lt;/p&gt;
-
-
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- &lt;p&gt;
-Look at cell editor implementations in the following packages:&lt;ul&gt;
-&lt;li&gt;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories
-&lt;li&gt;org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore.composite
-&lt;/ul&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 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
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.emf.facet.widget.celleditors" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.emf.facet.widget.celleditors" id="compositeEditorFactories" name="Composite cell editor factories"/>
+ </appinfo>
+ <documentation>
+ Use this extension point to provide new composite cell editors factories, that are used to find the right cell editor composite to use for a given type. Each factory handles a single type.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="compositeEditorFactory"/>
+ </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="compositeEditorFactory">
+ <annotation>
+ <documentation>
+ Defines a factory to create composite cell editors for a specific type.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A factory implementation to create composite cell editors for a specific type handled by the factory. The factory must implement CompositeEditorFactory.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ 0.9.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.compositeEditorFactories&quot;&gt;
+ &lt;compositeEditorFactory class=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories.CoreIResourceCompositeFactory&quot;/&gt;
+ &lt;compositeEditorFactory class=&quot;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories.CoreIFileCompositeFactory&quot;/&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ &lt;p&gt;
+Composite cell editor factories must implement &lt;tt&gt; org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.CompositeEditorFactory&amp;lt;T&amp;gt;&lt;/tt&gt;
+&lt;/p&gt;
+
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ &lt;p&gt;
+Look at cell editor implementations in the following packages:&lt;ul&gt;
+&lt;li&gt;org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.factories
+&lt;li&gt;org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore.composite
+&lt;/ul&gt;
+&lt;/p&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2011 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
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/AbstractCellEditorComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/AbstractCellEditorComposite.java
index 74abdc37468..5dd4827c04f 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/AbstractCellEditorComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/AbstractCellEditorComposite.java
@@ -1,134 +1,134 @@
-/*****************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Gregoire Dupe (Mia-Software) - Bug 339998 - public methods of AbstractCellEditorComposite have to be protected
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public abstract class AbstractCellEditorComposite<T> extends Composite implements IWidget<T>,
- IWidget2<T> {
-
- private final List<IListener> commitListeners;
- private final List<IListener> changeListeners;
- @Deprecated
- private final List<Listener> compatibilityCommitListeners;
- private final IValidator defaultValidator = new IValidator() {
- public IStatus validate(final Object object) {
- return Status.OK_STATUS;
- }
- };
-
- public AbstractCellEditorComposite(final Composite parent) {
- this(parent, SWT.NONE);
- }
-
- @SuppressWarnings("deprecation")
- /* backwards-compatibility */
- public AbstractCellEditorComposite(final Composite parent, final int style) {
- super(parent, style);
- this.compatibilityCommitListeners = new ArrayList<Listener>();
- this.commitListeners = new ArrayList<IListener>();
- this.changeListeners = new ArrayList<IListener>();
- }
-
- /** @deprecated use {@link AbstractCellEditorComposite#addCommitListener(IListener)} */
- @Deprecated
- public void addCommitListener(final Listener listener) {
- synchronized (this.compatibilityCommitListeners) {
- if (!this.compatibilityCommitListeners.contains(listener)) {
- this.compatibilityCommitListeners.add(listener);
- }
- }
- }
-
- /** @deprecated use {@link AbstractCellEditorComposite#removeCommitListener(IListener)} */
- @Deprecated
- public void removeCommitListener(final Listener listener) {
- synchronized (this.compatibilityCommitListeners) {
- this.compatibilityCommitListeners.remove(listener);
- }
- }
-
- public void addCommitListener(final IListener listener) {
- synchronized (this.commitListeners) {
- if (!this.commitListeners.contains(listener)) {
- this.commitListeners.add(listener);
- }
- }
- }
-
- public void removeCommitListener(final IListener listener) {
- synchronized (this.commitListeners) {
- this.commitListeners.remove(listener);
- }
- }
-
- @SuppressWarnings("deprecation")
- /* backwards-compatibility */
- protected final void fireCommit() {
- synchronized (this.compatibilityCommitListeners) {
- for (Listener commitListener : new ArrayList<Listener>(
- this.compatibilityCommitListeners)) {
- commitListener.handleEvent(new Event());
- }
- }
- synchronized (this.commitListeners) {
- for (IListener commitListener : new ArrayList<IListener>(this.commitListeners)) {
- commitListener.handleEvent();
- }
- }
- }
-
- public void addChangeListener(final IListener listener) {
- synchronized (this.changeListeners) {
- if (!this.changeListeners.contains(listener)) {
- this.changeListeners.add(listener);
- }
- }
- }
-
- public void removeChangeListener(final IListener listener) {
- synchronized (this.changeListeners) {
- this.changeListeners.remove(listener);
- }
- }
-
- protected final void fireChanged() {
- synchronized (this.changeListeners) {
- for (IListener changeListener : new ArrayList<IListener>(this.changeListeners)) {
- changeListener.handleEvent();
- }
- }
- }
-
- public IValidator getValidator() {
- // always valid by default
- return this.defaultValidator;
- }
-
- protected final void close() {
- if (!isDisposed()) {
- getParent().forceFocus();
- dispose();
- }
- }
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Gregoire Dupe (Mia-Software) - Bug 339998 - public methods of AbstractCellEditorComposite have to be protected
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+public abstract class AbstractCellEditorComposite<T> extends Composite implements IWidget<T>,
+ IWidget2<T> {
+
+ private final List<IListener> commitListeners;
+ private final List<IListener> changeListeners;
+ @Deprecated
+ private final List<Listener> compatibilityCommitListeners;
+ private final IValidator defaultValidator = new IValidator() {
+ public IStatus validate(final Object object) {
+ return Status.OK_STATUS;
+ }
+ };
+
+ public AbstractCellEditorComposite(final Composite parent) {
+ this(parent, SWT.NONE);
+ }
+
+ @SuppressWarnings("deprecation")
+ /* backwards-compatibility */
+ public AbstractCellEditorComposite(final Composite parent, final int style) {
+ super(parent, style);
+ this.compatibilityCommitListeners = new ArrayList<Listener>();
+ this.commitListeners = new ArrayList<IListener>();
+ this.changeListeners = new ArrayList<IListener>();
+ }
+
+ /** @deprecated use {@link AbstractCellEditorComposite#addCommitListener(IListener)} */
+ @Deprecated
+ public void addCommitListener(final Listener listener) {
+ synchronized (this.compatibilityCommitListeners) {
+ if (!this.compatibilityCommitListeners.contains(listener)) {
+ this.compatibilityCommitListeners.add(listener);
+ }
+ }
+ }
+
+ /** @deprecated use {@link AbstractCellEditorComposite#removeCommitListener(IListener)} */
+ @Deprecated
+ public void removeCommitListener(final Listener listener) {
+ synchronized (this.compatibilityCommitListeners) {
+ this.compatibilityCommitListeners.remove(listener);
+ }
+ }
+
+ public void addCommitListener(final IListener listener) {
+ synchronized (this.commitListeners) {
+ if (!this.commitListeners.contains(listener)) {
+ this.commitListeners.add(listener);
+ }
+ }
+ }
+
+ public void removeCommitListener(final IListener listener) {
+ synchronized (this.commitListeners) {
+ this.commitListeners.remove(listener);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ /* backwards-compatibility */
+ protected final void fireCommit() {
+ synchronized (this.compatibilityCommitListeners) {
+ for (Listener commitListener : new ArrayList<Listener>(
+ this.compatibilityCommitListeners)) {
+ commitListener.handleEvent(new Event());
+ }
+ }
+ synchronized (this.commitListeners) {
+ for (IListener commitListener : new ArrayList<IListener>(this.commitListeners)) {
+ commitListener.handleEvent();
+ }
+ }
+ }
+
+ public void addChangeListener(final IListener listener) {
+ synchronized (this.changeListeners) {
+ if (!this.changeListeners.contains(listener)) {
+ this.changeListeners.add(listener);
+ }
+ }
+ }
+
+ public void removeChangeListener(final IListener listener) {
+ synchronized (this.changeListeners) {
+ this.changeListeners.remove(listener);
+ }
+ }
+
+ protected final void fireChanged() {
+ synchronized (this.changeListeners) {
+ for (IListener changeListener : new ArrayList<IListener>(this.changeListeners)) {
+ changeListener.handleEvent();
+ }
+ }
+ }
+
+ public IValidator getValidator() {
+ // always valid by default
+ return this.defaultValidator;
+ }
+
+ protected final void close() {
+ if (!isDisposed()) {
+ getParent().forceFocus();
+ dispose();
+ }
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/CellEditorsUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/CellEditorsUtils.java
index a7e1877c4f3..a5553e686eb 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/CellEditorsUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/CellEditorsUtils.java
@@ -1,65 +1,65 @@
-/*******************************************************************************
- * 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
- *
- * Vincent Lorenzo (CEA-LIST) - Bug 351931 - Use local cell editor in table
- * Gregoire Dupe (Mia-Software) - Bug 351931 - Use local cell editor in table
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.Iterator;
-import java.util.List;
-
-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.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
-
-/**
- * @since 0.1.1
- * @author gdupe
- *
- */
-public final class CellEditorsUtils {
-
- private static final String FILE_EXTENSION = "modelcelleditors"; //$NON-NLS-1$
-
- private CellEditorsUtils() {
- // This is an utility class which must not be instantiated
- }
-
- /**
- * This method allows to find the bundle name for an editor
- *
- * @param editor
- * an editor
- * @return the bundle name for this editor
- */
- public static String getBundleNameFor(final AbstractModelCellEditor editor, final ResourceSet resourceSet) {
- for (Resource ressource : resourceSet.getResources()) {
- if (CellEditorsUtils.FILE_EXTENSION.equals(ressource.getURI().fileExtension())) {
- Iterator<EObject> allContents = ressource.getContents().iterator();
- while (allContents.hasNext()) {
- EObject currentContent = allContents.next();
- if (currentContent instanceof ModelCellEditorDeclarations) {
- if (((ModelCellEditorDeclarations) currentContent).getModelCellEditors()
- .contains(editor)) {
- URI uri = ressource.getURI();
- if (uri.isPlatformPlugin()) {
- List<String> list = uri.segmentsList();
- return list.get(1);
- }
- }
- }
- }
- }
- }
-
- return null;
- }
-}
+/*******************************************************************************
+ * 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
+ *
+ * Vincent Lorenzo (CEA-LIST) - Bug 351931 - Use local cell editor in table
+ * Gregoire Dupe (Mia-Software) - Bug 351931 - Use local cell editor in table
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.Iterator;
+import java.util.List;
+
+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.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
+
+/**
+ * @since 0.1.1
+ * @author gdupe
+ *
+ */
+public final class CellEditorsUtils {
+
+ private static final String FILE_EXTENSION = "modelcelleditors"; //$NON-NLS-1$
+
+ private CellEditorsUtils() {
+ // This is an utility class which must not be instantiated
+ }
+
+ /**
+ * This method allows to find the bundle name for an editor
+ *
+ * @param editor
+ * an editor
+ * @return the bundle name for this editor
+ */
+ public static String getBundleNameFor(final AbstractModelCellEditor editor, final ResourceSet resourceSet) {
+ for (Resource ressource : resourceSet.getResources()) {
+ if (CellEditorsUtils.FILE_EXTENSION.equals(ressource.getURI().fileExtension())) {
+ Iterator<EObject> allContents = ressource.getContents().iterator();
+ while (allContents.hasNext()) {
+ EObject currentContent = allContents.next();
+ if (currentContent instanceof ModelCellEditorDeclarations) {
+ if (((ModelCellEditorDeclarations) currentContent).getModelCellEditors()
+ .contains(editor)) {
+ URI uri = ressource.getURI();
+ if (uri.isPlatformPlugin()) {
+ List<String> list = uri.segmentsList();
+ return list.get(1);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICellEditorsRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICellEditorsRegistry.java
index 9429f65b1f1..09cc5cf2e01 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICellEditorsRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICellEditorsRegistry.java
@@ -1,80 +1,80 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.CellEditorsRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-
-/** Registry for the "celleditors" extension point */
-public interface ICellEditorsRegistry {
-
- static ICellEditorsRegistry INSTANCE = new CellEditorsRegistry();
-
- List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> getAllCellEditors();
-
- /**
- * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
- * was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- IModelCellEditor getCellEditorFor(EClassifier type);
-
- /**
- * Returns a cell editor to edit a list of values of the given type, or <code>null</code> if
- * none was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- INaryFeatureCellEditor getNaryCellEditorFor(EClassifier type);
-
- /**
- * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
- * was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @param preferredCellEditors
- * the cell editors that should be chosen in case of conflicts (several cell editors
- * defined for the same type)
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- IModelCellEditor getCellEditorFor(EClassifier type,
- List<AbstractModelCellEditor> preferredCellEditors);
-
- /**
- * Returns a cell editor to edit a list of values of the given type, or <code>null</code> if
- * none was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @param preferredCellEditors
- * the cell editors that should be chosen in case of conflicts (several cell editors
- * defined for the same type)
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- INaryFeatureCellEditor getNaryCellEditorFor(EClassifier type,
- List<AbstractModelCellEditor> preferredCellEditors);
-
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.CellEditorsRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+
+/** Registry for the "celleditors" extension point */
+public interface ICellEditorsRegistry {
+
+ static ICellEditorsRegistry INSTANCE = new CellEditorsRegistry();
+
+ List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> getAllCellEditors();
+
+ /**
+ * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
+ * was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ IModelCellEditor getCellEditorFor(EClassifier type);
+
+ /**
+ * Returns a cell editor to edit a list of values of the given type, or <code>null</code> if
+ * none was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ INaryFeatureCellEditor getNaryCellEditorFor(EClassifier type);
+
+ /**
+ * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
+ * was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @param preferredCellEditors
+ * the cell editors that should be chosen in case of conflicts (several cell editors
+ * defined for the same type)
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ IModelCellEditor getCellEditorFor(EClassifier type,
+ List<AbstractModelCellEditor> preferredCellEditors);
+
+ /**
+ * Returns a cell editor to edit a list of values of the given type, or <code>null</code> if
+ * none was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @param preferredCellEditors
+ * the cell editors that should be chosen in case of conflicts (several cell editors
+ * defined for the same type)
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ INaryFeatureCellEditor getNaryCellEditorFor(EClassifier type,
+ List<AbstractModelCellEditor> preferredCellEditors);
+
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactoriesRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactoriesRegistry.java
index 54a135d520f..50c6ab3dc71 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactoriesRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactoriesRegistry.java
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.CommandFactoriesRegistry;
-
-/**
- * Registry for the "commandFactories" extension point. It is used to create EMF {@link Command}s
- * compatible with a given {@link EditingDomain}.
- * <p>
- * For example, a <code>TransactionalEditingDomain</code> doesn't work with the usual EMF commands, and the model must be manipulated with {@link Command}s that use transactions.
- */
-public interface ICommandFactoriesRegistry {
-
- /** the singleton {@link ICommandFactoriesRegistry} */
- static ICommandFactoriesRegistry INSTANCE = new CommandFactoriesRegistry();
-
- /** @return the list of registered command factories */
- List<ICommandFactory> getCommandFactories();
-
- /**
- * @return a command factory compatible with the given {@link EditingDomain}, or <code>null</code> if none is found
- */
- ICommandFactory getCommandFactoryFor(final EditingDomain editingDomain);
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.CommandFactoriesRegistry;
+
+/**
+ * Registry for the "commandFactories" extension point. It is used to create EMF {@link Command}s
+ * compatible with a given {@link EditingDomain}.
+ * <p>
+ * For example, a <code>TransactionalEditingDomain</code> doesn't work with the usual EMF commands, and the model must be manipulated with {@link Command}s that use transactions.
+ */
+public interface ICommandFactoriesRegistry {
+
+ /** the singleton {@link ICommandFactoriesRegistry} */
+ static ICommandFactoriesRegistry INSTANCE = new CommandFactoriesRegistry();
+
+ /** @return the list of registered command factories */
+ List<ICommandFactory> getCommandFactories();
+
+ /**
+ * @return a command factory compatible with the given {@link EditingDomain}, or <code>null</code> if none is found
+ */
+ ICommandFactory getCommandFactoryFor(final EditingDomain editingDomain);
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactory.java
index 74c7719e783..59efc9c1c07 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICommandFactory.java
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-/**
- * Creates {@link Command}s for a specific {@link EditingDomain}.
- * <p>
- * See also {@link ICommandFactoriesRegistry}
- */
-public interface ICommandFactory extends
- org.eclipse.papyrus.emf.facet.util.emf.core.internal.exported.ICommandFactory {
-
- // The content of this interface ha been moved to
- // org.eclipse.papyrus.emf.facet.util.emf.core.internal.exported.ICommandFactory to
- // solve a cyclic
- // dependency issue (with the plug-in org.eclipse.papyrus.emf.facet.custom.ui)
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * Creates {@link Command}s for a specific {@link EditingDomain}.
+ * <p>
+ * See also {@link ICommandFactoriesRegistry}
+ */
+public interface ICommandFactory extends
+ org.eclipse.papyrus.emf.facet.util.emf.core.internal.exported.ICommandFactory {
+
+ // The content of this interface ha been moved to
+ // org.eclipse.papyrus.emf.facet.util.emf.core.internal.exported.ICommandFactory to
+ // solve a cyclic
+ // dependency issue (with the plug-in org.eclipse.papyrus.emf.facet.custom.ui)
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICompositeEditorFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICompositeEditorFactory.java
index 111abfc71d4..919f3a4a11a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICompositeEditorFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/ICompositeEditorFactory.java
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * Copyright (c) 2011 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
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * The factory interface for creating some control {@link AbstractCellEditorComposite} dedicated to the edition of one java
- * type. The developer should register some factories using the dedicated
- * extension point "compositeEditors"
- *
- * @param <T>
- * the java type managed by this composite editor factory.
- */
-public interface ICompositeEditorFactory<T> {
-
- /**
- * @return the type handled by the composite editors created by this factory. This method is
- * required because of type erasure with Java generics.
- */
- Class<T> getHandledType();
-
- /**
- * Create a cell editor composite for a value of type &lt;T&gt;, as a subclass of {@link AbstractCellEditorComposite}, which is a SWT {@link Composite} suited for use as an
- * in-place editor for values of type &lt;T&gt;.
- *
- * @param parent
- * the SWT parent of the new composite
- * @param style
- * SWT style bits ({@link SWT#BORDER}, etc.)
- * @return the new cell editor composite
- */
- AbstractCellEditorComposite<T> createCompositeEditor(Composite parent, int style);
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The factory interface for creating some control {@link AbstractCellEditorComposite} dedicated to the edition of one java
+ * type. The developer should register some factories using the dedicated
+ * extension point "compositeEditors"
+ *
+ * @param <T>
+ * the java type managed by this composite editor factory.
+ */
+public interface ICompositeEditorFactory<T> {
+
+ /**
+ * @return the type handled by the composite editors created by this factory. This method is
+ * required because of type erasure with Java generics.
+ */
+ Class<T> getHandledType();
+
+ /**
+ * Create a cell editor composite for a value of type &lt;T&gt;, as a subclass of {@link AbstractCellEditorComposite}, which is a SWT {@link Composite} suited for use as an
+ * in-place editor for values of type &lt;T&gt;.
+ *
+ * @param parent
+ * the SWT parent of the new composite
+ * @param style
+ * SWT style bits ({@link SWT#BORDER}, etc.)
+ * @return the new cell editor composite
+ */
+ AbstractCellEditorComposite<T> createCompositeEditor(Composite parent, int style);
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IListener.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IListener.java
index 72466a1ead4..ad89e7ec5a9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IListener.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IListener.java
@@ -1,16 +1,16 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-public interface IListener {
- /** Sent when an event that the receiver has registered for occurs. */
- void handleEvent();
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+public interface IListener {
+ /** Sent when an event that the receiver has registered for occurs. */
+ void handleEvent();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditHandler.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditHandler.java
index 93df9d60bf6..feedfa51fce 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditHandler.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditHandler.java
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-public interface IModelCellEditHandler {
- /**
- * Commit the value currently in the cell editor. This will get the value
- * through {@link IModelCellEditor#getValue()} and set it on the model
- * element under the cell.
- */
- void commit();
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+public interface IModelCellEditHandler {
+ /**
+ * Commit the value currently in the cell editor. This will get the value
+ * through {@link IModelCellEditor#getValue()} and set it on the model
+ * element under the cell.
+ */
+ void commit();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditor.java
index b3372841316..eddb6c81b26 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditor.java
@@ -1,50 +1,50 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public interface IModelCellEditor {
-
- /**
- * Initialize a cell for edition. This method must create a control inside
- * the given parent to let the user edit the value.
- *
- * @param parent
- * the SWT control that must contain the cell editor
- * @param originalValue
- * the original value of the cell being edited (that should be
- * displayed in the control initially)
- * @param editHandler
- * call {@link IModelCellEditHandler#commit()} when the user
- * "commits" the value (for example by hitting enter in a text
- * cell editor)
- * @param feature
- * the model feature for which the value is edited
- * @param source
- * the object containing the attribute or reference
- *
- * @return the SWT {@link Control} to be used for capturing the new cell
- * value
- */
- Control activateCell(Composite parent, Object originalValue, IModelCellEditHandler editHandler,
- EStructuralFeature feature, EObject source);
-
- /**
- * @return the value currently in the control. This is the value that will
- * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
- */
- Object getValue();
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public interface IModelCellEditor {
+
+ /**
+ * Initialize a cell for edition. This method must create a control inside
+ * the given parent to let the user edit the value.
+ *
+ * @param parent
+ * the SWT control that must contain the cell editor
+ * @param originalValue
+ * the original value of the cell being edited (that should be
+ * displayed in the control initially)
+ * @param editHandler
+ * call {@link IModelCellEditHandler#commit()} when the user
+ * "commits" the value (for example by hitting enter in a text
+ * cell editor)
+ * @param feature
+ * the model feature for which the value is edited
+ * @param source
+ * the object containing the attribute or reference
+ *
+ * @return the SWT {@link Control} to be used for capturing the new cell
+ * value
+ */
+ Control activateCell(Composite parent, Object originalValue, IModelCellEditHandler editHandler,
+ EStructuralFeature feature, EObject source);
+
+ /**
+ * @return the value currently in the control. This is the value that will
+ * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
+ */
+ Object getValue();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorContainer.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorContainer.java
index 4856d56139e..be39444dc3e 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorContainer.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorContainer.java
@@ -1,25 +1,25 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-
-public interface IModelCellEditorContainer<T extends AbstractModelCellEditor> {
-
- public String getBundleName();
-
- public void setBundleName(String bundleName);
-
- public AbstractModelCellEditor getModelCellEditor();
-
- public void setModelCellEditor(AbstractModelCellEditor modelCellEditor);
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+
+public interface IModelCellEditorContainer<T extends AbstractModelCellEditor> {
+
+ public String getBundleName();
+
+ public void setBundleName(String bundleName);
+
+ public AbstractModelCellEditor getModelCellEditor();
+
+ public void setModelCellEditor(AbstractModelCellEditor modelCellEditor);
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorValidator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorValidator.java
index e0cb65ab152..080679f07fb 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorValidator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IModelCellEditorValidator.java
@@ -1,18 +1,18 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-/** Allows validating a cell editor's value before it is committed */
-public interface IModelCellEditorValidator {
- /** @return whether the given value is valid for this cell editor */
- boolean isValid(Object newValue);
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+/** Allows validating a cell editor's value before it is committed */
+public interface IModelCellEditorValidator {
+ /** @return whether the given value is valid for this cell editor */
+ boolean isValid(Object newValue);
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEAttributeCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEAttributeCellEditor.java
index e437eaedefd..7aa1f3b96ab 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEAttributeCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEAttributeCellEditor.java
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public interface INaryEAttributeCellEditor<T extends Object> {
-
- /**
- * Initialize a cell for edition of a n-ary feature. This method must create
- * a control inside the given parent to let the user edit the value.
- *
- * @param parent
- * the SWT control that must contain the cell editor
- * @param values
- * the actual values of the reference
- * @param feature
- * the feature
- * @param eObject
- * the {@link EObject} being currently edited.
- * @param editHandler
- * @return the SWT {@link Control} to be used for capturing the new cell
- * value
- */
- Control activateCell(Composite parent, List<T> values, IModelCellEditHandler editHandler, EObject eObject, EStructuralFeature feature);
-
- /**
- * @return the value currently in the control. This is the value that will
- * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
- */
- List<T> getValue();
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public interface INaryEAttributeCellEditor<T extends Object> {
+
+ /**
+ * Initialize a cell for edition of a n-ary feature. This method must create
+ * a control inside the given parent to let the user edit the value.
+ *
+ * @param parent
+ * the SWT control that must contain the cell editor
+ * @param values
+ * the actual values of the reference
+ * @param feature
+ * the feature
+ * @param eObject
+ * the {@link EObject} being currently edited.
+ * @param editHandler
+ * @return the SWT {@link Control} to be used for capturing the new cell
+ * value
+ */
+ Control activateCell(Composite parent, List<T> values, IModelCellEditHandler editHandler, EObject eObject, EStructuralFeature feature);
+
+ /**
+ * @return the value currently in the control. This is the value that will
+ * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
+ */
+ List<T> getValue();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEReferenceCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEReferenceCellEditor.java
index 003b8a71899..a33d0a72294 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEReferenceCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryEReferenceCellEditor.java
@@ -1,61 +1,61 @@
-/*******************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public interface INaryEReferenceCellEditor<T extends EObject> {
-
- /**
- * Initialize a cell for edition of a n-ary feature. This method must create
- * a control inside the given parent to let the user edit the value.
- *
- * @param parent
- * the SWT control that must contain the cell editor
- * @param values
- * the actual values of the reference
- * @param availableValues
- * the available value for the reference
- * @param feature
- * the feature
- * @param eObject
- * the {@link EObject} being currently edited.
- * @param editHandler
- * @return the SWT {@link Control} to be used for capturing the new cell
- * value
- */
- Control activateCell(Composite parent, List<T> values, List<T> availableValues, IModelCellEditHandler editHandler, EObject eObject, EStructuralFeature feature);
-
- /*
- * Both lists are given here because in some case, we cannot calculate the the available
- * element, for instance when editing FacetReference, we need to have the FacetContext deal with
- * it.
- *
- * The EStructuralFeature is given here so that in the dialog we can know whether it is a
- * containment one, which has an impact on the edition. It is also needed to instantiate new
- * element, because we need to know its eType.
- *
- * The EObject is only here for dialog customization for instance. Do not modify it in the
- * dialog, the dialog has to return the new values.
- */
-
- /**
- * @return the value currently in the control. This is the value that will
- * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
- */
- List<T> getValue();
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public interface INaryEReferenceCellEditor<T extends EObject> {
+
+ /**
+ * Initialize a cell for edition of a n-ary feature. This method must create
+ * a control inside the given parent to let the user edit the value.
+ *
+ * @param parent
+ * the SWT control that must contain the cell editor
+ * @param values
+ * the actual values of the reference
+ * @param availableValues
+ * the available value for the reference
+ * @param feature
+ * the feature
+ * @param eObject
+ * the {@link EObject} being currently edited.
+ * @param editHandler
+ * @return the SWT {@link Control} to be used for capturing the new cell
+ * value
+ */
+ Control activateCell(Composite parent, List<T> values, List<T> availableValues, IModelCellEditHandler editHandler, EObject eObject, EStructuralFeature feature);
+
+ /*
+ * Both lists are given here because in some case, we cannot calculate the the available
+ * element, for instance when editing FacetReference, we need to have the FacetContext deal with
+ * it.
+ *
+ * The EStructuralFeature is given here so that in the dialog we can know whether it is a
+ * containment one, which has an impact on the edition. It is also needed to instantiate new
+ * element, because we need to know its eType.
+ *
+ * The EObject is only here for dialog customization for instance. Do not modify it in the
+ * dialog, the dialog has to return the new values.
+ */
+
+ /**
+ * @return the value currently in the control. This is the value that will
+ * be set on the model element when {@link IModelCellEditHandler#commit()} is called.
+ */
+ List<T> getValue();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryFeatureCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryFeatureCellEditor.java
index fdb05857770..2e5c748bb66 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryFeatureCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/INaryFeatureCellEditor.java
@@ -1,40 +1,40 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public interface INaryFeatureCellEditor {
-
- /**
- * Initialize a cell for edition of a n-ary feature. This method must create
- * a control inside the given parent to let the user edit the value.
- *
- * @param parent
- * the SWT control that must contain the cell editor
- * @param feature
- * the model feature for which the value is edited
- * @param source
- * the object containing the attribute or reference
- * @param editingDomain
- * the source {@link EObject} must be edited only through this {@link EditingDomain}
- *
- * @return the SWT {@link Control} to be used for capturing the new cell
- * value
- */
- Control activateCell(Composite parent, EStructuralFeature feature, EObject source,
- EditingDomain editingDomain);
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public interface INaryFeatureCellEditor {
+
+ /**
+ * Initialize a cell for edition of a n-ary feature. This method must create
+ * a control inside the given parent to let the user edit the value.
+ *
+ * @param parent
+ * the SWT control that must contain the cell editor
+ * @param feature
+ * the model feature for which the value is edited
+ * @param source
+ * the object containing the attribute or reference
+ * @param editingDomain
+ * the source {@link EObject} must be edited only through this {@link EditingDomain}
+ *
+ * @return the SWT {@link Control} to be used for capturing the new cell
+ * value
+ */
+ Control activateCell(Composite parent, EStructuralFeature feature, EObject source,
+ EditingDomain editingDomain);
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IValidator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IValidator.java
index 070d62733f4..0bdbf8fd859 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IValidator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IValidator.java
@@ -1,25 +1,25 @@
-/*****************************************************************************
- * 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:
- * Gregoire Dupe (Mia-Software) - initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.core.runtime.IStatus;
-
-/** Used to validate the value of a cell editor. */
-public interface IValidator {
- /**
- * Validates the given value for the cell editor.
- *
- * @return an {@link IStatus} with a status of {@link IStatus#OK} if the given value is valid,
- * or with a status of {@link IStatus#ERROR} otherwise.
- */
- IStatus validate(Object value);
-}
+/*****************************************************************************
+ * 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:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.core.runtime.IStatus;
+
+/** Used to validate the value of a cell editor. */
+public interface IValidator {
+ /**
+ * Validates the given value for the cell editor.
+ *
+ * @return an {@link IStatus} with a status of {@link IStatus#OK} if the given value is valid,
+ * or with a status of {@link IStatus#ERROR} otherwise.
+ */
+ IStatus validate(Object value);
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget.java
index e6311410a14..b8e9742d548 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget.java
@@ -1,34 +1,34 @@
-/*****************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software)
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Listener;
-
-/** Implemented by {@link Composite}s that are encapsulated in {@link IModelCellEditor cell editors} */
-public interface IWidget<T extends Object> {
- /** @return the validator used to determine whether an entered value is accepted */
- IValidator getValidator();
-
- /** Add a listener for changes to the value */
- void addCommitListener(Listener listener);
-
- /** Remove an existing listener */
- void removeCommitListener(Listener listener);
-
- /** Set the given value in the widget */
- void setValue(final T value);
-
- /** Get the value from the widget */
- T getValue();
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software)
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Listener;
+
+/** Implemented by {@link Composite}s that are encapsulated in {@link IModelCellEditor cell editors} */
+public interface IWidget<T extends Object> {
+ /** @return the validator used to determine whether an entered value is accepted */
+ IValidator getValidator();
+
+ /** Add a listener for changes to the value */
+ void addCommitListener(Listener listener);
+
+ /** Remove an existing listener */
+ void removeCommitListener(Listener listener);
+
+ /** Set the given value in the widget */
+ void setValue(final T value);
+
+ /** Get the value from the widget */
+ T getValue();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget2.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget2.java
index 09ea2cd9837..a901cfb3c58 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget2.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/IWidget2.java
@@ -1,43 +1,43 @@
-/*****************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software)
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors;
-
-import org.eclipse.swt.widgets.Composite;
-
-/** Implemented by {@link Composite}s that are encapsulated in {@link IModelCellEditor cell editors} */
-public interface IWidget2<T extends Object> {
- /** @return the validator used to determine whether an entered value is accepted */
- IValidator getValidator();
-
- /**
- * Add a listener that is notified when the value in the widget is "committed". That is, when
- * the user hits Enter or clicks outside the widget.
- */
- void addCommitListener(IListener listener);
-
- /** Remove an existing commit listener */
- void removeCommitListener(IListener listener);
-
- /** Add a listener for changes to the value */
- void addChangeListener(IListener listener);
-
- /** Remove an existing change listener */
- void removeChangeListener(IListener listener);
-
- /** Set the given value in the widget */
- void setValue(final T value);
-
- /** Get the value from the widget */
- T getValue();
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software)
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors;
+
+import org.eclipse.swt.widgets.Composite;
+
+/** Implemented by {@link Composite}s that are encapsulated in {@link IModelCellEditor cell editors} */
+public interface IWidget2<T extends Object> {
+ /** @return the validator used to determine whether an entered value is accepted */
+ IValidator getValidator();
+
+ /**
+ * Add a listener that is notified when the value in the widget is "committed". That is, when
+ * the user hits Enter or clicks outside the widget.
+ */
+ void addCommitListener(IListener listener);
+
+ /** Remove an existing commit listener */
+ void removeCommitListener(IListener listener);
+
+ /** Add a listener for changes to the value */
+ void addChangeListener(IListener listener);
+
+ /** Remove an existing change listener */
+ void removeChangeListener(IListener listener);
+
+ /** Set the given value in the widget */
+ void setValue(final T value);
+
+ /** Get the value from the widget */
+ T getValue();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registries/ICompositeEditorFactoriesRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registries/ICompositeEditorFactoriesRegistry.java
index b734498c243..65f5318337a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registries/ICompositeEditorFactoriesRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registries/ICompositeEditorFactoriesRegistry.java
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries;
-
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries.CompositeEditorFactoriesRegistry;
-
-/**
- * Registry for the "compositeEditorFactories" extension point
- *
- * @deprecated replaced by
- * org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite
- * .registry.ICompositeEditorFactoriesRegistry
- */
-@Deprecated
-public interface ICompositeEditorFactoriesRegistry {
-
- /** the singleton {@link ICompositeEditorFactoriesRegistry} */
- ICompositeEditorFactoriesRegistry INSTANCE = new CompositeEditorFactoriesRegistry();
-
- /** Whether there is a {@link CompositeEditorFactory} for the given type */
- boolean hasCompositeEditorFactory(final Class<?> type);
-
- /**
- * @return the {@link CompositeEditorFactory} for the given type, or <code>null</code> if none is
- * registered
- */
- <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type);
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries;
+
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries.CompositeEditorFactoriesRegistry;
+
+/**
+ * Registry for the "compositeEditorFactories" extension point
+ *
+ * @deprecated replaced by
+ * org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite
+ * .registry.ICompositeEditorFactoriesRegistry
+ */
+@Deprecated
+public interface ICompositeEditorFactoriesRegistry {
+
+ /** the singleton {@link ICompositeEditorFactoriesRegistry} */
+ ICompositeEditorFactoriesRegistry INSTANCE = new CompositeEditorFactoriesRegistry();
+
+ /** Whether there is a {@link CompositeEditorFactory} for the given type */
+ boolean hasCompositeEditorFactory(final Class<?> type);
+
+ /**
+ * @return the {@link CompositeEditorFactory} for the given type, or <code>null</code> if none is
+ * registered
+ */
+ <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type);
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registry/ICompositeEditorFactoriesRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registry/ICompositeEditorFactoriesRegistry.java
index 8454a30294d..643ce2c0a8d 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registry/ICompositeEditorFactoriesRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/core/composite/registry/ICompositeEditorFactoriesRegistry.java
@@ -1,33 +1,33 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registry;
-
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries.CompositeEditorFactoriesRegistry;
-
-/**
- * Registry for the "compositeEditorFactories" extension point
- */
-public interface ICompositeEditorFactoriesRegistry {
-
- /** the singleton {@link ICompositeEditorFactoriesRegistry} */
- ICompositeEditorFactoriesRegistry INSTANCE = new CompositeEditorFactoriesRegistry();
-
- /** Whether there is a {@link CompositeEditorFactory} for the given type */
- boolean hasCompositeEditorFactory(final Class<?> type);
-
- /**
- * @return the {@link CompositeEditorFactory} for the given type, or <code>null</code> if none is
- * registered
- */
- <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type);
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registry;
+
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries.CompositeEditorFactoriesRegistry;
+
+/**
+ * Registry for the "compositeEditorFactories" extension point
+ */
+public interface ICompositeEditorFactoriesRegistry {
+
+ /** the singleton {@link ICompositeEditorFactoriesRegistry} */
+ ICompositeEditorFactoriesRegistry INSTANCE = new CompositeEditorFactoriesRegistry();
+
+ /** Whether there is a {@link CompositeEditorFactory} for the given type */
+ boolean hasCompositeEditorFactory(final Class<?> type);
+
+ /**
+ * @return the {@link CompositeEditorFactory} for the given type, or <code>null</code> if none is
+ * registered
+ */
+ <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type);
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Activator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Activator.java
index 7d8a131baf0..9a154655fb8 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Activator.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Activator.java
@@ -1,69 +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:
- * Nicolas Guyomar (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-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.emf.facet.widgets.celleditors"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- Activator.plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
- * )
- */
- @Override
- public void stop(final BundleContext context) throws Exception {
- Activator.plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return Activator.plugin;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 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:
+ * Nicolas Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+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.emf.facet.widgets.celleditors"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ Activator.plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ Activator.plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return Activator.plugin;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CellEditorsRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CellEditorsRegistry.java
index 0632b6d2992..43458ba0088 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CellEditorsRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CellEditorsRegistry.java
@@ -1,340 +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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICellEditorsRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditorContainer;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryFeatureCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor;
-
-/** Registry for the "loadingDepth" extension point */
-public class CellEditorsRegistry extends AbstractRegistry implements ICellEditorsRegistry {
-
- private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "celleditors"; //$NON-NLS-1$
-
- private static final String CELL_EDITORS_MODEL_ELEMENT = "cellEditorsModel"; //$NON-NLS-1$
- private static final String PATH_ATTRIBUTE = "path"; //$NON-NLS-1$
-
- /** A list of basic cell editors */
- private final List<ModelCellEditorContainer<BasicCellEditor>> basicCellEditors = new ArrayList<ModelCellEditorContainer<BasicCellEditor>>();
- /** A list of unary reference cell editors */
- private final List<ModelCellEditorContainer<UnaryReferenceCellEditor>> unaryReferenceCellEditors = new ArrayList<ModelCellEditorContainer<UnaryReferenceCellEditor>>();
- /** A list of n-ary reference cell editors */
- private final List<ModelCellEditorContainer<NaryFeatureCellEditor>> naryFeatureCellEditors = new ArrayList<ModelCellEditorContainer<NaryFeatureCellEditor>>();
-
- public CellEditorsRegistry() {
- initialize();
- }
-
- public List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> getAllCellEditors() {
- List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> allCellEditors = new ArrayList<IModelCellEditorContainer<? extends AbstractModelCellEditor>>();
- for (ModelCellEditorContainer<BasicCellEditor> basicCellEditor : this.basicCellEditors) {
- allCellEditors.add(basicCellEditor);
- }
- for (ModelCellEditorContainer<UnaryReferenceCellEditor> unaryReferenceCellEditor : this.unaryReferenceCellEditors) {
- allCellEditors.add(unaryReferenceCellEditor);
- }
- for (ModelCellEditorContainer<NaryFeatureCellEditor> naryReferenceCellEditor : this.naryFeatureCellEditors) {
- allCellEditors.add(naryReferenceCellEditor);
- }
- return allCellEditors;
- }
-
- /**
- * Returns a cell editor wrapper for the given type, or <code>null</code> if none was found.
- * Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor wrapper
- * @param many
- * whether to get a cell editor to edit a single value or a list of values
- * @return the cell editor wrapper or <code>null</code> if none was found for the given type
- */
- public ModelCellEditor getCellEditorWrapperFor(final EClassifier type, final boolean many) {
- return getCellEditorWrapperFor(type, many, null);
- }
-
- /**
- * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
- * was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- public IModelCellEditor getCellEditorFor(final EClassifier type) {
- ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, false);
- if (cellEditorWrapper != null) {
- return (IModelCellEditor) cellEditorWrapper.getCellEditorImplementation();
- }
- return null;
- }
-
- /**
- * Returns a cell editor wrapper to edit a list of values of the given type, or <code>null</code> if none was found. Custom cell editors override the default ones (from
- * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @return the cell editor wrapper or <code>null</code> if none was found for the given type
- */
- public INaryFeatureCellEditor getNaryCellEditorFor(final EClassifier type) {
- ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, true);
- if (cellEditorWrapper != null) {
- return (INaryFeatureCellEditor) cellEditorWrapper.getCellEditorImplementation();
- }
- return null;
- }
-
- public IModelCellEditor getCellEditorFor(final EClassifier type,
- final List<AbstractModelCellEditor> preferredCellEditors) {
- ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, false,
- preferredCellEditors);
- if (cellEditorWrapper != null) {
- return (IModelCellEditor) cellEditorWrapper.getCellEditorImplementation();
- }
- return null;
- }
-
- public INaryFeatureCellEditor getNaryCellEditorFor(final EClassifier type,
- final List<AbstractModelCellEditor> preferredCellEditors) {
- ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, true,
- preferredCellEditors);
- if (cellEditorWrapper != null) {
- return (INaryFeatureCellEditor) cellEditorWrapper.getCellEditorImplementation();
- }
- return null;
- }
-
- /**
- * Returns a cell editor for the given type, or <code>null</code> if none was found. Custom cell
- * editors override the default ones (from "org.eclipse.papyrus.emf.facet.widgets.celleditors").
- *
- * @param type
- * the type for which to get a cell editor
- * @param many
- * whether to get a cell editor to edit a single value or a list of values
- * @param preferredCellEditors
- * the cell editors that should be chosen in case of conflicts (several cell editors
- * defined for the same type)
- * @return the cell editor or <code>null</code> if none was found for the given type
- */
- public ModelCellEditor getCellEditorWrapperFor(final EClassifier type, final boolean many,
- final List<AbstractModelCellEditor> preferredCellEditors) {
-
- List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> allCellEditorContainers = getAllCellEditors();
-
- List<ModelCellEditor> cellEditors = new ArrayList<ModelCellEditor>();
-
- for (IModelCellEditorContainer<? extends AbstractModelCellEditor> modelCellEditorContainer : allCellEditorContainers) {
- AbstractModelCellEditor modelCellEditor = modelCellEditorContainer.getModelCellEditor();
- if (isCellEditorForType(modelCellEditor, type, many)) {
- cellEditors.add(new ModelCellEditor(modelCellEditorContainer.getBundleName(),
- modelCellEditorContainer.getModelCellEditor()));
- }
- }
-
- ModelCellEditor selectedCellEditor = null;
-
- if (preferredCellEditors != null) {
- for (AbstractModelCellEditor preferredCellEditor : preferredCellEditors) {
- if (isCellEditorForType(preferredCellEditor, type, many)) {
- if (selectedCellEditor != null) {
- throw new IllegalArgumentException(
- "Several preferred cell editors are defined for type: " //$NON-NLS-1$
- + EcoreUtil.getURI(type));
- }
- selectedCellEditor = new ModelCellEditor("", preferredCellEditor); //$NON-NLS-1$
- }
- }
- }
-
- if (selectedCellEditor == null) {
- if (cellEditors.size() == 1) {
- selectedCellEditor = cellEditors.get(0);
- } else if (cellEditors.size() > 1) {
- boolean skippedDefault = false;
- for (ModelCellEditor cellEditor : cellEditors) {
- // lower priority for
- // org.eclipse.papyrus.emf.facet.widgets.celleditors.*
- if (cellEditor.getBundleName().startsWith("org.eclipse.papyrus.emf.facet.widgets.celleditors")) { //$NON-NLS-1$
- if (skippedDefault) {
- Logger.logError(
- "Several default cell editors are defined in EMF Facet for type: " //$NON-NLS-1$
- + EcoreUtil.getURI(type), Activator.getDefault());
- selectedCellEditor = cellEditor;
- break;
- }
- skippedDefault = true;
- continue;
- }
- if (selectedCellEditor != null) {
- Logger.logWarning("Several cell editors are defined for type: " //$NON-NLS-1$
- + EcoreUtil.getURI(type), Activator.getDefault());
- break;
- }
- selectedCellEditor = cellEditor;
- }
- }
- }
-
- return selectedCellEditor;
- }
-
- public static boolean isCellEditorForType(final AbstractModelCellEditor modelCellEditor,
- final EClassifier type, final boolean many) {
- if (many != (modelCellEditor instanceof NaryFeatureCellEditor)) {
- return false;
- }
- return isSuperType(modelCellEditor.getCellType(), type);
- }
-
- private static boolean isSuperType(final EClassifier superType, final EClassifier subType) {
- if (superType == subType) {
- return true;
- }
-
- if (superType instanceof EClass && subType instanceof EClass) {
- // special case because isSuperTypeOf doesn't handle it
- if (superType == EcorePackage.eINSTANCE.getEObject()) {
- return true;
- }
-
- EClass superTypeEClass = (EClass) superType;
- EClass subTypeEClass = (EClass) subType;
- return superTypeEClass.isSuperTypeOf(subTypeEClass);
- }
-
- if (superType == EcorePackage.eINSTANCE.getEDataType() && subType instanceof EDataType) {
- // cf Bug 331539 - cell editor registered for type "EDataType"
- return true;
- }
-
- return false;
- }
-
- public List<ModelCellEditorContainer<BasicCellEditor>> getBasicCellEditors() {
- return this.basicCellEditors;
- }
-
- public List<ModelCellEditorContainer<UnaryReferenceCellEditor>> getUnaryReferenceCellEditors() {
- return this.unaryReferenceCellEditors;
- }
-
- public List<ModelCellEditorContainer<NaryFeatureCellEditor>> getNaryFeatureCellEditors() {
- return this.naryFeatureCellEditors;
- }
-
- @Override
- protected String getExtensionPointName() {
- return CellEditorsRegistry.EXTENSION_POINT_NAME;
- }
-
- @Override
- protected String getExtensionPointNamespace() {
- return CellEditorsRegistry.EXTENSION_POINT_NAMESPACE;
- }
-
- @Override
- protected void handleRootElement(final IConfigurationElement configurationElement) {
- final String name = configurationElement.getName();
- if (name.equalsIgnoreCase(CellEditorsRegistry.CELL_EDITORS_MODEL_ELEMENT)) {
- readModelElement(configurationElement);
- } else {
- logUnknownElement(configurationElement);
- }
- }
-
- /** Read a 'cellEditorsModel' element */
- private void readModelElement(final IConfigurationElement configurationElement) {
- final String path = configurationElement.getAttribute(CellEditorsRegistry.PATH_ATTRIBUTE);
- String bundleName = configurationElement.getContributor().getName();
- URI uri = URI.createURI("platform:/plugin/" //$NON-NLS-1$
- + configurationElement.getContributor().getName() + "/" + path); //$NON-NLS-1$
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.getResource(uri, true);
- if (resource != null) {
- EList<EObject> contents = resource.getContents();
- if (contents.size() == 1) {
- EObject eObject = contents.get(0);
- if (eObject instanceof ModelCellEditorDeclarations) {
- ModelCellEditorDeclarations modelCellEditors = (ModelCellEditorDeclarations) eObject;
- EList<AbstractModelCellEditor> allCellEditors = modelCellEditors
- .getModelCellEditors();
- for (AbstractModelCellEditor modelCellEditor : allCellEditors) {
- if (modelCellEditor instanceof BasicCellEditor) {
- BasicCellEditor basicCellEditor = (BasicCellEditor) modelCellEditor;
- ModelCellEditorContainer<BasicCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<BasicCellEditor>();
- modelCellEditorContainer.setBundleName(bundleName);
- modelCellEditorContainer.setModelCellEditor(basicCellEditor);
- this.basicCellEditors.add(modelCellEditorContainer);
- } else if (modelCellEditor instanceof UnaryReferenceCellEditor) {
- UnaryReferenceCellEditor unaryReferenceCellEditor = (UnaryReferenceCellEditor) modelCellEditor;
- ModelCellEditorContainer<UnaryReferenceCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<UnaryReferenceCellEditor>();
- modelCellEditorContainer.setBundleName(bundleName);
- modelCellEditorContainer.setModelCellEditor(unaryReferenceCellEditor);
- this.unaryReferenceCellEditors.add(modelCellEditorContainer);
- } else if (modelCellEditor instanceof NaryFeatureCellEditor) {
- NaryFeatureCellEditor naryFeatureCellEditor = (NaryFeatureCellEditor) modelCellEditor;
- ModelCellEditorContainer<NaryFeatureCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<NaryFeatureCellEditor>();
- modelCellEditorContainer.setBundleName(bundleName);
- modelCellEditorContainer.setModelCellEditor(naryFeatureCellEditor);
- this.naryFeatureCellEditors.add(modelCellEditorContainer);
- } else {
- Logger.logError("Not handled: " //$NON-NLS-1$
- + modelCellEditor.getClass().getSimpleName(),
- Activator.getDefault());
- }
- }
- } else {
- Logger.logError("Root element must be of type " //$NON-NLS-1$
- + ModelCellEditorDeclarations.class.getSimpleName() + ": " + uri, //$NON-NLS-1$
- Activator.getDefault());
- }
- } else {
- Logger.logError("Resource should have one and only one root: " + uri, //$NON-NLS-1$
- Activator.getDefault());
- }
- } else {
- Logger.logError("Error reading resource: " + uri, Activator.getDefault()); //$NON-NLS-1$
- }
- }
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICellEditorsRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditorContainer;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryFeatureCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor;
+
+/** Registry for the "loadingDepth" extension point */
+public class CellEditorsRegistry extends AbstractRegistry implements ICellEditorsRegistry {
+
+ private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
+ private static final String EXTENSION_POINT_NAME = "celleditors"; //$NON-NLS-1$
+
+ private static final String CELL_EDITORS_MODEL_ELEMENT = "cellEditorsModel"; //$NON-NLS-1$
+ private static final String PATH_ATTRIBUTE = "path"; //$NON-NLS-1$
+
+ /** A list of basic cell editors */
+ private final List<ModelCellEditorContainer<BasicCellEditor>> basicCellEditors = new ArrayList<ModelCellEditorContainer<BasicCellEditor>>();
+ /** A list of unary reference cell editors */
+ private final List<ModelCellEditorContainer<UnaryReferenceCellEditor>> unaryReferenceCellEditors = new ArrayList<ModelCellEditorContainer<UnaryReferenceCellEditor>>();
+ /** A list of n-ary reference cell editors */
+ private final List<ModelCellEditorContainer<NaryFeatureCellEditor>> naryFeatureCellEditors = new ArrayList<ModelCellEditorContainer<NaryFeatureCellEditor>>();
+
+ public CellEditorsRegistry() {
+ initialize();
+ }
+
+ public List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> getAllCellEditors() {
+ List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> allCellEditors = new ArrayList<IModelCellEditorContainer<? extends AbstractModelCellEditor>>();
+ for (ModelCellEditorContainer<BasicCellEditor> basicCellEditor : this.basicCellEditors) {
+ allCellEditors.add(basicCellEditor);
+ }
+ for (ModelCellEditorContainer<UnaryReferenceCellEditor> unaryReferenceCellEditor : this.unaryReferenceCellEditors) {
+ allCellEditors.add(unaryReferenceCellEditor);
+ }
+ for (ModelCellEditorContainer<NaryFeatureCellEditor> naryReferenceCellEditor : this.naryFeatureCellEditors) {
+ allCellEditors.add(naryReferenceCellEditor);
+ }
+ return allCellEditors;
+ }
+
+ /**
+ * Returns a cell editor wrapper for the given type, or <code>null</code> if none was found.
+ * Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor wrapper
+ * @param many
+ * whether to get a cell editor to edit a single value or a list of values
+ * @return the cell editor wrapper or <code>null</code> if none was found for the given type
+ */
+ public ModelCellEditor getCellEditorWrapperFor(final EClassifier type, final boolean many) {
+ return getCellEditorWrapperFor(type, many, null);
+ }
+
+ /**
+ * Returns a cell editor to edit a single value of the given type, or <code>null</code> if none
+ * was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ public IModelCellEditor getCellEditorFor(final EClassifier type) {
+ ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, false);
+ if (cellEditorWrapper != null) {
+ return (IModelCellEditor) cellEditorWrapper.getCellEditorImplementation();
+ }
+ return null;
+ }
+
+ /**
+ * Returns a cell editor wrapper to edit a list of values of the given type, or <code>null</code> if none was found. Custom cell editors override the default ones (from
+ * "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @return the cell editor wrapper or <code>null</code> if none was found for the given type
+ */
+ public INaryFeatureCellEditor getNaryCellEditorFor(final EClassifier type) {
+ ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, true);
+ if (cellEditorWrapper != null) {
+ return (INaryFeatureCellEditor) cellEditorWrapper.getCellEditorImplementation();
+ }
+ return null;
+ }
+
+ public IModelCellEditor getCellEditorFor(final EClassifier type,
+ final List<AbstractModelCellEditor> preferredCellEditors) {
+ ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, false,
+ preferredCellEditors);
+ if (cellEditorWrapper != null) {
+ return (IModelCellEditor) cellEditorWrapper.getCellEditorImplementation();
+ }
+ return null;
+ }
+
+ public INaryFeatureCellEditor getNaryCellEditorFor(final EClassifier type,
+ final List<AbstractModelCellEditor> preferredCellEditors) {
+ ModelCellEditor cellEditorWrapper = getCellEditorWrapperFor(type, true,
+ preferredCellEditors);
+ if (cellEditorWrapper != null) {
+ return (INaryFeatureCellEditor) cellEditorWrapper.getCellEditorImplementation();
+ }
+ return null;
+ }
+
+ /**
+ * Returns a cell editor for the given type, or <code>null</code> if none was found. Custom cell
+ * editors override the default ones (from "org.eclipse.papyrus.emf.facet.widgets.celleditors").
+ *
+ * @param type
+ * the type for which to get a cell editor
+ * @param many
+ * whether to get a cell editor to edit a single value or a list of values
+ * @param preferredCellEditors
+ * the cell editors that should be chosen in case of conflicts (several cell editors
+ * defined for the same type)
+ * @return the cell editor or <code>null</code> if none was found for the given type
+ */
+ public ModelCellEditor getCellEditorWrapperFor(final EClassifier type, final boolean many,
+ final List<AbstractModelCellEditor> preferredCellEditors) {
+
+ List<IModelCellEditorContainer<? extends AbstractModelCellEditor>> allCellEditorContainers = getAllCellEditors();
+
+ List<ModelCellEditor> cellEditors = new ArrayList<ModelCellEditor>();
+
+ for (IModelCellEditorContainer<? extends AbstractModelCellEditor> modelCellEditorContainer : allCellEditorContainers) {
+ AbstractModelCellEditor modelCellEditor = modelCellEditorContainer.getModelCellEditor();
+ if (isCellEditorForType(modelCellEditor, type, many)) {
+ cellEditors.add(new ModelCellEditor(modelCellEditorContainer.getBundleName(),
+ modelCellEditorContainer.getModelCellEditor()));
+ }
+ }
+
+ ModelCellEditor selectedCellEditor = null;
+
+ if (preferredCellEditors != null) {
+ for (AbstractModelCellEditor preferredCellEditor : preferredCellEditors) {
+ if (isCellEditorForType(preferredCellEditor, type, many)) {
+ if (selectedCellEditor != null) {
+ throw new IllegalArgumentException(
+ "Several preferred cell editors are defined for type: " //$NON-NLS-1$
+ + EcoreUtil.getURI(type));
+ }
+ selectedCellEditor = new ModelCellEditor("", preferredCellEditor); //$NON-NLS-1$
+ }
+ }
+ }
+
+ if (selectedCellEditor == null) {
+ if (cellEditors.size() == 1) {
+ selectedCellEditor = cellEditors.get(0);
+ } else if (cellEditors.size() > 1) {
+ boolean skippedDefault = false;
+ for (ModelCellEditor cellEditor : cellEditors) {
+ // lower priority for
+ // org.eclipse.papyrus.emf.facet.widgets.celleditors.*
+ if (cellEditor.getBundleName().startsWith("org.eclipse.papyrus.emf.facet.widgets.celleditors")) { //$NON-NLS-1$
+ if (skippedDefault) {
+ Logger.logError(
+ "Several default cell editors are defined in EMF Facet for type: " //$NON-NLS-1$
+ + EcoreUtil.getURI(type), Activator.getDefault());
+ selectedCellEditor = cellEditor;
+ break;
+ }
+ skippedDefault = true;
+ continue;
+ }
+ if (selectedCellEditor != null) {
+ Logger.logWarning("Several cell editors are defined for type: " //$NON-NLS-1$
+ + EcoreUtil.getURI(type), Activator.getDefault());
+ break;
+ }
+ selectedCellEditor = cellEditor;
+ }
+ }
+ }
+
+ return selectedCellEditor;
+ }
+
+ public static boolean isCellEditorForType(final AbstractModelCellEditor modelCellEditor,
+ final EClassifier type, final boolean many) {
+ if (many != (modelCellEditor instanceof NaryFeatureCellEditor)) {
+ return false;
+ }
+ return isSuperType(modelCellEditor.getCellType(), type);
+ }
+
+ private static boolean isSuperType(final EClassifier superType, final EClassifier subType) {
+ if (superType == subType) {
+ return true;
+ }
+
+ if (superType instanceof EClass && subType instanceof EClass) {
+ // special case because isSuperTypeOf doesn't handle it
+ if (superType == EcorePackage.eINSTANCE.getEObject()) {
+ return true;
+ }
+
+ EClass superTypeEClass = (EClass) superType;
+ EClass subTypeEClass = (EClass) subType;
+ return superTypeEClass.isSuperTypeOf(subTypeEClass);
+ }
+
+ if (superType == EcorePackage.eINSTANCE.getEDataType() && subType instanceof EDataType) {
+ // cf Bug 331539 - cell editor registered for type "EDataType"
+ return true;
+ }
+
+ return false;
+ }
+
+ public List<ModelCellEditorContainer<BasicCellEditor>> getBasicCellEditors() {
+ return this.basicCellEditors;
+ }
+
+ public List<ModelCellEditorContainer<UnaryReferenceCellEditor>> getUnaryReferenceCellEditors() {
+ return this.unaryReferenceCellEditors;
+ }
+
+ public List<ModelCellEditorContainer<NaryFeatureCellEditor>> getNaryFeatureCellEditors() {
+ return this.naryFeatureCellEditors;
+ }
+
+ @Override
+ protected String getExtensionPointName() {
+ return CellEditorsRegistry.EXTENSION_POINT_NAME;
+ }
+
+ @Override
+ protected String getExtensionPointNamespace() {
+ return CellEditorsRegistry.EXTENSION_POINT_NAMESPACE;
+ }
+
+ @Override
+ protected void handleRootElement(final IConfigurationElement configurationElement) {
+ final String name = configurationElement.getName();
+ if (name.equalsIgnoreCase(CellEditorsRegistry.CELL_EDITORS_MODEL_ELEMENT)) {
+ readModelElement(configurationElement);
+ } else {
+ logUnknownElement(configurationElement);
+ }
+ }
+
+ /** Read a 'cellEditorsModel' element */
+ private void readModelElement(final IConfigurationElement configurationElement) {
+ final String path = configurationElement.getAttribute(CellEditorsRegistry.PATH_ATTRIBUTE);
+ String bundleName = configurationElement.getContributor().getName();
+ URI uri = URI.createURI("platform:/plugin/" //$NON-NLS-1$
+ + configurationElement.getContributor().getName() + "/" + path); //$NON-NLS-1$
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = resourceSet.getResource(uri, true);
+ if (resource != null) {
+ EList<EObject> contents = resource.getContents();
+ if (contents.size() == 1) {
+ EObject eObject = contents.get(0);
+ if (eObject instanceof ModelCellEditorDeclarations) {
+ ModelCellEditorDeclarations modelCellEditors = (ModelCellEditorDeclarations) eObject;
+ EList<AbstractModelCellEditor> allCellEditors = modelCellEditors
+ .getModelCellEditors();
+ for (AbstractModelCellEditor modelCellEditor : allCellEditors) {
+ if (modelCellEditor instanceof BasicCellEditor) {
+ BasicCellEditor basicCellEditor = (BasicCellEditor) modelCellEditor;
+ ModelCellEditorContainer<BasicCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<BasicCellEditor>();
+ modelCellEditorContainer.setBundleName(bundleName);
+ modelCellEditorContainer.setModelCellEditor(basicCellEditor);
+ this.basicCellEditors.add(modelCellEditorContainer);
+ } else if (modelCellEditor instanceof UnaryReferenceCellEditor) {
+ UnaryReferenceCellEditor unaryReferenceCellEditor = (UnaryReferenceCellEditor) modelCellEditor;
+ ModelCellEditorContainer<UnaryReferenceCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<UnaryReferenceCellEditor>();
+ modelCellEditorContainer.setBundleName(bundleName);
+ modelCellEditorContainer.setModelCellEditor(unaryReferenceCellEditor);
+ this.unaryReferenceCellEditors.add(modelCellEditorContainer);
+ } else if (modelCellEditor instanceof NaryFeatureCellEditor) {
+ NaryFeatureCellEditor naryFeatureCellEditor = (NaryFeatureCellEditor) modelCellEditor;
+ ModelCellEditorContainer<NaryFeatureCellEditor> modelCellEditorContainer = new ModelCellEditorContainer<NaryFeatureCellEditor>();
+ modelCellEditorContainer.setBundleName(bundleName);
+ modelCellEditorContainer.setModelCellEditor(naryFeatureCellEditor);
+ this.naryFeatureCellEditors.add(modelCellEditorContainer);
+ } else {
+ Logger.logError("Not handled: " //$NON-NLS-1$
+ + modelCellEditor.getClass().getSimpleName(),
+ Activator.getDefault());
+ }
+ }
+ } else {
+ Logger.logError("Root element must be of type " //$NON-NLS-1$
+ + ModelCellEditorDeclarations.class.getSimpleName() + ": " + uri, //$NON-NLS-1$
+ Activator.getDefault());
+ }
+ } else {
+ Logger.logError("Resource should have one and only one root: " + uri, //$NON-NLS-1$
+ Activator.getDefault());
+ }
+ } else {
+ Logger.logError("Error reading resource: " + uri, Activator.getDefault()); //$NON-NLS-1$
+ }
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CommandFactoriesRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CommandFactoriesRegistry.java
index 4e37fcd74ea..7896d9993e1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CommandFactoriesRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/CommandFactoriesRegistry.java
@@ -1,100 +1,100 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactoriesRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory;
-
-/** Registry for the "loadingDepth" extension point */
-public class CommandFactoriesRegistry extends AbstractRegistry implements ICommandFactoriesRegistry {
-
- private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "commandFactories"; //$NON-NLS-1$
-
- private static final String COMMAND_FACTORY_ELEMENT = "commandFactory"; //$NON-NLS-1$
- private static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
-
-
- private final List<ICommandFactory> commandFactories = new ArrayList<ICommandFactory>();
- private final ICommandFactory defaultCommandFactory = new DefaultCommandFactory();
-
- public CommandFactoriesRegistry() {
- initialize();
- }
-
- public List<ICommandFactory> getCommandFactories() {
- return this.commandFactories;
- }
-
- public ICommandFactory getCommandFactoryFor(final EditingDomain editingDomain) {
- for (ICommandFactory commandFactory : this.commandFactories) {
- if (commandFactory.handles(editingDomain)) {
- return commandFactory;
- }
- }
- return this.defaultCommandFactory;
- }
-
- @Override
- protected String getExtensionPointName() {
- return CommandFactoriesRegistry.EXTENSION_POINT_NAME;
- }
-
- @Override
- protected String getExtensionPointNamespace() {
- return CommandFactoriesRegistry.EXTENSION_POINT_NAMESPACE;
- }
-
- @Override
- protected void handleRootElement(final IConfigurationElement configurationElement) {
- final String name = configurationElement.getName();
- if (name.equalsIgnoreCase(CommandFactoriesRegistry.COMMAND_FACTORY_ELEMENT)) {
- readModelElement(configurationElement);
- } else {
- logUnknownElement(configurationElement);
- }
- }
-
- /** Read a 'cellEditorsModel' element */
- private void readModelElement(final IConfigurationElement configurationElement) {
- Object object;
- try {
- object = configurationElement
- .createExecutableExtension(CommandFactoriesRegistry.CLASS_ATTRIBUTE);
- } catch (CoreException e) {
- Logger.logError(e, Activator.getDefault());
- return;
- }
- if (object == null) {
- logMissingAttribute(configurationElement, CommandFactoriesRegistry.CLASS_ATTRIBUTE);
- return;
- }
-
- if (object instanceof ICommandFactory) {
- ICommandFactory commandFactory = (ICommandFactory) object;
- this.commandFactories.add(commandFactory);
- } else {
- logError(configurationElement,
- "class must implement " + ICommandFactory.class.getSimpleName()); //$NON-NLS-1$
- }
- }
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactoriesRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory;
+
+/** Registry for the "loadingDepth" extension point */
+public class CommandFactoriesRegistry extends AbstractRegistry implements ICommandFactoriesRegistry {
+
+ private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
+ private static final String EXTENSION_POINT_NAME = "commandFactories"; //$NON-NLS-1$
+
+ private static final String COMMAND_FACTORY_ELEMENT = "commandFactory"; //$NON-NLS-1$
+ private static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
+
+
+ private final List<ICommandFactory> commandFactories = new ArrayList<ICommandFactory>();
+ private final ICommandFactory defaultCommandFactory = new DefaultCommandFactory();
+
+ public CommandFactoriesRegistry() {
+ initialize();
+ }
+
+ public List<ICommandFactory> getCommandFactories() {
+ return this.commandFactories;
+ }
+
+ public ICommandFactory getCommandFactoryFor(final EditingDomain editingDomain) {
+ for (ICommandFactory commandFactory : this.commandFactories) {
+ if (commandFactory.handles(editingDomain)) {
+ return commandFactory;
+ }
+ }
+ return this.defaultCommandFactory;
+ }
+
+ @Override
+ protected String getExtensionPointName() {
+ return CommandFactoriesRegistry.EXTENSION_POINT_NAME;
+ }
+
+ @Override
+ protected String getExtensionPointNamespace() {
+ return CommandFactoriesRegistry.EXTENSION_POINT_NAMESPACE;
+ }
+
+ @Override
+ protected void handleRootElement(final IConfigurationElement configurationElement) {
+ final String name = configurationElement.getName();
+ if (name.equalsIgnoreCase(CommandFactoriesRegistry.COMMAND_FACTORY_ELEMENT)) {
+ readModelElement(configurationElement);
+ } else {
+ logUnknownElement(configurationElement);
+ }
+ }
+
+ /** Read a 'cellEditorsModel' element */
+ private void readModelElement(final IConfigurationElement configurationElement) {
+ Object object;
+ try {
+ object = configurationElement
+ .createExecutableExtension(CommandFactoriesRegistry.CLASS_ATTRIBUTE);
+ } catch (CoreException e) {
+ Logger.logError(e, Activator.getDefault());
+ return;
+ }
+ if (object == null) {
+ logMissingAttribute(configurationElement, CommandFactoriesRegistry.CLASS_ATTRIBUTE);
+ return;
+ }
+
+ if (object instanceof ICommandFactory) {
+ ICommandFactory commandFactory = (ICommandFactory) object;
+ this.commandFactories.add(commandFactory);
+ } else {
+ logError(configurationElement,
+ "class must implement " + ICommandFactory.class.getSimpleName()); //$NON-NLS-1$
+ }
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/DefaultCommandFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/DefaultCommandFactory.java
index fde44da5bed..4cf7db3f912 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/DefaultCommandFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/DefaultCommandFactory.java
@@ -1,62 +1,62 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-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.emf.facet.widgets.celleditors.ICommandFactory;
-
-/**
- * This is the command factory that is used when no other command factory is
- * specified through the "commandFactories" extension point.
- */
-public class DefaultCommandFactory implements ICommandFactory {
-
- public boolean handles(final EditingDomain editingDomain) {
- return true;
- }
-
- public Command createSetCommand(final EditingDomain domain, final Object owner,
- final Object feature, final Object value) {
- return SetCommand.create(domain, owner, feature, value);
- }
-
- public Command createSetCommand(final EditingDomain domain, final Object owner,
- final Object feature, final Object value, final int index) {
- return SetCommand.create(domain, owner, feature, value, index);
- }
-
- public Command createMoveCommand(final EditingDomain domain, final Object owner,
- final Object feature, final Object value, final int index) {
- return MoveCommand.create(domain, owner, feature, value, index);
- }
-
- public Command createAddCommand(final EditingDomain domain, final Object owner,
- final Object feature, final Object value) {
- return AddCommand.create(domain, owner, feature, value);
- }
-
- public Command createRemoveCommand(final EditingDomain domain, final Object owner,
- final Object feature, final Object value) {
- return RemoveCommand.create(domain, owner, feature, value);
- }
-
- public Command createDeleteCommand(final EditingDomain domain, final Object object) {
- return DeleteCommand.create(domain, object);
- }
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+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.emf.facet.widgets.celleditors.ICommandFactory;
+
+/**
+ * This is the command factory that is used when no other command factory is
+ * specified through the "commandFactories" extension point.
+ */
+public class DefaultCommandFactory implements ICommandFactory {
+
+ public boolean handles(final EditingDomain editingDomain) {
+ return true;
+ }
+
+ public Command createSetCommand(final EditingDomain domain, final Object owner,
+ final Object feature, final Object value) {
+ return SetCommand.create(domain, owner, feature, value);
+ }
+
+ public Command createSetCommand(final EditingDomain domain, final Object owner,
+ final Object feature, final Object value, final int index) {
+ return SetCommand.create(domain, owner, feature, value, index);
+ }
+
+ public Command createMoveCommand(final EditingDomain domain, final Object owner,
+ final Object feature, final Object value, final int index) {
+ return MoveCommand.create(domain, owner, feature, value, index);
+ }
+
+ public Command createAddCommand(final EditingDomain domain, final Object owner,
+ final Object feature, final Object value) {
+ return AddCommand.create(domain, owner, feature, value);
+ }
+
+ public Command createRemoveCommand(final EditingDomain domain, final Object owner,
+ final Object feature, final Object value) {
+ return RemoveCommand.create(domain, owner, feature, value);
+ }
+
+ public Command createDeleteCommand(final EditingDomain domain, final Object object) {
+ return DeleteCommand.create(domain, object);
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Messages.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Messages.java
index 004a0831a92..40a636fd3a0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Messages.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/Messages.java
@@ -1,53 +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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.messages"; //$NON-NLS-1$
- public static String CoreIFileComposite_mustSelectFile;
- public static String CoreIFileComposite_selectFile;
- public static String NaryAttributeEditingDialog_add;
- public static String NaryAttributeEditingDialog_delete;
- public static String NaryAttributeEditingDialog_enterNewValuePlaceholder;
- public static String NaryReferenceEditingDialog_add;
- public static String NaryReferenceEditingDialog_addAll;
- public static String NaryReferenceEditingDialog_addAllTooltip;
- public static String NaryReferenceEditingDialog_addTooltip;
- public static String NaryReferenceEditingDialog_availableValues;
- public static String NaryReferenceEditingDialog_deleteElements;
- public static String NaryReferenceEditingDialog_deleteElementsLong;
- public static String NaryReferenceEditingDialog_down;
- public static String NaryReferenceEditingDialog_moveWarning;
- public static String NaryReferenceEditingDialog_moveElement;
- public static String NaryReferenceEditingDialog_newInstance;
- public static String NaryReferenceEditingDialog_remove;
- public static String NaryReferenceEditingDialog_removeAll;
- public static String NaryReferenceEditingDialog_removeAllTooltip;
- public static String NaryReferenceEditingDialog_removeTooltip;
- public static String NaryReferenceEditingDialog_shellTitle;
- public static String NaryReferenceEditingDialog_typeFilterText;
- public static String NaryReferenceEditingDialog_up;
- public static String NaryReferenceEditingDialog_values;
- public static String UnaryReferenceCellEditorComposite_0;
- public static String UnaryReferenceCellEditorComposite_1;
- public static String UnaryReferenceCellEditorComposite_2;
- static {
- // initialize resource bundle
- NLS.initializeMessages(Messages.BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.messages"; //$NON-NLS-1$
+ public static String CoreIFileComposite_mustSelectFile;
+ public static String CoreIFileComposite_selectFile;
+ public static String NaryAttributeEditingDialog_add;
+ public static String NaryAttributeEditingDialog_delete;
+ public static String NaryAttributeEditingDialog_enterNewValuePlaceholder;
+ public static String NaryReferenceEditingDialog_add;
+ public static String NaryReferenceEditingDialog_addAll;
+ public static String NaryReferenceEditingDialog_addAllTooltip;
+ public static String NaryReferenceEditingDialog_addTooltip;
+ public static String NaryReferenceEditingDialog_availableValues;
+ public static String NaryReferenceEditingDialog_deleteElements;
+ public static String NaryReferenceEditingDialog_deleteElementsLong;
+ public static String NaryReferenceEditingDialog_down;
+ public static String NaryReferenceEditingDialog_moveWarning;
+ public static String NaryReferenceEditingDialog_moveElement;
+ public static String NaryReferenceEditingDialog_newInstance;
+ public static String NaryReferenceEditingDialog_remove;
+ public static String NaryReferenceEditingDialog_removeAll;
+ public static String NaryReferenceEditingDialog_removeAllTooltip;
+ public static String NaryReferenceEditingDialog_removeTooltip;
+ public static String NaryReferenceEditingDialog_shellTitle;
+ public static String NaryReferenceEditingDialog_typeFilterText;
+ public static String NaryReferenceEditingDialog_up;
+ public static String NaryReferenceEditingDialog_values;
+ public static String UnaryReferenceCellEditorComposite_0;
+ public static String UnaryReferenceCellEditorComposite_1;
+ public static String UnaryReferenceCellEditorComposite_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(Messages.BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditor.java
index 10858b0c742..27c8ea3f23b 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditor.java
@@ -1,81 +1,81 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-
-public class ModelCellEditor {
- private final String bundleName;
- private final AbstractModelCellEditor modelCellEditor;
-
- public ModelCellEditor(final String bundleName, final AbstractModelCellEditor modelCellEditor) {
- this.bundleName = bundleName;
- this.modelCellEditor = modelCellEditor;
- }
-
- public String getBundleName() {
- return this.bundleName;
- }
-
- public String getCellID() {
- return this.modelCellEditor.getCellId();
- }
-
- public AbstractModelCellEditor getModelCellEditor() {
- return this.modelCellEditor;
- }
-
- public Object getCellEditorImplementation() {
- String className = this.modelCellEditor.getModelCellEditorImpl();
-
- Class<?> classInstance = null;
- try {
- classInstance = Platform.getBundle(this.bundleName).loadClass(className);
- } catch (Exception e) {
- Logger.logError("Could not find class: " + className, //$NON-NLS-1$
- Activator.getDefault());
- return null;
- }
-
- Object instance = null;
- try {
- instance = classInstance.newInstance();
- } catch (Exception e) {
- Logger.logError("Could not instantiate class: " + className, //$NON-NLS-1$
- Activator.getDefault());
- return null;
- }
- return instance;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj instanceof ModelCellEditor) {
- ModelCellEditor other = (ModelCellEditor) obj;
- return other.getCellID().equals(getCellID());
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return getCellID().hashCode();
- }
-
- @Override
- public String toString() {
- return getBundleName() + "#" + getCellID(); //$NON-NLS-1$
- }
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+
+public class ModelCellEditor {
+ private final String bundleName;
+ private final AbstractModelCellEditor modelCellEditor;
+
+ public ModelCellEditor(final String bundleName, final AbstractModelCellEditor modelCellEditor) {
+ this.bundleName = bundleName;
+ this.modelCellEditor = modelCellEditor;
+ }
+
+ public String getBundleName() {
+ return this.bundleName;
+ }
+
+ public String getCellID() {
+ return this.modelCellEditor.getCellId();
+ }
+
+ public AbstractModelCellEditor getModelCellEditor() {
+ return this.modelCellEditor;
+ }
+
+ public Object getCellEditorImplementation() {
+ String className = this.modelCellEditor.getModelCellEditorImpl();
+
+ Class<?> classInstance = null;
+ try {
+ classInstance = Platform.getBundle(this.bundleName).loadClass(className);
+ } catch (Exception e) {
+ Logger.logError("Could not find class: " + className, //$NON-NLS-1$
+ Activator.getDefault());
+ return null;
+ }
+
+ Object instance = null;
+ try {
+ instance = classInstance.newInstance();
+ } catch (Exception e) {
+ Logger.logError("Could not instantiate class: " + className, //$NON-NLS-1$
+ Activator.getDefault());
+ return null;
+ }
+ return instance;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj instanceof ModelCellEditor) {
+ ModelCellEditor other = (ModelCellEditor) obj;
+ return other.getCellID().equals(getCellID());
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return getCellID().hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return getBundleName() + "#" + getCellID(); //$NON-NLS-1$
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditorContainer.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditorContainer.java
index 89e1c3b5699..0d3cf7ab3e5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditorContainer.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ModelCellEditorContainer.java
@@ -1,39 +1,39 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
-
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditorContainer;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-
-public class ModelCellEditorContainer<T extends AbstractModelCellEditor> implements
- IModelCellEditorContainer<AbstractModelCellEditor> {
-
- private AbstractModelCellEditor modelCellEditor;
- private String bundleName;
-
- public String getBundleName() {
- return this.bundleName;
- }
-
- public AbstractModelCellEditor getModelCellEditor() {
- return this.modelCellEditor;
- }
-
- public void setBundleName(final String bundleName) {
- this.bundleName = bundleName;
- }
-
- public void setModelCellEditor(final AbstractModelCellEditor modelCellEditor) {
- this.modelCellEditor = modelCellEditor;
-
- }
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal;
+
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditorContainer;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+
+public class ModelCellEditorContainer<T extends AbstractModelCellEditor> implements
+ IModelCellEditorContainer<AbstractModelCellEditor> {
+
+ private AbstractModelCellEditor modelCellEditor;
+ private String bundleName;
+
+ public String getBundleName() {
+ return this.bundleName;
+ }
+
+ public AbstractModelCellEditor getModelCellEditor() {
+ return this.modelCellEditor;
+ }
+
+ public void setBundleName(final String bundleName) {
+ this.bundleName = bundleName;
+ }
+
+ public void setModelCellEditor(final AbstractModelCellEditor modelCellEditor) {
+ this.modelCellEditor = modelCellEditor;
+
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/composite/registries/CompositeEditorFactoriesRegistry.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/composite/registries/CompositeEditorFactoriesRegistry.java
index 048375fe328..da360b3ce65 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/composite/registries/CompositeEditorFactoriesRegistry.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/composite/registries/CompositeEditorFactoriesRegistry.java
@@ -1,122 +1,122 @@
-/*******************************************************************************
- * Copyright (c) 2011 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
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- * Nicolas Guyomar (Mia-Software) - Bug 338826 - CompositeEditorFactoriesRegistry.getCompositeEditorFactory() should be parameterized
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 341369 - CompositeEditorFactoriesRegistry : inverted type comparison
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
-
-/**
- * Registry for composite editors extension point
- */
-public class CompositeEditorFactoriesRegistry extends AbstractRegistry
- implements
- org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries.ICompositeEditorFactoriesRegistry,
- org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registry.ICompositeEditorFactoriesRegistry {
-
- private static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
-
- private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
- private static final String EXTENSION_POINT_NAME = "compositeEditorFactories"; //$NON-NLS-1$
- private final List<ICompositeEditorFactory<?>> compositeFactories;
-
- public CompositeEditorFactoriesRegistry() {
- this.compositeFactories = new ArrayList<ICompositeEditorFactory<?>>();
- initialize();
- }
-
- public boolean hasCompositeEditorFactory(final Class<?> type) {
- return getCompositeEditorFactory(type) != null;
- }
-
- public <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type) {
- if (this.compositeFactories == null) {
- initialize();
- }
-
- final Class<?> objectType;
- if (type == byte.class) {
- objectType = Byte.class;
- } else if (type == short.class) {
- objectType = Short.class;
- } else if (type == int.class) {
- objectType = Integer.class;
- } else if (type == long.class) {
- objectType = Long.class;
- } else if (type == float.class) {
- objectType = Float.class;
- } else if (type == double.class) {
- objectType = Double.class;
- } else if (type == boolean.class) {
- objectType = Boolean.class;
- } else if (type == char.class) {
- objectType = Character.class;
- } else {
- objectType = type;
- }
-
- // choose the factory with the most "precise" type (lowest in the inheritance hierarchy)
- Class<?> mostPreciseType = null;
- ICompositeEditorFactory<T> mostPreciseFactory = null;
- for (ICompositeEditorFactory<?> factory : this.compositeFactories) {
- Class<?> handledType = factory.getHandledType();
- if (handledType != null && handledType.isAssignableFrom(objectType)) {
- if (mostPreciseType == null || mostPreciseType.isAssignableFrom(handledType)) {
- mostPreciseType = handledType;
- mostPreciseFactory = castMostPreciseFactory(factory);
- }
- }
- }
- return mostPreciseFactory;
- }
-
- // Only here to isolate the suppress warning
- @SuppressWarnings("unchecked")
- private <T> ICompositeEditorFactory<T> castMostPreciseFactory(final ICompositeEditorFactory<?> factory) {
- ICompositeEditorFactory<T> mostPreciseFactory;
- mostPreciseFactory = (ICompositeEditorFactory<T>) factory;
- return mostPreciseFactory;
- }
-
- @Override
- protected String getExtensionPointNamespace() {
- return CompositeEditorFactoriesRegistry.EXTENSION_POINT_NAMESPACE;
- }
-
- @Override
- protected String getExtensionPointName() {
- return CompositeEditorFactoriesRegistry.EXTENSION_POINT_NAME;
- }
-
- @Override
- protected void handleRootElement(final IConfigurationElement configurationElement) {
- ICompositeEditorFactory<?> factory;
- try {
- factory = (ICompositeEditorFactory<?>) configurationElement
- .createExecutableExtension(CompositeEditorFactoriesRegistry.CLASS_ATTRIBUTE);
- this.compositeFactories.add(factory);
- } catch (CoreException e) {
- Logger.logError(
- e, "A problem occured when instantiating a composite editor factory", Activator.getDefault()); //$NON-NLS-1$
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ * Nicolas Guyomar (Mia-Software) - Bug 338826 - CompositeEditorFactoriesRegistry.getCompositeEditorFactory() should be parameterized
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 341369 - CompositeEditorFactoriesRegistry : inverted type comparison
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.composite.registries;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.util.core.internal.exported.AbstractRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
+
+/**
+ * Registry for composite editors extension point
+ */
+public class CompositeEditorFactoriesRegistry extends AbstractRegistry
+ implements
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registries.ICompositeEditorFactoriesRegistry,
+ org.eclipse.papyrus.emf.facet.widgets.celleditors.core.composite.registry.ICompositeEditorFactoriesRegistry {
+
+ private static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
+
+ private static final String EXTENSION_POINT_NAMESPACE = "org.eclipse.papyrus.emf.facet.widgets.celleditors"; //$NON-NLS-1$
+ private static final String EXTENSION_POINT_NAME = "compositeEditorFactories"; //$NON-NLS-1$
+ private final List<ICompositeEditorFactory<?>> compositeFactories;
+
+ public CompositeEditorFactoriesRegistry() {
+ this.compositeFactories = new ArrayList<ICompositeEditorFactory<?>>();
+ initialize();
+ }
+
+ public boolean hasCompositeEditorFactory(final Class<?> type) {
+ return getCompositeEditorFactory(type) != null;
+ }
+
+ public <T> ICompositeEditorFactory<T> getCompositeEditorFactory(final Class<T> type) {
+ if (this.compositeFactories == null) {
+ initialize();
+ }
+
+ final Class<?> objectType;
+ if (type == byte.class) {
+ objectType = Byte.class;
+ } else if (type == short.class) {
+ objectType = Short.class;
+ } else if (type == int.class) {
+ objectType = Integer.class;
+ } else if (type == long.class) {
+ objectType = Long.class;
+ } else if (type == float.class) {
+ objectType = Float.class;
+ } else if (type == double.class) {
+ objectType = Double.class;
+ } else if (type == boolean.class) {
+ objectType = Boolean.class;
+ } else if (type == char.class) {
+ objectType = Character.class;
+ } else {
+ objectType = type;
+ }
+
+ // choose the factory with the most "precise" type (lowest in the inheritance hierarchy)
+ Class<?> mostPreciseType = null;
+ ICompositeEditorFactory<T> mostPreciseFactory = null;
+ for (ICompositeEditorFactory<?> factory : this.compositeFactories) {
+ Class<?> handledType = factory.getHandledType();
+ if (handledType != null && handledType.isAssignableFrom(objectType)) {
+ if (mostPreciseType == null || mostPreciseType.isAssignableFrom(handledType)) {
+ mostPreciseType = handledType;
+ mostPreciseFactory = castMostPreciseFactory(factory);
+ }
+ }
+ }
+ return mostPreciseFactory;
+ }
+
+ // Only here to isolate the suppress warning
+ @SuppressWarnings("unchecked")
+ private <T> ICompositeEditorFactory<T> castMostPreciseFactory(final ICompositeEditorFactory<?> factory) {
+ ICompositeEditorFactory<T> mostPreciseFactory;
+ mostPreciseFactory = (ICompositeEditorFactory<T>) factory;
+ return mostPreciseFactory;
+ }
+
+ @Override
+ protected String getExtensionPointNamespace() {
+ return CompositeEditorFactoriesRegistry.EXTENSION_POINT_NAMESPACE;
+ }
+
+ @Override
+ protected String getExtensionPointName() {
+ return CompositeEditorFactoriesRegistry.EXTENSION_POINT_NAME;
+ }
+
+ @Override
+ protected void handleRootElement(final IConfigurationElement configurationElement) {
+ ICompositeEditorFactory<?> factory;
+ try {
+ factory = (ICompositeEditorFactory<?>) configurationElement
+ .createExecutableExtension(CompositeEditorFactoriesRegistry.CLASS_ATTRIBUTE);
+ this.compositeFactories.add(factory);
+ } catch (CoreException e) {
+ Logger.logError(
+ e, "A problem occured when instantiating a composite editor factory", Activator.getDefault()); //$NON-NLS-1$
+ }
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/EEnumCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/EEnumCellEditor.java
index d3202610d69..5c21cfcecd4 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/EEnumCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/EEnumCellEditor.java
@@ -1,62 +1,62 @@
-/*****************************************************************************
- * 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:
- * Gregoire Dupe (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
-
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IListener;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.EnumeratorComposite;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * This is a enum value editor
- *
- * @author Gregoire Dupe (Mia-Software)
- *
- */
-public class EEnumCellEditor implements IModelCellEditor {
-
- private EnumeratorComposite<Enumerator> composite = null;
-
- public Control activateCell(final Composite parent, final Object originalValue,
- final IModelCellEditHandler editHandler, final EStructuralFeature feature,
- final EObject source) {
- if (!(feature.getEType() instanceof EEnum)) {
- throw new IllegalArgumentException("EEnum feature type"); //$NON-NLS-1$
- }
- this.composite = new EnumeratorComposite<Enumerator>(parent);
- this.composite.setEEnum((EEnum) feature.getEType());
-
- this.composite.setValue((Enumerator) originalValue);
-
- this.composite.addCommitListener(new IListener() {
- public void handleEvent() {
- editHandler.commit();
- }
- });
-
- return this.composite;
- }
-
- public Object getValue() {
- return this.composite.getValue();
- }
-
-}
+/*****************************************************************************
+ * 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:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
+
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IListener;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.EnumeratorComposite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * This is a enum value editor
+ *
+ * @author Gregoire Dupe (Mia-Software)
+ *
+ */
+public class EEnumCellEditor implements IModelCellEditor {
+
+ private EnumeratorComposite<Enumerator> composite = null;
+
+ public Control activateCell(final Composite parent, final Object originalValue,
+ final IModelCellEditHandler editHandler, final EStructuralFeature feature,
+ final EObject source) {
+ if (!(feature.getEType() instanceof EEnum)) {
+ throw new IllegalArgumentException("EEnum feature type"); //$NON-NLS-1$
+ }
+ this.composite = new EnumeratorComposite<Enumerator>(parent);
+ this.composite.setEEnum((EEnum) feature.getEType());
+
+ this.composite.setValue((Enumerator) originalValue);
+
+ this.composite.addCommitListener(new IListener() {
+ public void handleEvent() {
+ editHandler.commit();
+ }
+ });
+
+ return this.composite;
+ }
+
+ public Object getValue() {
+ return this.composite.getValue();
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryAttributeCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryAttributeCellEditor.java
index a63db464899..90fda2d5d01 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryAttributeCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryAttributeCellEditor.java
@@ -1,54 +1,54 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryEAttributeCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui.NaryAttributeEditingDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public class NaryAttributeCellEditor<T extends Object> implements INaryEAttributeCellEditor<T> {
-
- private NaryAttributeEditingDialog<T> naryAttributeEditingDialog;
-
- public Control activateCell(final Composite parent, final List<T> values,
- final IModelCellEditHandler editHandler, final EObject eObject,
- final EStructuralFeature feature) {
- final Composite placeholderComposite = new Composite(parent, SWT.NONE);
- this.naryAttributeEditingDialog = new NaryAttributeEditingDialog<T>(parent.getShell(),
- values, editHandler, eObject, feature) {
- @Override
- public boolean close() {
- placeholderComposite.dispose();
- return super.close();
- }
- };
- this.naryAttributeEditingDialog.open();
-
- return placeholderComposite;
- }
-
- public List<T> getValue() {
- if (this.naryAttributeEditingDialog != null) {
- return this.naryAttributeEditingDialog.getValue();
- }
- return null;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryEAttributeCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui.NaryAttributeEditingDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class NaryAttributeCellEditor<T extends Object> implements INaryEAttributeCellEditor<T> {
+
+ private NaryAttributeEditingDialog<T> naryAttributeEditingDialog;
+
+ public Control activateCell(final Composite parent, final List<T> values,
+ final IModelCellEditHandler editHandler, final EObject eObject,
+ final EStructuralFeature feature) {
+ final Composite placeholderComposite = new Composite(parent, SWT.NONE);
+ this.naryAttributeEditingDialog = new NaryAttributeEditingDialog<T>(parent.getShell(),
+ values, editHandler, eObject, feature) {
+ @Override
+ public boolean close() {
+ placeholderComposite.dispose();
+ return super.close();
+ }
+ };
+ this.naryAttributeEditingDialog.open();
+
+ return placeholderComposite;
+ }
+
+ public List<T> getValue() {
+ if (this.naryAttributeEditingDialog != null) {
+ return this.naryAttributeEditingDialog.getValue();
+ }
+ return null;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryReferenceCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryReferenceCellEditor.java
index 5eda3164bde..cf363a4a302 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryReferenceCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/NaryReferenceCellEditor.java
@@ -1,55 +1,55 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryEReferenceCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui.NaryReferenceEditingDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public class NaryReferenceCellEditor<T extends EObject> implements INaryEReferenceCellEditor<T> {
-
- private NaryReferenceEditingDialog<T> naryReferenceEditingDialog;
-
- public Control activateCell(final Composite parent, final List<T> values,
- final List<T> availableValues, final IModelCellEditHandler editHandler,
- final EObject eObject, final EStructuralFeature feature) {
- final Composite placeholderComposite = new Composite(parent, SWT.NONE);
- this.naryReferenceEditingDialog = new NaryReferenceEditingDialog<T>(parent.getShell(),
- values, availableValues, editHandler, eObject, feature) {
- @Override
- public boolean close() {
- placeholderComposite.dispose();
- return super.close();
- }
- };
- this.naryReferenceEditingDialog.open();
-
- return placeholderComposite;
- }
-
- public List<T> getValue() {
- if (this.naryReferenceEditingDialog != null) {
- return this.naryReferenceEditingDialog.getValue();
- }
- return null;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.INaryEReferenceCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui.NaryReferenceEditingDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class NaryReferenceCellEditor<T extends EObject> implements INaryEReferenceCellEditor<T> {
+
+ private NaryReferenceEditingDialog<T> naryReferenceEditingDialog;
+
+ public Control activateCell(final Composite parent, final List<T> values,
+ final List<T> availableValues, final IModelCellEditHandler editHandler,
+ final EObject eObject, final EStructuralFeature feature) {
+ final Composite placeholderComposite = new Composite(parent, SWT.NONE);
+ this.naryReferenceEditingDialog = new NaryReferenceEditingDialog<T>(parent.getShell(),
+ values, availableValues, editHandler, eObject, feature) {
+ @Override
+ public boolean close() {
+ placeholderComposite.dispose();
+ return super.close();
+ }
+ };
+ this.naryReferenceEditingDialog.open();
+
+ return placeholderComposite;
+ }
+
+ public List<T> getValue() {
+ if (this.naryReferenceEditingDialog != null) {
+ return this.naryReferenceEditingDialog.getValue();
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/UnaryReferenceCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/UnaryReferenceCellEditor.java
index 5628e640298..82d29945ec1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/UnaryReferenceCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/UnaryReferenceCellEditor.java
@@ -1,53 +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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.emf.facet.util.emf.core.ModelUtils;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IListener;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.UnaryReferenceCellEditorComposite;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/** A cell editor for unary references */
-public class UnaryReferenceCellEditor implements IModelCellEditor {
-
- private UnaryReferenceCellEditorComposite cellEditorComposite;
-
- public Control activateCell(final Composite parent, final Object originalValue,
- final IModelCellEditHandler editHandler, final EStructuralFeature feature,
- final EObject source) {
-
- List<EObject> list = ModelUtils.computeAssignableElements(feature, source);
-
- this.cellEditorComposite = new UnaryReferenceCellEditorComposite(parent, list);
- this.cellEditorComposite.addCommitListener(new IListener() {
- public void handleEvent() {
- editHandler.commit();
- }
- });
-
- return this.cellEditorComposite;
- }
-
- public Object getValue() {
- return this.cellEditorComposite.getValue();
- }
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.util.emf.core.ModelUtils;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IListener;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.UnaryReferenceCellEditorComposite;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/** A cell editor for unary references */
+public class UnaryReferenceCellEditor implements IModelCellEditor {
+
+ private UnaryReferenceCellEditorComposite cellEditorComposite;
+
+ public Control activateCell(final Composite parent, final Object originalValue,
+ final IModelCellEditHandler editHandler, final EStructuralFeature feature,
+ final EObject source) {
+
+ List<EObject> list = ModelUtils.computeAssignableElements(feature, source);
+
+ this.cellEditorComposite = new UnaryReferenceCellEditorComposite(parent, list);
+ this.cellEditorComposite.addCommitListener(new IListener() {
+ public void handleEvent() {
+ editHandler.commit();
+ }
+ });
+
+ return this.cellEditorComposite;
+ }
+
+ public Object getValue() {
+ return this.cellEditorComposite.getValue();
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/AbstractIResourceComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/AbstractIResourceComposite.java
index 2892984070a..116479147d1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/AbstractIResourceComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/AbstractIResourceComposite.java
@@ -1,149 +1,149 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-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.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-public abstract class AbstractIResourceComposite<T extends IResource> extends
- AbstractCellEditorComposite<T> {
-
- /** the control that is used to edit the contents of the cell */
- private final Button button;
- private Text text = null;
-
- private final Composite parentControl;
-
- public AbstractIResourceComposite(final Composite parent) {
- this(parent, SWT.NONE);
- }
-
- public AbstractIResourceComposite(final Composite parent, final int style) {
- super(parent);
- this.parentControl = parent;
-
- GridLayout gd = new GridLayout(2, false);
- gd.marginHeight = 0;
- gd.marginWidth = 0;
- gd.horizontalSpacing = 0;
- setLayout(gd);
-
- this.text = new Text(this, style);
- this.text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- this.button = new Button(this, SWT.PUSH);
- this.button.setText("..."); //$NON-NLS-1$
- GridData data = new GridData(SWT.FILL, SWT.FILL, false, true);
- this.button.setLayoutData(data);
-
- this.button.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- browseResource();
- }
- });
-
- // commit the cell editor when the mouse is clicked
- // anywhere outside the text field
- final Listener clickListener = new Listener() {
- public void handleEvent(final Event event) {
- if (event.widget instanceof Control) {
- Control control = (Control) event.widget;
- if (control.getShell() == getParentControl().getShell()) {
- if (event.widget != getButton() && event.widget != getText()) {
- fireCommit();
- }
- }
- }
- }
- };
- Display.getDefault().addFilter(SWT.MouseDown, clickListener);
-
- // this listener is only here to remove
- // the other listener from the Display
- this.text.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(final DisposeEvent e) {
- Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
- }
- });
-
- this.text.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(final KeyEvent event) {
- // Enter key pressed
- if ((event.keyCode == SWT.CR && event.stateMask == 0)
- || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
- fireCommit();
- } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
- // Escape key pressed
- close();
- }
- }
- });
-
- this.text.addModifyListener(new ModifyListener() {
- public void modifyText(final ModifyEvent e) {
- fireChanged();
- }
- });
-
- this.text.forceFocus();
- }
-
- protected Button getButton() {
- return this.button;
- }
-
- protected Text getText() {
- return this.text;
- }
-
- protected void commit() {
- fireCommit();
- }
-
- protected Composite getParentControl() {
- return this.parentControl;
- }
-
- public void setValue(final IResource value) {
- if (value != null) {
- this.text.setText(value.getFullPath().toString());
- } else {
- this.text.setText(""); //$NON-NLS-1$
- }
- }
-
- public abstract T getValue();
-
- protected abstract void browseResource();
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+public abstract class AbstractIResourceComposite<T extends IResource> extends
+ AbstractCellEditorComposite<T> {
+
+ /** the control that is used to edit the contents of the cell */
+ private final Button button;
+ private Text text = null;
+
+ private final Composite parentControl;
+
+ public AbstractIResourceComposite(final Composite parent) {
+ this(parent, SWT.NONE);
+ }
+
+ public AbstractIResourceComposite(final Composite parent, final int style) {
+ super(parent);
+ this.parentControl = parent;
+
+ GridLayout gd = new GridLayout(2, false);
+ gd.marginHeight = 0;
+ gd.marginWidth = 0;
+ gd.horizontalSpacing = 0;
+ setLayout(gd);
+
+ this.text = new Text(this, style);
+ this.text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ this.button = new Button(this, SWT.PUSH);
+ this.button.setText("..."); //$NON-NLS-1$
+ GridData data = new GridData(SWT.FILL, SWT.FILL, false, true);
+ this.button.setLayoutData(data);
+
+ this.button.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ browseResource();
+ }
+ });
+
+ // commit the cell editor when the mouse is clicked
+ // anywhere outside the text field
+ final Listener clickListener = new Listener() {
+ public void handleEvent(final Event event) {
+ if (event.widget instanceof Control) {
+ Control control = (Control) event.widget;
+ if (control.getShell() == getParentControl().getShell()) {
+ if (event.widget != getButton() && event.widget != getText()) {
+ fireCommit();
+ }
+ }
+ }
+ }
+ };
+ Display.getDefault().addFilter(SWT.MouseDown, clickListener);
+
+ // this listener is only here to remove
+ // the other listener from the Display
+ this.text.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(final DisposeEvent e) {
+ Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
+ }
+ });
+
+ this.text.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(final KeyEvent event) {
+ // Enter key pressed
+ if ((event.keyCode == SWT.CR && event.stateMask == 0)
+ || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
+ fireCommit();
+ } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ // Escape key pressed
+ close();
+ }
+ }
+ });
+
+ this.text.addModifyListener(new ModifyListener() {
+ public void modifyText(final ModifyEvent e) {
+ fireChanged();
+ }
+ });
+
+ this.text.forceFocus();
+ }
+
+ protected Button getButton() {
+ return this.button;
+ }
+
+ protected Text getText() {
+ return this.text;
+ }
+
+ protected void commit() {
+ fireCommit();
+ }
+
+ protected Composite getParentControl() {
+ return this.parentControl;
+ }
+
+ public void setValue(final IResource value) {
+ if (value != null) {
+ this.text.setText(value.getFullPath().toString());
+ } else {
+ this.text.setText(""); //$NON-NLS-1$
+ }
+ }
+
+ public abstract T getValue();
+
+ protected abstract void browseResource();
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIFileComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIFileComposite.java
index 564a921235c..3fdd3e7b9b0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIFileComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIFileComposite.java
@@ -1,75 +1,75 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class CoreIFileComposite extends AbstractIResourceComposite<IFile> {
-
- public CoreIFileComposite(final Composite parent) {
- super(parent);
- }
-
- public CoreIFileComposite(final Composite parent, final int style) {
- super(parent, style);
- }
-
- @Override
- public IFile getValue() {
- IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
- if (member instanceof IFile) {
- IFile file = (IFile) member;
- return file;
- }
- return null;
- }
-
- @Override
- protected final void browseResource() {
- ElementTreeSelectionDialog elementTreeSelectionDialog = new ElementTreeSelectionDialog(
- getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- elementTreeSelectionDialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- elementTreeSelectionDialog.setMessage(Messages.CoreIFileComposite_selectFile);
- elementTreeSelectionDialog.setAllowMultiple(false);
- elementTreeSelectionDialog.setDoubleClickSelects(true);
- elementTreeSelectionDialog.setValidator(new ISelectionStatusValidator() {
- public IStatus validate(final Object[] selection) {
- if (selection.length != 1 || !(selection[0] instanceof IFile)) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CoreIFileComposite_mustSelectFile);
- }
- return Status.OK_STATUS;
- }
- });
- elementTreeSelectionDialog.open();
- Object result = elementTreeSelectionDialog.getFirstResult();
-
- if (result != null && result instanceof IFile) {
- IFile selectedFile = (IFile) result;
- setValue(selectedFile);
- fireCommit();
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+public class CoreIFileComposite extends AbstractIResourceComposite<IFile> {
+
+ public CoreIFileComposite(final Composite parent) {
+ super(parent);
+ }
+
+ public CoreIFileComposite(final Composite parent, final int style) {
+ super(parent, style);
+ }
+
+ @Override
+ public IFile getValue() {
+ IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
+ if (member instanceof IFile) {
+ IFile file = (IFile) member;
+ return file;
+ }
+ return null;
+ }
+
+ @Override
+ protected final void browseResource() {
+ ElementTreeSelectionDialog elementTreeSelectionDialog = new ElementTreeSelectionDialog(
+ getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ elementTreeSelectionDialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ elementTreeSelectionDialog.setMessage(Messages.CoreIFileComposite_selectFile);
+ elementTreeSelectionDialog.setAllowMultiple(false);
+ elementTreeSelectionDialog.setDoubleClickSelects(true);
+ elementTreeSelectionDialog.setValidator(new ISelectionStatusValidator() {
+ public IStatus validate(final Object[] selection) {
+ if (selection.length != 1 || !(selection[0] instanceof IFile)) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CoreIFileComposite_mustSelectFile);
+ }
+ return Status.OK_STATUS;
+ }
+ });
+ elementTreeSelectionDialog.open();
+ Object result = elementTreeSelectionDialog.getFirstResult();
+
+ if (result != null && result instanceof IFile) {
+ IFile selectedFile = (IFile) result;
+ setValue(selectedFile);
+ fireCommit();
+ }
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIProjectComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIProjectComposite.java
index c414100edeb..5760c9835d0 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIProjectComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIProjectComposite.java
@@ -1,77 +1,77 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - Bug 342548 - [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.ListDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class CoreIProjectComposite extends AbstractIResourceComposite<IProject> {
-
- public CoreIProjectComposite(final Composite parent) {
- super(parent);
- }
-
- public CoreIProjectComposite(final Composite parent, final int style) {
- super(parent, style);
- }
-
- @Override
- public IProject getValue() {
- IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
- if (member instanceof IProject) {
- return (IProject) member;
- }
- return null;
- }
-
- @Override
- protected final void browseResource() {
-
- WorkbenchContentProvider projectsContentProvider = new WorkbenchContentProvider() {
- @Override
- public Object[] getChildren(final Object element) {
- if (!(element instanceof IWorkspace)) {
- return new Object[0];
- }
- IProject[] projects = ((IWorkspace) element).getRoot().getProjects();
- if (projects == null) {
- return new Object[0];
- }
- return projects;
- }
- };
-
- ListDialog dialog = new ListDialog(getShell());
- dialog.setContentProvider(projectsContentProvider);
- dialog.setLabelProvider(new WorkbenchLabelProvider());
- dialog.setInput(ResourcesPlugin.getWorkspace());
- // TODO: externalize string
- dialog.setMessage("Please select a project"); //$NON-NLS-1$
- // TODO: externalize string
- dialog.setTitle("Select Project"); //$NON-NLS-1$
- int code = dialog.open();
- if (code == Window.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 1) {
- IProject selectedProject = (IProject) result[0];
- setValue(selectedProject);
- fireCommit();
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - Bug 342548 - [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.ListDialog;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+public class CoreIProjectComposite extends AbstractIResourceComposite<IProject> {
+
+ public CoreIProjectComposite(final Composite parent) {
+ super(parent);
+ }
+
+ public CoreIProjectComposite(final Composite parent, final int style) {
+ super(parent, style);
+ }
+
+ @Override
+ public IProject getValue() {
+ IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
+ if (member instanceof IProject) {
+ return (IProject) member;
+ }
+ return null;
+ }
+
+ @Override
+ protected final void browseResource() {
+
+ WorkbenchContentProvider projectsContentProvider = new WorkbenchContentProvider() {
+ @Override
+ public Object[] getChildren(final Object element) {
+ if (!(element instanceof IWorkspace)) {
+ return new Object[0];
+ }
+ IProject[] projects = ((IWorkspace) element).getRoot().getProjects();
+ if (projects == null) {
+ return new Object[0];
+ }
+ return projects;
+ }
+ };
+
+ ListDialog dialog = new ListDialog(getShell());
+ dialog.setContentProvider(projectsContentProvider);
+ dialog.setLabelProvider(new WorkbenchLabelProvider());
+ dialog.setInput(ResourcesPlugin.getWorkspace());
+ // TODO: externalize string
+ dialog.setMessage("Please select a project"); //$NON-NLS-1$
+ // TODO: externalize string
+ dialog.setTitle("Select Project"); //$NON-NLS-1$
+ int code = dialog.open();
+ if (code == Window.OK) {
+ Object[] result = dialog.getResult();
+ if (result.length == 1) {
+ IProject selectedProject = (IProject) result[0];
+ setValue(selectedProject);
+ fireCommit();
+ }
+ }
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIResourceComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIResourceComposite.java
index d35451e40ae..ad2d18e636c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIResourceComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/CoreIResourceComposite.java
@@ -1,55 +1,55 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class CoreIResourceComposite extends AbstractIResourceComposite<IResource> {
-
- public CoreIResourceComposite(final Composite parent) {
- super(parent);
- }
-
- public CoreIResourceComposite(final Composite parent, final int style) {
- super(parent, style);
- }
-
- @Override
- public IResource getValue() {
- return ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
- }
-
- @Override
- protected final void browseResource() {
- ElementTreeSelectionDialog elementTreeSelectionDialog = new ElementTreeSelectionDialog(
- getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- elementTreeSelectionDialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
- elementTreeSelectionDialog.setMessage("Select a resource"); //$NON-NLS-1$
- elementTreeSelectionDialog.setAllowMultiple(false);
- elementTreeSelectionDialog.setDoubleClickSelects(true);
- elementTreeSelectionDialog.open();
- Object result = elementTreeSelectionDialog.getFirstResult();
-
- if (result != null && result instanceof IResource) {
- IResource selectedResource = (IResource) result;
- setValue(selectedResource);
- fireCommit();
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+public class CoreIResourceComposite extends AbstractIResourceComposite<IResource> {
+
+ public CoreIResourceComposite(final Composite parent) {
+ super(parent);
+ }
+
+ public CoreIResourceComposite(final Composite parent, final int style) {
+ super(parent, style);
+ }
+
+ @Override
+ public IResource getValue() {
+ return ResourcesPlugin.getWorkspace().getRoot().findMember(getText().getText());
+ }
+
+ @Override
+ protected final void browseResource() {
+ ElementTreeSelectionDialog elementTreeSelectionDialog = new ElementTreeSelectionDialog(
+ getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+ elementTreeSelectionDialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ elementTreeSelectionDialog.setMessage("Select a resource"); //$NON-NLS-1$
+ elementTreeSelectionDialog.setAllowMultiple(false);
+ elementTreeSelectionDialog.setDoubleClickSelects(true);
+ elementTreeSelectionDialog.open();
+ Object result = elementTreeSelectionDialog.getFirstResult();
+
+ if (result != null && result instanceof IResource) {
+ IResource selectedResource = (IResource) result;
+ setValue(selectedResource);
+ fireCommit();
+ }
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumComposite.java
index 32a0414e4da..8f13758ffe3 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumComposite.java
@@ -1,133 +1,133 @@
-/*****************************************************************************
- * 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:
- * Gregoire Dupe (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
- * Nicolas Guyomar (Mia-Software) - Bug 344563 - NPE with Enum Editor
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import org.eclipse.papyrus.emf.facet.util.core.Logger;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public abstract class EnumComposite<T> extends AbstractCellEditorComposite<T> {
-
- /** the control that is used to edit the contents of the cell */
- private Combo combo = null;
-
- private final Composite parentControl;
-
- private T lastValue;
-
- public EnumComposite(final Composite parent) {
- super(parent);
- setLayout(new FillLayout());
- this.parentControl = parent;
- this.combo = new Combo(this, SWT.NONE);
- final Listener clickListener = new Listener() {
- public void handleEvent(final Event event) {
- if (event.widget instanceof Control) {
- Control control = (Control) event.widget;
- if (control.getShell() == EnumComposite.this.getParentControl().getShell()) {
- if (event.widget != EnumComposite.this.getCombo()) {
- EnumComposite.this.commit();
- }
- }
- }
- }
- };
-
- this.combo.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- fireChanged();
- }
- });
-
- this.combo.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(final KeyEvent event) {
- // Enter key pressed
- if ((event.keyCode == SWT.CR && event.stateMask == 0)
- || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
- commit();
- } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
- // Escape key pressed
- close();
- }
- }
- });
-
- Display.getDefault().addFilter(SWT.MouseDown, clickListener);
- // this listener is only here to remove
- // the other listener from the Display
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(final DisposeEvent e) {
- Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
- }
- });
-
- this.combo.forceFocus();
- }
-
- protected void commit() {
- fireCommit();
- }
-
- public void setValue(final T value) {
- this.lastValue = value;
- if (value == null) {
- this.combo.setText(""); //$NON-NLS-1$
- } else {
- String strValue = getEnumString(value);
- this.combo.setText(strValue);
- }
- }
-
- public T getValue() {
- try {
- this.lastValue = this.getEnumValue(this.combo.getText());
- } catch (Exception e) {
- Logger.logError(e, Activator.getDefault());
- }
- return this.lastValue;
- }
-
- protected abstract T getEnumValue(String text);
-
- protected abstract String getEnumString(T value);
-
- protected abstract String[] getEnumStrings();
-
- public Combo getCombo() {
- return this.combo;
- }
-
- protected Composite getParentControl() {
- return this.parentControl;
- }
-
-}
+/*****************************************************************************
+ * 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:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
+ * Nicolas Guyomar (Mia-Software) - Bug 344563 - NPE with Enum Editor
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import org.eclipse.papyrus.emf.facet.util.core.Logger;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Activator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+public abstract class EnumComposite<T> extends AbstractCellEditorComposite<T> {
+
+ /** the control that is used to edit the contents of the cell */
+ private Combo combo = null;
+
+ private final Composite parentControl;
+
+ private T lastValue;
+
+ public EnumComposite(final Composite parent) {
+ super(parent);
+ setLayout(new FillLayout());
+ this.parentControl = parent;
+ this.combo = new Combo(this, SWT.NONE);
+ final Listener clickListener = new Listener() {
+ public void handleEvent(final Event event) {
+ if (event.widget instanceof Control) {
+ Control control = (Control) event.widget;
+ if (control.getShell() == EnumComposite.this.getParentControl().getShell()) {
+ if (event.widget != EnumComposite.this.getCombo()) {
+ EnumComposite.this.commit();
+ }
+ }
+ }
+ }
+ };
+
+ this.combo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ fireChanged();
+ }
+ });
+
+ this.combo.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(final KeyEvent event) {
+ // Enter key pressed
+ if ((event.keyCode == SWT.CR && event.stateMask == 0)
+ || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
+ commit();
+ } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ // Escape key pressed
+ close();
+ }
+ }
+ });
+
+ Display.getDefault().addFilter(SWT.MouseDown, clickListener);
+ // this listener is only here to remove
+ // the other listener from the Display
+ addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(final DisposeEvent e) {
+ Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
+ }
+ });
+
+ this.combo.forceFocus();
+ }
+
+ protected void commit() {
+ fireCommit();
+ }
+
+ public void setValue(final T value) {
+ this.lastValue = value;
+ if (value == null) {
+ this.combo.setText(""); //$NON-NLS-1$
+ } else {
+ String strValue = getEnumString(value);
+ this.combo.setText(strValue);
+ }
+ }
+
+ public T getValue() {
+ try {
+ this.lastValue = this.getEnumValue(this.combo.getText());
+ } catch (Exception e) {
+ Logger.logError(e, Activator.getDefault());
+ }
+ return this.lastValue;
+ }
+
+ protected abstract T getEnumValue(String text);
+
+ protected abstract String getEnumString(T value);
+
+ protected abstract String[] getEnumStrings();
+
+ public Combo getCombo() {
+ return this.combo;
+ }
+
+ protected Composite getParentControl() {
+ return this.parentControl;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumeratorComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumeratorComposite.java
index 58eef5324f2..c07f4210cf5 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumeratorComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/EnumeratorComposite.java
@@ -1,67 +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:
- * Gregoire Dupe (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.swt.widgets.Composite;
-
-public class EnumeratorComposite<T extends Enumerator> extends EnumComposite<T> {
-
- public EnumeratorComposite(final Composite parent) {
- super(parent);
-
- }
-
- private EEnum eenum = null;
-
- public void setEEnum(final EEnum eenum2) {
- this.eenum = eenum2;
- getCombo().setItems(getEnumStrings());
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected T getEnumValue(final String text) {
- if (this.eenum.getEEnumLiteralByLiteral(text) == null) {
- throw new RuntimeException("Invalid enumeration literal"); //$NON-NLS-1$
- }
- Object result = this.eenum.getEPackage().getEFactoryInstance()
- .createFromString(this.eenum, this.eenum.getEEnumLiteralByLiteral(text).getName());
- if (result instanceof Enumerator) {
- return (T) result;
- }
- return null;
- }
-
- @Override
- public String getEnumString(final T value) {
- return value.getLiteral();
- }
-
- @Override
- protected String[] getEnumStrings() {
- List<String> result = new ArrayList<String>();
- if (this.eenum != null) {
- for (EEnumLiteral eeNumLiteral : this.eenum.getELiterals()) {
- result.add(eeNumLiteral.getLiteral());
- }
- }
- return result.toArray(new String[] {});
- }
-}
+/*****************************************************************************
+ * 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:
+ * Gregoire Dupe (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Gregoire Dupe (Mia-Software) - Bug 344563 - NPE with Enum Editor
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.swt.widgets.Composite;
+
+public class EnumeratorComposite<T extends Enumerator> extends EnumComposite<T> {
+
+ public EnumeratorComposite(final Composite parent) {
+ super(parent);
+
+ }
+
+ private EEnum eenum = null;
+
+ public void setEEnum(final EEnum eenum2) {
+ this.eenum = eenum2;
+ getCombo().setItems(getEnumStrings());
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected T getEnumValue(final String text) {
+ if (this.eenum.getEEnumLiteralByLiteral(text) == null) {
+ throw new RuntimeException("Invalid enumeration literal"); //$NON-NLS-1$
+ }
+ Object result = this.eenum.getEPackage().getEFactoryInstance()
+ .createFromString(this.eenum, this.eenum.getEEnumLiteralByLiteral(text).getName());
+ if (result instanceof Enumerator) {
+ return (T) result;
+ }
+ return null;
+ }
+
+ @Override
+ public String getEnumString(final T value) {
+ return value.getLiteral();
+ }
+
+ @Override
+ protected String[] getEnumStrings() {
+ List<String> result = new ArrayList<String>();
+ if (this.eenum != null) {
+ for (EEnumLiteral eeNumLiteral : this.eenum.getELiterals()) {
+ result.add(eeNumLiteral.getLiteral());
+ }
+ }
+ return result.toArray(new String[] {});
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/UnaryReferenceCellEditorComposite.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/UnaryReferenceCellEditorComposite.java
index 7b3c49759cb..9e27ee9fd71 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/UnaryReferenceCellEditorComposite.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/UnaryReferenceCellEditorComposite.java
@@ -1,251 +1,251 @@
-/*****************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - initial API and implementation
- * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
- * Grégoire Dupé (Mia-Software) - Bug 424122 - [Table] Images, fonts and colors are not shared between the instances of table
- *****************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.TreeMap;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.fieldassist.ContentProposalAdapter;
-import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
-import org.eclipse.papyrus.emf.facet.util.swt.fontprovider.IFontProvider;
-import org.eclipse.papyrus.emf.facet.util.swt.fontprovider.IFontProviderFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
-import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-
-/** A cell editor for unary references */
-public class UnaryReferenceCellEditorComposite extends AbstractCellEditorComposite<EObject> {
-
- private static final int GRID_DATA_HEIGHT = 50;
- private final Button button;
- private final Combo combo;
- private final Control parentControl;
- private final Map<String, EObject> fElements = new TreeMap<String, EObject>();
-
- /**
- * @param parent
- * the parent composite
- * @param eObjects
- * the possible choices
- */
- public UnaryReferenceCellEditorComposite(final Composite parent, final List<EObject> eObjects) {
- super(parent);
- this.parentControl = parent;
-
- CustomizableLabelProvider customizableLabelProvider = new CustomizableLabelProvider();
- for (EObject eObject : eObjects) {
- String label = customizableLabelProvider.getText(eObject);
- // find a unique label
- if (this.fElements.get(label) != null) {
- int suffix = 2;
- while (this.fElements.get(label + " (" + suffix + ")") != null) { //$NON-NLS-1$ //$NON-NLS-2$
- suffix++;
- }
- this.fElements.put(label + " (" + suffix + ")", eObject); //$NON-NLS-1$//$NON-NLS-2$
- } else {
- this.fElements.put(label, eObject);
- }
- }
-
- GridLayout compositeLayout = new GridLayout(2, false);
- compositeLayout.marginHeight = 0;
- compositeLayout.marginWidth = 0;
- compositeLayout.horizontalSpacing = 0;
- setLayout(compositeLayout);
-
- this.combo = new Combo(this, SWT.DROP_DOWN);
- // reduce the font so that the Combo fits in the cell
- FontData[] fontData = Display.getDefault().getSystemFont().getFontData();
- fontData[0].setHeight(fontData[0].getHeight() - 2);
- final IFontProvider fontProvider = IFontProviderFactory.DEFAULT
- .getOrCreateIFontProvider(Display.getDefault());
- final Font font = fontProvider.getFont(fontData[0]);
- this.combo.setFont(font);
- for (String label : this.fElements.keySet()) {
- this.combo.add(label);
- }
- GridData comboGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- this.combo.setLayoutData(comboGridData);
- addCompletionHandler(this.combo, this.fElements.keySet());
-
- this.combo.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(final KeyEvent event) {
- // Enter key pressed
- if ((event.keyCode == SWT.CR && event.stateMask == 0)
- || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
- if (isValid()) {
- commit();
- } else {
- MessageDialog.openWarning(parent.getShell(),
- Messages.UnaryReferenceCellEditorComposite_0,
- Messages.UnaryReferenceCellEditorComposite_1);
- }
- } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
- // Escape key pressed
- close();
- }
- }
- });
-
- this.button = new Button(this, SWT.PUSH);
- this.button.setText("..."); //$NON-NLS-1$
- GridData buttonGridData = new GridData(SWT.FILL, SWT.FILL, false, true);
- buttonGridData.heightHint = UnaryReferenceCellEditorComposite.GRID_DATA_HEIGHT;
- this.button.setLayoutData(buttonGridData);
- this.button.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent e) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(
- UnaryReferenceCellEditorComposite.this.getParentControl().getShell(),
- new CustomizableLabelProvider()) {
- @Override
- protected void okPressed() {
- Object[] selectedElements = getSelectedElements();
- String selectedElementLabel = null;
- if (selectedElements.length > 0) {
- Set<Entry<String, EObject>> entrySet = UnaryReferenceCellEditorComposite.this
- .getfElements().entrySet();
- for (Entry<String, EObject> entry : entrySet) {
- if (entry.getValue() == selectedElements[0]) {
- selectedElementLabel = entry.getKey();
- break;
- }
- }
- }
- UnaryReferenceCellEditorComposite.this.getCombo().setText(
- selectedElementLabel);
- commit();
- super.okPressed();
- }
- };
- dialog.setTitle(Messages.UnaryReferenceCellEditorComposite_2);
- dialog.setElements(eObjects.toArray());
- dialog.open();
- }
- });
-
- // commit the cell editor when the mouse is clicked
- // anywhere outside the text field
- final Listener clickListener = new Listener() {
- public void handleEvent(final Event event) {
- if (event.widget instanceof Control) {
- Control control = (Control) event.widget;
- if (control.getShell() == UnaryReferenceCellEditorComposite.this
- .getParentControl().getShell()
- && event.widget != UnaryReferenceCellEditorComposite.this.getButton()
- && event.widget != UnaryReferenceCellEditorComposite.this.getCombo()) {
- if (isValid()) {
- commit();
- }
- }
- }
-
- }
- };
- Display.getDefault().addFilter(SWT.MouseDown, clickListener);
-
- // this listener is only here to remove
- // the other listener from the Display
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(final DisposeEvent e) {
- Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
- }
- });
-
- this.combo.addModifyListener(new ModifyListener() {
- public void modifyText(final ModifyEvent e) {
- fireChanged();
- }
- });
-
- this.combo.forceFocus();
- }
-
- protected boolean isValid() {
- return this.fElements.get(this.combo.getText()) != null;
- }
-
- private static void addCompletionHandler(final Combo comboBox, final Collection<String> completions) {
- String[] completionsArray = completions.toArray(new String[completions.size()]);
- SimpleContentProposalProvider contentProposalProvider = new SimpleContentProposalProvider(
- completionsArray);
- contentProposalProvider.setFiltering(true);
- ContentProposalAdapter adapter = new ContentProposalAdapter(comboBox,
- new ComboContentAdapter(), contentProposalProvider, null, null);
- // adapter.setFilterStyle(ContentProposalAdapter.FILTER_CHARACTER);
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
-
- }
-
- public EObject getValue() {
- EObject eObject = this.fElements.get(this.combo.getText());
- return eObject;
- }
-
- protected void commit() {
- fireCommit();
- }
-
- public void setValue(final EObject value) {
- //
- }
-
- protected Button getButton() {
- return this.button;
- }
-
- protected Combo getCombo() {
- return this.combo;
- }
-
- protected Control getParentControl() {
- return this.parentControl;
- }
-
- protected Map<String, EObject> getfElements() {
- return this.fElements;
- }
-
-}
+/*****************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - initial API and implementation
+ * Nicolas Bros (Mia-Software) - Bug 339664 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 334539 - [celleditors] change listener
+ * Grégoire Dupé (Mia-Software) - Bug 424122 - [Table] Images, fonts and colors are not shared between the instances of table
+ *****************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.fieldassist.ComboContentAdapter;
+import org.eclipse.jface.fieldassist.ContentProposalAdapter;
+import org.eclipse.jface.fieldassist.SimpleContentProposalProvider;
+import org.eclipse.papyrus.emf.facet.util.swt.fontprovider.IFontProvider;
+import org.eclipse.papyrus.emf.facet.util.swt.fontprovider.IFontProviderFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
+import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+
+/** A cell editor for unary references */
+public class UnaryReferenceCellEditorComposite extends AbstractCellEditorComposite<EObject> {
+
+ private static final int GRID_DATA_HEIGHT = 50;
+ private final Button button;
+ private final Combo combo;
+ private final Control parentControl;
+ private final Map<String, EObject> fElements = new TreeMap<String, EObject>();
+
+ /**
+ * @param parent
+ * the parent composite
+ * @param eObjects
+ * the possible choices
+ */
+ public UnaryReferenceCellEditorComposite(final Composite parent, final List<EObject> eObjects) {
+ super(parent);
+ this.parentControl = parent;
+
+ CustomizableLabelProvider customizableLabelProvider = new CustomizableLabelProvider();
+ for (EObject eObject : eObjects) {
+ String label = customizableLabelProvider.getText(eObject);
+ // find a unique label
+ if (this.fElements.get(label) != null) {
+ int suffix = 2;
+ while (this.fElements.get(label + " (" + suffix + ")") != null) { //$NON-NLS-1$ //$NON-NLS-2$
+ suffix++;
+ }
+ this.fElements.put(label + " (" + suffix + ")", eObject); //$NON-NLS-1$//$NON-NLS-2$
+ } else {
+ this.fElements.put(label, eObject);
+ }
+ }
+
+ GridLayout compositeLayout = new GridLayout(2, false);
+ compositeLayout.marginHeight = 0;
+ compositeLayout.marginWidth = 0;
+ compositeLayout.horizontalSpacing = 0;
+ setLayout(compositeLayout);
+
+ this.combo = new Combo(this, SWT.DROP_DOWN);
+ // reduce the font so that the Combo fits in the cell
+ FontData[] fontData = Display.getDefault().getSystemFont().getFontData();
+ fontData[0].setHeight(fontData[0].getHeight() - 2);
+ final IFontProvider fontProvider = IFontProviderFactory.DEFAULT
+ .getOrCreateIFontProvider(Display.getDefault());
+ final Font font = fontProvider.getFont(fontData[0]);
+ this.combo.setFont(font);
+ for (String label : this.fElements.keySet()) {
+ this.combo.add(label);
+ }
+ GridData comboGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ this.combo.setLayoutData(comboGridData);
+ addCompletionHandler(this.combo, this.fElements.keySet());
+
+ this.combo.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(final KeyEvent event) {
+ // Enter key pressed
+ if ((event.keyCode == SWT.CR && event.stateMask == 0)
+ || (event.keyCode == SWT.KEYPAD_CR && event.stateMask == 0)) {
+ if (isValid()) {
+ commit();
+ } else {
+ MessageDialog.openWarning(parent.getShell(),
+ Messages.UnaryReferenceCellEditorComposite_0,
+ Messages.UnaryReferenceCellEditorComposite_1);
+ }
+ } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ // Escape key pressed
+ close();
+ }
+ }
+ });
+
+ this.button = new Button(this, SWT.PUSH);
+ this.button.setText("..."); //$NON-NLS-1$
+ GridData buttonGridData = new GridData(SWT.FILL, SWT.FILL, false, true);
+ buttonGridData.heightHint = UnaryReferenceCellEditorComposite.GRID_DATA_HEIGHT;
+ this.button.setLayoutData(buttonGridData);
+ this.button.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(
+ UnaryReferenceCellEditorComposite.this.getParentControl().getShell(),
+ new CustomizableLabelProvider()) {
+ @Override
+ protected void okPressed() {
+ Object[] selectedElements = getSelectedElements();
+ String selectedElementLabel = null;
+ if (selectedElements.length > 0) {
+ Set<Entry<String, EObject>> entrySet = UnaryReferenceCellEditorComposite.this
+ .getfElements().entrySet();
+ for (Entry<String, EObject> entry : entrySet) {
+ if (entry.getValue() == selectedElements[0]) {
+ selectedElementLabel = entry.getKey();
+ break;
+ }
+ }
+ }
+ UnaryReferenceCellEditorComposite.this.getCombo().setText(
+ selectedElementLabel);
+ commit();
+ super.okPressed();
+ }
+ };
+ dialog.setTitle(Messages.UnaryReferenceCellEditorComposite_2);
+ dialog.setElements(eObjects.toArray());
+ dialog.open();
+ }
+ });
+
+ // commit the cell editor when the mouse is clicked
+ // anywhere outside the text field
+ final Listener clickListener = new Listener() {
+ public void handleEvent(final Event event) {
+ if (event.widget instanceof Control) {
+ Control control = (Control) event.widget;
+ if (control.getShell() == UnaryReferenceCellEditorComposite.this
+ .getParentControl().getShell()
+ && event.widget != UnaryReferenceCellEditorComposite.this.getButton()
+ && event.widget != UnaryReferenceCellEditorComposite.this.getCombo()) {
+ if (isValid()) {
+ commit();
+ }
+ }
+ }
+
+ }
+ };
+ Display.getDefault().addFilter(SWT.MouseDown, clickListener);
+
+ // this listener is only here to remove
+ // the other listener from the Display
+ addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(final DisposeEvent e) {
+ Display.getDefault().removeFilter(SWT.MouseDown, clickListener);
+ }
+ });
+
+ this.combo.addModifyListener(new ModifyListener() {
+ public void modifyText(final ModifyEvent e) {
+ fireChanged();
+ }
+ });
+
+ this.combo.forceFocus();
+ }
+
+ protected boolean isValid() {
+ return this.fElements.get(this.combo.getText()) != null;
+ }
+
+ private static void addCompletionHandler(final Combo comboBox, final Collection<String> completions) {
+ String[] completionsArray = completions.toArray(new String[completions.size()]);
+ SimpleContentProposalProvider contentProposalProvider = new SimpleContentProposalProvider(
+ completionsArray);
+ contentProposalProvider.setFiltering(true);
+ ContentProposalAdapter adapter = new ContentProposalAdapter(comboBox,
+ new ComboContentAdapter(), contentProposalProvider, null, null);
+ // adapter.setFilterStyle(ContentProposalAdapter.FILTER_CHARACTER);
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+
+ }
+
+ public EObject getValue() {
+ EObject eObject = this.fElements.get(this.combo.getText());
+ return eObject;
+ }
+
+ protected void commit() {
+ fireCommit();
+ }
+
+ public void setValue(final EObject value) {
+ //
+ }
+
+ protected Button getButton() {
+ return this.button;
+ }
+
+ protected Combo getCombo() {
+ return this.combo;
+ }
+
+ protected Control getParentControl() {
+ return this.parentControl;
+ }
+
+ protected Map<String, EObject> getfElements() {
+ return this.fElements;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIFileCompositeFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIFileCompositeFactory.java
index e09dc1691be..1d441c4d456 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIFileCompositeFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIFileCompositeFactory.java
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIFileComposite;
-import org.eclipse.swt.widgets.Composite;
-
-public class CoreIFileCompositeFactory implements ICompositeEditorFactory<IFile> {
-
- public Class<IFile> getHandledType() {
- return IFile.class;
- }
-
- public AbstractCellEditorComposite<IFile> createCompositeEditor(final Composite parent, final int style) {
- return new CoreIFileComposite(parent, style);
- }
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIFileComposite;
+import org.eclipse.swt.widgets.Composite;
+
+public class CoreIFileCompositeFactory implements ICompositeEditorFactory<IFile> {
+
+ public Class<IFile> getHandledType() {
+ return IFile.class;
+ }
+
+ public AbstractCellEditorComposite<IFile> createCompositeEditor(final Composite parent, final int style) {
+ return new CoreIFileComposite(parent, style);
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIProjectCompositeFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIProjectCompositeFactory.java
index d029ef74c23..ff210bb6dd3 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIProjectCompositeFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIProjectCompositeFactory.java
@@ -1,28 +1,28 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - Bug 342548 - [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIProjectComposite;
-import org.eclipse.swt.widgets.Composite;
-
-public class CoreIProjectCompositeFactory implements ICompositeEditorFactory<IProject> {
-
- public Class<IProject> getHandledType() {
- return IProject.class;
- }
-
- public AbstractCellEditorComposite<IProject> createCompositeEditor(final Composite parent, final int style) {
- return new CoreIProjectComposite(parent, style);
- }
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - Bug 342548 - [Java Discovery] Illegal parameter initializer for ELEMENTS_TO_ANALYZE
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIProjectComposite;
+import org.eclipse.swt.widgets.Composite;
+
+public class CoreIProjectCompositeFactory implements ICompositeEditorFactory<IProject> {
+
+ public Class<IProject> getHandledType() {
+ return IProject.class;
+ }
+
+ public AbstractCellEditorComposite<IProject> createCompositeEditor(final Composite parent, final int style) {
+ return new CoreIProjectComposite(parent, style);
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIResourceCompositeFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIResourceCompositeFactory.java
index aabcbeab521..e56852a6819 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIResourceCompositeFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/core/composite/factories/CoreIResourceCompositeFactory.java
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * Copyright (c) 2011 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
- * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIResourceComposite;
-import org.eclipse.swt.widgets.Composite;
-
-public class CoreIResourceCompositeFactory implements ICompositeEditorFactory<IResource> {
- public Class<IResource> getHandledType() {
- return IResource.class;
- }
-
- public AbstractCellEditorComposite<IResource> createCompositeEditor(final Composite parent,
- final int style) {
- return new CoreIResourceComposite(parent, style);
- }
+/*******************************************************************************
+ * Copyright (c) 2011 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 334546 - [celleditors] no border on Text field
+ * Nicolas Bros (Mia-Software) - Bug 338437 - compositeEditors extension point cannot be used to register user types
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.factories;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.AbstractCellEditorComposite;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICompositeEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.core.composite.CoreIResourceComposite;
+import org.eclipse.swt.widgets.Composite;
+
+public class CoreIResourceCompositeFactory implements ICompositeEditorFactory<IResource> {
+ public Class<IResource> getHandledType() {
+ return IResource.class;
+ }
+
+ public AbstractCellEditorComposite<IResource> createCompositeEditor(final Composite parent,
+ final int style) {
+ return new CoreIResourceComposite(parent, style);
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/messages.properties b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/messages.properties
index a2e8a13b34e..19531cd0d6c 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/messages.properties
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/messages.properties
@@ -1,38 +1,38 @@
-###############################################################################
-# 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:
-# Nicolas Bros (Mia-Software) - initial API and implementation
-###############################################################################
-CoreIFileComposite_mustSelectFile=You must select a file
-CoreIFileComposite_selectFile=Select a file
-NaryAttributeEditingDialog_add=&Add
-NaryReferenceEditingDialog_addAll=>>
-NaryReferenceEditingDialog_addAllTooltip=Add all
-NaryReferenceEditingDialog_addTooltip=Add
-NaryReferenceEditingDialog_availableValues=Available values
-NaryReferenceEditingDialog_deleteElements=Delete elements?
-NaryReferenceEditingDialog_deleteElementsLong=Since the feature is composite, this will delete the selected element(s) from the model.
-NaryReferenceEditingDialog_down=&Down
-NaryReferenceEditingDialog_moveWarning=The feature is composite. The selected value(s) will be moved from their previous parent.
-NaryReferenceEditingDialog_moveElement=Move element?
-NaryReferenceEditingDialog_remove=&<
-NaryReferenceEditingDialog_removeAll=<<
-NaryReferenceEditingDialog_removeAllTooltip=Remove all
-NaryReferenceEditingDialog_removeTooltip=Remove
-NaryReferenceEditingDialog_shellTitle=Edit {0} of {1}
-NaryReferenceEditingDialog_typeFilterText=type filter text
-NaryReferenceEditingDialog_up=&Up
-NaryReferenceEditingDialog_values=Values
-NaryReferenceEditingDialog_add=&>
-NaryReferenceEditingDialog_newInstance=New...
-UnaryReferenceCellEditorComposite_0=Invalid selection
-UnaryReferenceCellEditorComposite_1=Please select an EObject
-UnaryReferenceCellEditorComposite_2=Select an EObject
-NaryAttributeEditingDialog_delete=D&elete
-NaryAttributeEditingDialog_enterNewValuePlaceholder=<enter new value>
+###############################################################################
+# 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:
+# Nicolas Bros (Mia-Software) - initial API and implementation
+###############################################################################
+CoreIFileComposite_mustSelectFile=You must select a file
+CoreIFileComposite_selectFile=Select a file
+NaryAttributeEditingDialog_add=&Add
+NaryReferenceEditingDialog_addAll=>>
+NaryReferenceEditingDialog_addAllTooltip=Add all
+NaryReferenceEditingDialog_addTooltip=Add
+NaryReferenceEditingDialog_availableValues=Available values
+NaryReferenceEditingDialog_deleteElements=Delete elements?
+NaryReferenceEditingDialog_deleteElementsLong=Since the feature is composite, this will delete the selected element(s) from the model.
+NaryReferenceEditingDialog_down=&Down
+NaryReferenceEditingDialog_moveWarning=The feature is composite. The selected value(s) will be moved from their previous parent.
+NaryReferenceEditingDialog_moveElement=Move element?
+NaryReferenceEditingDialog_remove=&<
+NaryReferenceEditingDialog_removeAll=<<
+NaryReferenceEditingDialog_removeAllTooltip=Remove all
+NaryReferenceEditingDialog_removeTooltip=Remove
+NaryReferenceEditingDialog_shellTitle=Edit {0} of {1}
+NaryReferenceEditingDialog_typeFilterText=type filter text
+NaryReferenceEditingDialog_up=&Up
+NaryReferenceEditingDialog_values=Values
+NaryReferenceEditingDialog_add=&>
+NaryReferenceEditingDialog_newInstance=New...
+UnaryReferenceCellEditorComposite_0=Invalid selection
+UnaryReferenceCellEditorComposite_1=Please select an EObject
+UnaryReferenceCellEditorComposite_2=Select an EObject
+NaryAttributeEditingDialog_delete=D&elete
+NaryAttributeEditingDialog_enterNewValuePlaceholder=<enter new value>
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AbstractNaryEditingDialog.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AbstractNaryEditingDialog.java
index ecc4d0bd031..b970205ad5a 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AbstractNaryEditingDialog.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AbstractNaryEditingDialog.java
@@ -1,141 +1,141 @@
-/*******************************************************************************
- * 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:
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.swt.widgets.Shell;
-
-public abstract class AbstractNaryEditingDialog<T extends Object> extends Dialog {
-
- public static final int AVAILABLE_VALUES_TREE_WIDTH = 200;
- public static final int AVAILABLE_VALUES_TREE_HEIGHT = 250;
-
- private final List<T> values;
- private final IModelCellEditHandler editHandler;
- private final EObject eObject;
- private final EStructuralFeature feature;
-
- protected AbstractNaryEditingDialog(final Shell shell, final List<T> values,
- final IModelCellEditHandler editHandler, final EObject eObject,
- final EStructuralFeature feature) {
- super(shell);
- this.values = new ArrayList<T>(values);
- this.feature = feature;
- this.editHandler = editHandler;
- this.eObject = eObject;
- }
-
- public class AssignedValuesContentProvider implements IStructuredContentProvider {
- public Object[] getElements(final Object inputElement) {
- if (inputElement instanceof FeatureValuesInput) {
- FeatureValuesInput valuesInput = (FeatureValuesInput) inputElement;
- EObject source = valuesInput.getSource();
- List<?> list = (List<?>) source.eGet(valuesInput.getFeature());
- if (list == null) {
- return new Object[0];
- }
- return list.toArray();
- } else if (inputElement instanceof List<?>) {
- return ((List<?>) inputElement).toArray();
- }
- throw new IllegalArgumentException(FeatureValuesInput.class.getSimpleName()
- + " expected"); //$NON-NLS-1$
- }
-
- public void dispose() {
- //
- }
-
- public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
- //
- }
- }
-
- public List<T> getValue() {
- return this.values;
- }
-
- @SuppressWarnings("unchecked")
- // type erasure on generic
- public void upButtonClicked() {
- final IStructuredSelection selection = (IStructuredSelection) getSelection();
-
- int minIndex = 0;
- for (Object element : selection.toList()) {
- final int index = this.values.indexOf(element);
- T object = this.values.set(Math.max(index - 1, minIndex++), (T) element);
- this.values.set(index, object);
- }
- refresh();
- }
-
- @SuppressWarnings("unchecked")
- // type erasure on generic
- public void downButtonClicked() {
- final IStructuredSelection selection = (StructuredSelection) getSelection();
-
- List<?> selectionList = selection.toList();
- boolean canMove = !selectionList.contains(this.values.get(this.values.size() - 1));
- for (int i = this.values.size() - 2; i >= 0; i--) {
- final Object selectedObject = this.values.get(i);
- if (selectionList.contains(selectedObject)) {
- if (canMove) {
- T object = this.values.set(i + 1, (T) selectedObject);
- this.values.set(i, object);
- }
- } else {
- canMove = true;
- }
-
- }
-
- refresh();
- }
-
- public abstract ISelection getSelection();
-
- public abstract void refresh();
-
- @Override
- protected void okPressed() {
- super.okPressed();
- this.editHandler.commit();
- }
-
- protected List<T> getValues() {
- return this.values;
- }
-
- protected IModelCellEditHandler getEditHandler() {
- return this.editHandler;
- }
-
- protected EObject geteObject() {
- return this.eObject;
- }
-
- protected EStructuralFeature getFeature() {
- return this.feature;
- }
-
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.swt.widgets.Shell;
+
+public abstract class AbstractNaryEditingDialog<T extends Object> extends Dialog {
+
+ public static final int AVAILABLE_VALUES_TREE_WIDTH = 200;
+ public static final int AVAILABLE_VALUES_TREE_HEIGHT = 250;
+
+ private final List<T> values;
+ private final IModelCellEditHandler editHandler;
+ private final EObject eObject;
+ private final EStructuralFeature feature;
+
+ protected AbstractNaryEditingDialog(final Shell shell, final List<T> values,
+ final IModelCellEditHandler editHandler, final EObject eObject,
+ final EStructuralFeature feature) {
+ super(shell);
+ this.values = new ArrayList<T>(values);
+ this.feature = feature;
+ this.editHandler = editHandler;
+ this.eObject = eObject;
+ }
+
+ public class AssignedValuesContentProvider implements IStructuredContentProvider {
+ public Object[] getElements(final Object inputElement) {
+ if (inputElement instanceof FeatureValuesInput) {
+ FeatureValuesInput valuesInput = (FeatureValuesInput) inputElement;
+ EObject source = valuesInput.getSource();
+ List<?> list = (List<?>) source.eGet(valuesInput.getFeature());
+ if (list == null) {
+ return new Object[0];
+ }
+ return list.toArray();
+ } else if (inputElement instanceof List<?>) {
+ return ((List<?>) inputElement).toArray();
+ }
+ throw new IllegalArgumentException(FeatureValuesInput.class.getSimpleName()
+ + " expected"); //$NON-NLS-1$
+ }
+
+ public void dispose() {
+ //
+ }
+
+ public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
+ //
+ }
+ }
+
+ public List<T> getValue() {
+ return this.values;
+ }
+
+ @SuppressWarnings("unchecked")
+ // type erasure on generic
+ public void upButtonClicked() {
+ final IStructuredSelection selection = (IStructuredSelection) getSelection();
+
+ int minIndex = 0;
+ for (Object element : selection.toList()) {
+ final int index = this.values.indexOf(element);
+ T object = this.values.set(Math.max(index - 1, minIndex++), (T) element);
+ this.values.set(index, object);
+ }
+ refresh();
+ }
+
+ @SuppressWarnings("unchecked")
+ // type erasure on generic
+ public void downButtonClicked() {
+ final IStructuredSelection selection = (StructuredSelection) getSelection();
+
+ List<?> selectionList = selection.toList();
+ boolean canMove = !selectionList.contains(this.values.get(this.values.size() - 1));
+ for (int i = this.values.size() - 2; i >= 0; i--) {
+ final Object selectedObject = this.values.get(i);
+ if (selectionList.contains(selectedObject)) {
+ if (canMove) {
+ T object = this.values.set(i + 1, (T) selectedObject);
+ this.values.set(i, object);
+ }
+ } else {
+ canMove = true;
+ }
+
+ }
+
+ refresh();
+ }
+
+ public abstract ISelection getSelection();
+
+ public abstract void refresh();
+
+ @Override
+ protected void okPressed() {
+ super.okPressed();
+ this.editHandler.commit();
+ }
+
+ protected List<T> getValues() {
+ return this.values;
+ }
+
+ protected IModelCellEditHandler getEditHandler() {
+ return this.editHandler;
+ }
+
+ protected EObject geteObject() {
+ return this.eObject;
+ }
+
+ protected EStructuralFeature getFeature() {
+ return this.feature;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AssignableValuesContentProvider.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AssignableValuesContentProvider.java
index 75b0b85ea57..e784ffa12e3 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AssignableValuesContentProvider.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/AssignableValuesContentProvider.java
@@ -1,82 +1,82 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClassifier;
-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.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-public class AssignableValuesContentProvider implements ITreeContentProvider {
- public Object[] getElements(final Object inputElement) {
- if (inputElement instanceof FeatureValuesInput) {
- FeatureValuesInput assignableValuesInput = (FeatureValuesInput) inputElement;
- EStructuralFeature feature = assignableValuesInput.getFeature();
- EClassifier eType = feature.getEType();
- EObject source = assignableValuesInput.getSource();
- List<?> featureValues = (List<?>) source.eGet(feature);
-
- // build a list of EObjects assignable to the EReference
- List<EObject> list = new ArrayList<EObject>();
- Resource eResource = source.eResource();
- if (eResource == null) {
- return new Object[0];
- }
- ResourceSet resourceSet = eResource.getResourceSet();
- TreeIterator<Notifier> allContents = resourceSet.getAllContents();
- while (allContents.hasNext()) {
- Notifier notifier = allContents.next();
- if (notifier instanceof EObject) {
- EObject eObject = (EObject) notifier;
- if (eType.isInstance(eObject)
- && (!feature.isUnique() || !(featureValues != null && featureValues
- .contains(eObject)))) {
- list.add(eObject);
- }
- }
- }
- return list.toArray();
- } else if (inputElement instanceof List<?>) {
- return ((List<?>) inputElement).toArray();
- }
- throw new IllegalArgumentException(FeatureValuesInput.class.getSimpleName() + " expected"); //$NON-NLS-1$
- }
-
- public void dispose() {
- //
- }
-
- public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
- //
- }
-
- public Object[] getChildren(final Object parentElement) {
- return null;
- }
-
- public Object getParent(final Object element) {
- return null;
- }
-
- public boolean hasChildren(final Object element) {
- return false;
- }
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EClassifier;
+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.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class AssignableValuesContentProvider implements ITreeContentProvider {
+ public Object[] getElements(final Object inputElement) {
+ if (inputElement instanceof FeatureValuesInput) {
+ FeatureValuesInput assignableValuesInput = (FeatureValuesInput) inputElement;
+ EStructuralFeature feature = assignableValuesInput.getFeature();
+ EClassifier eType = feature.getEType();
+ EObject source = assignableValuesInput.getSource();
+ List<?> featureValues = (List<?>) source.eGet(feature);
+
+ // build a list of EObjects assignable to the EReference
+ List<EObject> list = new ArrayList<EObject>();
+ Resource eResource = source.eResource();
+ if (eResource == null) {
+ return new Object[0];
+ }
+ ResourceSet resourceSet = eResource.getResourceSet();
+ TreeIterator<Notifier> allContents = resourceSet.getAllContents();
+ while (allContents.hasNext()) {
+ Notifier notifier = allContents.next();
+ if (notifier instanceof EObject) {
+ EObject eObject = (EObject) notifier;
+ if (eType.isInstance(eObject)
+ && (!feature.isUnique() || !(featureValues != null && featureValues
+ .contains(eObject)))) {
+ list.add(eObject);
+ }
+ }
+ }
+ return list.toArray();
+ } else if (inputElement instanceof List<?>) {
+ return ((List<?>) inputElement).toArray();
+ }
+ throw new IllegalArgumentException(FeatureValuesInput.class.getSimpleName() + " expected"); //$NON-NLS-1$
+ }
+
+ public void dispose() {
+ //
+ }
+
+ public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
+ //
+ }
+
+ public Object[] getChildren(final Object parentElement) {
+ return null;
+ }
+
+ public Object getParent(final Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(final Object element) {
+ return false;
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/EditingUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/EditingUtils.java
index 72239f8b9be..68890b78cfd 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/EditingUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/EditingUtils.java
@@ -1,84 +1,84 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory;
-
-public final class EditingUtils {
- private EditingUtils() {
- //
- }
-
- public static void moveElementsUp(final EObject eObject, final EStructuralFeature feature,
- final Collection<Object> elements, final ICommandFactory commandFactory,
- final EditingDomain editingDomain) {
- CompoundCommand compoundCommand = new CompoundCommand();
-
- List<?> list = (List<?>) eObject.eGet(feature);
-
- int minIndex = 0;
- for (Object element : elements) {
- final int index = list.indexOf(element);
-
- Command moveCommand = commandFactory.createMoveCommand(editingDomain, eObject, feature,
- element, Math.max(index - 1, minIndex++));
- compoundCommand.append(moveCommand);
- }
- editingDomain.getCommandStack().execute(compoundCommand);
- // int[] selectionIndices;
- // Arrays.sort(selectionIndices);
- // CompoundCommand compoundCommand = new CompoundCommand();
- // int minIndex = 0;
- // for(int index : selectionIndices) {
- // Command moveCommand = MoveCommand.create(editingDomain,
- // eObject,feature, index, Math.max(index - 1,
- // minIndex++));
- // compoundCommand.append(moveCommand);
- // }
- // editingDomain.getCommandStack().execute(compoundCommand);
- }
-
- public static void moveElementsDown(final EObject eObject, final EStructuralFeature feature,
- final Collection<Object> elements, final ICommandFactory commandFactory,
- final EditingDomain editingDomain) {
- Object value = eObject.eGet(feature);
- List<?> list = (List<?>) value;
-
- CompoundCommand compoundCommand = new CompoundCommand();
-
- // prevent the last two elements from swapping
- boolean canMove = !elements.contains(list.get(list.size() - 1));
- for (int i = list.size() - 2; i >= 0; i--) {
- final Object selectedObject = list.get(i);
- if (elements.contains(selectedObject)) {
- if (canMove) {
- Command moveCommand = commandFactory.createMoveCommand(editingDomain, eObject,
- feature, selectedObject, i + 1);
- compoundCommand.append(moveCommand);
- }
- } else {
- canMove = true;
- }
-
- }
- editingDomain.getCommandStack().execute(compoundCommand);
- }
-
-}
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICommandFactory;
+
+public final class EditingUtils {
+ private EditingUtils() {
+ //
+ }
+
+ public static void moveElementsUp(final EObject eObject, final EStructuralFeature feature,
+ final Collection<Object> elements, final ICommandFactory commandFactory,
+ final EditingDomain editingDomain) {
+ CompoundCommand compoundCommand = new CompoundCommand();
+
+ List<?> list = (List<?>) eObject.eGet(feature);
+
+ int minIndex = 0;
+ for (Object element : elements) {
+ final int index = list.indexOf(element);
+
+ Command moveCommand = commandFactory.createMoveCommand(editingDomain, eObject, feature,
+ element, Math.max(index - 1, minIndex++));
+ compoundCommand.append(moveCommand);
+ }
+ editingDomain.getCommandStack().execute(compoundCommand);
+ // int[] selectionIndices;
+ // Arrays.sort(selectionIndices);
+ // CompoundCommand compoundCommand = new CompoundCommand();
+ // int minIndex = 0;
+ // for(int index : selectionIndices) {
+ // Command moveCommand = MoveCommand.create(editingDomain,
+ // eObject,feature, index, Math.max(index - 1,
+ // minIndex++));
+ // compoundCommand.append(moveCommand);
+ // }
+ // editingDomain.getCommandStack().execute(compoundCommand);
+ }
+
+ public static void moveElementsDown(final EObject eObject, final EStructuralFeature feature,
+ final Collection<Object> elements, final ICommandFactory commandFactory,
+ final EditingDomain editingDomain) {
+ Object value = eObject.eGet(feature);
+ List<?> list = (List<?>) value;
+
+ CompoundCommand compoundCommand = new CompoundCommand();
+
+ // prevent the last two elements from swapping
+ boolean canMove = !elements.contains(list.get(list.size() - 1));
+ for (int i = list.size() - 2; i >= 0; i--) {
+ final Object selectedObject = list.get(i);
+ if (elements.contains(selectedObject)) {
+ if (canMove) {
+ Command moveCommand = commandFactory.createMoveCommand(editingDomain, eObject,
+ feature, selectedObject, i + 1);
+ compoundCommand.append(moveCommand);
+ }
+ } else {
+ canMove = true;
+ }
+
+ }
+ editingDomain.getCommandStack().execute(compoundCommand);
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/FeatureValuesInput.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/FeatureValuesInput.java
index 385482c0b62..5da2df75030 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/FeatureValuesInput.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/FeatureValuesInput.java
@@ -1,33 +1,33 @@
-/*******************************************************************************
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-public class FeatureValuesInput {
- private final EStructuralFeature feature;
- private final EObject source;
-
- public FeatureValuesInput(final EStructuralFeature feature, final EObject source) {
- this.feature = feature;
- this.source = source;
- }
-
- public EStructuralFeature getFeature() {
- return this.feature;
- }
-
- public EObject getSource() {
- return this.source;
- }
+/*******************************************************************************
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+public class FeatureValuesInput {
+ private final EStructuralFeature feature;
+ private final EObject source;
+
+ public FeatureValuesInput(final EStructuralFeature feature, final EObject source) {
+ this.feature = feature;
+ this.source = source;
+ }
+
+ public EStructuralFeature getFeature() {
+ return this.feature;
+ }
+
+ public EObject getSource() {
+ return this.source;
+ }
} \ No newline at end of file
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/ModelCellsEditingSupport.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/ModelCellsEditingSupport.java
index 690ad89b81e..75d9eea5eb7 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/ModelCellsEditingSupport.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/ModelCellsEditingSupport.java
@@ -1,130 +1,130 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnViewer;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICellEditorsRegistry;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-public class ModelCellsEditingSupport<T> extends EditingSupport {
-
- private final EStructuralFeature feature;
- private final IModelCellEditor cellEditor;
- private final EObject eObject;
- private final ColumnViewer columnViewer;
- private final Object newValuePlaceholder;
- private List<T> values;
-
- public ModelCellsEditingSupport(final ColumnViewer columnViewer,
- final EStructuralFeature feature, final EObject eObject,
- final Object newValuePlaceholder, final List<T> values) {
- super(columnViewer);
- this.columnViewer = columnViewer;
- this.feature = feature;
- this.eObject = eObject;
- this.values = values;
- this.newValuePlaceholder = newValuePlaceholder;
- this.cellEditor = ICellEditorsRegistry.INSTANCE.getCellEditorFor(this.feature.getEType());
- if (this.cellEditor == null) {
- throw new IllegalStateException(
- "no cell editor found for " + this.feature.getEType().getName()); //$NON-NLS-1$
- }
- }
-
- @Override
- protected CellEditor getCellEditor(final Object element) {
- return new CellEditor((Composite) this.columnViewer.getControl()) {
-
- private Control control;
-
- @Override
- protected void doSetValue(final Object value) {
- //
- }
-
- @Override
- protected void doSetFocus() {
- this.control.setFocus();
- }
-
- @Override
- protected Object doGetValue() {
- return null;
- }
-
- @Override
- protected Control createControl(final Composite parent) {
- IModelCellEditHandler editHandler = new IModelCellEditHandler() {
- public void commit() {
- @SuppressWarnings("unchecked")
- // unchecked: The cellEditor.getValue() type cannot be checked.
- T value = (T) ModelCellsEditingSupport.this.cellEditor.getValue();
- int index = ModelCellsEditingSupport.this.values.indexOf(element);
- if (index != -1
- || element == ModelCellsEditingSupport.this.newValuePlaceholder) {
- ModelCellsEditingSupport.this.values.set(index, value);
- }
- close();
- ModelCellsEditingSupport.this.columnViewer.refresh();
- }
-
- };
-
- Object originalValue = null;
- if (element != ModelCellsEditingSupport.this.newValuePlaceholder) {
- originalValue = element;
- }
-
- this.control = ModelCellsEditingSupport.this.cellEditor.activateCell(parent,
- originalValue, editHandler, ModelCellsEditingSupport.this.feature,
- ModelCellsEditingSupport.this.eObject);
- return this.control;
- }
-
- public void close() {
- deactivate();
- Control parentControl = ModelCellsEditingSupport.this.columnViewer.getControl();
- if (parentControl != null && !parentControl.isDisposed()) {
- parentControl.forceFocus();
- }
- dispose();
- }
- };
- }
-
- @Override
- protected boolean canEdit(final Object element) {
- return true;
- }
-
- @Override
- protected Object getValue(final Object element) {
- return element;
- }
-
- @Override
- protected void setValue(final Object element, final Object value) {
-
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Bros (Mia-Software) - Bug 339855 - ModelCellEditor class should not be exposed
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.ICellEditorsRegistry;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class ModelCellsEditingSupport<T> extends EditingSupport {
+
+ private final EStructuralFeature feature;
+ private final IModelCellEditor cellEditor;
+ private final EObject eObject;
+ private final ColumnViewer columnViewer;
+ private final Object newValuePlaceholder;
+ private List<T> values;
+
+ public ModelCellsEditingSupport(final ColumnViewer columnViewer,
+ final EStructuralFeature feature, final EObject eObject,
+ final Object newValuePlaceholder, final List<T> values) {
+ super(columnViewer);
+ this.columnViewer = columnViewer;
+ this.feature = feature;
+ this.eObject = eObject;
+ this.values = values;
+ this.newValuePlaceholder = newValuePlaceholder;
+ this.cellEditor = ICellEditorsRegistry.INSTANCE.getCellEditorFor(this.feature.getEType());
+ if (this.cellEditor == null) {
+ throw new IllegalStateException(
+ "no cell editor found for " + this.feature.getEType().getName()); //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ protected CellEditor getCellEditor(final Object element) {
+ return new CellEditor((Composite) this.columnViewer.getControl()) {
+
+ private Control control;
+
+ @Override
+ protected void doSetValue(final Object value) {
+ //
+ }
+
+ @Override
+ protected void doSetFocus() {
+ this.control.setFocus();
+ }
+
+ @Override
+ protected Object doGetValue() {
+ return null;
+ }
+
+ @Override
+ protected Control createControl(final Composite parent) {
+ IModelCellEditHandler editHandler = new IModelCellEditHandler() {
+ public void commit() {
+ @SuppressWarnings("unchecked")
+ // unchecked: The cellEditor.getValue() type cannot be checked.
+ T value = (T) ModelCellsEditingSupport.this.cellEditor.getValue();
+ int index = ModelCellsEditingSupport.this.values.indexOf(element);
+ if (index != -1
+ || element == ModelCellsEditingSupport.this.newValuePlaceholder) {
+ ModelCellsEditingSupport.this.values.set(index, value);
+ }
+ close();
+ ModelCellsEditingSupport.this.columnViewer.refresh();
+ }
+
+ };
+
+ Object originalValue = null;
+ if (element != ModelCellsEditingSupport.this.newValuePlaceholder) {
+ originalValue = element;
+ }
+
+ this.control = ModelCellsEditingSupport.this.cellEditor.activateCell(parent,
+ originalValue, editHandler, ModelCellsEditingSupport.this.feature,
+ ModelCellsEditingSupport.this.eObject);
+ return this.control;
+ }
+
+ public void close() {
+ deactivate();
+ Control parentControl = ModelCellsEditingSupport.this.columnViewer.getControl();
+ if (parentControl != null && !parentControl.isDisposed()) {
+ parentControl.forceFocus();
+ }
+ dispose();
+ }
+ };
+ }
+
+ @Override
+ protected boolean canEdit(final Object element) {
+ return true;
+ }
+
+ @Override
+ protected Object getValue(final Object element) {
+ return element;
+ }
+
+ @Override
+ protected void setValue(final Object element, final Object value) {
+
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryAttributeEditingDialog.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryAttributeEditingDialog.java
index 5fcf5b86e3f..f476b23ceb9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryAttributeEditingDialog.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryAttributeEditingDialog.java
@@ -1,375 +1,375 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
-import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-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.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/** A dialog to edit a multiplicity-many {@link EAttribute} */
-public class NaryAttributeEditingDialog<T extends Object> extends AbstractNaryEditingDialog<T> {
-
- private static final int NUM_COLUMNS = 2;
- private TableViewer featureValuesTableViewer;
-
- private final Object newValuePlaceholder = new Object();
-
- private Button addButton;
- private Button removeButton;
- private Button upButton;
- private Button downButton;
-
- private final ColumnLabelProvider labelProvider = new ColumnLabelProvider() {
- private final LabelProvider delegateLabelProvider = new CustomizableLabelProvider();
-
- @Override
- public Image getImage(final Object element) {
- return this.delegateLabelProvider.getImage(element);
- }
-
- @Override
- public String getText(final Object element) {
- if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) {
- return Messages.NaryAttributeEditingDialog_enterNewValuePlaceholder;
- }
- return this.delegateLabelProvider.getText(element);
- }
-
- @Override
- public Color getForeground(final Object element) {
- if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) {
- return Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY);
- }
- return null;
- }
- };
-
- /**
- * @param parent
- * the parent {@link Shell}
- * @param values
- * the current values
- * @param editHandler
- * the edit handler to perform the commit.
- * @param feature
- * the feature to edit
- * @param eObject
- * the eObject being currently edited. Should not be modified in this dialog.
- */
- public NaryAttributeEditingDialog(final Shell shell, final List<T> values,
- final IModelCellEditHandler editHandler, final EObject eObject, final EStructuralFeature feature) {
- super(shell, values, editHandler, eObject, feature);
- }
-
-
- @Override
- protected void configureShell(final Shell shell) {
- super.configureShell(shell);
- shell.setText(NLS.bind(Messages.NaryReferenceEditingDialog_shellTitle,
- getFeature().getName(), geteObject().eClass().getName()));
- // prevent Escape or Enter from closing the dialog
- // when a cell editor is active
- shell.addListener(SWT.Traverse, new Listener() {
- public void handleEvent(final Event e) {
- if ((e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN)
- && NaryAttributeEditingDialog.this.featureValuesTableViewer
- .isCellEditorActive()) {
- e.doit = false;
- NaryAttributeEditingDialog.this.featureValuesTableViewer.cancelEditing();
- }
- }
- });
- }
-
- @Override
- protected Control createDialogArea(final Composite parent) {
- final Composite contents = (Composite) super.createDialogArea(parent);
-
- final GridLayout contentsGridLayout = (GridLayout) contents.getLayout();
- contentsGridLayout.numColumns = NaryAttributeEditingDialog.NUM_COLUMNS;
-
- final GridData contentsGridData = (GridData) contents.getLayoutData();
- contentsGridData.horizontalAlignment = SWT.FILL;
- contentsGridData.verticalAlignment = SWT.FILL;
-
- createValuesPane(contents);
- createButtonsPane(contents);
-
- this.featureValuesTableViewer.addOpenListener(new IOpenListener() {
- public void open(final OpenEvent event) {
- editSelectedElement();
- }
- });
-
- this.upButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- upButtonClicked();
- }
- });
-
- this.downButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- downButtonClicked();
- }
- });
-
- this.addButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- addButtonClicked();
- }
- });
-
- this.removeButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- removeButtonClicked();
- }
- });
-
- return contents;
- }
-
- @SuppressWarnings("unchecked")
- // type erasure on generic
- private void addButtonClicked() {
- getValues().add(0, (T) NaryAttributeEditingDialog.this.newValuePlaceholder);
- refresh();
- this.featureValuesTableViewer.editElement(this.newValuePlaceholder, 0);
- }
-
- @SuppressWarnings("unchecked")
- // type erasure on generic
- private void removeButtonClicked() {
- final IStructuredSelection selection = (IStructuredSelection) this.featureValuesTableViewer
- .getSelection();
-
- for (final Iterator<T> it = selection.iterator(); it.hasNext();) {
- final Object element = it.next();
-
- if (getValues().contains(element)) {
- getValues().remove(element);
- }
- }
- refresh();
- }
-
- private void spacer(final Composite parent) {
- @SuppressWarnings("unused")
- Label label = new Label(parent, SWT.NONE);
- }
-
- private void createButtonsPane(final Composite contents) {
- final Composite buttonsComposite = new Composite(contents, SWT.NONE);
- final GridData buttonsCompositeGridData = new GridData();
- buttonsCompositeGridData.verticalAlignment = SWT.FILL;
- buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
- buttonsComposite.setLayoutData(buttonsCompositeGridData);
- buttonsComposite.setLayout(new GridLayout());
-
- // spacer
- spacer(buttonsComposite);
-
- this.addButton = new Button(buttonsComposite, SWT.PUSH);
- this.addButton.setText(Messages.NaryAttributeEditingDialog_add);
- final GridData addButtonGridData = new GridData();
- addButtonGridData.verticalAlignment = SWT.FILL;
- addButtonGridData.horizontalAlignment = SWT.FILL;
- this.addButton.setLayoutData(addButtonGridData);
-
- this.removeButton = new Button(buttonsComposite, SWT.PUSH);
- this.removeButton.setText(Messages.NaryAttributeEditingDialog_delete);
- final GridData removeButtonGridData = new GridData();
- removeButtonGridData.verticalAlignment = SWT.FILL;
- removeButtonGridData.horizontalAlignment = SWT.FILL;
- this.removeButton.setLayoutData(removeButtonGridData);
-
- spacer(buttonsComposite);
-
- this.upButton = new Button(buttonsComposite, SWT.PUSH);
- this.upButton.setText(Messages.NaryReferenceEditingDialog_up);
- final GridData upButtonGridData = new GridData();
- upButtonGridData.verticalAlignment = SWT.FILL;
- upButtonGridData.horizontalAlignment = SWT.FILL;
- this.upButton.setLayoutData(upButtonGridData);
-
- this.downButton = new Button(buttonsComposite, SWT.PUSH);
- this.downButton.setText(Messages.NaryReferenceEditingDialog_down);
- final GridData downButtonGridData = new GridData();
- downButtonGridData.verticalAlignment = SWT.FILL;
- downButtonGridData.horizontalAlignment = SWT.FILL;
- this.downButton.setLayoutData(downButtonGridData);
- }
-
- private void createValuesPane(final Composite contents) {
- final Composite featureComposite = new Composite(contents, SWT.NONE);
- final GridData featureCompositeData = new GridData(SWT.FILL, SWT.FILL, true, true);
- featureCompositeData.horizontalAlignment = SWT.END;
- featureComposite.setLayoutData(featureCompositeData);
-
- final GridLayout featureCompositeLayout = new GridLayout();
- featureCompositeData.horizontalAlignment = SWT.FILL;
- featureCompositeLayout.marginHeight = 0;
- featureCompositeLayout.marginWidth = 0;
- featureCompositeLayout.numColumns = 1;
- featureComposite.setLayout(featureCompositeLayout);
-
- final Label featureLabel = new Label(featureComposite, SWT.NONE);
- featureLabel.setText(Messages.NaryReferenceEditingDialog_values);
- final GridData valuesLabelGridData = new GridData();
- valuesLabelGridData.horizontalSpan = 2;
- valuesLabelGridData.horizontalAlignment = SWT.FILL;
- valuesLabelGridData.verticalAlignment = SWT.FILL;
- featureLabel.setLayoutData(valuesLabelGridData);
-
- final Table table = new Table(featureComposite, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
- final GridData tableGridData = new GridData();
- tableGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
- tableGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
- tableGridData.verticalAlignment = SWT.FILL;
- tableGridData.horizontalAlignment = SWT.FILL;
- tableGridData.grabExcessHorizontalSpace = true;
- tableGridData.grabExcessVerticalSpace = true;
- table.setLayoutData(tableGridData);
- final TableColumn tableColumn = new TableColumn(table, SWT.CENTER);
-
- // full-width column
- table.addControlListener(new ControlListener() {
- public void controlResized(final ControlEvent e) {
- tableColumn.setWidth(table.getClientArea().width);
- }
-
- public void controlMoved(final ControlEvent e) {
- //
- }
- });
-
- this.featureValuesTableViewer = new TableViewer(table);
- this.featureValuesTableViewer.setContentProvider(new AssignedValuesContentProvider());
- // this.fFeatureValuesTableViewer.setLabelProvider(this.labelProvider);
- this.featureValuesTableViewer
- .setInput(getValues());
-
- final TableViewerColumn tableViewerColumn = new TableViewerColumn(
- this.featureValuesTableViewer, tableColumn);
- tableViewerColumn.setLabelProvider(this.labelProvider);
-
- tableViewerColumn.setEditingSupport(new ModelCellsEditingSupport<T>(
- this.featureValuesTableViewer, getFeature(), geteObject(),
- this.newValuePlaceholder, getValues()));
-
- // keyboard accessibility
- table.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(final KeyEvent e) {
- if (e.keyCode == SWT.F2) {
- editSelectedElement();
- }
- if (e.keyCode == SWT.DEL) {
- if (NaryAttributeEditingDialog.this.removeButton.isEnabled()) {
- NaryAttributeEditingDialog.this.removeButton.notifyListeners(
- SWT.Selection, null);
- }
- }
- if (e.keyCode == SWT.ARROW_UP
- && ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) {
- if (NaryAttributeEditingDialog.this.upButton.isEnabled()) {
- NaryAttributeEditingDialog.this.upButton.notifyListeners(SWT.Selection,
- null);
- }
- }
- if (e.keyCode == SWT.ARROW_DOWN
- && ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) {
- if (NaryAttributeEditingDialog.this.downButton.isEnabled()) {
- NaryAttributeEditingDialog.this.downButton.notifyListeners(SWT.Selection,
- null);
- }
- }
- }
- });
-
- }
-
- private void editSelectedElement() {
- ISelection selection = NaryAttributeEditingDialog.this.featureValuesTableViewer
- .getSelection();
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if (structuredSelection.getFirstElement() != null) {
- NaryAttributeEditingDialog.this.featureValuesTableViewer.editElement(
- structuredSelection.getFirstElement(), 0);
- }
- }
- }
-
- @Override
- public void refresh() {
- this.featureValuesTableViewer.refresh();
- }
-
- @Override
- protected boolean isResizable() {
- return true;
- }
-
- @Override
- protected void createButtonsForButtonBar(final Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
-
- @Override
- public ISelection getSelection() {
- return this.featureValuesTableViewer.getSelection();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
+import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+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.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/** A dialog to edit a multiplicity-many {@link EAttribute} */
+public class NaryAttributeEditingDialog<T extends Object> extends AbstractNaryEditingDialog<T> {
+
+ private static final int NUM_COLUMNS = 2;
+ private TableViewer featureValuesTableViewer;
+
+ private final Object newValuePlaceholder = new Object();
+
+ private Button addButton;
+ private Button removeButton;
+ private Button upButton;
+ private Button downButton;
+
+ private final ColumnLabelProvider labelProvider = new ColumnLabelProvider() {
+ private final LabelProvider delegateLabelProvider = new CustomizableLabelProvider();
+
+ @Override
+ public Image getImage(final Object element) {
+ return this.delegateLabelProvider.getImage(element);
+ }
+
+ @Override
+ public String getText(final Object element) {
+ if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) {
+ return Messages.NaryAttributeEditingDialog_enterNewValuePlaceholder;
+ }
+ return this.delegateLabelProvider.getText(element);
+ }
+
+ @Override
+ public Color getForeground(final Object element) {
+ if (element == NaryAttributeEditingDialog.this.newValuePlaceholder) {
+ return Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY);
+ }
+ return null;
+ }
+ };
+
+ /**
+ * @param parent
+ * the parent {@link Shell}
+ * @param values
+ * the current values
+ * @param editHandler
+ * the edit handler to perform the commit.
+ * @param feature
+ * the feature to edit
+ * @param eObject
+ * the eObject being currently edited. Should not be modified in this dialog.
+ */
+ public NaryAttributeEditingDialog(final Shell shell, final List<T> values,
+ final IModelCellEditHandler editHandler, final EObject eObject, final EStructuralFeature feature) {
+ super(shell, values, editHandler, eObject, feature);
+ }
+
+
+ @Override
+ protected void configureShell(final Shell shell) {
+ super.configureShell(shell);
+ shell.setText(NLS.bind(Messages.NaryReferenceEditingDialog_shellTitle,
+ getFeature().getName(), geteObject().eClass().getName()));
+ // prevent Escape or Enter from closing the dialog
+ // when a cell editor is active
+ shell.addListener(SWT.Traverse, new Listener() {
+ public void handleEvent(final Event e) {
+ if ((e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN)
+ && NaryAttributeEditingDialog.this.featureValuesTableViewer
+ .isCellEditorActive()) {
+ e.doit = false;
+ NaryAttributeEditingDialog.this.featureValuesTableViewer.cancelEditing();
+ }
+ }
+ });
+ }
+
+ @Override
+ protected Control createDialogArea(final Composite parent) {
+ final Composite contents = (Composite) super.createDialogArea(parent);
+
+ final GridLayout contentsGridLayout = (GridLayout) contents.getLayout();
+ contentsGridLayout.numColumns = NaryAttributeEditingDialog.NUM_COLUMNS;
+
+ final GridData contentsGridData = (GridData) contents.getLayoutData();
+ contentsGridData.horizontalAlignment = SWT.FILL;
+ contentsGridData.verticalAlignment = SWT.FILL;
+
+ createValuesPane(contents);
+ createButtonsPane(contents);
+
+ this.featureValuesTableViewer.addOpenListener(new IOpenListener() {
+ public void open(final OpenEvent event) {
+ editSelectedElement();
+ }
+ });
+
+ this.upButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ upButtonClicked();
+ }
+ });
+
+ this.downButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ downButtonClicked();
+ }
+ });
+
+ this.addButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ addButtonClicked();
+ }
+ });
+
+ this.removeButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ removeButtonClicked();
+ }
+ });
+
+ return contents;
+ }
+
+ @SuppressWarnings("unchecked")
+ // type erasure on generic
+ private void addButtonClicked() {
+ getValues().add(0, (T) NaryAttributeEditingDialog.this.newValuePlaceholder);
+ refresh();
+ this.featureValuesTableViewer.editElement(this.newValuePlaceholder, 0);
+ }
+
+ @SuppressWarnings("unchecked")
+ // type erasure on generic
+ private void removeButtonClicked() {
+ final IStructuredSelection selection = (IStructuredSelection) this.featureValuesTableViewer
+ .getSelection();
+
+ for (final Iterator<T> it = selection.iterator(); it.hasNext();) {
+ final Object element = it.next();
+
+ if (getValues().contains(element)) {
+ getValues().remove(element);
+ }
+ }
+ refresh();
+ }
+
+ private void spacer(final Composite parent) {
+ @SuppressWarnings("unused")
+ Label label = new Label(parent, SWT.NONE);
+ }
+
+ private void createButtonsPane(final Composite contents) {
+ final Composite buttonsComposite = new Composite(contents, SWT.NONE);
+ final GridData buttonsCompositeGridData = new GridData();
+ buttonsCompositeGridData.verticalAlignment = SWT.FILL;
+ buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
+ buttonsComposite.setLayoutData(buttonsCompositeGridData);
+ buttonsComposite.setLayout(new GridLayout());
+
+ // spacer
+ spacer(buttonsComposite);
+
+ this.addButton = new Button(buttonsComposite, SWT.PUSH);
+ this.addButton.setText(Messages.NaryAttributeEditingDialog_add);
+ final GridData addButtonGridData = new GridData();
+ addButtonGridData.verticalAlignment = SWT.FILL;
+ addButtonGridData.horizontalAlignment = SWT.FILL;
+ this.addButton.setLayoutData(addButtonGridData);
+
+ this.removeButton = new Button(buttonsComposite, SWT.PUSH);
+ this.removeButton.setText(Messages.NaryAttributeEditingDialog_delete);
+ final GridData removeButtonGridData = new GridData();
+ removeButtonGridData.verticalAlignment = SWT.FILL;
+ removeButtonGridData.horizontalAlignment = SWT.FILL;
+ this.removeButton.setLayoutData(removeButtonGridData);
+
+ spacer(buttonsComposite);
+
+ this.upButton = new Button(buttonsComposite, SWT.PUSH);
+ this.upButton.setText(Messages.NaryReferenceEditingDialog_up);
+ final GridData upButtonGridData = new GridData();
+ upButtonGridData.verticalAlignment = SWT.FILL;
+ upButtonGridData.horizontalAlignment = SWT.FILL;
+ this.upButton.setLayoutData(upButtonGridData);
+
+ this.downButton = new Button(buttonsComposite, SWT.PUSH);
+ this.downButton.setText(Messages.NaryReferenceEditingDialog_down);
+ final GridData downButtonGridData = new GridData();
+ downButtonGridData.verticalAlignment = SWT.FILL;
+ downButtonGridData.horizontalAlignment = SWT.FILL;
+ this.downButton.setLayoutData(downButtonGridData);
+ }
+
+ private void createValuesPane(final Composite contents) {
+ final Composite featureComposite = new Composite(contents, SWT.NONE);
+ final GridData featureCompositeData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ featureCompositeData.horizontalAlignment = SWT.END;
+ featureComposite.setLayoutData(featureCompositeData);
+
+ final GridLayout featureCompositeLayout = new GridLayout();
+ featureCompositeData.horizontalAlignment = SWT.FILL;
+ featureCompositeLayout.marginHeight = 0;
+ featureCompositeLayout.marginWidth = 0;
+ featureCompositeLayout.numColumns = 1;
+ featureComposite.setLayout(featureCompositeLayout);
+
+ final Label featureLabel = new Label(featureComposite, SWT.NONE);
+ featureLabel.setText(Messages.NaryReferenceEditingDialog_values);
+ final GridData valuesLabelGridData = new GridData();
+ valuesLabelGridData.horizontalSpan = 2;
+ valuesLabelGridData.horizontalAlignment = SWT.FILL;
+ valuesLabelGridData.verticalAlignment = SWT.FILL;
+ featureLabel.setLayoutData(valuesLabelGridData);
+
+ final Table table = new Table(featureComposite, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
+ final GridData tableGridData = new GridData();
+ tableGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
+ tableGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
+ tableGridData.verticalAlignment = SWT.FILL;
+ tableGridData.horizontalAlignment = SWT.FILL;
+ tableGridData.grabExcessHorizontalSpace = true;
+ tableGridData.grabExcessVerticalSpace = true;
+ table.setLayoutData(tableGridData);
+ final TableColumn tableColumn = new TableColumn(table, SWT.CENTER);
+
+ // full-width column
+ table.addControlListener(new ControlListener() {
+ public void controlResized(final ControlEvent e) {
+ tableColumn.setWidth(table.getClientArea().width);
+ }
+
+ public void controlMoved(final ControlEvent e) {
+ //
+ }
+ });
+
+ this.featureValuesTableViewer = new TableViewer(table);
+ this.featureValuesTableViewer.setContentProvider(new AssignedValuesContentProvider());
+ // this.fFeatureValuesTableViewer.setLabelProvider(this.labelProvider);
+ this.featureValuesTableViewer
+ .setInput(getValues());
+
+ final TableViewerColumn tableViewerColumn = new TableViewerColumn(
+ this.featureValuesTableViewer, tableColumn);
+ tableViewerColumn.setLabelProvider(this.labelProvider);
+
+ tableViewerColumn.setEditingSupport(new ModelCellsEditingSupport<T>(
+ this.featureValuesTableViewer, getFeature(), geteObject(),
+ this.newValuePlaceholder, getValues()));
+
+ // keyboard accessibility
+ table.addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyPressed(final KeyEvent e) {
+ if (e.keyCode == SWT.F2) {
+ editSelectedElement();
+ }
+ if (e.keyCode == SWT.DEL) {
+ if (NaryAttributeEditingDialog.this.removeButton.isEnabled()) {
+ NaryAttributeEditingDialog.this.removeButton.notifyListeners(
+ SWT.Selection, null);
+ }
+ }
+ if (e.keyCode == SWT.ARROW_UP
+ && ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) {
+ if (NaryAttributeEditingDialog.this.upButton.isEnabled()) {
+ NaryAttributeEditingDialog.this.upButton.notifyListeners(SWT.Selection,
+ null);
+ }
+ }
+ if (e.keyCode == SWT.ARROW_DOWN
+ && ((e.stateMask & SWT.COMMAND) != 0 || (e.stateMask & SWT.CONTROL) != 0)) {
+ if (NaryAttributeEditingDialog.this.downButton.isEnabled()) {
+ NaryAttributeEditingDialog.this.downButton.notifyListeners(SWT.Selection,
+ null);
+ }
+ }
+ }
+ });
+
+ }
+
+ private void editSelectedElement() {
+ ISelection selection = NaryAttributeEditingDialog.this.featureValuesTableViewer
+ .getSelection();
+ if (selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ if (structuredSelection.getFirstElement() != null) {
+ NaryAttributeEditingDialog.this.featureValuesTableViewer.editElement(
+ structuredSelection.getFirstElement(), 0);
+ }
+ }
+ }
+
+ @Override
+ public void refresh() {
+ this.featureValuesTableViewer.refresh();
+ }
+
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(final Composite parent) {
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ }
+
+
+ @Override
+ public ISelection getSelection() {
+ return this.featureValuesTableViewer.getSelection();
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryReferenceEditingDialog.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryReferenceEditingDialog.java
index 5b206e1e882..7b6e0501592 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryReferenceEditingDialog.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/internal/ui/NaryReferenceEditingDialog.java
@@ -1,490 +1,490 @@
-/*******************************************************************************
- * Copyright (c) 2010, 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
- * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
- * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
- *******************************************************************************/
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetReference;
-import org.eclipse.papyrus.emf.facet.util.emf.ui.internal.dialogs.CreateInstanceDialog;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
-import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-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.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/** A dialog to edit a multiplicity-many {@link EReference} */
-public class NaryReferenceEditingDialog<T extends EObject> extends AbstractNaryEditingDialog<T> {
-
-
- private Button addButton;
- private Button removeButton;
- private Button addAllButton;
- private Button removeAllButton;
- private Button upButton;
- private Button downButton;
-
- private static final int NUM_COLUMNS = 4;
- // this is a *tree* viewer because PatternFilter only supports Trees
- private TreeViewer availableValuesTreeViewer;
- private ListViewer featureValuesListViewer;
- private Button createInstanceButton;
-
- private AssignableValuesContentProvider assignableValuesContentProvider;
- private final List<T> availableValues;
-
-
- /**
- *
- * @param parent
- * the parent {@link Shell}
- * @param values
- * the list of current values.
- * @param feature
- * the feature to edit
- * @param eObject
- * the eObject being currently edited. Should not be modified in this dialog.
- * @param editHandler
- * The editHandler which has to be called when the edition is completed
- */
- public NaryReferenceEditingDialog(final Shell shell, final List<T> values,
- final List<T> availableValues, final IModelCellEditHandler editHandler,
- final EObject eObject, final EStructuralFeature feature) {
- super(shell, values, editHandler, eObject, feature);
- this.availableValues = new ArrayList<T>(availableValues);
- }
-
- @Override
- protected void configureShell(final Shell shell) {
- super.configureShell(shell);
- shell.setText(NLS.bind(Messages.NaryReferenceEditingDialog_shellTitle,
- getFeature().getName(), geteObject().eClass().getName()));
- }
-
- @Override
- protected Control createDialogArea(final Composite parent) {
- final Composite contents = (Composite) super.createDialogArea(parent);
-
- final GridLayout contentsGridLayout = (GridLayout) contents.getLayout();
- contentsGridLayout.numColumns = NaryReferenceEditingDialog.NUM_COLUMNS;
-
- final GridData contentsGridData = (GridData) contents.getLayoutData();
- contentsGridData.horizontalAlignment = SWT.FILL;
- contentsGridData.verticalAlignment = SWT.FILL;
-
- createLeftPane(contents);
- createMiddleButtonsPane(contents);
- createRightPane(contents);
- createRightButtonsPane(contents);
-
- this.availableValuesTreeViewer.addOpenListener(new IOpenListener() {
- public void open(final OpenEvent event) {
- if (NaryReferenceEditingDialog.this.addButton.isEnabled()) {
- NaryReferenceEditingDialog.this.addButton.notifyListeners(SWT.Selection, null);
- }
- }
- });
-
- this.featureValuesListViewer.addOpenListener(new IOpenListener() {
- public void open(final OpenEvent event) {
- if (NaryReferenceEditingDialog.this.removeButton.isEnabled()) {
- NaryReferenceEditingDialog.this.removeButton.notifyListeners(SWT.Selection,
- null);
- }
- }
- });
-
- this.upButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- upButtonClicked();
- }
- });
-
- this.downButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- downButtonClicked();
- }
- });
-
- this.addButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- addButtonClicked();
- }
- });
-
- this.addAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- addAllButtonClicked();
- }
- });
-
- this.removeButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- removeButtonClicked();
- }
- });
-
- this.removeAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- removeAllButtonClicked();
- }
- });
-
- if (this.createInstanceButton != null) {
- this.createInstanceButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(final SelectionEvent event) {
- createInstanceButtonClicked();
- }
- });
- }
-
- return contents;
- }
-
- private void addButtonClicked() {
- final IStructuredSelection selection = (IStructuredSelection) this.availableValuesTreeViewer
- .getSelection();
- if (selection.isEmpty() || !confirmMove()) {
- return;
- }
- Iterator<T> it = getTCastedStructuredSelectionIterator(selection);
- while (it.hasNext()) {
- T element = it.next();
- if (!(getValues() != null && getValues().contains(element))) {
- getValues().add(element);
- this.availableValues.remove(element);
- }
- }
- refresh();
- this.featureValuesListViewer.setSelection(selection);
- }
-
- @SuppressWarnings({ "unchecked", "static-method" })
- // unchecked: the selection in not type parameterized, then we cannot get a cleaned cast iterator
- // static-method: this method cannot be static to be able to use the T type.
- private Iterator<T> getTCastedStructuredSelectionIterator(final IStructuredSelection selection) {
- return selection.iterator();
- }
-
- private void addAllButtonClicked() {
- if (this.availableValues.isEmpty() || !confirmMove()) {
- return;
- }
- getValues().addAll(this.availableValues);
- this.availableValues.removeAll(getValues());
- refresh();
- }
-
- private void removeButtonClicked() {
- final IStructuredSelection selection = (IStructuredSelection) this.featureValuesListViewer
- .getSelection();
- if (selection.isEmpty() || !confirmRemove()) {
- return;
- }
-
- Iterator<T> it = this.getTCastedStructuredSelectionIterator(selection);
- while (it.hasNext()) {
- T element = it.next();
- if (getValues().contains(element)) {
- this.availableValues.add(element);
- getValues().remove(element);
- }
- }
- refresh();
- }
-
- private void removeAllButtonClicked() {
- if (getValues().isEmpty() || !confirmRemove()) {
- return;
- }
- this.availableValues.addAll(getValues());
- getValues().removeAll(getValues());
- refresh();
- }
-
- private boolean confirmRemove() {
- if (getFeature() instanceof EReference) {
- EReference eReference = (EReference) getFeature();
- if (eReference.isContainment()) {
- return MessageDialog.openConfirm(getShell(),
- Messages.NaryReferenceEditingDialog_deleteElements,
- Messages.NaryReferenceEditingDialog_deleteElementsLong);
- }
- }
- return true;
- }
-
- private boolean confirmMove() {
- if (getFeature() instanceof EReference || getFeature() instanceof FacetReference) {
- EReference reference = (EReference) getFeature();
- if (reference.isContainment()) {
- String fullMessage = Messages.NaryReferenceEditingDialog_moveWarning;
- return MessageDialog.openConfirm(getShell(),
- Messages.NaryReferenceEditingDialog_moveElement, fullMessage);
- }
- }
- return true;
- }
-
- @SuppressWarnings("unchecked")
- // type erasure on generic
- private void createInstanceButtonClicked() {
- EClassifier eType = getFeature().getEType();
- if (eType instanceof EClass) {
- EClass eClass = (EClass) eType;
- EObject newInstance = CreateInstanceDialog.open(getShell(), eClass,
- new CustomizableLabelProvider());
- if (newInstance != null) {
- getValues().add((T) newInstance);
- refresh();
- }
- }
- }
-
- private void createLeftPane(final Composite contents) {
- final Composite choiceComposite = new Composite(contents, SWT.NONE);
- final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.horizontalAlignment = SWT.END;
- choiceComposite.setLayoutData(data);
-
- final GridLayout layout = new GridLayout();
- data.horizontalAlignment = SWT.FILL;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.numColumns = 1;
- choiceComposite.setLayout(layout);
-
- final Label choiceLabel = new Label(choiceComposite, SWT.NONE);
- choiceLabel.setText(Messages.NaryReferenceEditingDialog_availableValues);
-
- final GridData choiceLabelGridData = new GridData();
- choiceLabelGridData.verticalAlignment = SWT.FILL;
- choiceLabelGridData.horizontalAlignment = SWT.FILL;
- choiceLabel.setLayoutData(choiceLabelGridData);
-
- final Text patternText = createFilterText(choiceComposite);
-
- final Tree availableValuesTree = new Tree(choiceComposite, SWT.MULTI | SWT.BORDER);
- final GridData availableValuesGridData = new GridData();
- availableValuesGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
- availableValuesGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
- availableValuesGridData.horizontalAlignment = SWT.FILL;
- availableValuesGridData.verticalAlignment = SWT.FILL;
- availableValuesGridData.grabExcessHorizontalSpace = true;
- availableValuesGridData.grabExcessVerticalSpace = true;
- availableValuesTree.setLayoutData(availableValuesGridData);
-
- this.availableValuesTreeViewer = new TreeViewer(availableValuesTree);
- this.assignableValuesContentProvider = new AssignableValuesContentProvider();
- this.availableValuesTreeViewer.setContentProvider(this.assignableValuesContentProvider);
- this.availableValuesTreeViewer.setLabelProvider(new CustomizableLabelProvider());
- final PatternFilter filter = new PatternFilter();
- this.availableValuesTreeViewer.addFilter(filter);
-
- this.availableValuesTreeViewer.setInput(this.availableValues);
-
- patternText.addModifyListener(new ModifyListener() {
- public void modifyText(final ModifyEvent e) {
- filter.setPattern(patternText.getText());
- NaryReferenceEditingDialog.this.availableValuesTreeViewer.refresh();
- }
- });
- }
-
- private void createMiddleButtonsPane(final Composite contents) {
- final Composite buttonsComposite = new Composite(contents, SWT.NONE);
- final GridData buttonsCompositeGridData = new GridData();
- buttonsCompositeGridData.verticalAlignment = SWT.CENTER;
- buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
- buttonsComposite.setLayoutData(buttonsCompositeGridData);
- buttonsComposite.setLayout(new GridLayout());
-
- // new Label(buttonsComposite, SWT.NONE);
-
- this.addButton = new Button(buttonsComposite, SWT.PUSH);
- this.addButton.setText(Messages.NaryReferenceEditingDialog_add);
- this.addButton.setToolTipText(Messages.NaryReferenceEditingDialog_addTooltip);
- final GridData addButtonGridData = new GridData();
- addButtonGridData.verticalAlignment = SWT.FILL;
- addButtonGridData.horizontalAlignment = SWT.FILL;
- this.addButton.setLayoutData(addButtonGridData);
-
- this.removeButton = new Button(buttonsComposite, SWT.PUSH);
- this.removeButton.setText(Messages.NaryReferenceEditingDialog_remove);
- this.removeButton.setToolTipText(Messages.NaryReferenceEditingDialog_removeTooltip);
- final GridData removeButtonGridData = new GridData();
- removeButtonGridData.verticalAlignment = SWT.FILL;
- removeButtonGridData.horizontalAlignment = SWT.FILL;
- this.removeButton.setLayoutData(removeButtonGridData);
-
- spacer(buttonsComposite);
-
- this.addAllButton = new Button(buttonsComposite, SWT.PUSH);
- this.addAllButton.setText(Messages.NaryReferenceEditingDialog_addAll);
- this.addAllButton.setToolTipText(Messages.NaryReferenceEditingDialog_addAllTooltip);
-
- this.removeAllButton = new Button(buttonsComposite, SWT.PUSH);
- this.removeAllButton.setText(Messages.NaryReferenceEditingDialog_removeAll);
- this.removeAllButton.setToolTipText(Messages.NaryReferenceEditingDialog_removeAllTooltip);
- }
-
- private void spacer(final Composite parent) {
- @SuppressWarnings("unused")
- Label label = new Label(parent, SWT.NONE);
- }
-
- private void createRightButtonsPane(final Composite contents) {
- final Composite buttonsComposite = new Composite(contents, SWT.NONE);
- final GridData buttonsCompositeGridData = new GridData();
- buttonsCompositeGridData.verticalAlignment = SWT.FILL;
- buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
- buttonsComposite.setLayoutData(buttonsCompositeGridData);
- buttonsComposite.setLayout(new GridLayout());
-
- // spacer
- spacer(buttonsComposite);
-
- if (getFeature() instanceof EReference) {
- EReference eReference = (EReference) getFeature();
- if (eReference.isContainment()) {
- this.createInstanceButton = new Button(buttonsComposite, SWT.PUSH);
- this.createInstanceButton.setText(Messages.NaryReferenceEditingDialog_newInstance);
- final GridData createButtonGridData = new GridData();
- createButtonGridData.verticalAlignment = SWT.FILL;
- createButtonGridData.horizontalAlignment = SWT.FILL;
- this.createInstanceButton.setLayoutData(createButtonGridData);
- spacer(buttonsComposite);
- }
-
- }
-
- this.upButton = new Button(buttonsComposite, SWT.PUSH);
- this.upButton.setText(Messages.NaryReferenceEditingDialog_up);
- final GridData upButtonGridData = new GridData();
- upButtonGridData.verticalAlignment = SWT.FILL;
- upButtonGridData.horizontalAlignment = SWT.FILL;
- this.upButton.setLayoutData(upButtonGridData);
-
- this.downButton = new Button(buttonsComposite, SWT.PUSH);
- this.downButton.setText(Messages.NaryReferenceEditingDialog_down);
- final GridData downButtonGridData = new GridData();
- downButtonGridData.verticalAlignment = SWT.FILL;
- downButtonGridData.horizontalAlignment = SWT.FILL;
- this.downButton.setLayoutData(downButtonGridData);
- }
-
- private void createRightPane(final Composite contents) {
- final Composite featureComposite = new Composite(contents, SWT.NONE);
- final GridData featureCompositeData = new GridData(SWT.FILL, SWT.FILL, true, true);
- featureCompositeData.horizontalAlignment = SWT.END;
- featureComposite.setLayoutData(featureCompositeData);
-
- final GridLayout featureCompositeLayout = new GridLayout();
- featureCompositeData.horizontalAlignment = SWT.FILL;
- featureCompositeLayout.marginHeight = 0;
- featureCompositeLayout.marginWidth = 0;
- featureCompositeLayout.numColumns = 1;
- featureComposite.setLayout(featureCompositeLayout);
-
- final Label featureLabel = new Label(featureComposite, SWT.NONE);
- featureLabel.setText(Messages.NaryReferenceEditingDialog_values);
- final GridData valuesLabelGridData = new GridData();
- valuesLabelGridData.horizontalSpan = 2;
- valuesLabelGridData.horizontalAlignment = SWT.FILL;
- valuesLabelGridData.verticalAlignment = SWT.FILL;
- featureLabel.setLayoutData(valuesLabelGridData);
-
- final org.eclipse.swt.widgets.List availableValuesList = new org.eclipse.swt.widgets.List(
- featureComposite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
- final GridData availableValuesGridData = new GridData();
- availableValuesGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
- availableValuesGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
- availableValuesGridData.verticalAlignment = SWT.FILL;
- availableValuesGridData.horizontalAlignment = SWT.FILL;
- availableValuesGridData.grabExcessHorizontalSpace = true;
- availableValuesGridData.grabExcessVerticalSpace = true;
- availableValuesList.setLayoutData(availableValuesGridData);
-
- this.featureValuesListViewer = new ListViewer(availableValuesList);
- this.featureValuesListViewer.setContentProvider(new AssignedValuesContentProvider());
- this.featureValuesListViewer.setLabelProvider(new CustomizableLabelProvider());
- this.featureValuesListViewer
- .setInput(getValues());
- }
-
- private Text createFilterText(final Composite contents) {
- Text patternText = new Text(contents, SWT.BORDER | SWT.SEARCH);
- patternText.setMessage(Messages.NaryReferenceEditingDialog_typeFilterText);
- patternText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return patternText;
- }
-
- @Override
- public void refresh() {
- this.availableValuesTreeViewer.refresh();
- this.featureValuesListViewer.refresh();
- }
-
- @Override
- protected boolean isResizable() {
- return true;
- }
-
- @Override
- protected void createButtonsForButtonBar(final Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
- @Override
- public ISelection getSelection() {
- return this.featureValuesListViewer.getSelection();
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010, 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ * Nicolas Guyomar (Mia-Software) - Bug 339554 - org.eclipse.papyrus.emf.facet.widgets.celleditors API cleaning
+ * Nicolas Guyomar (Mia-Software) - Bug 342451 - To be able to edit derived facet attributes and derived facet references in a table
+ * Gregoire Dupe (Mia-Software) - Bug 369987 - [Restructuring][Table] Switch to the new customization and facet framework
+ *******************************************************************************/
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.ui;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetReference;
+import org.eclipse.papyrus.emf.facet.util.emf.ui.internal.dialogs.CreateInstanceDialog;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.IModelCellEditHandler;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.internal.Messages;
+import org.eclipse.papyrus.emf.facet.widgets.internal.CustomizableLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+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.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/** A dialog to edit a multiplicity-many {@link EReference} */
+public class NaryReferenceEditingDialog<T extends EObject> extends AbstractNaryEditingDialog<T> {
+
+
+ private Button addButton;
+ private Button removeButton;
+ private Button addAllButton;
+ private Button removeAllButton;
+ private Button upButton;
+ private Button downButton;
+
+ private static final int NUM_COLUMNS = 4;
+ // this is a *tree* viewer because PatternFilter only supports Trees
+ private TreeViewer availableValuesTreeViewer;
+ private ListViewer featureValuesListViewer;
+ private Button createInstanceButton;
+
+ private AssignableValuesContentProvider assignableValuesContentProvider;
+ private final List<T> availableValues;
+
+
+ /**
+ *
+ * @param parent
+ * the parent {@link Shell}
+ * @param values
+ * the list of current values.
+ * @param feature
+ * the feature to edit
+ * @param eObject
+ * the eObject being currently edited. Should not be modified in this dialog.
+ * @param editHandler
+ * The editHandler which has to be called when the edition is completed
+ */
+ public NaryReferenceEditingDialog(final Shell shell, final List<T> values,
+ final List<T> availableValues, final IModelCellEditHandler editHandler,
+ final EObject eObject, final EStructuralFeature feature) {
+ super(shell, values, editHandler, eObject, feature);
+ this.availableValues = new ArrayList<T>(availableValues);
+ }
+
+ @Override
+ protected void configureShell(final Shell shell) {
+ super.configureShell(shell);
+ shell.setText(NLS.bind(Messages.NaryReferenceEditingDialog_shellTitle,
+ getFeature().getName(), geteObject().eClass().getName()));
+ }
+
+ @Override
+ protected Control createDialogArea(final Composite parent) {
+ final Composite contents = (Composite) super.createDialogArea(parent);
+
+ final GridLayout contentsGridLayout = (GridLayout) contents.getLayout();
+ contentsGridLayout.numColumns = NaryReferenceEditingDialog.NUM_COLUMNS;
+
+ final GridData contentsGridData = (GridData) contents.getLayoutData();
+ contentsGridData.horizontalAlignment = SWT.FILL;
+ contentsGridData.verticalAlignment = SWT.FILL;
+
+ createLeftPane(contents);
+ createMiddleButtonsPane(contents);
+ createRightPane(contents);
+ createRightButtonsPane(contents);
+
+ this.availableValuesTreeViewer.addOpenListener(new IOpenListener() {
+ public void open(final OpenEvent event) {
+ if (NaryReferenceEditingDialog.this.addButton.isEnabled()) {
+ NaryReferenceEditingDialog.this.addButton.notifyListeners(SWT.Selection, null);
+ }
+ }
+ });
+
+ this.featureValuesListViewer.addOpenListener(new IOpenListener() {
+ public void open(final OpenEvent event) {
+ if (NaryReferenceEditingDialog.this.removeButton.isEnabled()) {
+ NaryReferenceEditingDialog.this.removeButton.notifyListeners(SWT.Selection,
+ null);
+ }
+ }
+ });
+
+ this.upButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ upButtonClicked();
+ }
+ });
+
+ this.downButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ downButtonClicked();
+ }
+ });
+
+ this.addButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ addButtonClicked();
+ }
+ });
+
+ this.addAllButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ addAllButtonClicked();
+ }
+ });
+
+ this.removeButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ removeButtonClicked();
+ }
+ });
+
+ this.removeAllButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ removeAllButtonClicked();
+ }
+ });
+
+ if (this.createInstanceButton != null) {
+ this.createInstanceButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(final SelectionEvent event) {
+ createInstanceButtonClicked();
+ }
+ });
+ }
+
+ return contents;
+ }
+
+ private void addButtonClicked() {
+ final IStructuredSelection selection = (IStructuredSelection) this.availableValuesTreeViewer
+ .getSelection();
+ if (selection.isEmpty() || !confirmMove()) {
+ return;
+ }
+ Iterator<T> it = getTCastedStructuredSelectionIterator(selection);
+ while (it.hasNext()) {
+ T element = it.next();
+ if (!(getValues() != null && getValues().contains(element))) {
+ getValues().add(element);
+ this.availableValues.remove(element);
+ }
+ }
+ refresh();
+ this.featureValuesListViewer.setSelection(selection);
+ }
+
+ @SuppressWarnings({ "unchecked", "static-method" })
+ // unchecked: the selection in not type parameterized, then we cannot get a cleaned cast iterator
+ // static-method: this method cannot be static to be able to use the T type.
+ private Iterator<T> getTCastedStructuredSelectionIterator(final IStructuredSelection selection) {
+ return selection.iterator();
+ }
+
+ private void addAllButtonClicked() {
+ if (this.availableValues.isEmpty() || !confirmMove()) {
+ return;
+ }
+ getValues().addAll(this.availableValues);
+ this.availableValues.removeAll(getValues());
+ refresh();
+ }
+
+ private void removeButtonClicked() {
+ final IStructuredSelection selection = (IStructuredSelection) this.featureValuesListViewer
+ .getSelection();
+ if (selection.isEmpty() || !confirmRemove()) {
+ return;
+ }
+
+ Iterator<T> it = this.getTCastedStructuredSelectionIterator(selection);
+ while (it.hasNext()) {
+ T element = it.next();
+ if (getValues().contains(element)) {
+ this.availableValues.add(element);
+ getValues().remove(element);
+ }
+ }
+ refresh();
+ }
+
+ private void removeAllButtonClicked() {
+ if (getValues().isEmpty() || !confirmRemove()) {
+ return;
+ }
+ this.availableValues.addAll(getValues());
+ getValues().removeAll(getValues());
+ refresh();
+ }
+
+ private boolean confirmRemove() {
+ if (getFeature() instanceof EReference) {
+ EReference eReference = (EReference) getFeature();
+ if (eReference.isContainment()) {
+ return MessageDialog.openConfirm(getShell(),
+ Messages.NaryReferenceEditingDialog_deleteElements,
+ Messages.NaryReferenceEditingDialog_deleteElementsLong);
+ }
+ }
+ return true;
+ }
+
+ private boolean confirmMove() {
+ if (getFeature() instanceof EReference || getFeature() instanceof FacetReference) {
+ EReference reference = (EReference) getFeature();
+ if (reference.isContainment()) {
+ String fullMessage = Messages.NaryReferenceEditingDialog_moveWarning;
+ return MessageDialog.openConfirm(getShell(),
+ Messages.NaryReferenceEditingDialog_moveElement, fullMessage);
+ }
+ }
+ return true;
+ }
+
+ @SuppressWarnings("unchecked")
+ // type erasure on generic
+ private void createInstanceButtonClicked() {
+ EClassifier eType = getFeature().getEType();
+ if (eType instanceof EClass) {
+ EClass eClass = (EClass) eType;
+ EObject newInstance = CreateInstanceDialog.open(getShell(), eClass,
+ new CustomizableLabelProvider());
+ if (newInstance != null) {
+ getValues().add((T) newInstance);
+ refresh();
+ }
+ }
+ }
+
+ private void createLeftPane(final Composite contents) {
+ final Composite choiceComposite = new Composite(contents, SWT.NONE);
+ final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.horizontalAlignment = SWT.END;
+ choiceComposite.setLayoutData(data);
+
+ final GridLayout layout = new GridLayout();
+ data.horizontalAlignment = SWT.FILL;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.numColumns = 1;
+ choiceComposite.setLayout(layout);
+
+ final Label choiceLabel = new Label(choiceComposite, SWT.NONE);
+ choiceLabel.setText(Messages.NaryReferenceEditingDialog_availableValues);
+
+ final GridData choiceLabelGridData = new GridData();
+ choiceLabelGridData.verticalAlignment = SWT.FILL;
+ choiceLabelGridData.horizontalAlignment = SWT.FILL;
+ choiceLabel.setLayoutData(choiceLabelGridData);
+
+ final Text patternText = createFilterText(choiceComposite);
+
+ final Tree availableValuesTree = new Tree(choiceComposite, SWT.MULTI | SWT.BORDER);
+ final GridData availableValuesGridData = new GridData();
+ availableValuesGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
+ availableValuesGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
+ availableValuesGridData.horizontalAlignment = SWT.FILL;
+ availableValuesGridData.verticalAlignment = SWT.FILL;
+ availableValuesGridData.grabExcessHorizontalSpace = true;
+ availableValuesGridData.grabExcessVerticalSpace = true;
+ availableValuesTree.setLayoutData(availableValuesGridData);
+
+ this.availableValuesTreeViewer = new TreeViewer(availableValuesTree);
+ this.assignableValuesContentProvider = new AssignableValuesContentProvider();
+ this.availableValuesTreeViewer.setContentProvider(this.assignableValuesContentProvider);
+ this.availableValuesTreeViewer.setLabelProvider(new CustomizableLabelProvider());
+ final PatternFilter filter = new PatternFilter();
+ this.availableValuesTreeViewer.addFilter(filter);
+
+ this.availableValuesTreeViewer.setInput(this.availableValues);
+
+ patternText.addModifyListener(new ModifyListener() {
+ public void modifyText(final ModifyEvent e) {
+ filter.setPattern(patternText.getText());
+ NaryReferenceEditingDialog.this.availableValuesTreeViewer.refresh();
+ }
+ });
+ }
+
+ private void createMiddleButtonsPane(final Composite contents) {
+ final Composite buttonsComposite = new Composite(contents, SWT.NONE);
+ final GridData buttonsCompositeGridData = new GridData();
+ buttonsCompositeGridData.verticalAlignment = SWT.CENTER;
+ buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
+ buttonsComposite.setLayoutData(buttonsCompositeGridData);
+ buttonsComposite.setLayout(new GridLayout());
+
+ // new Label(buttonsComposite, SWT.NONE);
+
+ this.addButton = new Button(buttonsComposite, SWT.PUSH);
+ this.addButton.setText(Messages.NaryReferenceEditingDialog_add);
+ this.addButton.setToolTipText(Messages.NaryReferenceEditingDialog_addTooltip);
+ final GridData addButtonGridData = new GridData();
+ addButtonGridData.verticalAlignment = SWT.FILL;
+ addButtonGridData.horizontalAlignment = SWT.FILL;
+ this.addButton.setLayoutData(addButtonGridData);
+
+ this.removeButton = new Button(buttonsComposite, SWT.PUSH);
+ this.removeButton.setText(Messages.NaryReferenceEditingDialog_remove);
+ this.removeButton.setToolTipText(Messages.NaryReferenceEditingDialog_removeTooltip);
+ final GridData removeButtonGridData = new GridData();
+ removeButtonGridData.verticalAlignment = SWT.FILL;
+ removeButtonGridData.horizontalAlignment = SWT.FILL;
+ this.removeButton.setLayoutData(removeButtonGridData);
+
+ spacer(buttonsComposite);
+
+ this.addAllButton = new Button(buttonsComposite, SWT.PUSH);
+ this.addAllButton.setText(Messages.NaryReferenceEditingDialog_addAll);
+ this.addAllButton.setToolTipText(Messages.NaryReferenceEditingDialog_addAllTooltip);
+
+ this.removeAllButton = new Button(buttonsComposite, SWT.PUSH);
+ this.removeAllButton.setText(Messages.NaryReferenceEditingDialog_removeAll);
+ this.removeAllButton.setToolTipText(Messages.NaryReferenceEditingDialog_removeAllTooltip);
+ }
+
+ private void spacer(final Composite parent) {
+ @SuppressWarnings("unused")
+ Label label = new Label(parent, SWT.NONE);
+ }
+
+ private void createRightButtonsPane(final Composite contents) {
+ final Composite buttonsComposite = new Composite(contents, SWT.NONE);
+ final GridData buttonsCompositeGridData = new GridData();
+ buttonsCompositeGridData.verticalAlignment = SWT.FILL;
+ buttonsCompositeGridData.horizontalAlignment = SWT.FILL;
+ buttonsComposite.setLayoutData(buttonsCompositeGridData);
+ buttonsComposite.setLayout(new GridLayout());
+
+ // spacer
+ spacer(buttonsComposite);
+
+ if (getFeature() instanceof EReference) {
+ EReference eReference = (EReference) getFeature();
+ if (eReference.isContainment()) {
+ this.createInstanceButton = new Button(buttonsComposite, SWT.PUSH);
+ this.createInstanceButton.setText(Messages.NaryReferenceEditingDialog_newInstance);
+ final GridData createButtonGridData = new GridData();
+ createButtonGridData.verticalAlignment = SWT.FILL;
+ createButtonGridData.horizontalAlignment = SWT.FILL;
+ this.createInstanceButton.setLayoutData(createButtonGridData);
+ spacer(buttonsComposite);
+ }
+
+ }
+
+ this.upButton = new Button(buttonsComposite, SWT.PUSH);
+ this.upButton.setText(Messages.NaryReferenceEditingDialog_up);
+ final GridData upButtonGridData = new GridData();
+ upButtonGridData.verticalAlignment = SWT.FILL;
+ upButtonGridData.horizontalAlignment = SWT.FILL;
+ this.upButton.setLayoutData(upButtonGridData);
+
+ this.downButton = new Button(buttonsComposite, SWT.PUSH);
+ this.downButton.setText(Messages.NaryReferenceEditingDialog_down);
+ final GridData downButtonGridData = new GridData();
+ downButtonGridData.verticalAlignment = SWT.FILL;
+ downButtonGridData.horizontalAlignment = SWT.FILL;
+ this.downButton.setLayoutData(downButtonGridData);
+ }
+
+ private void createRightPane(final Composite contents) {
+ final Composite featureComposite = new Composite(contents, SWT.NONE);
+ final GridData featureCompositeData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ featureCompositeData.horizontalAlignment = SWT.END;
+ featureComposite.setLayoutData(featureCompositeData);
+
+ final GridLayout featureCompositeLayout = new GridLayout();
+ featureCompositeData.horizontalAlignment = SWT.FILL;
+ featureCompositeLayout.marginHeight = 0;
+ featureCompositeLayout.marginWidth = 0;
+ featureCompositeLayout.numColumns = 1;
+ featureComposite.setLayout(featureCompositeLayout);
+
+ final Label featureLabel = new Label(featureComposite, SWT.NONE);
+ featureLabel.setText(Messages.NaryReferenceEditingDialog_values);
+ final GridData valuesLabelGridData = new GridData();
+ valuesLabelGridData.horizontalSpan = 2;
+ valuesLabelGridData.horizontalAlignment = SWT.FILL;
+ valuesLabelGridData.verticalAlignment = SWT.FILL;
+ featureLabel.setLayoutData(valuesLabelGridData);
+
+ final org.eclipse.swt.widgets.List availableValuesList = new org.eclipse.swt.widgets.List(
+ featureComposite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
+ final GridData availableValuesGridData = new GridData();
+ availableValuesGridData.widthHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_WIDTH;
+ availableValuesGridData.heightHint = AbstractNaryEditingDialog.AVAILABLE_VALUES_TREE_HEIGHT;
+ availableValuesGridData.verticalAlignment = SWT.FILL;
+ availableValuesGridData.horizontalAlignment = SWT.FILL;
+ availableValuesGridData.grabExcessHorizontalSpace = true;
+ availableValuesGridData.grabExcessVerticalSpace = true;
+ availableValuesList.setLayoutData(availableValuesGridData);
+
+ this.featureValuesListViewer = new ListViewer(availableValuesList);
+ this.featureValuesListViewer.setContentProvider(new AssignedValuesContentProvider());
+ this.featureValuesListViewer.setLabelProvider(new CustomizableLabelProvider());
+ this.featureValuesListViewer
+ .setInput(getValues());
+ }
+
+ private Text createFilterText(final Composite contents) {
+ Text patternText = new Text(contents, SWT.BORDER | SWT.SEARCH);
+ patternText.setMessage(Messages.NaryReferenceEditingDialog_typeFilterText);
+ patternText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ return patternText;
+ }
+
+ @Override
+ public void refresh() {
+ this.availableValuesTreeViewer.refresh();
+ this.featureValuesListViewer.refresh();
+ }
+
+ @Override
+ protected boolean isResizable() {
+ return true;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(final Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ }
+
+ @Override
+ public ISelection getSelection() {
+ return this.featureValuesListViewer.getSelection();
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/AbstractModelCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/AbstractModelCellEditor.java
index 4c901f30d4b..dae980b5236 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/AbstractModelCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/AbstractModelCellEditor.java
@@ -1,101 +1,101 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object ' <em><b>Abstract Model Cell Editor</b></em>'. <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
- * <em>Cell Type</em>}</li>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
- * <em>Cell Id</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor()
- * @model abstract="true"
- * @generated
- */
-public interface AbstractModelCellEditor extends EObject {
- /**
- * Returns the value of the '<em><b>Cell Type</b></em>' reference. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cell Type</em>' reference isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Cell Type</em>' reference.
- * @see #setCellType(EClassifier)
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor_CellType()
- * @model required="true"
- * @generated
- */
- EClassifier getCellType();
-
- /**
- * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
- * <em>Cell Type</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @param value
- * the new value of the '<em>Cell Type</em>' reference.
- * @see #getCellType()
- * @generated
- */
- void setCellType(EClassifier value);
-
- /**
- * Returns the value of the '<em><b>Cell Id</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Cell 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>Cell Id</em>' attribute.
- * @see #setCellId(String)
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor_CellId()
- * @model required="true"
- * @generated
- */
- String getCellId();
-
- /**
- * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
- * <em>Cell Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @param value
- * the new value of the '<em>Cell Id</em>' attribute.
- * @see #getCellId()
- * @generated
- */
- void setCellId(String value);
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @model kind="operation" required="true"
- * @generated
- */
- String getModelCellEditorImpl();
-
-} // AbstractModelCellEditor
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Abstract Model Cell Editor</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
+ * <em>Cell Type</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
+ * <em>Cell Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor()
+ * @model abstract="true"
+ * @generated
+ */
+public interface AbstractModelCellEditor extends EObject {
+ /**
+ * Returns the value of the '<em><b>Cell Type</b></em>' reference. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Cell Type</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Cell Type</em>' reference.
+ * @see #setCellType(EClassifier)
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor_CellType()
+ * @model required="true"
+ * @generated
+ */
+ EClassifier getCellType();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
+ * <em>Cell Type</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Cell Type</em>' reference.
+ * @see #getCellType()
+ * @generated
+ */
+ void setCellType(EClassifier value);
+
+ /**
+ * Returns the value of the '<em><b>Cell Id</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Cell 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>Cell Id</em>' attribute.
+ * @see #setCellId(String)
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getAbstractModelCellEditor_CellId()
+ * @model required="true"
+ * @generated
+ */
+ String getCellId();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
+ * <em>Cell Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @param value
+ * the new value of the '<em>Cell Id</em>' attribute.
+ * @see #getCellId()
+ * @generated
+ */
+ void setCellId(String value);
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ String getModelCellEditorImpl();
+
+} // AbstractModelCellEditor
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/BasicCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/BasicCellEditor.java
index b5c8feb1fe2..35906992fd6 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/BasicCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/BasicCellEditor.java
@@ -1,60 +1,60 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object ' <em><b>Basic Cell Editor</b></em>'. <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
- * <em>Basic Cell Editor Impl</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getBasicCellEditor()
- * @model
- * @generated
- */
-public interface BasicCellEditor extends AbstractModelCellEditor {
- /**
- * Returns the value of the '<em><b>Basic Cell Editor Impl</b></em>'
- * attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Basic Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Basic Cell Editor Impl</em>' attribute.
- * @see #setBasicCellEditorImpl(String)
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getBasicCellEditor_BasicCellEditorImpl()
- * @model required="true"
- * @generated
- */
- String getBasicCellEditorImpl();
-
- /**
- * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
- * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Basic Cell Editor Impl</em>'
- * attribute.
- * @see #getBasicCellEditorImpl()
- * @generated
- */
- void setBasicCellEditorImpl(String value);
-
-} // BasicCellEditor
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Basic Cell Editor</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
+ * <em>Basic Cell Editor Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getBasicCellEditor()
+ * @model
+ * @generated
+ */
+public interface BasicCellEditor extends AbstractModelCellEditor {
+ /**
+ * Returns the value of the '<em><b>Basic Cell Editor Impl</b></em>'
+ * attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Basic Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Basic Cell Editor Impl</em>' attribute.
+ * @see #setBasicCellEditorImpl(String)
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getBasicCellEditor_BasicCellEditorImpl()
+ * @model required="true"
+ * @generated
+ */
+ String getBasicCellEditorImpl();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
+ * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Basic Cell Editor Impl</em>'
+ * attribute.
+ * @see #getBasicCellEditorImpl()
+ * @generated
+ */
+ void setBasicCellEditorImpl(String value);
+
+} // BasicCellEditor
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorDeclarations.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorDeclarations.java
index dd0b0dc4a32..4d0829e55c1 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorDeclarations.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorDeclarations.java
@@ -1,50 +1,50 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object ' <em><b>Declarations</b></em>'. <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors
- * <em>Model Cell Editors</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getModelCellEditorDeclarations()
- * @model
- * @generated
- */
-public interface ModelCellEditorDeclarations extends EObject {
- /**
- * Returns the value of the '<em><b>Model Cell Editors</b></em>' containment
- * reference list. The list contents are of type {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor} . <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Model Cell Editors</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>Model Cell Editors</em>' containment
- * reference list.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getModelCellEditorDeclarations_ModelCellEditors()
- * @model containment="true"
- * @generated
- */
- EList<AbstractModelCellEditor> getModelCellEditors();
-
-} // ModelCellEditorDeclarations
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Declarations</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors
+ * <em>Model Cell Editors</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getModelCellEditorDeclarations()
+ * @model
+ * @generated
+ */
+public interface ModelCellEditorDeclarations extends EObject {
+ /**
+ * Returns the value of the '<em><b>Model Cell Editors</b></em>' containment
+ * reference list. The list contents are of type {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor} . <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Model Cell Editors</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>Model Cell Editors</em>' containment
+ * reference list.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getModelCellEditorDeclarations_ModelCellEditors()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AbstractModelCellEditor> getModelCellEditors();
+
+} // ModelCellEditorDeclarations
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorFactory.java
index 2fcb5f67ac2..ce925d7f012 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorFactory.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorFactory.java
@@ -1,78 +1,78 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-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.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage
- * @generated
- */
-public interface ModelCellEditorFactory extends EFactory {
- /**
- * The singleton instance of the factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- ModelCellEditorFactory eINSTANCE = org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorFactoryImpl
- .init();
-
- /**
- * Returns a new object of class '<em>Declarations</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Declarations</em>'.
- * @generated
- */
- ModelCellEditorDeclarations createModelCellEditorDeclarations();
-
- /**
- * Returns a new object of class '<em>Basic Cell Editor</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Basic Cell Editor</em>'.
- * @generated
- */
- BasicCellEditor createBasicCellEditor();
-
- /**
- * Returns a new object of class '<em>Unary Reference Cell Editor</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Unary Reference Cell Editor</em>'.
- * @generated
- */
- UnaryReferenceCellEditor createUnaryReferenceCellEditor();
-
- /**
- * Returns a new object of class '<em>Nary Feature Cell Editor</em>'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>Nary Feature Cell Editor</em>'.
- * @generated
- */
- NaryFeatureCellEditor createNaryFeatureCellEditor();
-
- /**
- * Returns the package supported by this factory. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @return the package supported by this factory.
- * @generated
- */
- ModelCellEditorPackage getModelCellEditorPackage();
-
-} // ModelCellEditorFactory
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+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.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage
+ * @generated
+ */
+public interface ModelCellEditorFactory extends EFactory {
+ /**
+ * The singleton instance of the factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ModelCellEditorFactory eINSTANCE = org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorFactoryImpl
+ .init();
+
+ /**
+ * Returns a new object of class '<em>Declarations</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Declarations</em>'.
+ * @generated
+ */
+ ModelCellEditorDeclarations createModelCellEditorDeclarations();
+
+ /**
+ * Returns a new object of class '<em>Basic Cell Editor</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Basic Cell Editor</em>'.
+ * @generated
+ */
+ BasicCellEditor createBasicCellEditor();
+
+ /**
+ * Returns a new object of class '<em>Unary Reference Cell Editor</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Unary Reference Cell Editor</em>'.
+ * @generated
+ */
+ UnaryReferenceCellEditor createUnaryReferenceCellEditor();
+
+ /**
+ * Returns a new object of class '<em>Nary Feature Cell Editor</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Nary Feature Cell Editor</em>'.
+ * @generated
+ */
+ NaryFeatureCellEditor createNaryFeatureCellEditor();
+
+ /**
+ * Returns the package supported by this factory. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ModelCellEditorPackage getModelCellEditorPackage();
+
+} // ModelCellEditorFactory
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorPackage.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorPackage.java
index a5b20939d34..0047c50b1eb 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorPackage.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/ModelCellEditorPackage.java
@@ -1,536 +1,536 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-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 enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorFactory
- * @model kind="package"
- * @generated
- */
-public interface ModelCellEditorPackage extends EPackage {
- /**
- * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNAME = "modelCellEditor"; //$NON-NLS-1$
-
- /**
- * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"; //$NON-NLS-1$
-
- /**
- * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_PREFIX = "modelCellEditor"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- ModelCellEditorPackage eINSTANCE = org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl
- .init();
-
- /**
- * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
- * <em>Declarations</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getModelCellEditorDeclarations()
- * @generated
- */
- int MODEL_CELL_EDITOR_DECLARATIONS = 0;
-
- /**
- * The feature id for the '<em><b>Model Cell Editors</b></em>' containment
- * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS = 0;
-
- /**
- * The number of structural features of the '<em>Declarations</em>' class.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int MODEL_CELL_EDITOR_DECLARATIONS_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
- * <em>Abstract Model Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getAbstractModelCellEditor()
- * @generated
- */
- int ABSTRACT_MODEL_CELL_EDITOR = 1;
-
- /**
- * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE = 0;
-
- /**
- * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ABSTRACT_MODEL_CELL_EDITOR__CELL_ID = 1;
-
- /**
- * The number of structural features of the ' <em>Abstract Model Cell Editor</em>' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT = 2;
-
- /**
- * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
- * <em>Basic Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getBasicCellEditor()
- * @generated
- */
- int BASIC_CELL_EDITOR = 2;
-
- /**
- * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int BASIC_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
-
- /**
- * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int BASIC_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
-
- /**
- * The feature id for the '<em><b>Basic Cell Editor Impl</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Basic Cell Editor</em>'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int BASIC_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
- * <em>Unary Reference Cell Editor</em>}' class. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getUnaryReferenceCellEditor()
- * @generated
- */
- int UNARY_REFERENCE_CELL_EDITOR = 3;
-
- /**
- * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UNARY_REFERENCE_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
-
- /**
- * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UNARY_REFERENCE_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
-
- /**
- * The feature id for the '<em><b>Unary Reference Cell Editor Impl</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UNARY_REFERENCE_CELL_EDITOR__UNARY_REFERENCE_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the ' <em>Unary Reference Cell Editor</em>' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int UNARY_REFERENCE_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
- * <em>Nary Feature Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getNaryFeatureCellEditor()
- * @generated
- */
- int NARY_FEATURE_CELL_EDITOR = 4;
-
- /**
- * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int NARY_FEATURE_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
-
- /**
- * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int NARY_FEATURE_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
-
- /**
- * The feature id for the '<em><b>Nary Feature Cell Editor Impl</b></em>'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int NARY_FEATURE_CELL_EDITOR__NARY_FEATURE_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the ' <em>Nary Feature Cell Editor</em>' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int NARY_FEATURE_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
-
- /**
- * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations
- * <em>Declarations</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>Declarations</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations
- * @generated
- */
- EClass getModelCellEditorDeclarations();
-
- /**
- * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors
- * <em>Model Cell Editors</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @return the meta object for the containment reference list ' <em>Model Cell Editors</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors()
- * @see #getModelCellEditorDeclarations()
- * @generated
- */
- EReference getModelCellEditorDeclarations_ModelCellEditors();
-
- /**
- * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor
- * <em>Abstract Model Cell Editor</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for class '<em>Abstract Model Cell Editor</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor
- * @generated
- */
- EClass getAbstractModelCellEditor();
-
- /**
- * Returns the meta object for the reference ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
- * <em>Cell Type</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the reference '<em>Cell Type</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType()
- * @see #getAbstractModelCellEditor()
- * @generated
- */
- EReference getAbstractModelCellEditor_CellType();
-
- /**
- * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
- * <em>Cell Id</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Cell Id</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId()
- * @see #getAbstractModelCellEditor()
- * @generated
- */
- EAttribute getAbstractModelCellEditor_CellId();
-
- /**
- * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor
- * <em>Basic Cell Editor</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @return the meta object for class '<em>Basic Cell Editor</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor
- * @generated
- */
- EClass getBasicCellEditor();
-
- /**
- * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
- * <em>Basic Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for the attribute ' <em>Basic Cell Editor Impl</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl()
- * @see #getBasicCellEditor()
- * @generated
- */
- EAttribute getBasicCellEditor_BasicCellEditorImpl();
-
- /**
- * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor
- * <em>Unary Reference Cell Editor</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for class '<em>Unary Reference Cell Editor</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor
- * @generated
- */
- EClass getUnaryReferenceCellEditor();
-
- /**
- * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
- * <em>Unary Reference Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for the attribute ' <em>Unary Reference Cell Editor Impl</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl()
- * @see #getUnaryReferenceCellEditor()
- * @generated
- */
- EAttribute getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl();
-
- /**
- * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor
- * <em>Nary Feature Cell Editor</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for class '<em>Nary Feature Cell Editor</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor
- * @generated
- */
- EClass getNaryFeatureCellEditor();
-
- /**
- * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
- * <em>Nary Feature Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for the attribute ' <em>Nary Feature Cell Editor Impl</em>'.
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl()
- * @see #getNaryFeatureCellEditor()
- * @generated
- */
- EAttribute getNaryFeatureCellEditor_NaryFeatureCellEditorImpl();
-
- /**
- * 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
- */
- ModelCellEditorFactory getModelCellEditorFactory();
-
- /**
- * <!-- 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 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.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
- * <em>Declarations</em>}' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getModelCellEditorDeclarations()
- * @generated
- */
- EClass MODEL_CELL_EDITOR_DECLARATIONS = ModelCellEditorPackage.eINSTANCE
- .getModelCellEditorDeclarations();
-
- /**
- * The meta object literal for the '<em><b>Model Cell Editors</b></em>'
- * containment reference list feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EReference MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS = ModelCellEditorPackage.eINSTANCE
- .getModelCellEditorDeclarations_ModelCellEditors();
-
- /**
- * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
- * <em>Abstract Model Cell Editor</em>}' class. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getAbstractModelCellEditor()
- * @generated
- */
- EClass ABSTRACT_MODEL_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
- .getAbstractModelCellEditor();
-
- /**
- * The meta object literal for the '<em><b>Cell Type</b></em>' reference
- * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.eINSTANCE
- .getAbstractModelCellEditor_CellType();
-
- /**
- * The meta object literal for the '<em><b>Cell Id</b></em>' attribute
- * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute ABSTRACT_MODEL_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.eINSTANCE
- .getAbstractModelCellEditor_CellId();
-
- /**
- * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
- * <em>Basic Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getBasicCellEditor()
- * @generated
- */
- EClass BASIC_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE.getBasicCellEditor();
-
- /**
- * The meta object literal for the ' <em><b>Basic Cell Editor Impl</b></em>' attribute feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
- .getBasicCellEditor_BasicCellEditorImpl();
-
- /**
- * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
- * <em>Unary Reference Cell Editor</em>}' class. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getUnaryReferenceCellEditor()
- * @generated
- */
- EClass UNARY_REFERENCE_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
- .getUnaryReferenceCellEditor();
-
- /**
- * The meta object literal for the ' <em><b>Unary Reference Cell Editor Impl</b></em>' attribute feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute UNARY_REFERENCE_CELL_EDITOR__UNARY_REFERENCE_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
- .getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl();
-
- /**
- * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
- * <em>Nary Feature Cell Editor</em>}' class. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getNaryFeatureCellEditor()
- * @generated
- */
- EClass NARY_FEATURE_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
- .getNaryFeatureCellEditor();
-
- /**
- * The meta object literal for the ' <em><b>Nary Feature Cell Editor Impl</b></em>' attribute feature.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute NARY_FEATURE_CELL_EDITOR__NARY_FEATURE_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
- .getNaryFeatureCellEditor_NaryFeatureCellEditorImpl();
-
- }
-
-} // ModelCellEditorPackage
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ModelCellEditorPackage extends EPackage {
+ /**
+ * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "modelCellEditor"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "modelCellEditor"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ ModelCellEditorPackage eINSTANCE = org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl
+ .init();
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
+ * <em>Declarations</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getModelCellEditorDeclarations()
+ * @generated
+ */
+ int MODEL_CELL_EDITOR_DECLARATIONS = 0;
+
+ /**
+ * The feature id for the '<em><b>Model Cell Editors</b></em>' containment
+ * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS = 0;
+
+ /**
+ * The number of structural features of the '<em>Declarations</em>' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MODEL_CELL_EDITOR_DECLARATIONS_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
+ * <em>Abstract Model Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getAbstractModelCellEditor()
+ * @generated
+ */
+ int ABSTRACT_MODEL_CELL_EDITOR = 1;
+
+ /**
+ * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE = 0;
+
+ /**
+ * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_MODEL_CELL_EDITOR__CELL_ID = 1;
+
+ /**
+ * The number of structural features of the ' <em>Abstract Model Cell Editor</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
+ * <em>Basic Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getBasicCellEditor()
+ * @generated
+ */
+ int BASIC_CELL_EDITOR = 2;
+
+ /**
+ * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BASIC_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BASIC_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
+
+ /**
+ * The feature id for the '<em><b>Basic Cell Editor Impl</b></em>'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Basic Cell Editor</em>'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int BASIC_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
+ * <em>Unary Reference Cell Editor</em>}' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getUnaryReferenceCellEditor()
+ * @generated
+ */
+ int UNARY_REFERENCE_CELL_EDITOR = 3;
+
+ /**
+ * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNARY_REFERENCE_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNARY_REFERENCE_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
+
+ /**
+ * The feature id for the '<em><b>Unary Reference Cell Editor Impl</b></em>'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNARY_REFERENCE_CELL_EDITOR__UNARY_REFERENCE_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the ' <em>Unary Reference Cell Editor</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int UNARY_REFERENCE_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
+ * <em>Nary Feature Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getNaryFeatureCellEditor()
+ * @generated
+ */
+ int NARY_FEATURE_CELL_EDITOR = 4;
+
+ /**
+ * The feature id for the '<em><b>Cell Type</b></em>' reference. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NARY_FEATURE_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Cell Id</b></em>' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NARY_FEATURE_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID;
+
+ /**
+ * The feature id for the '<em><b>Nary Feature Cell Editor Impl</b></em>'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NARY_FEATURE_CELL_EDITOR__NARY_FEATURE_CELL_EDITOR_IMPL = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the ' <em>Nary Feature Cell Editor</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NARY_FEATURE_CELL_EDITOR_FEATURE_COUNT = ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR_FEATURE_COUNT + 1;
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations
+ * <em>Declarations</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Declarations</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations
+ * @generated
+ */
+ EClass getModelCellEditorDeclarations();
+
+ /**
+ * Returns the meta object for the containment reference list ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors
+ * <em>Model Cell Editors</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for the containment reference list ' <em>Model Cell Editors</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations#getModelCellEditors()
+ * @see #getModelCellEditorDeclarations()
+ * @generated
+ */
+ EReference getModelCellEditorDeclarations_ModelCellEditors();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor
+ * <em>Abstract Model Cell Editor</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Abstract Model Cell Editor</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor
+ * @generated
+ */
+ EClass getAbstractModelCellEditor();
+
+ /**
+ * Returns the meta object for the reference ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType
+ * <em>Cell Type</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Cell Type</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellType()
+ * @see #getAbstractModelCellEditor()
+ * @generated
+ */
+ EReference getAbstractModelCellEditor_CellType();
+
+ /**
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId
+ * <em>Cell Id</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Cell Id</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor#getCellId()
+ * @see #getAbstractModelCellEditor()
+ * @generated
+ */
+ EAttribute getAbstractModelCellEditor_CellId();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor
+ * <em>Basic Cell Editor</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @return the meta object for class '<em>Basic Cell Editor</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor
+ * @generated
+ */
+ EClass getBasicCellEditor();
+
+ /**
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl
+ * <em>Basic Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the attribute ' <em>Basic Cell Editor Impl</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor#getBasicCellEditorImpl()
+ * @see #getBasicCellEditor()
+ * @generated
+ */
+ EAttribute getBasicCellEditor_BasicCellEditorImpl();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor
+ * <em>Unary Reference Cell Editor</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Unary Reference Cell Editor</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor
+ * @generated
+ */
+ EClass getUnaryReferenceCellEditor();
+
+ /**
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
+ * <em>Unary Reference Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the attribute ' <em>Unary Reference Cell Editor Impl</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl()
+ * @see #getUnaryReferenceCellEditor()
+ * @generated
+ */
+ EAttribute getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl();
+
+ /**
+ * Returns the meta object for class ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor
+ * <em>Nary Feature Cell Editor</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for class '<em>Nary Feature Cell Editor</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor
+ * @generated
+ */
+ EClass getNaryFeatureCellEditor();
+
+ /**
+ * Returns the meta object for the attribute ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
+ * <em>Nary Feature Cell Editor Impl</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the attribute ' <em>Nary Feature Cell Editor Impl</em>'.
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl()
+ * @see #getNaryFeatureCellEditor()
+ * @generated
+ */
+ EAttribute getNaryFeatureCellEditor_NaryFeatureCellEditorImpl();
+
+ /**
+ * 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
+ */
+ ModelCellEditorFactory getModelCellEditorFactory();
+
+ /**
+ * <!-- 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 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.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
+ * <em>Declarations</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getModelCellEditorDeclarations()
+ * @generated
+ */
+ EClass MODEL_CELL_EDITOR_DECLARATIONS = ModelCellEditorPackage.eINSTANCE
+ .getModelCellEditorDeclarations();
+
+ /**
+ * The meta object literal for the '<em><b>Model Cell Editors</b></em>'
+ * containment reference list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS = ModelCellEditorPackage.eINSTANCE
+ .getModelCellEditorDeclarations_ModelCellEditors();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
+ * <em>Abstract Model Cell Editor</em>}' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getAbstractModelCellEditor()
+ * @generated
+ */
+ EClass ABSTRACT_MODEL_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
+ .getAbstractModelCellEditor();
+
+ /**
+ * The meta object literal for the '<em><b>Cell Type</b></em>' reference
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE = ModelCellEditorPackage.eINSTANCE
+ .getAbstractModelCellEditor_CellType();
+
+ /**
+ * The meta object literal for the '<em><b>Cell Id</b></em>' attribute
+ * feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ABSTRACT_MODEL_CELL_EDITOR__CELL_ID = ModelCellEditorPackage.eINSTANCE
+ .getAbstractModelCellEditor_CellId();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
+ * <em>Basic Cell Editor</em>}' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getBasicCellEditor()
+ * @generated
+ */
+ EClass BASIC_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE.getBasicCellEditor();
+
+ /**
+ * The meta object literal for the ' <em><b>Basic Cell Editor Impl</b></em>' attribute feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
+ .getBasicCellEditor_BasicCellEditorImpl();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
+ * <em>Unary Reference Cell Editor</em>}' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.UnaryReferenceCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getUnaryReferenceCellEditor()
+ * @generated
+ */
+ EClass UNARY_REFERENCE_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
+ .getUnaryReferenceCellEditor();
+
+ /**
+ * The meta object literal for the ' <em><b>Unary Reference Cell Editor Impl</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute UNARY_REFERENCE_CELL_EDITOR__UNARY_REFERENCE_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
+ .getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl();
+
+ /**
+ * The meta object literal for the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
+ * <em>Nary Feature Cell Editor</em>}' class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.NaryFeatureCellEditorImpl
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorPackageImpl#getNaryFeatureCellEditor()
+ * @generated
+ */
+ EClass NARY_FEATURE_CELL_EDITOR = ModelCellEditorPackage.eINSTANCE
+ .getNaryFeatureCellEditor();
+
+ /**
+ * The meta object literal for the ' <em><b>Nary Feature Cell Editor Impl</b></em>' attribute feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NARY_FEATURE_CELL_EDITOR__NARY_FEATURE_CELL_EDITOR_IMPL = ModelCellEditorPackage.eINSTANCE
+ .getNaryFeatureCellEditor_NaryFeatureCellEditorImpl();
+
+ }
+
+} // ModelCellEditorPackage
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/NaryFeatureCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/NaryFeatureCellEditor.java
index 8f8495df09f..1b6cfb4c996 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/NaryFeatureCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/NaryFeatureCellEditor.java
@@ -1,61 +1,61 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object ' <em><b>Nary Feature Cell Editor</b></em>'. <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
- * <em>Nary Feature Cell Editor Impl</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getNaryFeatureCellEditor()
- * @model
- * @generated
- */
-public interface NaryFeatureCellEditor extends AbstractModelCellEditor {
- /**
- * Returns the value of the '<em><b>Nary Feature Cell Editor Impl</b></em>'
- * attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nary Feature Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Nary Feature Cell Editor Impl</em>'
- * attribute.
- * @see #setNaryFeatureCellEditorImpl(String)
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getNaryFeatureCellEditor_NaryFeatureCellEditorImpl()
- * @model required="true"
- * @generated
- */
- String getNaryFeatureCellEditorImpl();
-
- /**
- * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
- * <em>Nary Feature Cell Editor Impl</em>}' attribute. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Nary Feature Cell Editor Impl</em>'
- * attribute.
- * @see #getNaryFeatureCellEditorImpl()
- * @generated
- */
- void setNaryFeatureCellEditorImpl(String value);
-
-} // NaryFeatureCellEditor
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Nary Feature Cell Editor</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
+ * <em>Nary Feature Cell Editor Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getNaryFeatureCellEditor()
+ * @model
+ * @generated
+ */
+public interface NaryFeatureCellEditor extends AbstractModelCellEditor {
+ /**
+ * Returns the value of the '<em><b>Nary Feature Cell Editor Impl</b></em>'
+ * attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Nary Feature Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Nary Feature Cell Editor Impl</em>'
+ * attribute.
+ * @see #setNaryFeatureCellEditorImpl(String)
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getNaryFeatureCellEditor_NaryFeatureCellEditorImpl()
+ * @model required="true"
+ * @generated
+ */
+ String getNaryFeatureCellEditorImpl();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor#getNaryFeatureCellEditorImpl
+ * <em>Nary Feature Cell Editor Impl</em>}' attribute. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Nary Feature Cell Editor Impl</em>'
+ * attribute.
+ * @see #getNaryFeatureCellEditorImpl()
+ * @generated
+ */
+ void setNaryFeatureCellEditorImpl(String value);
+
+} // NaryFeatureCellEditor
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/UnaryReferenceCellEditor.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/UnaryReferenceCellEditor.java
index 964c0eabb5f..97fc4c6493f 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/UnaryReferenceCellEditor.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/UnaryReferenceCellEditor.java
@@ -1,60 +1,60 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object ' <em><b>Unary Reference Cell Editor</b></em>'. <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
- * <em>Unary Reference Cell Editor Impl</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getUnaryReferenceCellEditor()
- * @model
- * @generated
- */
-public interface UnaryReferenceCellEditor extends AbstractModelCellEditor {
- /**
- * Returns the value of the ' <em><b>Unary Reference Cell Editor Impl</b></em>' attribute. <!--
- * begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Unary Reference Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Unary Reference Cell Editor Impl</em>'
- * attribute.
- * @see #setUnaryReferenceCellEditorImpl(String)
- * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl()
- * @model required="true"
- * @generated
- */
- String getUnaryReferenceCellEditorImpl();
-
- /**
- * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
- * <em>Unary Reference Cell Editor Impl</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the ' <em>Unary Reference Cell Editor Impl</em>' attribute.
- * @see #getUnaryReferenceCellEditorImpl()
- * @generated
- */
- void setUnaryReferenceCellEditorImpl(String value);
-
-} // UnaryReferenceCellEditor
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object ' <em><b>Unary Reference Cell Editor</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
+ * <em>Unary Reference Cell Editor Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getUnaryReferenceCellEditor()
+ * @model
+ * @generated
+ */
+public interface UnaryReferenceCellEditor extends AbstractModelCellEditor {
+ /**
+ * Returns the value of the ' <em><b>Unary Reference Cell Editor Impl</b></em>' attribute. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Unary Reference Cell Editor Impl</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Unary Reference Cell Editor Impl</em>'
+ * attribute.
+ * @see #setUnaryReferenceCellEditorImpl(String)
+ * @see org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage#getUnaryReferenceCellEditor_UnaryReferenceCellEditorImpl()
+ * @model required="true"
+ * @generated
+ */
+ String getUnaryReferenceCellEditorImpl();
+
+ /**
+ * Sets the value of the ' {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor#getUnaryReferenceCellEditorImpl
+ * <em>Unary Reference Cell Editor Impl</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the ' <em>Unary Reference Cell Editor Impl</em>' attribute.
+ * @see #getUnaryReferenceCellEditorImpl()
+ * @generated
+ */
+ void setUnaryReferenceCellEditorImpl(String value);
+
+} // UnaryReferenceCellEditor
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/AbstractModelCellEditorImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/AbstractModelCellEditorImpl.java
index 7fc8eec4330..829ce543471 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/AbstractModelCellEditorImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/AbstractModelCellEditorImpl.java
@@ -1,259 +1,259 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Abstract Model Cell Editor</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl#getCellType
- * <em>Cell Type</em>}</li>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl#getCellId
- * <em>Cell Id</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public abstract class AbstractModelCellEditorImpl extends EObjectImpl implements
- AbstractModelCellEditor {
- /**
- * The cached value of the '{@link #getCellType() <em>Cell Type</em>}'
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getCellType()
- * @generated
- * @ordered
- */
- protected EClassifier cellType;
-
- /**
- * The default value of the '{@link #getCellId() <em>Cell Id</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getCellId()
- * @generated
- * @ordered
- */
- protected static final String CELL_ID_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getCellId() <em>Cell Id</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getCellId()
- * @generated
- * @ordered
- */
- protected String cellId = AbstractModelCellEditorImpl.CELL_ID_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected AbstractModelCellEditorImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ModelCellEditorPackage.Literals.ABSTRACT_MODEL_CELL_EDITOR;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClassifier getCellType() {
- if (this.cellType != null && this.cellType.eIsProxy()) {
- InternalEObject oldCellType = (InternalEObject) this.cellType;
- this.cellType = (EClassifier) eResolveProxy(oldCellType);
- if (this.cellType != oldCellType) {
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.RESOLVE,
- ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE,
- oldCellType, this.cellType));
- }
- }
- }
- return this.cellType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClassifier basicGetCellType() {
- return this.cellType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setCellType(final EClassifier newCellType) {
- EClassifier oldCellType = this.cellType;
- this.cellType = newCellType;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET,
- ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE, oldCellType,
- this.cellType));
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getCellId() {
- return this.cellId;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setCellId(final String newCellId) {
- String oldCellId = this.cellId;
- this.cellId = newCellId;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET,
- ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID, oldCellId,
- this.cellId));
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getModelCellEditorImpl() {
- // TODO: implement this method
- // Ensure that you remove @generated or mark it @generated NOT
- throw new UnsupportedOperationException();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
- switch (featureID) {
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
- if (resolve) {
- return getCellType();
- }
- return basicGetCellType();
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
- return getCellId();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eSet(final int featureID, final Object newValue) {
- switch (featureID) {
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
- setCellType((EClassifier) newValue);
- return;
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
- setCellId((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
- setCellType((EClassifier) null);
- return;
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
- setCellId(AbstractModelCellEditorImpl.CELL_ID_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
- return this.cellType != null;
- case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
- return AbstractModelCellEditorImpl.CELL_ID_EDEFAULT == null ? this.cellId != null
- : !AbstractModelCellEditorImpl.CELL_ID_EDEFAULT.equals(this.cellId);
- }
- 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(" (cellId: "); //$NON-NLS-1$
- result.append(this.cellId);
- result.append(')');
- return result.toString();
- }
-
-} // AbstractModelCellEditorImpl
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Abstract Model Cell Editor</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl#getCellType
+ * <em>Cell Type</em>}</li>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.AbstractModelCellEditorImpl#getCellId
+ * <em>Cell Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class AbstractModelCellEditorImpl extends EObjectImpl implements
+ AbstractModelCellEditor {
+ /**
+ * The cached value of the '{@link #getCellType() <em>Cell Type</em>}'
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getCellType()
+ * @generated
+ * @ordered
+ */
+ protected EClassifier cellType;
+
+ /**
+ * The default value of the '{@link #getCellId() <em>Cell Id</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getCellId()
+ * @generated
+ * @ordered
+ */
+ protected static final String CELL_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCellId() <em>Cell Id</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getCellId()
+ * @generated
+ * @ordered
+ */
+ protected String cellId = AbstractModelCellEditorImpl.CELL_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected AbstractModelCellEditorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelCellEditorPackage.Literals.ABSTRACT_MODEL_CELL_EDITOR;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClassifier getCellType() {
+ if (this.cellType != null && this.cellType.eIsProxy()) {
+ InternalEObject oldCellType = (InternalEObject) this.cellType;
+ this.cellType = (EClassifier) eResolveProxy(oldCellType);
+ if (this.cellType != oldCellType) {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE,
+ oldCellType, this.cellType));
+ }
+ }
+ }
+ return this.cellType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClassifier basicGetCellType() {
+ return this.cellType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCellType(final EClassifier newCellType) {
+ EClassifier oldCellType = this.cellType;
+ this.cellType = newCellType;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE, oldCellType,
+ this.cellType));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getCellId() {
+ return this.cellId;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCellId(final String newCellId) {
+ String oldCellId = this.cellId;
+ this.cellId = newCellId;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID, oldCellId,
+ this.cellId));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getModelCellEditorImpl() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
+ switch (featureID) {
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
+ if (resolve) {
+ return getCellType();
+ }
+ return basicGetCellType();
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
+ return getCellId();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(final int featureID, final Object newValue) {
+ switch (featureID) {
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
+ setCellType((EClassifier) newValue);
+ return;
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
+ setCellId((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
+ setCellType((EClassifier) null);
+ return;
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
+ setCellId(AbstractModelCellEditorImpl.CELL_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_TYPE:
+ return this.cellType != null;
+ case ModelCellEditorPackage.ABSTRACT_MODEL_CELL_EDITOR__CELL_ID:
+ return AbstractModelCellEditorImpl.CELL_ID_EDEFAULT == null ? this.cellId != null
+ : !AbstractModelCellEditorImpl.CELL_ID_EDEFAULT.equals(this.cellId);
+ }
+ 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(" (cellId: "); //$NON-NLS-1$
+ result.append(this.cellId);
+ result.append(')');
+ return result.toString();
+ }
+
+} // AbstractModelCellEditorImpl
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/BasicCellEditorImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/BasicCellEditorImpl.java
index 469ff660761..cb6d7020bf9 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/BasicCellEditorImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/BasicCellEditorImpl.java
@@ -1,183 +1,183 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Basic Cell Editor</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl#getBasicCellEditorImpl
- * <em>Basic Cell Editor Impl</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class BasicCellEditorImpl extends AbstractModelCellEditorImpl implements BasicCellEditor {
- /**
- * The default value of the '{@link #getBasicCellEditorImpl()
- * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #getBasicCellEditorImpl()
- * @generated
- * @ordered
- */
- protected static final String BASIC_CELL_EDITOR_IMPL_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getBasicCellEditorImpl()
- * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #getBasicCellEditorImpl()
- * @generated
- * @ordered
- */
- protected String basicCellEditorImpl = BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected BasicCellEditorImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ModelCellEditorPackage.Literals.BASIC_CELL_EDITOR;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getBasicCellEditorImpl() {
- return this.basicCellEditorImpl;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setBasicCellEditorImpl(final String newBasicCellEditorImpl) {
- String oldBasicCellEditorImpl = this.basicCellEditorImpl;
- this.basicCellEditorImpl = newBasicCellEditorImpl;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET,
- ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL,
- oldBasicCellEditorImpl, this.basicCellEditorImpl));
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
- switch (featureID) {
- case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
- return getBasicCellEditorImpl();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eSet(final int featureID, final Object newValue) {
- switch (featureID) {
- case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
- setBasicCellEditorImpl((String) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
- setBasicCellEditorImpl(BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
- return BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT == null ? this.basicCellEditorImpl != null
- : !BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT
- .equals(this.basicCellEditorImpl);
- }
- 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(" (basicCellEditorImpl: "); //$NON-NLS-1$
- result.append(this.basicCellEditorImpl);
- result.append(')');
- return result.toString();
- }
-
- /** @generated NOT */
- @Override
- public String getModelCellEditorImpl() {
- return getBasicCellEditorImpl();
- }
-
-} // BasicCellEditorImpl
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Basic Cell Editor</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.BasicCellEditorImpl#getBasicCellEditorImpl
+ * <em>Basic Cell Editor Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BasicCellEditorImpl extends AbstractModelCellEditorImpl implements BasicCellEditor {
+ /**
+ * The default value of the '{@link #getBasicCellEditorImpl()
+ * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBasicCellEditorImpl()
+ * @generated
+ * @ordered
+ */
+ protected static final String BASIC_CELL_EDITOR_IMPL_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getBasicCellEditorImpl()
+ * <em>Basic Cell Editor Impl</em>}' attribute. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getBasicCellEditorImpl()
+ * @generated
+ * @ordered
+ */
+ protected String basicCellEditorImpl = BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected BasicCellEditorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelCellEditorPackage.Literals.BASIC_CELL_EDITOR;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getBasicCellEditorImpl() {
+ return this.basicCellEditorImpl;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setBasicCellEditorImpl(final String newBasicCellEditorImpl) {
+ String oldBasicCellEditorImpl = this.basicCellEditorImpl;
+ this.basicCellEditorImpl = newBasicCellEditorImpl;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL,
+ oldBasicCellEditorImpl, this.basicCellEditorImpl));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
+ switch (featureID) {
+ case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
+ return getBasicCellEditorImpl();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(final int featureID, final Object newValue) {
+ switch (featureID) {
+ case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
+ setBasicCellEditorImpl((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
+ setBasicCellEditorImpl(BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.BASIC_CELL_EDITOR__BASIC_CELL_EDITOR_IMPL:
+ return BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT == null ? this.basicCellEditorImpl != null
+ : !BasicCellEditorImpl.BASIC_CELL_EDITOR_IMPL_EDEFAULT
+ .equals(this.basicCellEditorImpl);
+ }
+ 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(" (basicCellEditorImpl: "); //$NON-NLS-1$
+ result.append(this.basicCellEditorImpl);
+ result.append(')');
+ return result.toString();
+ }
+
+ /** @generated NOT */
+ @Override
+ public String getModelCellEditorImpl() {
+ return getBasicCellEditorImpl();
+ }
+
+} // BasicCellEditorImpl
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorDeclarationsImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorDeclarationsImpl.java
index ac6978e9724..09d5cc2bdfa 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorDeclarationsImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorDeclarationsImpl.java
@@ -1,161 +1,161 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Declarations</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>
- * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl#getModelCellEditors
- * <em>Model Cell Editors</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ModelCellEditorDeclarationsImpl extends EObjectImpl implements
- ModelCellEditorDeclarations {
- /**
- * The cached value of the '{@link #getModelCellEditors()
- * <em>Model Cell Editors</em>}' containment reference list. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see #getModelCellEditors()
- * @generated
- * @ordered
- */
- protected EList<AbstractModelCellEditor> modelCellEditors;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected ModelCellEditorDeclarationsImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ModelCellEditorPackage.Literals.MODEL_CELL_EDITOR_DECLARATIONS;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EList<AbstractModelCellEditor> getModelCellEditors() {
- if (this.modelCellEditors == null) {
- this.modelCellEditors = new EObjectContainmentEList<AbstractModelCellEditor>(
- AbstractModelCellEditor.class, this,
- ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS);
- }
- return this.modelCellEditors;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(final InternalEObject otherEnd, final int featureID,
- final NotificationChain msgs) {
- switch (featureID) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
- return ((InternalEList<?>) getModelCellEditors()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
- switch (featureID) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
- return getModelCellEditors();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(final int featureID, final Object newValue) {
- switch (featureID) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
- getModelCellEditors().clear();
- getModelCellEditors().addAll((Collection<? extends AbstractModelCellEditor>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public void eUnset(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
- getModelCellEditors().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public boolean eIsSet(final int featureID) {
- switch (featureID) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
- return this.modelCellEditors != null && !this.modelCellEditors.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} // ModelCellEditorDeclarationsImpl
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Declarations</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.impl.ModelCellEditorDeclarationsImpl#getModelCellEditors
+ * <em>Model Cell Editors</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelCellEditorDeclarationsImpl extends EObjectImpl implements
+ ModelCellEditorDeclarations {
+ /**
+ * The cached value of the '{@link #getModelCellEditors()
+ * <em>Model Cell Editors</em>}' containment reference list. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getModelCellEditors()
+ * @generated
+ * @ordered
+ */
+ protected EList<AbstractModelCellEditor> modelCellEditors;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ModelCellEditorDeclarationsImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ModelCellEditorPackage.Literals.MODEL_CELL_EDITOR_DECLARATIONS;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<AbstractModelCellEditor> getModelCellEditors() {
+ if (this.modelCellEditors == null) {
+ this.modelCellEditors = new EObjectContainmentEList<AbstractModelCellEditor>(
+ AbstractModelCellEditor.class, this,
+ ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS);
+ }
+ return this.modelCellEditors;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(final InternalEObject otherEnd, final int featureID,
+ final NotificationChain msgs) {
+ switch (featureID) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
+ return ((InternalEList<?>) getModelCellEditors()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(final int featureID, final boolean resolve, final boolean coreType) {
+ switch (featureID) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
+ return getModelCellEditors();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(final int featureID, final Object newValue) {
+ switch (featureID) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
+ getModelCellEditors().clear();
+ getModelCellEditors().addAll((Collection<? extends AbstractModelCellEditor>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
+ getModelCellEditors().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(final int featureID) {
+ switch (featureID) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS__MODEL_CELL_EDITORS:
+ return this.modelCellEditors != null && !this.modelCellEditors.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ModelCellEditorDeclarationsImpl
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorFactoryImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorFactoryImpl.java
index 64980158b01..7d60614f3fd 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorFactoryImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorFactoryImpl.java
@@ -1,144 +1,144 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class ModelCellEditorFactoryImpl extends EFactoryImpl implements ModelCellEditorFactory {
- /**
- * Creates the default factory implementation. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public static ModelCellEditorFactory init() {
- try {
- ModelCellEditorFactory theModelCellEditorFactory = (ModelCellEditorFactory) EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"); //$NON-NLS-1$
- if (theModelCellEditorFactory != null) {
- return theModelCellEditorFactory;
- }
- } catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new ModelCellEditorFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ModelCellEditorFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public EObject create(final EClass eClass) {
- switch (eClass.getClassifierID()) {
- case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS:
- return createModelCellEditorDeclarations();
- case ModelCellEditorPackage.BASIC_CELL_EDITOR:
- return createBasicCellEditor();
- case ModelCellEditorPackage.UNARY_REFERENCE_CELL_EDITOR:
- return createUnaryReferenceCellEditor();
- case ModelCellEditorPackage.NARY_FEATURE_CELL_EDITOR:
- return createNaryFeatureCellEditor();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() //$NON-NLS-1$
- + "' is not a valid classifier"); //$NON-NLS-1$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public ModelCellEditorDeclarations createModelCellEditorDeclarations() {
- ModelCellEditorDeclarationsImpl modelCellEditorDeclarations = new ModelCellEditorDeclarationsImpl();
- return modelCellEditorDeclarations;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public BasicCellEditor createBasicCellEditor() {
- BasicCellEditorImpl basicCellEditor = new BasicCellEditorImpl();
- return basicCellEditor;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public UnaryReferenceCellEditor createUnaryReferenceCellEditor() {
- UnaryReferenceCellEditorImpl unaryReferenceCellEditor = new UnaryReferenceCellEditorImpl();
- return unaryReferenceCellEditor;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NaryFeatureCellEditor createNaryFeatureCellEditor() {
- NaryFeatureCellEditorImpl naryFeatureCellEditor = new NaryFeatureCellEditorImpl();
- return naryFeatureCellEditor;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public ModelCellEditorPackage getModelCellEditorPackage() {
- return (ModelCellEditorPackage) getEPackage();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @deprecated
- * @generated
- */
- @Deprecated
- public static ModelCellEditorPackage getPackage() {
- return ModelCellEditorPackage.eINSTANCE;
- }
-
-} // ModelCellEditorFactoryImpl
+/**
+ * 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:
+ * Nicolas Bros (Mia-Software) - initial API and implementation
+ */
+package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorFactory;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor;
+import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.UnaryReferenceCellEditor;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelCellEditorFactoryImpl extends EFactoryImpl implements ModelCellEditorFactory {
+ /**
+ * Creates the default factory implementation. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public static ModelCellEditorFactory init() {
+ try {
+ ModelCellEditorFactory theModelCellEditorFactory = (ModelCellEditorFactory) EPackage.Registry.INSTANCE
+ .getEFactory("http://www.eclipse.org/papyrus/EMF_Facet/ModelCellEditor/0.1.0/modelCellEditor"); //$NON-NLS-1$
+ if (theModelCellEditorFactory != null) {
+ return theModelCellEditorFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ModelCellEditorFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelCellEditorFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(final EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ModelCellEditorPackage.MODEL_CELL_EDITOR_DECLARATIONS:
+ return createModelCellEditorDeclarations();
+ case ModelCellEditorPackage.BASIC_CELL_EDITOR:
+ return createBasicCellEditor();
+ case ModelCellEditorPackage.UNARY_REFERENCE_CELL_EDITOR:
+ return createUnaryReferenceCellEditor();
+ case ModelCellEditorPackage.NARY_FEATURE_CELL_EDITOR:
+ return createNaryFeatureCellEditor();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() //$NON-NLS-1$
+ + "' is not a valid classifier"); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelCellEditorDeclarations createModelCellEditorDeclarations() {
+ ModelCellEditorDeclarationsImpl modelCellEditorDeclarations = new ModelCellEditorDeclarationsImpl();
+ return modelCellEditorDeclarations;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BasicCellEditor createBasicCellEditor() {
+ BasicCellEditorImpl basicCellEditor = new BasicCellEditorImpl();
+ return basicCellEditor;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public UnaryReferenceCellEditor createUnaryReferenceCellEditor() {
+ UnaryReferenceCellEditorImpl unaryReferenceCellEditor = new UnaryReferenceCellEditorImpl();
+ return unaryReferenceCellEditor;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NaryFeatureCellEditor createNaryFeatureCellEditor() {
+ NaryFeatureCellEditorImpl naryFeatureCellEditor = new NaryFeatureCellEditorImpl();
+ return naryFeatureCellEditor;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelCellEditorPackage getModelCellEditorPackage() {
+ return (ModelCellEditorPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ModelCellEditorPackage getPackage() {
+ return ModelCellEditorPackage.eINSTANCE;
+ }
+
+} // ModelCellEditorFactoryImpl
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorPackageImpl.java b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorPackageImpl.java
index 058ed087ca9..46cc0e35d45 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorPackageImpl.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors/src/org/eclipse/papyrus/emf/facet/widgets/celleditors/modelCellEditor/impl/ModelCellEditorPackageImpl.java
@@ -1,381 +1,381 @@
-/**
- * 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:
- * Nicolas Bros (Mia-Software) - initial API and implementation
- */
-package org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.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.emf.facet.widgets.celleditors.modelCellEditor.AbstractModelCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.BasicCellEditor;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorDeclarations;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorFactory;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.ModelCellEditorPackage;
-import org.eclipse.papyrus.emf.facet.widgets.celleditors.modelCellEditor.NaryFeatureCellEditor;
-import org.eclipse.papyrus.emf.f