Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/uml/org.eclipse.papyrus.textual.editors.example/.project28
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.classpath7
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.project28
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/META-INF/MANIFEST.MF28
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/about.html28
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/build.properties9
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/PropertyViewEditorsExample.ctx27
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/OperationExample.xwt51
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt46
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.properties4
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.xml33
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/pom.xml14
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/Activator.java50
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/ExtendedValueSpecificationCellEditorConfiguration.java40
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/UMLReferenceCellEditorConfigurationExample.java36
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/manager/cell/ExtendedValueSpecificationCellManager.java31
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature/feature.xml8
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java1
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java170
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java141
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java155
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java7
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java68
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java86
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java121
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java68
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java152
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java91
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java128
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java82
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java175
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java200
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java750
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java506
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java146
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java50
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java164
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java30
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java29
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml5
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java100
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath7
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project28
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF28
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html28
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties8
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties13
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml19
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml14
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java77
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java120
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java101
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java160
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml8
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java220
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java213
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java58
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java76
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java263
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java2
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties1
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java729
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java2
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF53
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java346
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi13
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml28
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java346
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java113
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java41
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath8
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF39
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties9
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties13
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml359
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen345
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml14
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java137
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java29
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java97
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java91
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g882
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens26
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java1117
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java2405
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/internal/UmlValueSpecificationActivator.java95
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationUiModule.java15
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/UmlValueSpecificationProposalProvider.java11
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java180
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationDescriptionLabelProvider.java22
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/labeling/UmlValueSpecificationLabelProvider.java29
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/outline/UmlValueSpecificationOutlineTreeProvider.java13
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/quickfix/UmlValueSpecificationQuickfixProvider.java24
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.classpath7
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.project28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/META-INF/MANIFEST.MF28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/about.html28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/build.properties7
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/plugin.properties13
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/pom.xml14
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/Activator.java77
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java602
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.classpath9
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Generate Language Infrastructure (org.eclipse.papyrus.uml.textedit.port.xtext).launch18
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.launch/Launch Runtime Eclipse.launch34
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.project34
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.core.prefs288
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/META-INF/MANIFEST.MF41
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/about.html28
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/build.properties10
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.properties13
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml18
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/plugin.xml_gen17
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/pom.xml53
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/AbstractUmlValueSpecificationRuntimeModule.java157
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.ecore40
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.genmodel45
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtextbinbin0 -> 2899 bytes
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetupGenerated.java45
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationAntlrTokenFileProvider.java15
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/UmlValueSpecificationParser.java39
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.g581
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecification.tokens26
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationLexer.java1116
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/parser/antlr/internal/InternalUmlValueSpecificationParser.java1397
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSemanticSequencer.java206
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/serializer/UmlValueSpecificationSyntacticSequencer.java40
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/services/UmlValueSpecificationGrammarAccess.java456
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/AbstractRule.java161
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralBooleanRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralIntegerOrUnlimitedNaturalRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralNullRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralRealRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/LiteralStringRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationFactory.java106
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UmlValueSpecificationPackage.java817
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/UndefinedRule.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/VisibilityKind.java132
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/AbstractRuleImpl.java476
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralBooleanRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralIntegerOrUnlimitedNaturalRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralNullRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralRealRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/LiteralStringRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationFactoryImpl.java190
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UmlValueSpecificationPackageImpl.java518
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/UndefinedRuleImpl.java177
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/impl/VisibilityKindImpl.java345
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationAdapterFactory.java272
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/umlValueSpecification/util/UmlValueSpecificationSwitch.java280
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/AbstractUmlValueSpecificationJavaValidator.java22
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/GenerateUmlValueSpecification.mwe2187
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecification.xtext64
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationRuntimeModule.java20
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/UmlValueSpecificationStandaloneSetup.java25
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/formatting/UmlValueSpecificationFormatter.java38
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/Main.java90
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGenerator.xtend24
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/UmlValueSpecificationGeneratorMWE.mwe231
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/scoping/UmlValueSpecificationScopeProvider.java55
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/validation/UmlValueSpecificationJavaValidator.java30
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext/xtend-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/generator/.gitignore1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF50
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/NameResolutionHelper.java224
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/ReferenceContentAssistProcessor.java250
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/util/UMLReferenceConverter.java457
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/model/Environment.xmi282
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/AbstractModelElement.java23
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/DataSource.java30
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/modelelement/ModelElement.java18
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextMultiReference.java65
-rw-r--r--plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/widgets/CompletionStyledTextReferenceDialog.java109
-rwxr-xr-x[-rw-r--r--]releng/top-pom-main.xml0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java1
-rw-r--r--tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.tests/.project57
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/.project28
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/META-INF/MANIFEST.MF24
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/ValueSpecficationGrammarTests.launch49
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/build.properties7
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/model/xtextValueSpecificationModel.di2
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/model/xtextValueSpecificationModel.notation19
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/model/xtextValueSpecificationModel.uml21
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/plugin.properties13
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/pom.xml15
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/AbstractGrammarTest.java102
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/Activator.java49
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/XTextEditorTester.java79
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/rules/NoTransactionFixture.java108
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/rules/NoTransactionRule.java87
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java25
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/ValueSpecificationGrammarTests.java273
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterCompletionTest.di2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterCompletionTest.notation347
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterCompletionTest.uml47
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterTest.di2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterTest.notation187
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/resources/uml/UMLReferenceConverterTest.uml25
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/AllTests.java2
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLReferenceConverterCompletionTest.java362
-rw-r--r--tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests/src/org/eclipse/papyrus/uml/tools/tests/tests/UMLReferenceConverterTest.java173
215 files changed, 28390 insertions, 579 deletions
diff --git a/examples/uml/org.eclipse.papyrus.textual.editors.example/.project b/examples/uml/org.eclipse.papyrus.textual.editors.example/.project
new file mode 100644
index 00000000000..049eca4f978
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.textual.editors.example/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.textual.editors.example</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.classpath b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.classpath
new file mode 100644
index 00000000000..098194ca4b7
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.project b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.project
new file mode 100644
index 00000000000..049eca4f978
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.textual.editors.example</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.settings/org.eclipse.jdt.core.prefs b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f42de363afa
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/META-INF/MANIFEST.MF b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..050e4ce3e29
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.uml.textual.editors.example;singleton:=true
+Bundle-Version: 1.0.2.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.textual.editors.example.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.nattable;bundle-version="1.0.2",
+ org.eclipse.papyrus.views.properties;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.nattable;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.2",
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.gmf.runtime.common.ui.services,
+ org.eclipse.gmf.runtime.emf.core,
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.2",
+ org.eclipse.xtext,
+ org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.nattable.xtext.valuespecification;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.properties.xtext;bundle-version="1.0.2"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-ActivationPolicy: lazy
+Bundle-Description: %Bundle-Description
+Bundle-Localization: plugin
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/about.html b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/about.html
new file mode 100644
index 00000000000..dd3c089a94c
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/build.properties b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/build.properties
new file mode 100644
index 00000000000..2fd49ecbd95
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ model/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/PropertyViewEditorsExample.ctx b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/PropertyViewEditorsExample.ctx
new file mode 100644
index 00000000000..295ac9abf92
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/PropertyViewEditorsExample.ctx
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="PropertyViewEditorsExample">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69QJkKDJEeSZxfCXzZz3-w"/>
+ <tabs label="UML" id="uml" category="org.eclipse.papyrus" image="" priority="1">
+ <sections name="PropertyExample" sectionFile="ui/PropertyExample.xwt">
+ <widget href="ui/PropertyExample.xwt#/"/>
+ </sections>
+ <sections name="OperationExample" sectionFile="ui/OperationExample.xwt">
+ <widget href="ui/OperationExample.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="PropertyExample" sections="//@tabs.0/@sections.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleProperty">
+ <overriddenConstraints href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69ieUqDJEeSZxfCXzZz3-w"/>
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" xmi:id="_69ieU6DJEeSZxfCXzZz3-w" name="umlClassName" value="Property"/>
+ </constraints>
+ </views>
+ <views name="OperationExample" sections="//@tabs.0/@sections.1">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleOperation">
+ <overriddenConstraints href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69iefKDJEeSZxfCXzZz3-w"/>
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="umlClassName" value="Operation"/>
+ </constraints>
+ </views>
+ <prototype href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#_69QJkKDJEeSZxfCXzZz3-w"/>
+</contexts:Context>
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/OperationExample.xwt b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/OperationExample.xwt
new file mode 100644
index 00000000000..413bc6c02f7
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/OperationExample.xwt
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:umlXtext="clr-namespace:org.eclipse.papyrus.uml.properties.xtext"
+ xmlns:j="clr-namespace:java.lang" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:xtext="clr-namespace:org.eclipse.papyrus.infra.widgets.xtext.creation"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:BehavioralFeature:isAbstract"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Operation:isQuery"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:Operation:bodyCondition"></ppe:ReferenceDialog>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:BehavioralFeature:concurrency"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:BehavioralFeature:method"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:BehavioralFeature:ownedParameter"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}" property="UML:Operation:precondition" customLabel="oldPreCondition"></ppe:MultiReference>
+ <ppe:CompletionStyledTextMultiReference input="{Binding}" property="UML:Operation:precondition" customLabel="NewPreCondition"></ppe:CompletionStyledTextMultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:Operation:postcondition"></ppe:MultiReference>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt
new file mode 100644
index 00000000000..7560a5894cc
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:xtexteditor="clr-namespace:org.eclipse.papyrus.uml.properties.xtext.widget.property"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"
+ customLabel="defaultEditor"></ppe:ReferenceDialog>
+ <ppe:CompletionStyledTextReferenceDialog
+ input="{Binding}" property="UML:TypedElement:type" customLabel="newType"></ppe:CompletionStyledTextReferenceDialog>
+ <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:Property:defaultValue"></ppe:ReferenceDialog>
+ <xtexteditor:UMLStyledTextReferenceDialog
+ property="UML:Property:defaultValue" input="{Binding}"></xtexteditor:UMLStyledTextReferenceDialog>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:Property:subsettedProperty"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:Property:redefinedProperty"></ppe:MultiReference>
+ </Composite>
+</Composite> \ No newline at end of file
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.properties b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.properties
new file mode 100644
index 00000000000..d29d9894540
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.properties
@@ -0,0 +1,4 @@
+#Properties file for org.eclipse.papyrus.editors.example
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Editor Contribution Example
+Bundle-Description = This plugin provides examples of declaration of textual editors in the Papyrus Table and in the Property View \ No newline at end of file
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.xml b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.xml
new file mode 100644
index 00000000000..0f8a2a9bc29
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/plugin.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.celleditor.configuration">
+ <configuration
+ class="org.eclipse.papyrus.uml.textual.editors.example.celleditors.UMLReferenceCellEditorConfigurationExample"
+ order="2">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.views.properties.context">
+ <context
+ contextModel="model/UML/PropertyViewEditorsExample.ctx"
+ isCustomizable="true">
+ </context>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.textual.editors.example.cell.manager"
+ manager="org.eclipse.papyrus.uml.textual.editors.example.manager.cell.ExtendedValueSpecificationCellManager"
+ order="400">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.celleditor.configuration">
+ <configuration
+ class="org.eclipse.papyrus.uml.textual.editors.example.celleditors.ExtendedValueSpecificationCellEditorConfiguration"
+ order="20">
+ </configuration>
+ </extension>
+</plugin>
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/pom.xml b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/pom.xml
new file mode 100644
index 00000000000..88e5c73b2c2
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.textual.editors.example</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/Activator.java b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/Activator.java
new file mode 100644
index 00000000000..80446ff7d10
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.uml.textual.editors.example;
+
+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.uml.textual.editors.example"; //$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)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/ExtendedValueSpecificationCellEditorConfiguration.java b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/ExtendedValueSpecificationCellEditorConfiguration.java
new file mode 100644
index 00000000000..d52ea3c5d4e
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/ExtendedValueSpecificationCellEditorConfiguration.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.textual.editors.example.celleditors;
+
+import org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor.ValueSpecificationCellEditorConfiguration;
+
+/**
+ * The configuration for the ConnectorEnd cell editor
+ */
+public class ExtendedValueSpecificationCellEditorConfiguration extends
+ ValueSpecificationCellEditorConfiguration {
+
+ /**
+ * The identifier of xtext cell editor for the ValueSpecification.
+ */
+ private static final String XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER = "XTEXT_ValueSpecification_Cell_Editor_Example"; //$NON-NLS-1$
+
+ /**
+ * Constructor.
+ */
+ public ExtendedValueSpecificationCellEditorConfiguration() {
+ super();
+ }
+
+ @Override
+ public String getEditorConfigId() {
+ return XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER;
+ }
+
+}
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/UMLReferenceCellEditorConfigurationExample.java b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/UMLReferenceCellEditorConfigurationExample.java
new file mode 100644
index 00000000000..27627be7a7d
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/celleditors/UMLReferenceCellEditorConfigurationExample.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.textual.editors.example.celleditors;
+
+import org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration;
+
+/**
+ *
+ * This class provides the configuration to edit UML References single and multi-valued with a text editor
+ *
+ */
+public class UMLReferenceCellEditorConfigurationExample extends UMLSingleReferenceTextualCellEditorWithButtonConfiguration {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration#getEditorConfigId()
+ *
+ * @return
+ */
+ @Override
+ public String getEditorConfigId() {
+ return "org.eclipse.papyrus.editors.example.textualreferenceeditor"; //$NON-NLS-1$
+ }
+
+}
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/manager/cell/ExtendedValueSpecificationCellManager.java b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/manager/cell/ExtendedValueSpecificationCellManager.java
new file mode 100644
index 00000000000..5ca08272ee5
--- /dev/null
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/src/org/eclipse/papyrus/uml/textual/editors/example/manager/cell/ExtendedValueSpecificationCellManager.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.textual.editors.example.manager.cell;
+
+import org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell.ValueSpecificationCellManager;
+
+/**
+ * This class provides the method to get and set the values in the Cell
+ * representing a ValueSpecification.
+ */
+public class ExtendedValueSpecificationCellManager extends
+ ValueSpecificationCellManager {
+
+ /**
+ * Constructor.
+ */
+ public ExtendedValueSpecificationCellManager() {
+ super();
+ }
+
+}
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature/feature.xml
index 0c8794f8866..3c649326fe8 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature/feature.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.uml.textedit.feature" label="%featureName" provider-name="%providerName" version="1.1.0.qualifier">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.uml.textedit.feature" label="%featureName" provider-name="%providerName" version="1.0.2.qualifier">
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
Copyright (c) 2012 CEA LIST.
@@ -58,5 +58,11 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.uml.textedit.port.xtext" install-size="0" unpack="false" version="0.0.0"/>
<plugin download-size="0" id="org.eclipse.papyrus.uml.textedit.port.xtext.ui" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui" install-size="0" unpack="false" version="0.0.0"/>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils" install-size="0" unpack="false" version="0.0.0"/>
</feature> \ No newline at end of file
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java
index dd020633f84..62014d9895a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors/src/org/eclipse/papyrus/extensionpoints/editors/utils/DirectEditorsUtil.java
@@ -246,3 +246,4 @@ public class DirectEditorsUtil {
}
}
+
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java
new file mode 100644
index 00000000000..7c8a9a48885
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractOpenDialogCellEditorButtonAction.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.celleditor;
+
+import org.eclipse.jface.window.Window;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.edit.DialogEditHandler;
+import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * This class allows to store required information to customize
+ * a Button to open a dialog
+ */
+public abstract class AbstractOpenDialogCellEditorButtonAction {
+
+ /** The text to use for the button. */
+ private String text;
+
+ /** The tooltip to use for the button. */
+ private String tooltipText;
+
+ /** the image to set on the button. */
+ private Image image;
+
+ /**
+ * the new cell value selected by the user opening a dialog
+ */
+ protected Object newValue;
+
+ /**
+ * the column index of the edited cell
+ */
+ protected int columnIndex;
+
+ /**
+ * the row index of the edited cell
+ */
+ protected int rowIndex;
+
+ /**
+ * Gets the image.
+ *
+ * @return the image
+ */
+ public Image getImage() {
+ return image;
+ }
+
+
+ /**
+ * Sets the image.
+ *
+ * @param image
+ * the new image
+ */
+ public void setImage(Image image) {
+ this.image = image;
+ }
+
+
+ /**
+ * Gets the text.
+ *
+ * @return the text
+ */
+ public String getText() {
+ return text;
+ }
+
+
+ /**
+ * Sets the text.
+ *
+ * @param text
+ * the new text
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+
+
+ /**
+ * Gets the tooltip text.
+ *
+ * @return the tooltip text
+ */
+ public String getTooltipText() {
+ return tooltipText;
+ }
+
+
+ /**
+ * Sets the tooltip text.
+ *
+ * @param tooltipText
+ * the new tooltip text
+ */
+ public void setTooltipText(String tooltipText) {
+ this.tooltipText = tooltipText;
+ }
+
+
+ /**
+ *
+ * @return
+ * the created dialog
+ */
+ public abstract AbstractDialogCellEditor createDialogCellEditor();
+
+
+ /**
+ * Setter for the edited cell location
+ *
+ * @param columnIndex
+ * the column index of the edited cell
+ * @param rowIndex
+ * the row index of the edited cell
+ */
+ public final void setCellLocation(int columnIndex, int rowIndex) {
+ this.columnIndex = columnIndex;
+ this.rowIndex = rowIndex;
+ }
+
+ /**
+ *
+ * @return
+ * the value selected by the user
+ */
+ public Object getEditorValue() {
+ return this.newValue;
+ }
+
+ /**
+ *
+ * @param parent
+ * the parent composite used to open a dialog
+ * @param originalCanonicalValue
+ * the original value
+ * @param cell
+ * the cell to edit
+ * @param configRegistry
+ * the config registry used by the nattable widget
+ * @return
+ * a IStatus to know if the user cancel the action or validate the action
+ */
+ public int openDialog(Composite parent, Object originalCanonicalValue, ILayerCell cell, IConfigRegistry configRegistry) {
+ AbstractDialogCellEditor editor = createDialogCellEditor();
+ editor.activateCell(parent, originalCanonicalValue, EditModeEnum.DIALOG, new DialogEditHandler(), cell, configRegistry);
+ int res = editor.open();
+ if (Window.OK == res) {
+ this.newValue = editor.getEditorValue();
+ }
+ return res;
+ }
+}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java
index 6a31dd8480d..1621ddefdc4 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractPapyrusStyledTextCellEditor.java
@@ -13,18 +13,30 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.celleditor;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.window.Window;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum;
import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+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;
/**
* Abstract Class for StyledText cell editor.
- * This class is used for XText Cell Editor
+ * This class is used for XText Cell Editor and text editor with completion
*
- * @author vl222926
+ * @author Vincent Lorenzo
*
*/
-public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyledTextCellEditor {
+public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyledTextCellEditor{
/**
* the table
@@ -42,6 +54,27 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled
protected final ITableAxisElementProvider elementProvider;
/**
+ * the configuration of the additional button
+ */
+ protected AbstractOpenDialogCellEditorButtonAction buttonConfiguration;
+
+ /**
+ * the controller of the editor
+ */
+ private Control editorControl;
+
+ /**
+ * the initial value
+ */
+ private Object originalValue;
+
+ /**
+ * the styled text
+ */
+ private StyledText text;
+
+
+ /**
*
* Constructor.
*
@@ -70,7 +103,6 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled
this(table, axisElement, elementProvider, false);
}
-
/**
*
* Constructor.
@@ -89,4 +121,105 @@ public abstract class AbstractPapyrusStyledTextCellEditor extends AbstractStyled
* @return the edited object
*/
protected abstract EObject getEditedEObject();
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#activateCell(org.eclipse.swt.widgets.Composite, java.lang.Object)
+ *
+ * @param parent
+ * @param originalCanonicalValue
+ * @return
+ */
+ @Override
+ protected Control activateCell(Composite parent, Object originalCanonicalValue) {
+ this.originalValue = originalCanonicalValue;
+ Composite realParent = parent;
+ if (this.buttonConfiguration != null) {
+ realParent = new Composite(parent, SWT.NONE);
+ }
+ this.text = (StyledText) super.activateCell(realParent, originalCanonicalValue);
+ if (this.buttonConfiguration != null) {
+ this.editorControl = realParent;
+ GridLayout gridLayout = new GridLayout(2, false);
+ gridLayout.horizontalSpacing = 0;
+ gridLayout.verticalSpacing = 0;
+ gridLayout.marginHeight = 0;
+ gridLayout.marginWidth = 0;
+ realParent.setLayout(gridLayout);
+
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ text.setLayoutData(gridData);
+
+ Button b = createAdditionalButton(realParent);
+ GridData buttonGridData = new GridData(SWT.RIGHT, SWT.FILL, false, true);
+ b.setLayoutData(buttonGridData);
+ this.buttonConfiguration.setCellLocation(layerCell.getColumnIndex(), layerCell.getRowIndex());
+ } else {
+ this.editorControl = text;
+ }
+ return this.editorControl;
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#getEditorControl()
+ *
+ * @return
+ */
+ @Override
+ public Control getEditorControl() {
+ return editorControl;
+ }
+
+ /**
+ *
+ * @param composite
+ * the composite parent
+ * @return
+ * the created button
+ *
+ */
+ protected Button createAdditionalButton(Composite composite) {
+ Button button = new Button(composite, SWT.NONE);
+ button.setText(this.buttonConfiguration.getText());
+ button.setToolTipText(this.buttonConfiguration.getTooltipText());
+ button.setImage(this.buttonConfiguration.getImage());
+ button.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ runButtonAction();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ return button;
+ }
+
+
+ /**
+ * execute the action declared in the button
+ */
+ protected void runButtonAction() {
+ if (Window.OK == this.buttonConfiguration.openDialog(parent, originalValue, layerCell, configRegistry)) {
+ setCanonicalValue(this.buttonConfiguration.getEditorValue());
+ commit(MoveDirectionEnum.NONE);
+ } else {
+ close();
+ }
+ }
+
+ /**
+ * This method allow to define the behavior of the an additional button located at the right of the text field in the cell
+ *
+ * @param additionalAction
+ */
+ public void setOpenDialogCellEditorButtonAction(AbstractOpenDialogCellEditorButtonAction additionalAction) {
+ this.buttonConfiguration = additionalAction;
+ if (additionalAction != null) {
+ Assert.isNotNull(additionalAction);
+ }
+ }
}
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
index aea2d85286a..5350b8333d8 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
@@ -13,6 +13,8 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.celleditor;
+
+
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
import org.eclipse.nebula.widgets.nattable.edit.config.RenderErrorHandling;
@@ -30,8 +32,8 @@ import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
-import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Composite;
@@ -46,7 +48,7 @@ import org.eclipse.swt.widgets.Text;
* @author vl222926
*
*/
-public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor {
+public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor implements KeyListener {
/**
* The StyledText control which is the editor wrapped by this TextCellEditor.
@@ -200,7 +202,7 @@ public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor {
}
@Override
- public StyledText getEditorControl() {
+ public Control getEditorControl() {
return this.text;
}
@@ -261,58 +263,117 @@ public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor {
// add a key listener that will commit or close the editor for special key strokes
// and executes conversion/validation on input to the editor
- textControl.addKeyListener(new KeyAdapter() {
+ textControl.addKeyListener(this);
+ // textControl.addKeyListener(new KeyAdapter() {
+ //
+ // @Override
+ // public void keyPressed(KeyEvent event) {
+ // if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
+ //
+ // MoveDirectionEnum move = MoveDirectionEnum.NONE;
+ // if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
+ // if (event.stateMask == 0) {
+ // move = MoveDirectionEnum.DOWN;
+ // } else if (event.stateMask == SWT.SHIFT) {
+ // move = MoveDirectionEnum.UP;
+ // }
+ // }
+ //
+ // commit(move);
+ //
+ // if (editMode == EditModeEnum.DIALOG) {
+ // parent.forceFocus();
+ // }
+ // } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ // close();
+ // } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
+ // if (event.keyCode == SWT.ARROW_UP) {
+ // commit(MoveDirectionEnum.UP);
+ // } else if (event.keyCode == SWT.ARROW_DOWN) {
+ // commit(MoveDirectionEnum.DOWN);
+ // }
+ // }
+ // }
+ //
+ // @Override
+ // public void keyReleased(KeyEvent e) {
+ // try {
+ // // always do the conversion
+ // Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
+ // // and always do the validation
+ // // even if for commiting the validation should be skipped, on editing
+ // // a validation failure should be made visible
+ // // otherwise there would be no need for validation!
+ // validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
+ // } catch (Exception ex) {
+ // // do nothing as exceptions caused by conversion or validation are handled already
+ // // we just need this catch block for stopping the process if conversion failed with
+ // // an exception
+ // }
+ // }
+ // });
- @Override
- public void keyPressed(KeyEvent event) {
- if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
-
- MoveDirectionEnum move = MoveDirectionEnum.NONE;
- if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
- if (event.stateMask == 0) {
- move = MoveDirectionEnum.DOWN;
- } else if (event.stateMask == SWT.SHIFT) {
- move = MoveDirectionEnum.UP;
- }
- }
-
- commit(move);
-
- if (editMode == EditModeEnum.DIALOG) {
- parent.forceFocus();
- }
- } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
- close();
- } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
- if (event.keyCode == SWT.ARROW_UP) {
- commit(MoveDirectionEnum.UP);
- } else if (event.keyCode == SWT.ARROW_DOWN) {
- commit(MoveDirectionEnum.DOWN);
- }
+ return textControl;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.swt.events.KeyListener#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param event
+ */
+ public void keyPressed(KeyEvent event) {
+ if (commitOnEnter && (event.keyCode == SWT.CR || event.keyCode == SWT.KEYPAD_CR)) {
+
+ MoveDirectionEnum move = MoveDirectionEnum.NONE;
+ if (moveSelectionOnEnter && editMode == EditModeEnum.INLINE) {
+ if (event.stateMask == 0) {
+ move = MoveDirectionEnum.DOWN;
+ } else if (event.stateMask == SWT.SHIFT) {
+ move = MoveDirectionEnum.UP;
}
}
- @Override
- public void keyReleased(KeyEvent e) {
- try {
- // always do the conversion
- Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
- // and always do the validation
- // even if for commiting the validation should be skipped, on editing
- // a validation failure should be made visible
- // otherwise there would be no need for validation!
- validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
- } catch (Exception ex) {
- // do nothing as exceptions caused by conversion or validation are handled already
- // we just need this catch block for stopping the process if conversion failed with
- // an exception
- }
+ commit(move);
+
+ if (editMode == EditModeEnum.DIALOG) {
+ parent.forceFocus();
}
- });
+ } else if (event.keyCode == SWT.ESC && event.stateMask == 0) {
+ close();
+ } else if (commitOnUpDown && editMode == EditModeEnum.INLINE) {
+ if (event.keyCode == SWT.ARROW_UP) {
+ commit(MoveDirectionEnum.UP);
+ } else if (event.keyCode == SWT.ARROW_DOWN) {
+ commit(MoveDirectionEnum.DOWN);
+ }
+ }
+ }
- return textControl;
+ /**
+ *
+ * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param e
+ */
+ public void keyReleased(KeyEvent e) {
+ try {
+ // always do the conversion
+ Object canonicalValue = getCanonicalValue(inputConversionErrorHandler);
+ // and always do the validation
+ // even if for commiting the validation should be skipped, on editing
+ // a validation failure should be made visible
+ // otherwise there would be no need for validation!
+ validateCanonicalValue(canonicalValue, inputValidationErrorHandler);
+ } catch (Exception ex) {
+ // do nothing as exceptions caused by conversion or validation are handled already
+ // we just need this catch block for stopping the process if conversion failed with
+ // an exception
+ }
}
+
@Override
public void close() {
super.close();
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
index 1c539622067..370b383ea9a 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
@@ -35,7 +35,12 @@ public interface ICellManager {
public static final String NOT_AVALAIBLE = Messages.ICellManager_NotAvailable;
/**
- * the empty sting
+ * the string used for <code>null</code> value
+ */
+ public static final String NULL_VALUE = "null"; //$NON-NLS-1$
+
+ /**
+ * empty string
*/
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java
new file mode 100644
index 00000000000..f96a6b57a2d
--- /dev/null
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CrossAxisWrapper.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.utils;
+
+/**
+ *
+ * @author Vincent Lorenzo
+ *
+ * This class can be used to store the axis linked to a cell
+ *
+ * @param <A>
+ * the type of the first axis
+ * @param <B>
+ * the type of the second axis
+ */
+public class CrossAxisWrapper<A, B> {
+
+ /**
+ * the first axis
+ */
+ private A firstAxis;
+
+ /**
+ * the second axis
+ */
+ private B secondAxis;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param firstAxis
+ * @param secondAxis
+ */
+ public CrossAxisWrapper(A firstAxis, B secondAxis) {
+ this.firstAxis = firstAxis;
+ this.secondAxis = secondAxis;
+ }
+
+ /**
+ *
+ * @return
+ * the row element
+ */
+ public A getFirstAxis() {
+ return firstAxis;
+ }
+
+ /**
+ *
+ * @return
+ * the column element
+ */
+ public B getSecondAxis() {
+ return secondAxis;
+ }
+} \ No newline at end of file
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java
new file mode 100644
index 00000000000..33e481ba136
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextMultiReferenceDialogObservableValue.java
@@ -0,0 +1,86 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.databinding;
+
+import java.util.Collection;
+
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Vincent Lorenzo
+ *
+ */
+public class CompletionStyledTextMultiReferenceDialogObservableValue extends CompletionStyledTextObservableValue {
+
+ /**
+ * the styled text with completion reference dialog
+ */
+ private Control referenceDialog;
+
+ /**
+ * the IObservable list
+ */
+ private IObservableList list;
+
+ /**
+ * @param dialog
+ * The observed StyledTextReferenceDialog
+ * @param styledText
+ * The observed StyledText
+ * @param modelObservable
+ * The Model IObservable
+ * @param eventType
+ * The eventType to listen to. When the event is fired by the Text
+ * widget, this IObservableValue will fire a ChangeEvent
+ */
+ public CompletionStyledTextMultiReferenceDialogObservableValue(Control dialog, StyledText styledText, IObservableList modelObservable, int eventType) {
+ super(styledText, null, eventType);
+ this.referenceDialog = dialog;
+ list = modelObservable;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object)
+ *
+ * @param value
+ */
+ @Override
+ protected void doSetValue(Object value) {
+ super.doSetValue(value);
+ referenceDialog.update();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextObservableValue#doGetValue()
+ *
+ * @return
+ */
+ @Override
+ protected Object doGetValue() {
+ Object newValues = super.doGetValue();
+ if (newValues instanceof Collection<?>) {
+ if (!list.equals(newValues)) {
+ list.clear();
+ list.addAll((Collection<?>) newValues);
+ }
+ }else if(newValues==null){
+ list.clear();
+ }
+ return newValues;
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java
new file mode 100644
index 00000000000..f60fe0a1b28
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextObservableValue.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.databinding;
+
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Event;
+
+public class CompletionStyledTextObservableValue extends StyledTextObservableValue implements ISetPapyrusConverter {
+
+ /**
+ * The name resolution helper shared with the widget
+ */
+ protected IPapyrusConverter parser;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param text
+ * @param modelProperty
+ * @param eventType
+ */
+ public CompletionStyledTextObservableValue(StyledText text, IObservableValue modelProperty, int eventType) {
+ super(text, modelProperty, eventType);
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object)
+ *
+ * @param value
+ */
+ @Override
+ protected void doSetValue(Object value) {
+ String editValue = parser.canonicalToEditValue(value, 0);
+ if (editValue instanceof String) {
+ super.doSetValue(editValue);
+ } else {
+ super.doSetValue(value);
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doGetValue()
+ *
+ * @returnē
+ */
+ @Override
+ protected Object doGetValue() {
+ Object newValue = super.doGetValue();
+ if (newValue instanceof String) {
+ if (IPapyrusConverter.NULL_VALUE.equals(newValue)) {
+ return null;
+ }
+ Object result = this.parser.editToCanonicalValue((String) newValue, 0);
+ return result;
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param parser
+ */
+ @Override
+ public void setPapyrusConverter(IPapyrusConverter parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void handleEvent(final Event event) {
+
+ final Object oldValue = currentValue;
+ final Object newValue = getValue();
+ // if (newValue == null) {
+ // return;
+ // }
+ currentValue = newValue;
+
+ if ((eventType & event.type) != 0) {
+ fireValueChange(new ValueDiff() {
+
+ @Override
+ public Object getOldValue() {
+ return oldValue;
+ }
+
+ @Override
+ public Object getNewValue() {
+ return newValue;
+ }
+
+ });
+ }
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java
new file mode 100644
index 00000000000..ef22a7ba233
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CompletionStyledTextReferenceDialogObservableValue.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.databinding;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.papyrus.infra.widgets.editors.CompletionStyledTextReferenceDialog;
+import org.eclipse.swt.custom.StyledText;
+
+/**
+ * @author VL222926
+ *
+ */
+public class CompletionStyledTextReferenceDialogObservableValue extends CompletionStyledTextObservableValue {
+
+ /**
+ * the styled text with completion reference dialog
+ */
+ private CompletionStyledTextReferenceDialog referenceDialog;
+
+ /**
+ * @param dialog
+ * The observed StyledTextReferenceDialog
+ * @param styledText
+ * The observed StyledText
+ * @param modelObservable
+ * The Model IObservable
+ * @param eventType
+ * The eventType to listen to. When the event is fired by the Text
+ * widget, this IObservableValue will fire a ChangeEvent
+ */
+ public CompletionStyledTextReferenceDialogObservableValue(CompletionStyledTextReferenceDialog dialog, StyledText styledText, IObservableValue modelObservable, int eventType) {
+ super(styledText, modelObservable, eventType);
+ this.referenceDialog = dialog;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object)
+ *
+ * @param value
+ */
+ @Override
+ protected void doSetValue(Object value) {
+ super.doSetValue(value);
+ referenceDialog.update();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextObservableValue#doGetValue()
+ *
+ * @return
+ */
+ @Override
+ protected Object doGetValue() {
+ return super.doGetValue();
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java
new file mode 100644
index 00000000000..19ab83c7351
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextObservableValue.java
@@ -0,0 +1,152 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.databinding;
+
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable;
+import org.eclipse.papyrus.infra.widgets.providers.UnchangedObject;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+
+/**
+ * An ObservableValue for StyledText field, with support for AggregatedObservable
+ *
+ * @author Vincent Lorenzo
+ */
+public class StyledTextObservableValue extends AbstractObservableValue implements Listener {
+
+ /**
+ * The styled text.
+ */
+ protected StyledText text;
+
+ /**
+ * The event type used by the styled text.
+ */
+ protected int eventType;
+
+ /**
+ * The current value.
+ */
+ protected Object currentValue;
+
+ /**
+ * If the Text field may represent more than one value,
+ * use an AggregatedObservable.
+ *
+ * May be null.
+ */
+ protected AggregatedObservable modelProperty;
+
+ /**
+ * Constructor
+ *
+ * @param text
+ * The Text field to observe
+ * @param modelProperty
+ * The model IObservableValue
+ * @param eventType
+ * The eventType to listen to. When the event is fired by the Text
+ * widget, this IObservableValue will fire a ChangeEvent
+ */
+ public StyledTextObservableValue(final StyledText text, final IObservableValue modelProperty, final int eventType) {
+ this.text = text;
+ this.eventType = eventType;
+ if (modelProperty instanceof AggregatedObservable) {
+ this.modelProperty = (AggregatedObservable) modelProperty;
+ }
+ this.text.addListener(eventType, this);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
+ */
+ @Override
+ public Object getValueType() {
+ return String.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doGetValue()
+ */
+ @Override
+ protected Object doGetValue() {
+ if (UnchangedObject.instance.toString().equals(text.getText())) {
+ return null;
+ } else {
+ return text.getText();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doSetValue(java.lang.Object)
+ */
+ @Override
+ protected void doSetValue(final Object value) {
+ if (modelProperty != null && modelProperty.hasDifferentValues()) {
+ this.text.setText(UnchangedObject.instance.toString());
+ this.currentValue = UnchangedObject.instance;
+ } else {
+ if (value instanceof String) {
+ this.text.setText((String) value);
+ this.currentValue = value;
+ } else if (value == null) {
+ this.text.setText(""); //$NON-NLS-1$
+ this.currentValue = null;
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+ */
+ @Override
+ public void handleEvent(final Event event) {
+
+ final Object oldValue = currentValue;
+ final Object newValue = getValue();
+ if (newValue == null) {
+ return;
+ }
+ currentValue = newValue;
+
+ if ((eventType & event.type) != 0) {
+ fireValueChange(new ValueDiff() {
+
+ @Override
+ public Object getOldValue() {
+ return oldValue;
+ }
+
+ @Override
+ public Object getNewValue() {
+ return newValue;
+ }
+
+ });
+ }
+ }
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java
new file mode 100644
index 00000000000..eb77f7e30d1
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/StyledTextReferenceDialogObservableValue.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.databinding;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor;
+import org.eclipse.papyrus.infra.widgets.providers.UnchangedObject;
+import org.eclipse.swt.custom.StyledText;
+
+/**
+ * An ObservableValue for ReferenceDialog widget (Which displays
+ * the current value with a CLabel)
+ */
+public class StyledTextReferenceDialogObservableValue extends StyledTextObservableValue {
+
+ /**
+ * The value editor.
+ */
+ private AbstractValueEditor referenceDialog;
+
+ /**
+ * The label provider used to get the text value.
+ */
+ private ILabelProvider labelProvider;
+
+ /**
+ * @param dialog
+ * The observed StyledTextReferenceDialog
+ * @param styledText
+ * The observed StyledText
+ * @param modelObservable
+ * The Model IObservable
+ * @param eventType
+ * The eventType to listen to. When the event is fired by the Text
+ * widget, this IObservableValue will fire a ChangeEvent
+ * @param labelProvider
+ * The label provider
+ */
+ public StyledTextReferenceDialogObservableValue(final AbstractValueEditor dialog, final StyledText styledText, final IObservableValue modelObservable, final int eventType, final ILabelProvider labelProvider) {
+ super(styledText, modelObservable, eventType);
+ this.referenceDialog = dialog;
+ this.labelProvider = labelProvider;
+ }
+
+ /**
+ * Set the label provider.
+ *
+ * @param labelProvider
+ * The LabelProvider used to define the CLabel's text and image,
+ * based on the current value
+ */
+ public void setLabelProvider(ILabelProvider labelProvider) {
+ if (labelProvider != null) {
+ this.labelProvider = labelProvider;
+ } else {
+ this.labelProvider = new LabelProvider();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue#doSetValue(java.lang.Object)
+ */
+ @Override
+ protected void doSetValue(final Object value) {
+ if (null != modelProperty && modelProperty.hasDifferentValues()) {
+ this.text.setText(UnchangedObject.instance.toString());
+ this.currentValue = UnchangedObject.instance;
+ } else if (value instanceof String) {
+ this.text.setText((String) value);
+ this.currentValue = value;
+ } else {
+ this.text.setText(labelProvider.getText(value));
+ this.currentValue = value;
+ }
+ referenceDialog.update();
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java
new file mode 100644
index 00000000000..7103ed3b46e
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextMultipleReferenceEditor.java
@@ -0,0 +1,128 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextMultiReferenceDialogObservableValue;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ *
+ *
+ * An editor for multivalued references, with a string editor in addition. This editor should be used when
+ * there is enough vertical space available. If the vertical space is limited,
+ * CompactMultipleReferenceEditor should be used instead.
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class CompletionStyledTextMultipleReferenceEditor extends MultipleReferenceEditor implements ISetPapyrusConverter {
+
+ /**
+ * the embedded string editor
+ */
+ private CompletionStyledTextStringEditor editor;
+
+ /**
+ * the converter to use
+ */
+ private IPapyrusConverter converter;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ * @param ordered
+ * @param unique
+ * @param label
+ */
+ public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style, boolean ordered, boolean unique, String label) {
+ super(parent, style, ordered, unique, label);
+ addStyledTextSection(parent, style);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ * @param label
+ */
+ public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style, String label) {
+ super(parent, style, label);
+ addStyledTextSection(parent, style);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ */
+ public CompletionStyledTextMultipleReferenceEditor(Composite parent, int style) {
+ super(parent, style);
+ addStyledTextSection(parent, style);
+ }
+
+ /**
+ *
+ * @param parent
+ * @param style
+ */
+ protected void addStyledTextSection(Composite parent, int style) {
+ editor = new CompletionStyledTextStringEditor(this, style | SWT.BORDER);
+ GridData treeData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ treeData.horizontalSpan = 2;
+ editor.setLayoutData(treeData);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.editors.MultipleValueEditor#setModelObservable(org.eclipse.core.databinding.observable.list.IObservableList)
+ *
+ * @param modelProperty
+ */
+ @Override
+ public void setModelObservable(IObservableList modelProperty) {
+ super.setModelObservable(modelProperty);
+ CompletionStyledTextMultiReferenceDialogObservableValue styledTextObservable = new CompletionStyledTextMultiReferenceDialogObservableValue(editor, editor.getText(), modelProperty, SWT.FocusOut);
+ styledTextObservable.setPapyrusConverter(converter);
+ styledTextObservable.addChangeListener(new IChangeListener() {
+
+ @Override
+ public void handleChange(org.eclipse.core.databinding.observable.ChangeEvent event) {
+ commit();
+ }
+ });
+ editor.setValue(modelProperty);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param converter
+ */
+ @Override
+ public void setPapyrusConverter(IPapyrusConverter converter) {
+ this.converter = converter;
+ this.editor.setPapyrusConverter(converter);
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java
new file mode 100644
index 00000000000..8c7847d3b0a
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextReferenceDialog.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.papyrus.infra.widgets.databinding.CompletionStyledTextReferenceDialogObservableValue;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Vincent Lorenzo
+ *
+ */
+public class CompletionStyledTextReferenceDialog extends StyledTextReferenceDialog implements ISetPapyrusConverter {
+ /**
+ * the content assist helper used for the completion
+ */
+ protected IPapyrusConverter parser;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ */
+ public CompletionStyledTextReferenceDialog(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite, java.lang.String, int)
+ *
+ * @param parent
+ * @param initialValue
+ * @param style
+ * @return
+ */
+ protected StyledTextStringEditor createStyledTextStringEditor(Composite parent, String initialValue, int style) {
+ StyledTextStringEditor editor = new CompletionStyledTextStringEditor(parent, style);
+ editor.setValue(initialValue);
+ return editor;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createWidgetObservable(org.eclipse.core.databinding.observable.value.IObservableValue)
+ *
+ * @param modelProperty
+ * @return
+ */
+ protected IObservableValue createWidgetObservable(IObservableValue modelProperty) {
+ CompletionStyledTextReferenceDialogObservableValue val = new CompletionStyledTextReferenceDialogObservableValue(this, this.styledTextStringEditor.getText(), modelProperty, SWT.FocusOut);
+ val.setPapyrusConverter(parser);
+ return val;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param parser
+ */
+ @Override
+ public void setPapyrusConverter(IPapyrusConverter parser) {
+ this.parser = parser;
+ ((CompletionStyledTextStringEditor) styledTextStringEditor).setPapyrusConverter(parser);
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java
new file mode 100644
index 00000000000..367b67aa907
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/CompletionStyledTextStringEditor.java
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+
+/**
+ * @author Vincent Lorenzo
+ *
+ */
+public class CompletionStyledTextStringEditor extends StyledTextStringEditor implements ISetPapyrusConverter {
+
+ /**
+ * This wrapper provides a text field with completion
+ */
+ private StringEditorWithCompletionWrapper wrapper;
+
+ /**
+ * the parser to use
+ */
+ protected IPapyrusConverter parser;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ * @param heighHint
+ * @param widthHint
+ */
+ public CompletionStyledTextStringEditor(Composite parent, int style, int heighHint, int widthHint) {
+ super(parent, style, heighHint, widthHint);
+ createReferenceTargetValidator();
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ * @param label
+ * @param heighHint
+ * @param widthHint
+ */
+ public CompletionStyledTextStringEditor(Composite parent, int style, String label, int heighHint, int widthHint) {
+ super(parent, style, label, heighHint, widthHint);
+ createReferenceTargetValidator();
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ * @param label
+ */
+ public CompletionStyledTextStringEditor(Composite parent, int style, String label) {
+ super(parent, style, label);
+ createReferenceTargetValidator();
+ }
+
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#setValue(java.lang.Object)
+ *
+ * @param value
+ */
+ @Override
+ public void setValue(Object value) {
+ if (parser != null && value instanceof Collection<?>) {
+ String val = parser.canonicalToEditValue(value, 0);
+ super.setValue(val);
+ } else {
+ super.setValue(value);
+ }
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ */
+ public CompletionStyledTextStringEditor(Composite parent, int style) {
+ super(parent, style);
+ createReferenceTargetValidator();
+ }
+
+ protected void notifyChange() {
+
+ text.notifyListeners(SWT.FocusOut, new Event());
+
+ // added to update the status when we use the completion
+ if (targetValidator != null) {
+ IStatus status = targetValidator.validate(text.getText());
+ updateStatus(status);
+ }
+ commit();
+ changeColorField();
+ }
+
+ /**
+ * create the validator for the text field
+ */
+ protected void createReferenceTargetValidator() {
+ targetValidator = new AbstractValidator() {
+
+ @Override
+ public IStatus validate(Object value) {
+ if (parser == null) {
+ return Status.OK_STATUS;
+ }
+ if (value instanceof String) {
+ return parser.isValidEditString((String) value);
+ }
+ // not possible
+ return new Status(IStatus.ERROR, org.eclipse.papyrus.infra.widgets.Activator.PLUGIN_ID, "Impossible case"); //$NON-NLS-1$
+ }
+ };
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#createStyledText(org.eclipse.swt.widgets.Composite, java.lang.String, int)
+ *
+ * @param parent
+ * @param value
+ * @param style
+ * @return
+ */
+ @Override
+ public StyledText createStyledText(Composite parent, String value, int style) {
+ this.wrapper = new StringEditorWithCompletionWrapper(parent, style);
+ return wrapper.getTextWidget();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param parser
+ */
+ public void setPapyrusConverter(IPapyrusConverter parser) {
+ this.parser = parser;
+ this.wrapper.setPapyrusConverter(parser);
+ }
+
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java
new file mode 100644
index 00000000000..7de49d963cc
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java
@@ -0,0 +1,200 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.jface.text.contentassist.ContentAssistEvent;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.ICompletionListener;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Vincent Lorenzo
+ *
+ * This class allows to build a StyledText widget allowing the completion
+ *
+ */
+public class StringEditorWithCompletionWrapper implements ISetPapyrusConverter{
+
+ /**
+ * the parser used to convert object to string and string to object
+ */
+ public IPapyrusConverter parser;
+
+ /**
+ * boolean indicating if the content assist popup is opened
+ */
+ private boolean delayedIsOpen = false;
+
+ /**
+ * the text viewer
+ */
+ private TextViewer textViewer;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * the parent to use to create the TextWidget
+ * @param helper
+ * the helper to use to find the elements by their name
+ */
+ public StringEditorWithCompletionWrapper(Composite parent, IPapyrusConverter parser) {
+ setPapyrusConverter(parser);
+ buildControls(parent, SWT.NONE);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * the parent to use to create the TextWidget
+ * @param helper
+ * the helper to use to find the elements by their name
+ */
+ public StringEditorWithCompletionWrapper(Composite parent, int style, IPapyrusConverter parser) {
+ setPapyrusConverter(parser);
+ buildControls(parent, style);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * the parent to use to create the TextWidget
+ * @param helper
+ * the helper to use to find the elements by their name
+ */
+ public StringEditorWithCompletionWrapper(Composite parent, int style) {
+ buildControls(parent, style);
+ }
+
+
+ /**
+ *
+ * @return
+ * the text viewer used
+ */
+ public TextViewer getTextViewer() {
+ return this.textViewer;
+ }
+
+ /**
+ *
+ * @return
+ * the styled text used or <code>null</code>
+ */
+ public StyledText getTextWidget() {
+ if (this.textViewer != null) {
+ return this.textViewer.getTextWidget();
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @return
+ * <code>true</code> if the content assist is currently opened
+ */
+ public boolean isContentAssistOpened() {
+ return delayedIsOpen;
+ }
+
+ private ContentAssistant assistant;
+
+ private IContentAssistProcessor processor;
+
+ private void buildControls(Composite parent, int style) {
+ // setLayout(new FillLayout());
+ textViewer = new TextViewer(parent, SWT.SINGLE | SWT.V_SCROLL | style);
+
+ textViewer.setDocument(new Document());
+
+ this.assistant = new ContentAssistant();
+
+
+ if (parser != null) {
+ this.processor = parser.getCompletionProcessor(null);
+ assistant.setContentAssistProcessor(this.processor, IDocument.DEFAULT_CONTENT_TYPE);
+ }
+
+ assistant.install(textViewer);
+ assistant.addCompletionListener(new ICompletionListener() {
+
+ @Override
+ public void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {
+
+ }
+
+ @Override
+ public void assistSessionStarted(ContentAssistEvent event) {
+ // reset open status asynchronously.
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ delayedIsOpen = true;
+ }
+ });
+ }
+
+ @Override
+ public void assistSessionEnded(ContentAssistEvent event) {
+ // reset open status asynchronously.
+ Display.getDefault().asyncExec(new Runnable() {
+
+ public void run() {
+ delayedIsOpen = false;
+ }
+ });
+
+ }
+ });
+ textViewer.getControl().addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (SWT.CTRL == e.stateMask && SWT.SPACE == e.character) {
+ assistant.showPossibleCompletions();
+ }
+ }
+ });
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param parser
+ */
+ @Override
+ public void setPapyrusConverter(IPapyrusConverter parser) {
+ this.parser = parser;
+ if (parser != null && assistant!=null && processor==null) {
+ this.processor = parser.getCompletionProcessor(null);
+ assistant.setContentAssistProcessor(this.processor, IDocument.DEFAULT_CONTENT_TYPE);
+ }
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java
new file mode 100644
index 00000000000..a00452dd51f
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java
@@ -0,0 +1,750 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TECā nicolas.fauvergue@all4tec.net - Bug 459747
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.databinding.StyledTextReferenceDialogObservableValue;
+import org.eclipse.papyrus.infra.widgets.messages.Messages;
+import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+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.Shell;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * An editor representing a single reference as a String Editor. A filtered selection
+ * dialog is used to edit the value. Also offers support for unsetting the
+ * value. This Editor needs a ContentProvider, and may use an optional
+ * LabelProvider, describing the objects that can be referred by this property
+ *
+ * @author Vincent Lorenzo
+ *
+ * Duplicated code from {@link ReferenceDialog}, replacing CLabel by {@link StyledTextStringEditor}
+ *
+ */
+public class StyledTextReferenceDialog extends AbstractValueEditor implements SelectionListener {
+
+ /**
+ * The styled text displaying the current value
+ */
+ protected final StyledTextStringEditor styledTextStringEditor;
+
+ /**
+ * The Button used to browse the available values
+ */
+ protected Button browseValuesButton;
+
+ /**
+ * The Button used to create a new instance
+ */
+ protected Button createInstanceButton;
+
+ /**
+ * The Button used to edit the current object
+ */
+ protected Button editInstanceButton;
+
+ /**
+ * The Button used to unset the current value
+ */
+ protected Button unsetButton;
+
+ /**
+ * The label provider used to display the values in both the label and the
+ * selection dialog
+ */
+ protected ILabelProvider labelProvider;
+
+ /**
+ * The content provider, providing the different possible values for the
+ * input object
+ */
+ protected IStaticContentProvider contentProvider;
+
+ /**
+ * The dialog used to select the value
+ */
+ protected final ITreeSelectorDialog dialog;
+
+ /**
+ * The current value for this editor
+ */
+ protected Object value;
+
+ /**
+ * The factory used to create or edit objects directly from this editor
+ */
+ protected ReferenceValueFactory valueFactory;
+
+ /**
+ * Indicates whether the widget is read-only or not
+ */
+ protected boolean readOnly;
+
+ /**
+ * Boolean to detect direct creation.
+ */
+ private boolean directCreation;
+
+ /**
+ * Indicates whether the widget requires a value or not. If it is mandatory,
+ * it cannot delete/unset its value
+ */
+ protected boolean mandatory;
+
+ /**
+ * The control decoration of the styled text.
+ */
+ private ControlDecoration controlDecoration;
+
+ /**
+ * Determinate if an error occurred.
+ */
+ protected boolean error = false;
+
+ /**
+ * The timer.
+ */
+ private Timer timer;
+
+ /**
+ * The timer tack for the change color.
+ */
+ private TimerTask changeColorTask;
+
+ /**
+ * Determinate if an edit occurred.
+ */
+ private boolean edit = false;
+
+ /**
+ * Constructs a new ReferenceDialog in the given parent Composite. The style
+ * will be applied to the syled text displaying the current value.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style of the styled text.
+ */
+ public StyledTextReferenceDialog(final Composite parent, final int style) {
+ super(parent, style);
+ GridData gridData = getDefaultLayoutData();
+
+ styledTextStringEditor = createStyledTextStringEditor(this, null, factory.getBorderStyle() | style);
+ styledTextStringEditor.setLayoutData(gridData);
+ styledTextStringEditor.addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ editAction(); // TODO : Try to determine whether the double
+ // click should call the edit, create or browse
+ // action
+ // e.g. if the value is null, try to browse. If we cannot
+ // browse, try to create an instance.
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // Nothing
+ }
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // Nothing
+ }
+
+ });
+
+ dialog = createDialog(parent.getShell());
+
+ createButtons();
+ updateControls();
+ controlDecoration = new ControlDecoration(styledTextStringEditor, SWT.TOP | SWT.LEFT);
+
+ gridData.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+ }
+
+ /**
+ * This allow to create the styled text editor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param initialValue
+ * The initial value of the styled text.
+ * @param style
+ * The style of the styled text.
+ * @return The created {@link StyledTextStringEditor}.
+ */
+ protected StyledTextStringEditor createStyledTextStringEditor(final Composite parent, final String initialValue, final int style) {
+ StyledTextStringEditor editor = new StyledTextStringEditor(parent, style);
+ editor.setValue(initialValue);
+ return editor;
+ }
+
+ /**
+ * This allow to create the dialog.
+ *
+ * @param shell
+ * The current shell.
+ * @return The created {@link ITreeSelectorDialog}.
+ */
+ protected ITreeSelectorDialog createDialog(final Shell shell) {
+ return new TreeSelectorDialog(shell);
+ }
+
+ /**
+ * This allow to create the buttons of the reference dialog (browse, create, edit and unset).
+ */
+ protected void createButtons() {
+ ((GridLayout) getLayout()).numColumns += 4;
+
+ browseValuesButton = factory.createButton(this, null, SWT.PUSH);
+ browseValuesButton.setImage(Activator.getDefault().getImage("/icons/browse_12x12.gif")); //$NON-NLS-1$
+ browseValuesButton.setToolTipText(Messages.ReferenceDialog_EditValue);
+ browseValuesButton.addSelectionListener(this);
+
+ createInstanceButton = factory.createButton(this, null, SWT.PUSH);
+ createInstanceButton.setImage(Activator.getDefault().getImage("/icons/Add_12x12.gif")); //$NON-NLS-1$
+ createInstanceButton.setToolTipText(Messages.ReferenceDialog_CreateANewObject);
+ createInstanceButton.addSelectionListener(this);
+
+ editInstanceButton = factory.createButton(this, null, SWT.PUSH);
+ editInstanceButton.setImage(Activator.getDefault().getImage("/icons/Edit_12x12.gif")); //$NON-NLS-1$
+ editInstanceButton.setToolTipText(Messages.ReferenceDialog_EditTheCurrentValue);
+ editInstanceButton.addSelectionListener(this);
+
+ unsetButton = factory.createButton(this, null, SWT.PUSH);
+ unsetButton.setImage(Activator.getDefault().getImage("/icons/Delete_12x12.gif")); //$NON-NLS-1$
+ unsetButton.setToolTipText(Messages.ReferenceDialog_UnsetValue);
+ unsetButton.addSelectionListener(this);
+ }
+
+ /**
+ * The action executed when the "browse" button is selected Choose a value
+ * from a selection of already created objects
+ */
+ protected void browseAction() {
+ setInitialSelection(Collections.singletonList(getValue()));
+ int result = dialog.open();
+ if (result == Window.OK) {
+ Object[] newValue = dialog.getResult();
+ if (newValue == null) {
+ return;
+ }
+
+ if (newValue.length == 0) {
+ setValue(null);
+ } else {
+ Object value = newValue[0];
+ if (contentProvider instanceof IAdaptableContentProvider) {
+
+ value = ((IAdaptableContentProvider) contentProvider).getAdaptedValue(value);
+ }
+ setValue(value);
+ styledTextStringEditor.setValue(labelProvider.getText(newValue));
+ }
+ }
+ }
+
+ /**
+ * The action executed when the "create" button is selected Create a new
+ * instance and assign it to this reference
+ */
+ protected void createAction() {
+ if (valueFactory != null && valueFactory.canCreateObject()) {
+ final Object context = getContextElement();
+ getOperationExecutor(context).execute(new Runnable() {
+
+ @Override
+ public void run() {
+ Object value = valueFactory.createObject(createInstanceButton, context);
+ if (value == null) {
+ // Cancel the operation
+ throw new OperationCanceledException();
+ }
+ Collection<Object> validatedObjects = valueFactory.validateObjects(Collections.singleton(value));
+ if (!validatedObjects.isEmpty()) {
+ final Object newValue = validatedObjects.iterator().next();
+ setValue(newValue);
+ styledTextStringEditor.setValue(labelProvider.getText(newValue));
+ }
+ }
+ }, NLS.bind(Messages.ReferenceDialog_setOperation, labelText));
+ }
+ }
+
+ /**
+ * The action executed when the "edit" button is selected Edits the object
+ * that is currently selected
+ */
+ protected void editAction() {
+ styledTextStringEditor.setBackground(EDIT);
+ edit = true;
+ final Object currentValue = getValue();
+ if (currentValue != null && valueFactory != null && valueFactory.canEdit()) {
+ getOperationExecutor(currentValue).execute(new Runnable() {
+
+ @Override
+ public void run() {
+ Object newValue = valueFactory.edit(editInstanceButton, currentValue);
+
+ // Per the contract of ReferenceValueFactory::edit(), a null return means the object was edited "in place."
+ // In that case, there is nothing further to do
+ if (newValue != null) {
+ setValue(newValue);
+ styledTextStringEditor.setValue(labelProvider.getText(newValue));
+ }
+
+ updateLabel();
+ }
+ }, NLS.bind(Messages.ReferenceDialog_editOperation, labelText));
+ }
+ }
+
+ /**
+ * The action executed when the "unset" button is selected Sets the current
+ * reference to null
+ */
+ protected void unsetAction() {
+ setValue(null);
+ }
+
+ /**
+ * Updates the displayed label for the current value
+ */
+ protected void updateLabel() {
+ if (binding != null) {
+ binding.updateModelToTarget();
+
+ } else {
+ styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ }
+ }
+
+ /**
+ * Sets the Content provider for this editor
+ *
+ * @param provider
+ * The content provider used to retrieve the possible values for
+ * this Reference
+ */
+ public void setContentProvider(final IStaticContentProvider provider) {
+ dialog.setContentProvider(new EncapsulatedContentProvider(provider));
+ if (getValue() != null) {
+ setInitialSelection(Collections.singletonList(getValue()));
+ }
+
+ this.contentProvider = provider;
+ }
+
+ /**
+ * Sets the Label provider for this editor If the label provider is null, a
+ * default one will be used. The same label provider is used for both the
+ * editor's label and the selection dialog.
+ *
+ * @param provider
+ * The label provider
+ */
+ public void setLabelProvider(final ILabelProvider provider) {
+ if (provider == null) {
+ setLabelProvider(new LabelProvider());
+ return;
+ }
+
+ dialog.setLabelProvider(provider);
+ this.labelProvider = provider;
+ if (widgetObservable != null) {
+ ((StyledTextReferenceDialogObservableValue) widgetObservable).setLabelProvider(labelProvider);
+ }
+ updateLabel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setLabel(final String label) {
+ super.setLabel(label);
+ dialog.setTitle(label);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getValue() {
+ if (modelProperty != null) {
+ Object modelPropertyValue = modelProperty.getValue();
+ if(modelPropertyValue == null){
+ EObject contextElement = getContextElement() != null && getContextElement() instanceof EObject ? (EObject) getContextElement() : null;
+ if(modelProperty.getValueType() instanceof EStructuralFeature){
+ return contextElement.eGet((EStructuralFeature)modelProperty.getValueType());
+ }
+ }
+ return modelPropertyValue;
+ }
+ return value;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getEditableType() {
+ return Object.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setReadOnly(boolean readOnly) {
+ this.readOnly = readOnly;
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isReadOnly() {
+ return !styledTextStringEditor.isEnabled();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+ }
+
+ /**
+ * Set the initial selection.
+ *
+ * @param initialValues
+ * The list of possible values.
+ */
+ protected void setInitialSelection(final List<?> initialValues) {
+ dialog.setInitialElementSelections(initialValues);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#setModelObservable(org.eclipse.core.databinding.observable.value.IObservableValue)
+ */
+ @Override
+ public void setModelObservable(final IObservableValue modelProperty) {
+ setWidgetObservable(createWidgetObservable(modelProperty));
+ super.setModelObservable(modelProperty);
+ this.styledTextStringEditor.setModelObservable(modelProperty);
+
+ updateControls();
+ }
+
+ /**
+ * This allow to create the widget observable value.
+ *
+ * @param modelProperty
+ * The current observable value.
+ * @return The created {@link StyledTextReferenceDialogObservableValue}.
+ */
+ protected IObservableValue createWidgetObservable(final IObservableValue modelProperty) {
+ return new StyledTextReferenceDialogObservableValue(this, this.styledTextStringEditor.getText(), modelProperty, SWT.FocusOut, labelProvider);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)
+ */
+ @Override
+ public void setToolTipText(final String text) {
+ super.setLabelToolTipText(text);
+ styledTextStringEditor.setToolTipText(text);
+ }
+
+ /**
+ * Set the factory.
+ *
+ * @param factory
+ * The reference value factory.
+ */
+ public void setValueFactory(final ReferenceValueFactory factory) {
+ valueFactory = factory;
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ Widget widget = e.widget;
+ if (widget == browseValuesButton) {
+ browseAction();
+ } else if (widget == createInstanceButton) {
+ createAction();
+ } else if (widget == editInstanceButton) {
+ editAction();
+ } else if (widget == unsetButton) {
+ unsetAction();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // Nothing
+ }
+
+ /**
+ * Updates the buttons' status
+ */
+ protected void updateControls() {
+ // Check if the edit & create buttons should be displayed
+ boolean exclude = valueFactory == null || !valueFactory.canCreateObject();
+ setExclusion(editInstanceButton, exclude);
+ setExclusion(createInstanceButton, exclude);
+
+ setExclusion(browseValuesButton, directCreation);
+
+ browseValuesButton.setEnabled(!readOnly);
+
+ // If they are displayed, check if they should be enabled
+ if (!exclude) {
+ editInstanceButton.setEnabled(valueFactory != null && valueFactory.canEdit() && getValue() != null);
+ createInstanceButton.setEnabled(valueFactory != null && valueFactory.canCreateObject() && !readOnly);
+ }
+
+ // Do not display unset if the value is mandatory
+ setExclusion(unsetButton, mandatory);
+ if (!mandatory) {
+ boolean enabled = !readOnly;
+ enabled = enabled && getValue() != null;
+
+ unsetButton.setEnabled(enabled);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Control#update()
+ */
+ @Override
+ public void update() {
+ super.update();
+ updateControls();
+ }
+
+ /**
+ * Set the direct creation value.
+ *
+ * @param directCreation
+ * Boolean to determinate the direct creation value.
+ */
+ public void setDirectCreation(final boolean directCreation) {
+ this.directCreation = directCreation;
+ updateControls();
+ }
+
+ /**
+ * Set the value.
+ *
+ * @param value
+ * The value object.
+ */
+ public void setValue(final Object value) {
+ this.value = value;
+ try {
+ if (modelProperty != null) {
+ modelProperty.setValue(value);
+ error = false;
+ }
+ } catch (Exception e) {
+ error = true;
+
+ }
+
+ updateControls();
+ updateLabel();
+ commit();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.StructuredViewer#setInput(Object)
+ * @param input
+ * The current input;
+ */
+ public void setInput(final Object input) {
+ this.dialog.setInput(input);
+ }
+
+ /**
+ * Set the mandatory.
+ *
+ * @param mandatory
+ * The mandatory boolean value.
+ */
+ public void setMandatory(final boolean mandatory) {
+ this.mandatory = mandatory;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#updateStatus(org.eclipse.core.runtime.IStatus)
+ */
+ @Override
+ public void updateStatus(final IStatus status) {
+
+ if (error) {
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(Messages.ReferenceDialog_0);
+ controlDecoration.setDescriptionText(Messages.ReferenceDialog_1);
+ controlDecoration.show();
+ styledTextStringEditor.setBackground(ERROR);
+ styledTextStringEditor.update();
+
+
+ } else {
+ controlDecoration.hide();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Widget#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (changeColorTask != null) {
+ changeColorTask.cancel();
+ }
+ if (timer != null) {
+ timer.cancel();
+ }
+ super.dispose();
+ }
+
+ /**
+ * This allow to react of cancel of the current task.
+ */
+ private void cancelCurrentTask() {
+ if (changeColorTask != null) {
+ changeColorTask.cancel();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#changeColorField()
+ */
+ @Override
+ public void changeColorField() {
+ if (!error & !edit) {
+
+ if (timer == null) {
+ timer = new Timer(true);
+ }
+
+ cancelCurrentTask();
+ changeColorTask = new TimerTask() {
+
+ @Override
+ public void run() {
+ if (StyledTextReferenceDialog.this.isDisposed()) {
+ return;
+ }
+ StyledTextReferenceDialog.this.getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ if (StyledTextReferenceDialog.this.isDisposed()) {// Bug 434787 : Shouldn't not execute the timer thread if the widget is disposed
+ return;
+ }
+ styledTextStringEditor.setBackground(DEFAULT);
+ styledTextStringEditor.update();
+ }
+
+
+ });
+ }
+ };
+
+ if (errorBinding) {
+ styledTextStringEditor.setBackground(ERROR);
+ styledTextStringEditor.update();
+ } else {
+ IStatus status = (IStatus) binding.getValidationStatus().getValue();
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ case IStatus.WARNING:
+ timer.schedule(changeColorTask, 600);
+ styledTextStringEditor.setBackground(VALID);
+ styledTextStringEditor.update();
+ break;
+ case IStatus.ERROR:
+ styledTextStringEditor.setBackground(ERROR);
+ styledTextStringEditor.update();
+ break;
+
+ }
+ }
+ } else {
+ styledTextStringEditor.setBackground(DEFAULT);
+ }
+ }
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java
new file mode 100644
index 00000000000..6f82b025613
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java
@@ -0,0 +1,506 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue;
+import org.eclipse.papyrus.infra.widgets.selectors.StringSelector;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+
+/**
+ * A Property Editor representing a single-line or multi-line String value as a
+ * Text. This editor's content is validated when the focus is lost, or, if the
+ * editor is single-line, when the Carriage Return is pressed. For a multi-line
+ * editor, ctrl+enter will also validate the editor's content.
+ *
+ * @see SWT#MULTI
+ *
+ * @author Vincent Lorenzo, adapted code from {@link StringEditor}
+ */
+public class StyledTextStringEditor extends AbstractValueEditor implements KeyListener, ModifyListener {
+
+ /**
+ * The text box for editing this editor's value
+ */
+ protected final StyledText text;
+
+ private int delay = 600;
+
+ private boolean validateOnDelay = false;
+
+ private Timer timer;
+
+ private TimerTask currentValidateTask;
+
+ private TimerTask changeColorTask;
+
+ private final static int DEFAULT_HEIGHT_HINT = 55;
+
+ private final static int DEFAULT_WIDTH_HINT = 100;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ */
+ public StyledTextStringEditor(Composite parent, int style) {
+ this(parent, style, null, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT);
+
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param label
+ * The label for this editor
+ */
+ public StyledTextStringEditor(Composite parent, int style, String label) {
+ this(parent, style, label, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param heighHint
+ * Height hint of the text area in multiline mode
+ * @param widthHint
+ * Width hint of the text area in multiline mode
+ */
+ public StyledTextStringEditor(Composite parent, int style, int heighHint, int widthHint) {
+ this(parent, style, null, heighHint, widthHint);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param label
+ * The label for this editor
+ * @param heighHint
+ * Height hint of the text area in multiline mode
+ * @param widthHint
+ * Width hint of the text area in multiline mode
+ */
+ public StyledTextStringEditor(Composite parent, int style, String label, int heighHint, int widthHint) {
+ super(parent, label);
+
+ GridData data = getDefaultLayoutData();
+ data.grabExcessVerticalSpace = true;
+ data.grabExcessHorizontalSpace = true;
+ data.verticalAlignment = SWT.FILL;
+ data.horizontalAlignment = SWT.FILL;
+ if ((style & SWT.MULTI) != 0) {
+ data.minimumHeight = heighHint;
+ data.minimumWidth = widthHint;
+ style = style | SWT.V_SCROLL;
+ }
+
+ text = createStyledText(this, null, style);
+ text.setLayoutData(data);
+
+ if (label != null) {
+ super.label.setLayoutData(getLabelLayoutData());
+
+ }
+ text.addKeyListener(this);
+ text.addModifyListener(this);
+ setCommitOnFocusLost(text);
+ controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP);
+ controlDecoration.hide();
+
+ // we ignore the indentation
+ // data.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
+
+ // we remove the margin
+ GridLayout layout = (GridLayout) this.getLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+
+ pack();
+
+ }
+
+
+ /**
+ * Creates a styled text as a part of the form.
+ *
+ * @param parent
+ * the text parent
+ * @param value
+ * the text initial value
+ * @param style
+ * the text style
+ * @return the styled text widget
+ */
+ public StyledText createStyledText(Composite parent, String value, int style) {
+ StyledText txt = new StyledText(parent, style);
+ txt.setText(value);
+ return txt;
+ }
+
+
+ @Override
+ protected GridData getLabelLayoutData() {
+ GridData result = super.getLabelLayoutData();
+ if (text != null) {
+ if ((text.getStyle() & SWT.MULTI) != 0) {
+ result.verticalAlignment = SWT.BEGINNING;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Ignored
+ */
+ @Override
+ public void keyPressed(KeyEvent e) {
+ // Nothing
+ }
+
+ /**
+ * Validates this editor when one of the following events occur : - CR
+ * released - Keypad CR released - Ctrl + [CR | Keypad CR] released
+ *
+ * @see org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param e
+ */
+ // TODO : we should prevent the \n from being written when validating the
+ // multi-line field with Ctrl + CR
+ @Override
+ public void keyReleased(KeyEvent e) {
+ // We listen on Carriage Return or Ctrl+ Carriage return, depending on
+ // whether the editor is single- or multi-line
+ if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) {
+ if ((text.getStyle() & SWT.MULTI) == 0) { // Single-line : Enter
+ if (e.stateMask == SWT.NONE) {
+ notifyChange();
+ }
+ } else { // Multi-line : Ctrl+Enter
+ if (e.stateMask == SWT.CTRL) {
+ String str = text.getText();
+ if (str.endsWith(StringSelector.LINE_SEPARATOR)) {
+ int newLength = str.length() - StringSelector.LINE_SEPARATOR.length();
+ text.setText(str.substring(0, newLength));
+ text.setSelection(newLength);
+ }
+ notifyChange();
+ }
+ }
+ }
+
+
+ }
+
+ @Override
+ public void setModelObservable(IObservableValue observable) {
+ setWidgetObservable(new StyledTextObservableValue(text, observable, SWT.FocusOut), true);
+ super.setModelObservable(observable);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getEditableType() {
+ return String.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getValue() {
+ return text.getText();
+ }
+
+ @Override
+ public void setReadOnly(boolean readOnly) {
+ text.setEnabled(!readOnly);
+ }
+
+ @Override
+ public boolean isReadOnly() {
+ return !text.isEnabled();
+ }
+
+ protected void notifyChange() {
+
+ text.notifyListeners(SWT.FocusOut, new Event());
+ commit();
+ changeColorField();
+ }
+
+ @Override
+ public void setToolTipText(String tooltip) {
+ text.setToolTipText(tooltip);
+ super.setLabelToolTipText(tooltip);
+ }
+
+ /**
+ * Sets the current text value for this editor
+ *
+ * @param value
+ */
+ public void setValue(Object value) {
+ if (value instanceof String) {
+ this.text.setText((String) value);
+ } else {
+ this.text.setText(""); //$NON-NLS-1$;
+ }
+ }
+
+ /**
+ * Indicates that this editor should be automatically validated after a
+ * timer.
+ *
+ * @param validateOnDelay
+ */
+ public void setValidateOnDelay(boolean validateOnDelay) {
+ this.validateOnDelay = validateOnDelay;
+
+ if (validateOnDelay) {
+ text.addModifyListener(this);
+ } else {
+ text.removeModifyListener(this);
+ cancelCurrentTask();
+ }
+ }
+
+ /**
+ * Indicates that this editor should be automatically validated after the
+ * given timer
+ *
+ * @param millis
+ * The delay after which the editor should be automatically
+ * validated, in milliseconds. The default is 600ms
+ */
+ public void setValidateOnDelay(int millis) {
+ this.delay = millis;
+ setValidateOnDelay(true);
+ if (delay == 0) {
+ cancelCurrentTask();
+ }
+ }
+
+ private void cancelCurrentTask() {
+ if (currentValidateTask != null) {
+ currentValidateTask.cancel();
+ currentValidateTask = null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ // SWT Thread
+ if (validateOnDelay) {
+ if (delay == 0) {
+ commit(); // Direct commit on edition, to avoid creating useless
+ // threads
+
+ return;
+ }
+
+ if (timer == null) {
+ timer = new Timer(true);
+ }
+
+ cancelCurrentTask();
+ currentValidateTask = new TimerTask() {
+
+ // Timer thread
+ @Override
+ public void run() {
+ StyledTextStringEditor.this.getDisplay().syncExec(new Runnable() {
+
+ // SWT Thread
+ @Override
+ public void run() {
+
+ commit();
+ }
+ });
+ }
+ };
+ timer.schedule(currentValidateTask, delay);
+ }
+ if (targetValidator != null) {
+ IStatus status = targetValidator.validate(text.getText());
+ updateStatus(status);
+ }
+ if (modelValidator != null) {
+ IStatus status = modelValidator.validate(text.getText());
+ updateStatus(status);
+ if (binding == null) {
+ update();
+ }
+ }
+
+ if (modelProperty != null) { // Bug 433169: The widget may be used without an Observable Value (setValue + getValue)
+ if (modelProperty.getValue() != null) {
+ if (!isReadOnly() && !modelProperty.getValue().toString().equals(text.getText())) {
+ text.setBackground(EDIT);
+ } else {
+ text.setBackground(DEFAULT);
+ }
+ } else {
+ if (text.getText().equals("")) {
+ text.setBackground(DEFAULT);
+ } else {
+ text.setBackground(EDIT);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ cancelCurrentTask();
+ cancelChangeColorTask();
+ if (timer != null) {
+ timer.cancel();
+ timer = null;
+ }
+ super.dispose();
+ }
+
+ public StyledText getText() {
+ return text;
+ }
+
+ @Override
+ public void updateStatus(IStatus status) {
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
+
+ }
+
+ @Override
+ public void changeColorField() {
+ if (binding != null) {
+
+ if (timer == null) {
+ timer = new Timer(true);
+ }
+
+ cancelChangeColorTask();
+ changeColorTask = new TimerTask() {
+
+ @Override
+ public void run() {
+ if (StyledTextStringEditor.this.isDisposed()) {
+ return;
+ }
+ StyledTextStringEditor.this.getDisplay().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ text.setBackground(DEFAULT);
+ text.update();
+ }
+ });
+ }
+ };
+ if (errorBinding) {
+ text.setBackground(ERROR);
+ text.update();
+ } else {
+ IStatus status = (IStatus) binding.getValidationStatus().getValue();
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ case IStatus.WARNING:
+ timer.schedule(changeColorTask, 600);
+ text.setBackground(VALID);
+ text.update();
+ break;
+ case IStatus.ERROR:
+ text.setBackground(ERROR);
+ text.update();
+ break;
+
+ }
+ }
+ }
+ }
+
+ private void cancelChangeColorTask() {
+ if (changeColorTask != null) {
+ changeColorTask.cancel();
+ changeColorTask = null;
+ }
+ }
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java
new file mode 100644
index 00000000000..b37f22846f5
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/DoNothingCompletionProposal.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.util;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+
+/**
+ * @author VL222926
+ *
+ */
+public class DoNothingCompletionProposal implements ICompletionProposal {
+ /** The string to be displayed in the completion proposal popup. */
+ private String fDisplayString;
+ /** The replacement string. */
+ private String fReplacementString;
+ /** The replacement offset. */
+ private int fReplacementOffset;
+ // /** The replacement length. */
+ private int fReplacementLength;
+ /** The cursor position after this proposal has been applied. */
+ private int fCursorPosition;
+ /** The image to be displayed in the completion proposal popup. */
+ private Image fImage;
+ /** The context information of this proposal. */
+ private IContextInformation fContextInformation;
+ /** The additional info of this proposal. */
+ private String fAdditionalProposalInfo;
+
+ /**
+ * Creates a new completion proposal based on the provided information. The replacement string is
+ * considered being the display string too. All remaining fields are set to <code>null</code>.
+ *
+ * @param replacementString
+ * the actual string to be inserted into the document
+ * @param replacementOffset
+ * the offset of the text to be replaced
+ * @param replacementLength
+ * the length of the text to be replaced
+ * @param cursorPosition
+ * the position of the cursor following the insert relative to replacementOffset
+ */
+ public DoNothingCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition) {
+ this(replacementString, replacementOffset, replacementLength, cursorPosition, null, null, null, null);
+ }
+
+ /**
+ * Creates a new completion proposal. All fields are initialized based on the provided information.
+ *
+ * @param replacementString
+ * the actual string to be inserted into the document
+ * @param replacementOffset
+ * the offset of the text to be replaced
+ * @param replacementLength
+ * the length of the text to be replaced
+ * @param cursorPosition
+ * the position of the cursor following the insert relative to replacementOffset
+ * @param image
+ * the image to display for this proposal
+ * @param displayString
+ * the string to be displayed for the proposal
+ * @param contextInformation
+ * the context information associated with this proposal
+ * @param additionalProposalInfo
+ * the additional information associated with this proposal
+ */
+ public DoNothingCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo) {
+ Assert.isNotNull(replacementString);
+ Assert.isTrue(replacementOffset >= 0);
+ Assert.isTrue(replacementLength >= 0);
+ Assert.isTrue(cursorPosition >= 0);
+
+ fReplacementString = replacementString;
+ fReplacementOffset = replacementOffset;
+ fReplacementLength = replacementLength;
+ fCursorPosition = cursorPosition;
+ fImage = image;
+ fDisplayString = displayString;
+ fContextInformation = contextInformation;
+ fAdditionalProposalInfo = additionalProposalInfo;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
+ *
+ * @param document
+ */
+ public void apply(IDocument document) {
+ // nothing to do
+ }
+
+ /*
+ * @see ICompletionProposal#getSelection(IDocument)
+ */
+ public Point getSelection(IDocument document) {
+ return new Point(fReplacementOffset + fCursorPosition, 0);
+ }
+
+ /*
+ * @see ICompletionProposal#getContextInformation()
+ */
+ public IContextInformation getContextInformation() {
+ return fContextInformation;
+ }
+
+ /*
+ * @see ICompletionProposal#getImage()
+ */
+ public Image getImage() {
+ return fImage;
+
+ }
+
+ /*
+ * @see ICompletionProposal#getDisplayString()
+ */
+ public String getDisplayString() {
+ if (fDisplayString != null)
+ return fDisplayString;
+ return fReplacementString;
+ }
+
+ /*
+ * @see ICompletionProposal#getAdditionalProposalInfo()
+ */
+ public String getAdditionalProposalInfo() {
+ return fAdditionalProposalInfo;
+ }
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java
new file mode 100644
index 00000000000..727c9c6b46e
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/INameResolutionHelper.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.util;
+
+import java.util.List;
+
+/**
+ * Common interface to use to find elements from a given string
+ *
+ */
+public interface INameResolutionHelper {
+
+ /**
+ *
+ * @param aString
+ * a string
+ * @return
+ * all elements whose the name starts with this string, or all found element if the string is <code>null</code> or empty
+ */
+ public List<?> getMatchingElements(final String aString);
+
+ /**
+ *
+ * @param aString
+ * a string
+ * @return
+ * all elements which have the wanted string as (qualified) name
+ */
+ public List<?> getElementsByName(final String aString);
+
+
+ /**
+ * @param namedElement
+ * @return
+ * the shortest qualified to use for the element
+ */
+ public List<String> getShortestQualifiedNames(Object element);
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java
new file mode 100644
index 00000000000..e55a566cbc9
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/IPapyrusConverter.java
@@ -0,0 +1,164 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.util;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+
+/**
+ * @author VL222926
+ *
+ * This class provides method to convert Object to a string to edit or a string to display and vice-versa from a string to edit or to display to the real object
+ *
+ */
+public interface IPapyrusConverter extends INameResolutionHelper {
+
+ // the previous regex,which did not allow to get 'Class, when the user asked for the completion and
+ // PLEASE DO NOT ERASE THIS COMMENT
+ // public static final String FIND_PART_NAME_REGEX = "([^'\\x2C]+)|('[^']+')"; //$NON-NLS-1$
+
+ /**
+ * regex used to parse string on , and ',':
+ */
+ public static final String FIND_PART_NAME_REGEX = "([^'\\x2C]+)|('[^']+')|('(([^']*[\\x2C][^']*)))"; //$NON-NLS-1$
+
+ /**
+ * the string delimiter
+ */
+ public static final String STRING_DELIMITER = "\'"; //$NON-NLS-1$
+
+ /**
+ * the string separator for multivalued properties
+ */
+ public static final String STRING_SEPARATOR = ","; //$NON-NLS-1$
+
+ /**
+ * the string used for <code>null</code> value
+ */
+ public static final String NULL_VALUE = "null";//$NON-NLS-1$
+
+ /**
+ * add this string to the suggestions when there are more than {@link #MAX_ELEMENTS_TO_DISPLAY}
+ */
+ public static final String MORE_ELEMENTS = "...";//$NON-NLS-1$
+
+ /**
+ * empty string
+ */
+ public static final String EMPTY_STRING = "";//$NON-NLS-1$
+
+ /**
+ *
+ * @param multiValueAsString
+ * the full String write in the StyledText
+ * @return
+ * a map with the name of the elements as value and the start and the end index of the name in the typed text as key
+ */
+ public Map<List<Integer>, String> getSubStringsWithTheirPositions(String multiValueAsString);
+
+ /**
+ *
+ * @param multiValueAsString
+ * a string
+ * @return
+ * all substring according to the applied regex
+ */
+ public List<String> splitFullStringToSubElementString(String multiValueAsString);
+
+ /**
+ *
+ * @param aString
+ * a string
+ * @return
+ * a istatus indicating if the string is valid or not
+ */
+ public IStatus isValidEditString(String aString);
+
+ /**
+ * Returns the parser's content assist processor
+ *
+ * @param element
+ * the element
+ * @return the content assist processor
+ */
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element);
+
+
+ /**
+ *
+ * @param object
+ * an object
+ * @param flag
+ * a flag which coul be used for for the name qualification for example
+ * @return
+ * the string to display (label) representing the object
+ */
+ public String canonicalToDisplayValue(Object object, int flag);
+
+ /**
+ *
+ * @param object
+ * an object
+ * @param flag
+ * a flag which coul be used for for the name qualification for example
+ * @return
+ * the string to edit (label) representing the object
+ */
+ public String canonicalToEditValue(Object object, int flag);
+
+ /**
+ *
+ * @param string
+ * a display string
+ * @param flag
+ * a flag which coul be used for for the name qualification for example
+ * @return
+ * the object represented by the displayed string
+ */
+ public Object displayToCanonicalValue(String string, int flag);
+
+ /**
+ *
+ * @param string
+ * an edited string
+ * @param flag
+ * a flag which coul be used for for the name qualification for example
+ * @return
+ * the object represented by the edited string
+ */
+ public Object editToCanonicalValue(String string, int flag);
+
+ /**
+ *
+ * @param string
+ * an edited string
+ * @return
+ * the the equivalent string to use for edition
+ */
+ public String editToDisplayValue(String string);
+
+ /**
+ *
+ * @param string
+ * a displayed string
+ * @return
+ * the the equivalent string to use for
+ */
+ public String displayToEditValue(String string);
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java
new file mode 100644
index 00000000000..104bfabd7df
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetNameResolutionHelper.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.util;
+
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+
+/**
+ * Interface used to declare a ISNameResolutionHelper
+ *
+ */
+public interface ISetNameResolutionHelper {
+
+ /**
+ *
+ * @param helper
+ * a name resolution helper
+ */
+ public void setNameResolutionHelper(INameResolutionHelper helper);
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java
new file mode 100644
index 00000000000..4da7e5a75eb
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/ISetPapyrusConverter.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.util;
+
+/**
+ * @author Vincent Lorenzo
+ *
+ */
+public interface ISetPapyrusConverter {
+
+ /**
+ *
+ * @param converter
+ * the papyrus converter to use
+ */
+ public void setPapyrusConverter(IPapyrusConverter converter);
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml
new file mode 100644
index 00000000000..3f87e27c957
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+</plugin>
+
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java
new file mode 100644
index 00000000000..0296470c930
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractXtextCellEditor.java
@@ -0,0 +1,100 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+
+/**
+ * ICellEditor implementation that wraps a SWT Text control to
+ * support text editing. This is also the default editor in NatTable if you
+ * didn't configure something else.
+ */
+public abstract class AbstractXtextCellEditor extends
+ AbstractNatTableXTextCellEditor {
+
+ /**
+ * Creates the default TextCellEditor that does not commit on pressing the
+ * up/down arrow keys and will not move the selection on committing a value
+ * by pressing enter.
+ */
+ public AbstractXtextCellEditor(final Table table,
+ final Object axisElement,
+ final ITableAxisElementProvider elementProvider) {
+ super(table, axisElement, elementProvider);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.xtext.integration.celleditor.AbstractNatTableXTextCellEditor#createXTextEditorConfiguration()
+ *
+ * @return
+ */
+ protected DefaultXtextDirectEditorConfiguration createXTextEditorConfiguration() {
+ int columnIndex = this.layerCell.getColumnIndex();
+ int rowIndex = this.layerCell.getRowIndex();
+ Object row = this.elementProvider.getRowElement(rowIndex);
+ Object column = this.elementProvider.getColumnElement(columnIndex);
+ row = AxisUtils.getRepresentedElement(row);
+ column = AxisUtils.getRepresentedElement(column);
+
+ return getConfigurationFromEditedEObject(row, column);
+ }
+
+ /**
+ * This allow to get the configuration for edited object.
+ *
+ * @param editedEObject
+ * The edited object.
+ * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding the the edited object.
+ */
+ protected DefaultXtextDirectEditorConfiguration getConfigurationFromEditedEObject(Object row, Object column) {
+ if (row instanceof EObject && column instanceof EStructuralFeature) {
+
+ final Object editedEObject = ((EObject) row).eGet((EStructuralFeature) column);
+
+ if (editedEObject != null && editedEObject instanceof EObject) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = ((EObject) editedEObject).eClass()
+ .getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfiguration(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration.preEditAction(editedEObject);
+ return xtextConfiguration;
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project
new file mode 100644
index 00000000000..8f91204b6ab
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.nattable.xtext.valuespecification</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..d2e6e831782
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: $pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.nattable.xtext.valuespecification;singleton:=true
+Bundle-Version: 1.0.2.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.nattable.xtext.valuespecification.Activator
+Require-Bundle: org.eclipse.uml2.uml,
+ org.eclipse.papyrus.infra.nattable;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.2",
+ org.eclipse.ui,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.emf.nattable;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.2",
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;bundle-version="1.0.2",
+ com.google.inject,
+ org.eclipse.papyrus.uml.nattable.xtext.integration;bundle-version="1.0.2",
+ org.eclipse.nebula.widgets.nattable.core,
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.2"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.nattable.xtext.valuespecification,
+ org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor,
+ org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell
+Bundle-Vendor: %providerName
+Bundle-Description: %pluginDescription
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties
new file mode 100644
index 00000000000..dd3fa347af8
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+
+src.includes = about.html
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties
new file mode 100644
index 00000000000..16e85ac4bcb
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.properties
@@ -0,0 +1,13 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation
+##################################################################################
+pluginName = ValueSpecification XText for NatTable
+providerName = Eclipse Modeling Project
+pluginDescription=This plugin define the xtext editor for the cell of NatTable \ No newline at end of file
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml
new file mode 100644
index 00000000000..db358219279
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.uml.nattable.valuespecification.config.cell.manager"
+ manager="org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell.ValueSpecificationCellManager"
+ order="1100">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.celleditor.configuration">
+ <configuration
+ class="org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor.ValueSpecificationCellEditorConfiguration"
+ order="700">
+ </configuration>
+ </extension>
+</plugin>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml
new file mode 100644
index 00000000000..eab6b5219e6
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.nattable.xtext.valuespecification</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java
new file mode 100644
index 00000000000..d3ae979cccc
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/Activator.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.valuespecification;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ /**
+ * The plug-in ID.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.nattable.xtext.valuespecification"; //$NON-NLS-1$
+
+ /**
+ * The shared instance.
+ */
+ private static Activator plugin;
+
+ /**
+ * The log helper.
+ */
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java
new file mode 100644
index 00000000000..a8db522a61e
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditor.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor.AbstractXtextCellEditor;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * {@link ICellEditor} implementation that wraps a SWT {@link Text} control to
+ * support text editing. This is also the default editor in NatTable if you
+ * didn't configure something else.
+ */
+public class ValueSpecificationCellEditor extends AbstractXtextCellEditor {
+
+ /**
+ * Constructor.
+ *
+ * @param table
+ * The table.
+ * @param axisElement
+ * The axis element object.
+ * @param elementProvider
+ * The element provider.
+ */
+ public ValueSpecificationCellEditor(final Table table,
+ final Object axisElement,
+ final ITableAxisElementProvider elementProvider) {
+ super(table, axisElement, elementProvider);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor#getEditedEObject()
+ */
+ @Override
+ protected EObject getEditedEObject() {
+ int columnIndex = this.layerCell.getColumnIndex();
+ int rowIndex = this.layerCell.getRowIndex();
+ Object row = this.elementProvider.getRowElement(rowIndex);
+ Object column = this.elementProvider.getColumnElement(columnIndex);
+ row = AxisUtils.getRepresentedElement(row);
+ column = AxisUtils.getRepresentedElement(column);
+ EObject editedEObject = null;
+ if (row instanceof EObject && column instanceof EStructuralFeature) {
+ if (UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) column)
+ .getEType()) {
+ editedEObject = (EObject) row;
+ }
+ } else if (row instanceof EStructuralFeature && column instanceof EObject) {
+ if (UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) row)
+ .getEType()) {
+ editedEObject = (EObject) column;
+ }
+ }
+ return editedEObject;
+ }
+
+ /**
+ * This allow to get the configuration for edited object.
+ *
+ * @param editedEObject
+ * The edited object.
+ * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding
+ * the the edited object.
+ */
+ protected DefaultXtextDirectEditorConfiguration getConfigurationFromEditedEObject(
+ final Object row, final Object column) {
+ if (row instanceof EObject && column instanceof EStructuralFeature || row instanceof EStructuralFeature && column instanceof EObject) {
+
+ final EStructuralFeature feature = (EStructuralFeature) (column instanceof EStructuralFeature ? column : row);
+ final EObject eObject = (EObject) (row instanceof EObject ? row : column);
+
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = feature.getEType()
+ .getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfigurationWithPriority(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration.preEditAction(eObject.eGet(feature));
+ return xtextConfiguration;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java
new file mode 100644
index 00000000000..3955e6de4aa
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/celleditor/ValueSpecificationCellEditorConfiguration.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.celleditor;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
+import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.nattable.celleditor.config.AbstractCellEditorConfiguration;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * The configuration for the ConnectorEnd cell editor
+ */
+public class ValueSpecificationCellEditorConfiguration extends AbstractCellEditorConfiguration {
+
+ /**
+ * The identifier of xtext cell editor for the ValueSpecification.
+ */
+ private static final String XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER = "XTEXT_ValueSpecification_Cell_Editor"; //$NON-NLS-1$
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider)
+ */
+ @Override
+ public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ */
+ @Override
+ public ICellPainter getCellPainter(Table table, Object axisElement) {
+ return new TextPainter();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider)
+ */
+ @Override
+ public ICellEditor getICellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider) {
+ return new ValueSpecificationCellEditor(table, axisElement, elementProvider);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ */
+ @Override
+ public String getDisplayMode(Table table, Object axisElement) {
+ return DisplayMode.EDIT;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId()
+ */
+ @Override
+ public String getEditorConfigId() {
+ return XTEXT_VALUE_SPECIFICATION_CELL_EDITOR_IDENTIFIER;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ */
+ @Override
+ public boolean handles(final Table table, final Object object) {
+ boolean result = false;
+ if (object instanceof EStructuralFeature) {
+ result = ((EStructuralFeature) object).getEType().getInstanceClassName().equals(ValueSpecification.class.getName());
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java
new file mode 100644
index 00000000000..381d2157642
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.valuespecification/src/org/eclipse/papyrus/uml/nattable/xtext/valuespecification/manager/cell/ValueSpecificationCellManager.java
@@ -0,0 +1,160 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.valuespecification.manager.cell;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EObjectAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.EStructuralFeatureAxis;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+import com.google.inject.Injector;
+
+/**
+ * This class provides the method to get and set the values in the Cell
+ * representing a ValueSpecification.
+ */
+public class ValueSpecificationCellManager extends EMFFeatureValueCellManager {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.Object,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ */
+ @Override
+ public Command getSetValueCommand(final TransactionalEditingDomain domain,
+ final Object columnElement, final Object rowElement,
+ final Object newValue, final INattableModelManager tableManager) {
+ if (newValue instanceof IAdaptable) {
+ final ICommand cmd = (ICommand) ((IAdaptable) newValue)
+ .getAdapter(ICommand.class);
+ if (null != cmd && cmd.canExecute()) {
+ return new GMFtoEMFCommandWrapper(cmd);
+ } else {
+ final String editedString = (String) ((IAdaptable) newValue)
+ .getAdapter(String.class);
+ return getSetStringValueCommand(domain, columnElement,
+ rowElement, editedString, null, tableManager);
+ }
+
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#getSetStringValueCommand(org.eclipse.emf.transaction.TransactionalEditingDomain,
+ * java.lang.Object, java.lang.Object, java.lang.String,
+ * org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter,
+ * org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager)
+ */
+ @Override
+ public Command getSetStringValueCommand(
+ final TransactionalEditingDomain domain, final Object columnElement,
+ final Object rowElement, final String newValue,
+ final AbstractStringValueConverter valueSolver,
+ final INattableModelManager tableManager) {
+ if (columnElement instanceof EStructuralFeatureAxis && rowElement instanceof EObjectAxis || columnElement instanceof EObjectAxis && rowElement instanceof EStructuralFeatureAxis) {
+
+ EStructuralFeature structuralFeature = null;
+ if (columnElement instanceof EStructuralFeatureAxis) {
+ structuralFeature = (EStructuralFeature) ((EStructuralFeatureAxis) columnElement).getElement();
+ } else {
+ structuralFeature = (EStructuralFeature) ((EStructuralFeatureAxis) rowElement).getElement();
+ }
+
+ if (UMLPackage.Literals.VALUE_SPECIFICATION == structuralFeature
+ .getEType()) {
+ EObject eObject = null;
+ if (rowElement instanceof EObjectAxis) {
+ eObject = ((EObjectAxis) rowElement).getElement();
+ } else {
+ eObject = ((EObjectAxis) columnElement).getElement();
+ }
+
+ CompositeCommand result = ValueSpecificationSetCommand
+ .getInstance().createSetCommand(getInjector(), eObject,
+ structuralFeature, newValue, getDefaultLanguages());
+
+ return result.isEmpty() ? null : new GMFtoEMFCommandWrapper(
+ result);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This allow to define the default languages for an opaque expression.
+ *
+ * @return The list of default languages.
+ */
+ protected Collection<String> getDefaultLanguages() {
+ // This method will be redefined to define the default languages of an opaque expression
+ return Collections.emptyList();
+ }
+
+ /**
+ * This allow to get the injector used for the xtext parser.
+ *
+ * @return The injector corresponding to the xtext parser.
+ */
+ public Injector getInjector() {
+ return UmlValueSpecificationActivator
+ .getInstance()
+ .getInjector(
+ UmlValueSpecificationActivator.ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.emf.nattable.manager.cell.EMFFeatureValueCellManager#handles(java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public boolean handles(final Object columnElement, final Object rowElement) {
+ boolean result = false;
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ if (column instanceof EStructuralFeature) {
+ result = UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) column)
+ .getEType();
+ } else if (row instanceof EStructuralFeature) {
+ result = UMLPackage.Literals.VALUE_SPECIFICATION == ((EStructuralFeature) row)
+ .getEType();
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml
index 38f7425c6d2..ce661696b69 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml
@@ -7,6 +7,14 @@
class="org.eclipse.papyrus.uml.nattable.config.UMLFeatureCellEditorConfig"
order="500">
</configuration>
+ <configuration
+ class="org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration"
+ order="400">
+ </configuration>
+ <configuration
+ class="org.eclipse.papyrus.uml.nattable.config.UMLMultiReferenceTextualCellEditorWithButtonConfiguration"
+ order="401">
+ </configuration>
</extension>
<extension
point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java
new file mode 100644
index 00000000000..9a55ad884cd
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLMultiReferenceTextualCellEditorWithButtonConfiguration.java
@@ -0,0 +1,220 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.config;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor;
+import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
+import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction;
+import org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.nattable.converter.UMLMultiReferenceDisplayConverter;
+import org.eclipse.papyrus.uml.nattable.converter.UMLSingleReferenceDisplayConverter;
+import org.eclipse.papyrus.uml.nattable.editor.MultiReferenceCellEditor;
+import org.eclipse.papyrus.uml.nattable.editor.SingleReferenceValueCellEditor;
+import org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor;
+import org.eclipse.papyrus.uml.nattable.messages.Messages;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This class provides the configuration to edit UML References single and multi-valued with a text editor
+ *
+ */
+public class UMLMultiReferenceTextualCellEditorWithButtonConfiguration implements IAxisCellEditorConfiguration {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean handles(Table table, Object object) {
+ Object tmp = AxisUtils.getRepresentedElement(object);
+ if (tmp instanceof EReference) {
+ EReference ref = (EReference) tmp;
+ if (ref.isContainment() || !ref.isChangeable() || ref.isDerived()) {
+ return false;
+ }
+ if (!ref.isMany()) {
+ return false;
+ }
+ EClassifier type = ref.getEType();
+
+ // TODO : to test on constraint
+ // return type instanceof EClass && UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf((EClass) type);
+ return true;
+
+ } else if (object instanceof String && ((String) object).startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX)) {
+ String str = (String) tmp;
+ Property prop = UMLTableUtils.getRealStereotypeProperty(table.getContext(), str);
+ if (prop != null) {
+ if (prop.isDerived()) {
+ return false;
+ }
+ Type type = prop.getType();
+ if (type instanceof DataType) {
+ return false;
+ }
+ if (!(type instanceof NamedElement)) {
+ return false;
+ }
+ if (!prop.isMultivalued()) {
+ return false;
+ }
+ switch (prop.getAggregation()) {
+ case NONE_LITERAL:
+ case SHARED_LITERAL:
+ return true;
+ case COMPOSITE_LITERAL:
+ default:
+ return false;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider)
+ *
+ * @param table
+ * @param axisElement
+ * @param provider
+ * @return
+ */
+ @Override
+ public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) {
+ return new UMLMultiReferenceDisplayConverter();
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public ICellPainter getCellPainter(Table table, Object axisElement) {
+ return new TextPainter();
+ }
+
+
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider)
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @return
+ */
+ @Override
+ public ICellEditor getICellEditor(Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ UMLReferenceTextWithCompletionCellEditor editor = new UMLReferenceTextWithCompletionCellEditor(table, axisElement, elementProvider);
+ editor.setIsMultiValued(true);
+ AbstractOpenDialogCellEditorButtonAction openDialogConfiguration = new AbstractOpenDialogCellEditorButtonAction() {
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction#createDialogCellEditor()
+ *
+ * @return
+ */
+ @Override
+ public AbstractDialogCellEditor createDialogCellEditor() {
+ return new MultiReferenceCellEditor(axisElement, elementProvider);
+ }
+
+ };
+ editor.setOpenDialogCellEditorButtonAction(openDialogConfiguration);
+ openDialogConfiguration.setText("..."); //$NON-NLS-1$
+ openDialogConfiguration.setTooltipText(Messages.UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue);
+ return editor;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public String getDisplayMode(Table table, Object axisElement) {
+ return DisplayMode.EDIT;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId()
+ *
+ * @return
+ */
+ @Override
+ public String getEditorConfigId() {
+ return "org.eclipse.papyrus.uml.reference.text.with.completion.editor.and.dialog"; //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDataValidator(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public IDataValidator getDataValidator(Table table, Object axisElement) {
+ return null;// By default, the system will use the DefautDataValidator//new UMLReferenceDataValidator();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorDescription()
+ *
+ * @return
+ */
+ @Override
+ public String getEditorDescription() {
+ return "This configuration provides a Text editor with completion for multi references"; //$NON-NLS-1$
+ }
+
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java
new file mode 100644
index 00000000000..0bf91a90169
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLSingleReferenceTextualCellEditorWithButtonConfiguration.java
@@ -0,0 +1,213 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.config;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor;
+import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
+import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor;
+import org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.nattable.converter.UMLSingleReferenceDisplayConverter;
+import org.eclipse.papyrus.uml.nattable.editor.SingleReferenceValueCellEditor;
+import org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor;
+import org.eclipse.papyrus.uml.nattable.messages.Messages;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This class provides the configuration to edit UML References single and multi-valued with a text editor
+ *
+ */
+public class UMLSingleReferenceTextualCellEditorWithButtonConfiguration implements IAxisCellEditorConfiguration {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param object
+ * @return
+ */
+ @Override
+ public boolean handles(Table table, Object object) {
+ Object tmp = AxisUtils.getRepresentedElement(object);
+ if (tmp instanceof EReference) {
+ EReference ref = (EReference) tmp;
+ if (ref.isContainment() || !ref.isChangeable() || ref.isDerived()) {
+ return false;
+ }
+ if (ref.isMany()) {
+ return false;
+ }
+ EClassifier type = ref.getEType();
+ return type instanceof EClass && UMLPackage.eINSTANCE.getNamedElement().isSuperTypeOf((EClass) type);
+ } else if (object instanceof String && ((String) object).startsWith(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX)) {
+ String str = (String) tmp;
+ Property prop = UMLTableUtils.getRealStereotypeProperty(table.getContext(), str);
+ if (prop != null) {
+ if (prop.isDerived()) {
+ return false;
+ }
+ Type type = prop.getType();
+ if (type instanceof DataType) {
+ return false;
+ }
+ if (!(type instanceof NamedElement)) {
+ return false;
+ }
+ if (prop.isMultivalued()) {
+ return false;
+ }
+ switch (prop.getAggregation()) {
+ case NONE_LITERAL:
+ case SHARED_LITERAL:
+ return true;
+ case COMPOSITE_LITERAL:
+ default:
+ return false;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayConvert(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.jface.viewers.ILabelProvider)
+ *
+ * @param table
+ * @param axisElement
+ * @param provider
+ * @return
+ */
+ @Override
+ public IDisplayConverter getDisplayConvert(Table table, Object axisElement, ILabelProvider provider) {
+ return new UMLSingleReferenceDisplayConverter();
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getCellPainter(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public ICellPainter getCellPainter(Table table, Object axisElement) {
+ return new TextPainter();
+ }
+
+
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getICellEditor(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object, org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider)
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @return
+ */
+ @Override
+ public ICellEditor getICellEditor(Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ AbstractPapyrusStyledTextCellEditor editor = new UMLReferenceTextWithCompletionCellEditor(table, axisElement, elementProvider);
+ AbstractOpenDialogCellEditorButtonAction openDialogConfiguration = new AbstractOpenDialogCellEditorButtonAction() {
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractOpenDialogCellEditorButtonAction#createDialogCellEditor()
+ *
+ * @return
+ */
+ @Override
+ public AbstractDialogCellEditor createDialogCellEditor() {
+ return new SingleReferenceValueCellEditor(axisElement, elementProvider);
+ }
+
+ };
+ editor.setOpenDialogCellEditorButtonAction(openDialogConfiguration);
+ openDialogConfiguration.setText("..."); //$NON-NLS-1$
+ openDialogConfiguration.setTooltipText(Messages.UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue);
+ return editor;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDisplayMode(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public String getDisplayMode(Table table, Object axisElement) {
+ return DisplayMode.EDIT;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorConfigId()
+ *
+ * @return
+ */
+ @Override
+ public String getEditorConfigId() {
+ return "org.eclipse.papyrus.uml.reference.text.with.completion.editor.and.dialog"; //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getDataValidator(org.eclipse.papyrus.infra.nattable.model.nattable.Table, java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public IDataValidator getDataValidator(Table table, Object axisElement) {
+ return null;// By default, the system will use the DefautDataValidator//new UMLReferenceDataValidator();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.IAxisCellEditorConfiguration#getEditorDescription()
+ *
+ * @return
+ */
+ @Override
+ public String getEditorDescription() {
+ return "This configuration provides a Text editor with completion for single references"; //$NON-NLS-1$
+ }
+
+
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java
new file mode 100644
index 00000000000..ecb254d9eda
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLMultiReferenceDisplayConverter.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.converter;
+
+import java.util.Collections;
+
+import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager;
+
+/**
+ *
+ * This class allows us to convert UML Object into string and string to UML Object
+ *
+ */
+public class UMLMultiReferenceDisplayConverter extends UMLSingleReferenceDisplayConverter {
+
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#canonicalToDisplayValue(java.lang.Object)
+ *
+ * @param canonicalValue
+ * @return
+ */
+ @Override
+ public Object canonicalToDisplayValue(Object canonicalValue) {
+ if (canonicalValue == null) {
+ return ICellManager.EMPTY_STRING;
+ }
+ return super.canonicalToDisplayValue(canonicalValue);
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#displayToCanonicalValue(java.lang.Object)
+ *
+ * @param displayValue
+ * @return
+ */
+ @Override
+ public Object displayToCanonicalValue(Object displayValue) {
+ if (ICellManager.NULL_VALUE.equals(displayValue) || ICellManager.EMPTY_STRING.equals(displayValue)) {
+ return Collections.EMPTY_LIST;
+ } else {
+ return super.displayToCanonicalValue(displayValue);
+ }
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java
new file mode 100644
index 00000000000..c9d144063a6
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/converter/UMLSingleReferenceDisplayConverter.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.converter;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
+import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+
+/**
+ *
+ * This class allows us to convert UML Object into string and string to UML Object
+ *
+ */
+public class UMLSingleReferenceDisplayConverter extends DisplayConverter implements ISetPapyrusConverter {
+
+
+ /**
+ * the parser used for references, separated by ','
+ */
+ private IPapyrusConverter parser;
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#canonicalToDisplayValue(java.lang.Object)
+ *
+ * @param canonicalValue
+ * @return
+ */
+ @Override
+ public Object canonicalToDisplayValue(Object canonicalValue) {
+ if (canonicalValue instanceof Object) {
+ return parser.canonicalToEditValue(canonicalValue,0);
+ }
+ return parser.canonicalToEditValue(null,0);
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter#displayToCanonicalValue(java.lang.Object)
+ *
+ * @param displayValue
+ * @return
+ */
+ @Override
+ public Object displayToCanonicalValue(Object displayValue) {
+ if (ICellManager.EMPTY_STRING.equals(displayValue) || ICellManager.NULL_VALUE.equals(displayValue)) {
+ return null;
+ }
+ Assert.isTrue(displayValue instanceof String);
+ return parser.editToCanonicalValue((String) displayValue, 0);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter#setPapyrusConverter(org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter)
+ *
+ * @param parser
+ */
+ @Override
+ public void setPapyrusConverter(IPapyrusConverter parser) {
+ this.parser = parser;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java
new file mode 100644
index 00000000000..18f994f339a
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/editor/UMLReferenceTextWithCompletionCellEditor.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Original authors and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA-LIST) - duplicated and adapted code from nattable project.
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.uml.nattable.manager.cell.editor;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.utils.CrossAxisWrapper;
+import org.eclipse.papyrus.infra.widgets.editors.StringEditorWithCompletionWrapper;
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.papyrus.uml.tools.util.UMLReferenceConverter;
+import org.eclipse.papyrus.uml.tools.utils.NameResolutionHelper;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.uml2.uml.Element;
+
+
+
+/**
+ * {@link ICellEditor} implementation that wraps a SWT {@link Text} control to
+ * support text editing. This is also the default editor in NatTable if you
+ * didn't configure something else.
+ *
+ * duplicated and adapted code from nattable project. Add the method {@link #keyPressed(Composite, KeyEvent)} to allow to ovveride it
+ */
+public class UMLReferenceTextWithCompletionCellEditor extends AbstractPapyrusStyledTextCellEditor {
+
+ /**
+ * The Text control which is the editor wrapped by this TextCellEditor.
+ */
+ private StringEditorWithCompletionWrapper textCompletion = null;
+
+ /**
+ * The name resolution helper to use to find UML Element from a string
+ */
+ private INameResolutionHelper helper;
+
+ /**
+ * the papyrus parser to use
+ */
+ private IPapyrusConverter parser;
+ /**
+ * boolean indicating if we are editing a multivalued field
+ */
+ private boolean isMultiValued = false;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @param commitOnUpDown
+ * @param moveSelectionOnEnter
+ */
+ public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider, boolean commitOnUpDown, boolean moveSelectionOnEnter) {
+ super(table, axisElement, elementProvider, commitOnUpDown, moveSelectionOnEnter);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @param commitOnUpDown
+ */
+ public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider, boolean commitOnUpDown) {
+ super(table, axisElement, elementProvider, commitOnUpDown);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ */
+ public UMLReferenceTextWithCompletionCellEditor(Table table, Object axisElement, ITableAxisElementProvider elementProvider) {
+ super(table, axisElement, elementProvider);
+ }
+
+ /**
+ *
+ * @param isMultivalued
+ */
+ public void setIsMultiValued(boolean isMultivalued) {
+ this.isMultiValued = isMultivalued;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#activateCell(org.eclipse.swt.widgets.Composite, java.lang.Object)
+ *
+ * @param parent
+ * @param originalCanonicalValue
+ * @return
+ */
+ @Override
+ protected Control activateCell(Composite parent, Object originalCanonicalValue) {
+ this.helper = createNameResolutionHelper();
+ parser = new UMLReferenceConverter(this.helper, isMultiValued);
+ setPapyrusConverter(parser);
+ return super.activateCell(parent, originalCanonicalValue);
+ }
+
+ /**
+ *
+ * @param parser
+ * the parser to use to find the references
+ */
+ private void setPapyrusConverter(IPapyrusConverter parser) {
+ // if (this.dataValidator instanceof ISetPapyrusParser) {
+ // ((ISetPapyrusParser) this.dataValidator).setPapyrusParser(parser);
+ // }
+ if (this.displayConverter instanceof ISetPapyrusConverter) {
+ ((ISetPapyrusConverter) this.displayConverter).setPapyrusConverter(parser);
+ }
+ }
+
+ /**
+ *
+ * @return
+ */
+ @Override
+ public Control getEditorControl() {
+ return super.getEditorControl();
+ }
+
+ /**
+ *
+ * @param parent
+ * @param style
+ * @return
+ */
+ @Override
+ protected StyledText createStyledText(Composite parent, int style) {
+ // IPapyrusParser parser = new UMLReferenceParser(helper);
+ this.textCompletion = new StringEditorWithCompletionWrapper(parent, this.parser);
+ return this.textCompletion.getTextViewer().getTextWidget();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#keyPressed(org.eclipse.swt.events.KeyEvent)
+ *
+ * @param event
+ */
+ @Override
+ public void keyPressed(KeyEvent event) {
+ if (isMultiValued && textCompletion.isContentAssistOpened()) {
+ return;
+ }
+ super.keyPressed(event);
+ }
+
+
+ /**
+ *
+ * @return
+ * the created name resolution helper
+ */
+ protected INameResolutionHelper createNameResolutionHelper() {
+ CrossAxisWrapper<EObject, EStructuralFeature> editedElement = UMLTableUtils.getRealEditedObject(layerCell, elementProvider);
+ EObject element = editedElement.getFirstAxis();
+ Element scope;
+ if (element instanceof Element) {
+ scope = (Element) element;
+ } else {
+ // it could be a stereotype application
+ scope = org.eclipse.uml2.uml.util.UMLUtil.getBaseElement(element);
+ }
+
+ EStructuralFeature feature = editedElement.getSecondAxis();
+ EClassifier eType = feature.getEType();
+ if (eType instanceof EClass) {
+ INameResolutionHelper helper = new NameResolutionHelper(scope, (EClass) eType);
+ return helper;
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor#getCanonicalValue(org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler)
+ *
+ * @param conversionErrorHandler
+ * @return
+ */
+ @Override
+ public Object getCanonicalValue(IEditErrorHandler conversionErrorHandler) {
+ Object canonnicalValue = super.getCanonicalValue(conversionErrorHandler);
+ if (canonnicalValue instanceof Collection<?>) {
+ return canonnicalValue;
+ }
+ if (isMultiValued) {
+ Collection<Object> coll = new ArrayList<Object>();
+ coll.add(canonnicalValue);
+ return coll;
+ } else {
+ return canonnicalValue;
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.AbstractCellEditor#getCanonicalValue()
+ *
+ * @return
+ */
+ @Override
+ public Object getCanonicalValue() {
+ return super.getCanonicalValue();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#close()
+ *
+ */
+ @Override
+ public void close() {
+ this.textCompletion.getTextWidget().dispose();
+ super.close();
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor#getEditedEObject()
+ *
+ * @return
+ */
+ protected EObject getEditedEObject() {
+ return null;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
index 9320e0be78c..784ff1dd44a 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/Messages.java
@@ -21,6 +21,8 @@ public class Messages extends NLS {
public static String StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied;
public static String StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound;
+
+ public static String UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
index 8ccb633749a..a11a43cae98 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/messages/messages.properties
@@ -1,2 +1,3 @@
StereotypePropertyCellManager_SeveralStereotypesWithThisFeatureAreApplied=Several stereotypes with this feature are applied -> not yet managed
StereotypePropertyHeaderLabelProvider_RequiredProfileNotFound=Required Profile Not Found
+UMLReferenceCellEditorConfiguration_OpenDialogToChooseTheValue=Open dialog to choose the value.
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
index 90800f68bdb..3ae9bd8a73e 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
@@ -1,341 +1,388 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.nattable.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.Constants;
-import org.eclipse.papyrus.uml.nattable.paste.StereotypeApplicationStructure;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- *
- * This class provides useful methods to manage stereotypes in the table
- *
- */
-public class UMLTableUtils {
-
- public static final String PROPERTY_OF_STEREOTYPE_PREFIX = "property_of_stereotype:/"; //$NON-NLS-1$
-
- private UMLTableUtils() {
- // to prevent instanciation
- }
-
- /**
- *
- * @param aString
- * a string
- * @return
- * <code>true</code> if the string start with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
- */
- public static final boolean isStringRepresentingStereotypeProperty(String aString) {
- return aString.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX);
- }
-
- /**
- *
- * @param anAxis
- * an object axis
- * @return
- * <code>true</code> if the axis represents a property of stereotype (so a string starting with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
- */
- public static final boolean isStringRepresentingStereotypeProperty(Object anAxis) {
- anAxis = AxisUtils.getRepresentedElement(anAxis);
- if (anAxis instanceof String) {
- return isStringRepresentingStereotypeProperty((String) anAxis);
- }
- return false;
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
- */
- public static Property getRealStereotypeProperty(final EObject eobject, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (eobject instanceof Element) {
- final Element element = (Element) eobject;
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
-
- // 1. we check if the profile is applied on the nearest package
- if (element.getNearestPackage() != null) {
- final Profile profile = element.getNearestPackage().getAppliedProfile(profileQN, true);
- if (profile != null) {
- final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
- return (Property) ste.getMember(propertyName);
- }
- }
-
- // 2. if not, the profile could be applied on a sub-package of the nearest package
- /* the table can show element which are not children of its context, so the profile could not be available in its context */
- return getProperty(element.getNearestPackage().getNestedPackages(), propertyQN);
- }
- return null;
- }
-
- /**
- *
- * @param packages
- * a list of package
- * @param propertyQN
- * the qualified name of the wanted property
- * @return
- * the property or <code>null</code> if not found
- */
- protected static Property getProperty(Collection<Package> packages, String propertyQN) {
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
- for (Package package1 : packages) {
- for (Profile prof : package1.getAppliedProfiles()) {
- if (prof.getQualifiedName().equals(profileQN)) {
- NamedElement ste = prof.getMember(stereotypeName);
- if (ste instanceof Stereotype) {
- NamedElement prop = ((Stereotype) ste).getMember(propertyName);
- if (prop instanceof Property && prop.getQualifiedName().equals(propertyQN)) {
- return (Property) prop;
- }
- }
- }
- Property p = getProperty(package1.getNestedPackages(), propertyQN);
- if (p != null) {
- return p;
- }
- }
- }
- return null;
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- * @return
- * a list of enumerator which contains the available literal
- */
- public static final List<Enumerator> getLiteralsToTypeProperty(final EObject modelElement, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (modelElement instanceof Element) {
- final Property property = UMLTableUtils.getRealStereotypeProperty(modelElement, id);
- final Stereotype current = (Stereotype) property.getOwner();
-
- EClass stereotypeDef = (EClass) current.getProfile().getDefinition(current);
- EStructuralFeature feature = stereotypeDef.getEStructuralFeature(property.getName());
- EEnum eenum = null;
- if (feature != null && feature.getEType() instanceof EEnum) {
- eenum = (EEnum) feature.getEType();
- }
-
- if (eenum != null) {
- final List<Enumerator> literals = new ArrayList<Enumerator>();
- for (EEnumLiteral literal : eenum.getELiterals()) {
- Enumerator value = literal.getInstance();
- literals.add(value);
- }
- return literals;
- }
- }
- return Collections.emptyList();
-
- }
-
- /**
- *
- * @param eobject
- * an element of the model (currently, if it is not an UML::Element, we can't find the property)
- * @param id
- * the id used to identify the property of the stereotype
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
- */
- public static Property getRealStereotypeProperty(final EObject eobject, final String id, final Map<?, ?> sharedMap) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- if (eobject instanceof Element) {
- final Element element = (Element) eobject;
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
- final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
- final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
- final Package nearestPackage;
- if (sharedMap != null) {
- final Element context = (Element) sharedMap.get(Constants.PASTED_ELEMENT_CONTAINER_KEY);
- nearestPackage = context.getNearestPackage();
- } else {
- nearestPackage = element.getNearestPackage();
- }
- if (nearestPackage != null) {
- final Profile profile = nearestPackage.getAppliedProfile(profileQN, true);
- if (profile != null) {
- final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
- return (Property) ste.getMember(propertyName);
- }
- }
-
- }
- return null;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getAppliedStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- *
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getApplicableStereotypesWithThisProperty(final Element element, final String id) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getApplicableStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param element
- * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
- * @param id
- * the id used to identify the property of the stereotype
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
- * we can't resolve it (the required profile is not applied)
- */
- public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id, Map<?, ?> sharedMap) {
- Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
- final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
- if (sharedMap != null) {
- final List<StereotypeApplicationStructure> struct = findStereotypeApplicationDataStructure(element, id, sharedMap);
- if (struct != null) {
- for (final StereotypeApplicationStructure current : struct) {
- stereotypes.add(current.getStereotype());
- }
- }
- }
- if (element.eResource() != null) {
- final Object prop = getRealStereotypeProperty(element, id, sharedMap);
- if (prop instanceof Property) {
- for (final Stereotype current : element.getAppliedStereotypes()) {
- if (current.getAllAttributes().contains(prop)) {
- stereotypes.add(current);
- }
- }
- }
- }
- return stereotypes;
- }
-
- /**
- *
- * @param editedElement
- * the edited element
- * @param id
- * the id of the edited stereotype feature
- * @param sharedMap
- * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
- * application and so on
- * @return
- * the list of the found data structure or <code>null</code> if not found
- */
- public static final List<StereotypeApplicationStructure> findStereotypeApplicationDataStructure(final Element editedElement, final String id, final Map<?, ?> sharedMap) {
- // TODO : enhance the data structure to look for an editedElement + a propQn as Key!
- @SuppressWarnings("unchecked")
- List<StereotypeApplicationStructure> list = (List<StereotypeApplicationStructure>) sharedMap.get(editedElement);
- if (list != null && !list.isEmpty()) {
- final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
- for (final StereotypeApplicationStructure current : list) {
- if (current.getProperty().getQualifiedName().equals(propertyQN)) {
- return Collections.singletonList(current);// TODO : doesn't manage when several stereotype with the same property are applied
- }
- }
- }
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EEnumLiteral;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.CrossAxisWrapper;
+import org.eclipse.papyrus.uml.nattable.paste.StereotypeApplicationStructure;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ *
+ * This class provides useful methods to manage stereotypes in the table
+ *
+ */
+public class UMLTableUtils {
+
+ public static final String PROPERTY_OF_STEREOTYPE_PREFIX = "property_of_stereotype:/"; //$NON-NLS-1$
+
+ private UMLTableUtils() {
+ // to prevent instanciation
+ }
+
+ /**
+ *
+ * @param aString
+ * a string
+ * @return
+ * <code>true</code> if the string start with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
+ */
+ public static final boolean isStringRepresentingStereotypeProperty(String aString) {
+ return aString.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX);
+ }
+
+ /**
+ *
+ * @param anAxis
+ * an object axis
+ * @return
+ * <code>true</code> if the axis represents a property of stereotype (so a string starting with {@link #PROPERTY_OF_STEREOTYPE_PREFIX}
+ */
+ public static final boolean isStringRepresentingStereotypeProperty(Object anAxis) {
+ anAxis = AxisUtils.getRepresentedElement(anAxis);
+ if (anAxis instanceof String) {
+ return isStringRepresentingStereotypeProperty((String) anAxis);
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param eobject
+ * an element of the model (currently, if it is not an UML::Element, we can't find the property)
+ * @param id
+ * the id used to identify the property of the stereotype
+ *
+ * @return
+ * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
+ */
+ public static Property getRealStereotypeProperty(final EObject eobject, final String id) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ if (eobject instanceof Element) {
+ final Element element = (Element) eobject;
+ final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
+ final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
+ final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
+
+ // 1. we check if the profile is applied on the nearest package
+ if (element.getNearestPackage() != null) {
+ final Profile profile = element.getNearestPackage().getAppliedProfile(profileQN, true);
+ if (profile != null) {
+ final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
+ return (Property) ste.getMember(propertyName);
+ }
+ }
+
+ // 2. if not, the profile could be applied on a sub-package of the nearest package
+ /* the table can show element which are not children of its context, so the profile could not be available in its context */
+ return getProperty(element.getNearestPackage().getNestedPackages(), propertyQN);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param packages
+ * a list of package
+ * @param propertyQN
+ * the qualified name of the wanted property
+ * @return
+ * the property or <code>null</code> if not found
+ */
+ protected static Property getProperty(Collection<Package> packages, String propertyQN) {
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
+ final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
+ final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
+ for (Package package1 : packages) {
+ for (Profile prof : package1.getAppliedProfiles()) {
+ if (prof.getQualifiedName().equals(profileQN)) {
+ NamedElement ste = prof.getMember(stereotypeName);
+ if (ste instanceof Stereotype) {
+ NamedElement prop = ((Stereotype) ste).getMember(propertyName);
+ if (prop instanceof Property && prop.getQualifiedName().equals(propertyQN)) {
+ return (Property) prop;
+ }
+ }
+ }
+ Property p = getProperty(package1.getNestedPackages(), propertyQN);
+ if (p != null) {
+ return p;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param eobject
+ * an element of the model (currently, if it is not an UML::Element, we can't find the property)
+ * @param id
+ * the id used to identify the property of the stereotype
+ * @return
+ * a list of enumerator which contains the available literal
+ */
+ public static final List<Enumerator> getLiteralsToTypeProperty(final EObject modelElement, final String id) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ if (modelElement instanceof Element) {
+ final Property property = UMLTableUtils.getRealStereotypeProperty(modelElement, id);
+ final Stereotype current = (Stereotype) property.getOwner();
+
+ EClass stereotypeDef = (EClass) current.getProfile().getDefinition(current);
+ EStructuralFeature feature = stereotypeDef.getEStructuralFeature(property.getName());
+ EEnum eenum = null;
+ if (feature != null && feature.getEType() instanceof EEnum) {
+ eenum = (EEnum) feature.getEType();
+ }
+
+ if (eenum != null) {
+ final List<Enumerator> literals = new ArrayList<Enumerator>();
+ for (EEnumLiteral literal : eenum.getELiterals()) {
+ Enumerator value = literal.getInstance();
+ literals.add(value);
+ }
+ return literals;
+ }
+ }
+ return Collections.emptyList();
+
+ }
+
+ /**
+ *
+ * @param eobject
+ * an element of the model (currently, if it is not an UML::Element, we can't find the property)
+ * @param id
+ * the id used to identify the property of the stereotype
+ * @param sharedMap
+ * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
+ * application and so on
+ * @return
+ * the UML::Property or <code>null</code> if we can't resolve it (the required profile is not applied)
+ */
+ public static Property getRealStereotypeProperty(final EObject eobject, final String id, final Map<?, ?> sharedMap) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ if (eobject instanceof Element) {
+ final Element element = (Element) eobject;
+ final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ final String stereotypeQN = NamedElementUtil.getParentQualifiedName(propertyQN);
+ final String stereotypeName = NamedElementUtil.getNameFromQualifiedName(stereotypeQN);
+ final String profileQN = NamedElementUtil.getParentQualifiedName(stereotypeQN);
+ final Package nearestPackage;
+ if (sharedMap != null) {
+ final Element context = (Element) sharedMap.get(Constants.PASTED_ELEMENT_CONTAINER_KEY);
+ nearestPackage = context.getNearestPackage();
+ } else {
+ nearestPackage = element.getNearestPackage();
+ }
+ if (nearestPackage != null) {
+ final Profile profile = nearestPackage.getAppliedProfile(profileQN, true);
+ if (profile != null) {
+ final Stereotype ste = profile.getOwnedStereotype(stereotypeName);
+ return (Property) ste.getMember(propertyName);
+ }
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param element
+ * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
+ * @param id
+ * the id used to identify the property of the stereotype
+ *
+ * @return
+ * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
+ * we can't resolve it (the required profile is not applied)
+ */
+ public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
+ if (element.eResource() != null) {
+ final Object prop = getRealStereotypeProperty(element, id);
+ if (prop instanceof Property) {
+ for (final Stereotype current : element.getAppliedStereotypes()) {
+ if (current.getAllAttributes().contains(prop)) {
+ stereotypes.add(current);
+ }
+ }
+ }
+ }
+ return stereotypes;
+ }
+
+ /**
+ *
+ * @param element
+ * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
+ * @param id
+ * the id used to identify the property of the stereotype
+ *
+ * @return
+ * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
+ * we can't resolve it (the required profile is not applied)
+ */
+ public static final List<Stereotype> getApplicableStereotypesWithThisProperty(final Element element, final String id) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
+ if (element.eResource() != null) {
+ final Object prop = getRealStereotypeProperty(element, id);
+ if (prop instanceof Property) {
+ for (final Stereotype current : element.getApplicableStereotypes()) {
+ if (current.getAllAttributes().contains(prop)) {
+ stereotypes.add(current);
+ }
+ }
+ }
+ }
+ return stereotypes;
+ }
+
+ /**
+ *
+ * @param element
+ * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
+ * @param id
+ * the id used to identify the property of the stereotype
+ * @param sharedMap
+ * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
+ * application and so on
+ * @return
+ * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
+ * we can't resolve it (the required profile is not applied)
+ */
+ public static final List<Stereotype> getAppliedStereotypesWithThisProperty(final Element element, final String id, Map<?, ?> sharedMap) {
+ Assert.isTrue(id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX));
+ final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
+ if (sharedMap != null) {
+ final List<StereotypeApplicationStructure> struct = findStereotypeApplicationDataStructure(element, id, sharedMap);
+ if (struct != null) {
+ for (final StereotypeApplicationStructure current : struct) {
+ stereotypes.add(current.getStereotype());
+ }
+ }
+ }
+ if (element.eResource() != null) {
+ final Object prop = getRealStereotypeProperty(element, id, sharedMap);
+ if (prop instanceof Property) {
+ for (final Stereotype current : element.getAppliedStereotypes()) {
+ if (current.getAllAttributes().contains(prop)) {
+ stereotypes.add(current);
+ }
+ }
+ }
+ }
+ return stereotypes;
+ }
+
+ /**
+ *
+ * @param editedElement
+ * the edited element
+ * @param id
+ * the id of the edited stereotype feature
+ * @param sharedMap
+ * a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
+ * application and so on
+ * @return
+ * the list of the found data structure or <code>null</code> if not found
+ */
+ public static final List<StereotypeApplicationStructure> findStereotypeApplicationDataStructure(final Element editedElement, final String id, final Map<?, ?> sharedMap) {
+ // TODO : enhance the data structure to look for an editedElement + a propQn as Key!
+ @SuppressWarnings("unchecked")
+ List<StereotypeApplicationStructure> list = (List<StereotypeApplicationStructure>) sharedMap.get(editedElement);
+ if (list != null && !list.isEmpty()) {
+ final String propertyQN = id.replace(UMLTableUtils.PROPERTY_OF_STEREOTYPE_PREFIX, ""); //$NON-NLS-1$
+ for (final StereotypeApplicationStructure current : list) {
+ if (current.getProperty().getQualifiedName().equals(propertyQN)) {
+ return Collections.singletonList(current);// TODO : doesn't manage when several stereotype with the same property are applied
+ }
+ }
+ }
+ return null;
+ }
+
+ // currently consisder this method as internal
+ public static CrossAxisWrapper<EObject, EStructuralFeature> getRealEditedObject(final ILayerCell layerCell, ITableAxisElementProvider manager) {
+ int columnIndex = layerCell.getColumnIndex();
+ int rowIndex = layerCell.getRowIndex();
+ Object row = manager.getRowElement(rowIndex);
+ Object column = manager.getColumnElement(columnIndex);
+ row = AxisUtils.getRepresentedElement(row);
+ column = AxisUtils.getRepresentedElement(column);
+ Element editedElement = null;
+ Object feature = null;
+ if (row instanceof Element && !(column instanceof Element)) {
+ editedElement = (Element) row;
+ feature = column;
+ } else if (column instanceof Element && !(row instanceof Element)) {
+ editedElement = (Element) column;
+ feature = row;
+ } else {
+ return null;
+ }
+
+ EStructuralFeature realFeature = null;
+ EObject realEditedObject = null;
+// Stereotype stereotype = null;
+ List<Stereotype> stereotypesWithEditedFeatureAppliedOnElement = null;
+ if (feature instanceof EStructuralFeature) {
+ realFeature = (EStructuralFeature) feature;
+ realEditedObject = editedElement;
+ } else if (feature instanceof String && ((String) feature).startsWith(PROPERTY_OF_STEREOTYPE_PREFIX)) {
+ final String id = AxisUtils.getPropertyId(feature);
+ stereotypesWithEditedFeatureAppliedOnElement = UMLTableUtils.getAppliedStereotypesWithThisProperty(editedElement, id);
+// stereotype = stereotypesWithEditedFeatureAppliedOnElement.get(0);
+ realEditedObject = editedElement.getStereotypeApplication(stereotypesWithEditedFeatureAppliedOnElement.get(0));
+ Property prop = UMLTableUtils.getRealStereotypeProperty(editedElement, id);
+ realFeature = realEditedObject.eClass().getEStructuralFeature(prop.getName());
+ }
+ if (stereotypesWithEditedFeatureAppliedOnElement != null && stereotypesWithEditedFeatureAppliedOnElement.size() > 1) {
+ // TODO : not yet managed
+ return null;
+ }
+
+ if (realEditedObject != null && realFeature != null) {
+ return new CrossAxisWrapper<EObject, EStructuralFeature>(realEditedObject, realFeature);
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java
index 0c9546dff31..b6ee04a8b5a 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/widget/UMLDialogComboAction.java
@@ -25,10 +25,10 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
import org.eclipse.papyrus.infra.nattable.celleditor.AbstractComboAction;
import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
-import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
import org.eclipse.papyrus.uml.nattable.Activator;
import org.eclipse.papyrus.uml.nattable.dataprovider.UMLSingleReferenceComboBoxDataProvider;
import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
index e53fc7c4b6c..18037adb042 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
@@ -1,27 +1,26 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui;bundle-version="3.105.0",
- org.eclipse.ui.forms;bundle-version="3.6.0",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.0",
- org.eclipse.emf.ecore;bundle-version="2.9.0",
- org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
- org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.7.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.1.0",
- org.eclipse.xtext;bundle-version="2.4.2",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.properties;bundle-version="1.1.0",
- org.eclipse.papyrus.views.properties;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.xtext;singleto
- n:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui;bundle-version="3.105.0",
+ org.eclipse.ui.forms;bundle-version="3.6.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.6.0",
+ org.eclipse.emf.ecore;bundle-version="2.9.0",
+ org.eclipse.gmf.runtime.common.core;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.diagram.ui.properties;bundle-version="1.7.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.1.0",
+ org.eclipse.xtext;bundle-version="2.4.2",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.properties;bundle-version="1.1.0",
+ org.eclipse.papyrus.views.properties;bundle-version="1.1.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.properties.xtext;singleto
+ n:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java
new file mode 100644
index 00000000000..a990905d246
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/UMLXtextReferenceValueEditor.java
@@ -0,0 +1,346 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.textual.editors.example.widget;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
+import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog;
+import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.papyrus.uml.xtext.integration.StyledTextXtextAdapter;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * This class provides a ReferenceValueEditor, with a text field with the xtext
+ * completion and syntax instead of the CLabel.
+ */
+public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
+ implements IContextElementProvider, SelectionListener {
+
+ /**
+ * The xtext adapter.
+ */
+ private StyledTextXtextAdapter xtextAdapter;
+
+ /**
+ * The xtext direct editor configuration used.
+ */
+ private DefaultXtextDirectEditorConfiguration configuration;
+
+ /**
+ * The context element adapter.
+ */
+ final private ContextElementAdapter contextElementAdapter = new ContextElementAdapter(
+ this);
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ */
+ public UMLXtextReferenceValueEditor(final Composite parent, final int style) {
+ super(parent, style);
+ styledTextStringEditor.getText().addFocusListener(new FocusListener() {
+
+ public void focusLost(FocusEvent e) {
+ IParser parser = getParser();
+ if (null == xtextAdapter) {
+ return;
+ }
+
+ if (null != xtextAdapter
+ && null != xtextAdapter.getCompletionProposalAdapter()
+ && xtextAdapter.getCompletionProposalAdapter()
+ .delayedIsPopupOpen()) {
+ // ignore focus lost
+ return;
+ }
+ manageParserCommand(parser);
+ }
+
+ public void focusGained(FocusEvent e) {
+ // Nothing
+ }
+ });
+ }
+
+ /**
+ * This allow to manage the parser command.
+ *
+ * @param parser
+ * The parser used.
+ */
+ protected void manageParserCommand(final IParser parser) {
+ if (null != parser) {
+ ICommand command = null;
+ if (null != modelProperty
+ && modelProperty.getValueType() instanceof EStructuralFeature) {
+ command = parser.getParseCommand(new EObjectAdapter(
+ (EStructuralFeature) modelProperty.getValueType()),
+ styledTextStringEditor.getText().getText(), 0);
+ } else {
+ command = parser.getParseCommand(new EObjectAdapter(
+ (EObject) getValue()), styledTextStringEditor.getText()
+ .getText(), 0);
+ }
+
+ TransactionalEditingDomain domain = TransactionUtil
+ .getEditingDomain(getContextElement());
+ if (null == domain) {
+ // can be null for opaque expression that have been
+ // created but have not been added to parent
+ // try to get resource set from nested dialog context
+ ResourceSet rs = NestedEditingDialogContext.getInstance()
+ .getResourceSet();
+ domain = TransactionUtil.getEditingDomain(rs);
+ }
+ if (null != domain) {
+ domain.getCommandStack().execute(
+ new GMFtoEMFCommandWrapper(command));
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite,
+ * java.lang.String, int)
+ */
+ @Override
+ protected StyledTextStringEditor createStyledTextStringEditor(
+ final Composite parent, final String initialValue, final int style) {
+ // Change the style to set the singleText to a single line
+ int createdStyle = style | SWT.SINGLE;
+ return new StyledTextStringEditor(parent, createdStyle) {
+ public StyledText createStyledText(Composite parent, String value,
+ int createdStyle) {
+ StyledText txt = new StyledText(parent, createdStyle);
+ if (null != labelProvider) {
+ txt.setText(labelProvider.getText(getValue()));
+ }
+ return txt;
+ }
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#update()
+ */
+ @Override
+ public void update() {
+ super.update();
+ updateControls();
+ }
+
+ /**
+ * This allow to update the xtext adapter for the styled text.
+ *
+ * @param styledText
+ * The styled text which one to adapt the xtext adapter.
+ */
+ protected void updateXtextAdapters(final Control styledText) {
+ final Object oldObjectToEdit = null != configuration ? configuration
+ .getObjectToEdit() : null;
+
+ final DefaultXtextDirectEditorConfiguration newConfiguration = getConfigurationFromSelection();
+ // Check if configuration has changed and update adapters
+ if (null != newConfiguration && newConfiguration != configuration) {
+ if (null != xtextAdapter) {
+ xtextAdapter.getFakeResourceContext().getFakeResource()
+ .eAdapters().remove(contextElementAdapter);
+ }
+ configuration = newConfiguration;
+ xtextAdapter = new StyledTextXtextAdapter(
+ configuration.getInjector());
+
+ EObject semanticElement = (EObject) getValue();
+ if (null != semanticElement) {
+ newConfiguration.preEditAction(semanticElement);
+ }
+
+ xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters()
+ .add(contextElementAdapter);
+ xtextAdapter.adapt((StyledText) styledText);
+ }
+
+ if (null != configuration
+ && configuration.getObjectToEdit() != oldObjectToEdit) {
+ IContextElementProvider provider = configuration
+ .getContextProvider();
+ if (provider instanceof IContextElementProviderWithInit) {
+ // update resource, if required by text editor
+ if (null != xtextAdapter) {
+ ((IContextElementProviderWithInit) provider)
+ .initResource(xtextAdapter.getFakeResourceContext()
+ .getFakeResource());
+ }
+ }
+ }
+ }
+
+ /**
+ * This allow to get the xtext direct editor configuration depending on the
+ * value of the styled text.
+ *
+ * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding.
+ */
+ protected DefaultXtextDirectEditorConfiguration getConfigurationFromSelection() {
+ DefaultXtextDirectEditorConfiguration result = null;
+ final Object feature = modelProperty.getValueType();
+ if (null != feature && feature instanceof EStructuralFeature) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = ((EStructuralFeature) feature)
+ .getEType().getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfiguration(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ final Object contextElement = getContextElement();
+ if (null != contextElement
+ && contextElement instanceof EObject) {
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration
+ .preEditAction(((EObject) contextElement)
+ .eGet((EStructuralFeature) feature));
+ result = xtextConfiguration;
+ }
+ }
+ }
+ }
+
+ if (null == result) {
+ EObject semanticElement = (EObject) getValue();
+
+ if (null != semanticElement) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = semanticElement.eClass()
+ .getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfiguration(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration.preEditAction(semanticElement);
+ return xtextConfiguration;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get the parser corresponding to the value.
+ *
+ * @return The {@link IParser}
+ */
+ protected IParser getParser() {
+ EObject parentSemanticElement = null;
+ final Object contextElement = getContextElement();
+ if (null != contextElement && contextElement instanceof EObject) {
+ parentSemanticElement = (EObject) contextElement;
+ }
+ if (null != configuration && null != parentSemanticElement) {
+ return configuration.createParser(parentSemanticElement);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc} Update the xtext adapter.
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+ updateXtextAdapters(styledTextStringEditor.getText());
+ styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ updateLabel();
+ }
+
+ /**
+ * {@inheritDoc} Dispose the xtext adapter.
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ // dispose resources to avoid memory leaks
+ if (null != styledTextStringEditor) {
+ styledTextStringEditor.dispose();
+ }
+ if (null != xtextAdapter) {
+ xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters()
+ .remove(contextElementAdapter);
+ xtextAdapter.dispose();
+ xtextAdapter = null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider#getContextObject()
+ */
+ @Override
+ public EObject getContextObject() {
+ final Object value = getValue();
+ return value instanceof EObject ? (EObject) value : null;
+ }
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi
new file mode 100644
index 00000000000..0addaed8040
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ASCII"?>
+<environment:Environment
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <propertyEditorTypes
+ label="Xtext Reference Editor"
+ widgetClass="UMLStyledTextReferenceDialog"
+ namespace="//@namespaces.0"/>
+ <namespaces
+ name="xtexteditor"
+ value="org.eclipse.papyrus.uml.properties.xtext.widget.property"/>
+</environment:Environment>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml
index d3f366ccdb7..73b22f1d0bf 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/plugin.xml
@@ -1,11 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.uml.properties.languageEditor">
- <editor
- editor="org.eclipse.papyrus.uml.properties.xtext.XtextLanguageEditor"
- language="OCL">
- </editor>
- </extension>
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.uml.properties.languageEditor">
+ <editor
+ editor="org.eclipse.papyrus.uml.properties.xtext.XtextLanguageEditor"
+ language="OCL">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.views.properties.environment">
+ <environment
+ environmentModel="model/environment.xmi">
+ </environment>
+ </extension>
+</plugin>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java
new file mode 100644
index 00000000000..182ff901e2b
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java
@@ -0,0 +1,346 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.xtext.widget;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
+import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog;
+import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.papyrus.uml.xtext.integration.StyledTextXtextAdapter;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProviderWithInit;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * This class provides a ReferenceValueEditor, with a text field with the xtext
+ * completion and syntax instead of the CLabel.
+ */
+public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
+ implements IContextElementProvider, SelectionListener {
+
+ /**
+ * The xtext adapter.
+ */
+ private StyledTextXtextAdapter xtextAdapter;
+
+ /**
+ * The xtext direct editor configuration used.
+ */
+ private DefaultXtextDirectEditorConfiguration configuration;
+
+ /**
+ * The context element adapter.
+ */
+ final private ContextElementAdapter contextElementAdapter = new ContextElementAdapter(
+ this);
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ */
+ public UMLXtextReferenceValueEditor(final Composite parent, final int style) {
+ super(parent, style);
+ styledTextStringEditor.getText().addFocusListener(new FocusListener() {
+
+ public void focusLost(FocusEvent e) {
+ IParser parser = getParser();
+ if (null == xtextAdapter) {
+ return;
+ }
+
+ if (null != xtextAdapter
+ && null != xtextAdapter.getCompletionProposalAdapter()
+ && xtextAdapter.getCompletionProposalAdapter()
+ .delayedIsPopupOpen()) {
+ // ignore focus lost
+ return;
+ }
+ manageParserCommand(parser);
+ }
+
+ public void focusGained(FocusEvent e) {
+ // Nothing
+ }
+ });
+ }
+
+ /**
+ * This allow to manage the parser command.
+ *
+ * @param parser
+ * The parser used.
+ */
+ protected void manageParserCommand(final IParser parser) {
+ if (null != parser) {
+ ICommand command = null;
+ if (null != modelProperty
+ && modelProperty.getValueType() instanceof EStructuralFeature) {
+ command = parser.getParseCommand(new EObjectAdapter(
+ (EStructuralFeature) modelProperty.getValueType()),
+ styledTextStringEditor.getText().getText(), 0);
+ } else {
+ command = parser.getParseCommand(new EObjectAdapter(
+ (EObject) getValue()), styledTextStringEditor.getText()
+ .getText(), 0);
+ }
+
+ TransactionalEditingDomain domain = TransactionUtil
+ .getEditingDomain(getContextElement());
+ if (null == domain) {
+ // can be null for opaque expression that have been
+ // created but have not been added to parent
+ // try to get resource set from nested dialog context
+ ResourceSet rs = NestedEditingDialogContext.getInstance()
+ .getResourceSet();
+ domain = TransactionUtil.getEditingDomain(rs);
+ }
+ if (null != domain) {
+ domain.getCommandStack().execute(
+ new GMFtoEMFCommandWrapper(command));
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#createStyledTextStringEditor(org.eclipse.swt.widgets.Composite,
+ * java.lang.String, int)
+ */
+ @Override
+ protected StyledTextStringEditor createStyledTextStringEditor(
+ final Composite parent, final String initialValue, final int style) {
+ // Change the style to set the singleText to a single line
+ int createdStyle = style | SWT.SINGLE;
+ return new StyledTextStringEditor(parent, createdStyle) {
+ public StyledText createStyledText(Composite parent, String value,
+ int createdStyle) {
+ StyledText txt = new StyledText(parent, createdStyle);
+ if (null != labelProvider) {
+ txt.setText(labelProvider.getText(getValue()));
+ }
+ return txt;
+ }
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#update()
+ */
+ @Override
+ public void update() {
+ super.update();
+ updateControls();
+ }
+
+ /**
+ * This allow to update the xtext adapter for the styled text.
+ *
+ * @param styledText
+ * The styled text which one to adapt the xtext adapter.
+ */
+ protected void updateXtextAdapters(final Control styledText) {
+ final Object oldObjectToEdit = null != configuration ? configuration
+ .getObjectToEdit() : null;
+
+ final DefaultXtextDirectEditorConfiguration newConfiguration = getConfigurationFromSelection();
+ // Check if configuration has changed and update adapters
+ if (null != newConfiguration && newConfiguration != configuration) {
+ if (null != xtextAdapter) {
+ xtextAdapter.getFakeResourceContext().getFakeResource()
+ .eAdapters().remove(contextElementAdapter);
+ }
+ configuration = newConfiguration;
+ xtextAdapter = new StyledTextXtextAdapter(
+ configuration.getInjector());
+
+ EObject semanticElement = (EObject) getValue();
+ if (null != semanticElement) {
+ newConfiguration.preEditAction(semanticElement);
+ }
+
+ xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters()
+ .add(contextElementAdapter);
+ xtextAdapter.adapt((StyledText) styledText);
+ }
+
+ if (null != configuration
+ && configuration.getObjectToEdit() != oldObjectToEdit) {
+ IContextElementProvider provider = configuration
+ .getContextProvider();
+ if (provider instanceof IContextElementProviderWithInit) {
+ // update resource, if required by text editor
+ if (null != xtextAdapter) {
+ ((IContextElementProviderWithInit) provider)
+ .initResource(xtextAdapter.getFakeResourceContext()
+ .getFakeResource());
+ }
+ }
+ }
+ }
+
+ /**
+ * This allow to get the xtext direct editor configuration depending on the
+ * value of the styled text.
+ *
+ * @return The {@link DefaultXtextDirectEditorConfiguration} corresponding.
+ */
+ protected DefaultXtextDirectEditorConfiguration getConfigurationFromSelection() {
+ DefaultXtextDirectEditorConfiguration result = null;
+ final Object feature = modelProperty.getValueType();
+ if (null != feature && feature instanceof EStructuralFeature) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = ((EStructuralFeature) feature)
+ .getEType().getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfigurationWithPriority(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ final Object contextElement = getContextElement();
+ if (null != contextElement
+ && contextElement instanceof EObject) {
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration
+ .preEditAction(((EObject) contextElement)
+ .eGet((EStructuralFeature) feature));
+ result = xtextConfiguration;
+ }
+ }
+ }
+ }
+
+ if (null == result) {
+ EObject semanticElement = (EObject) getValue();
+
+ if (null != semanticElement) {
+ IPreferenceStore store = Activator.getDefault()
+ .getPreferenceStore();
+ String semanticClassName = semanticElement.eClass()
+ .getInstanceClassName();
+
+ String key = IDirectEditorsIds.EDITOR_FOR_ELEMENT
+ + semanticClassName;
+ String languagePreferred = store.getString(key);
+
+ if (languagePreferred != null && !languagePreferred.equals("")) { //$NON-NLS-1$
+ IDirectEditorConfiguration configuration = DirectEditorsUtil
+ .findEditorConfigurationWithPriority(languagePreferred,
+ semanticClassName);
+ if (configuration instanceof DefaultXtextDirectEditorConfiguration) {
+
+ DefaultXtextDirectEditorConfiguration xtextConfiguration = (DefaultXtextDirectEditorConfiguration) configuration;
+ xtextConfiguration.preEditAction(semanticElement);
+ return xtextConfiguration;
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get the parser corresponding to the value.
+ *
+ * @return The {@link IParser}
+ */
+ protected IParser getParser() {
+ EObject parentSemanticElement = null;
+ final Object contextElement = getContextElement();
+ if (null != contextElement && contextElement instanceof EObject) {
+ parentSemanticElement = (EObject) contextElement;
+ }
+ if (null != configuration && null != parentSemanticElement) {
+ return configuration.createParser(parentSemanticElement);
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc} Update the xtext adapter.
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+ updateXtextAdapters(styledTextStringEditor.getText());
+ styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ updateLabel();
+ }
+
+ /**
+ * {@inheritDoc} Dispose the xtext adapter.
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog#dispose()
+ *
+ */
+ @Override
+ public void dispose() {
+ // dispose resources to avoid memory leaks
+ if (null != styledTextStringEditor) {
+ styledTextStringEditor.dispose();
+ }
+ if (null != xtextAdapter) {
+ xtextAdapter.getFakeResourceContext().getFakeResource().eAdapters()
+ .remove(contextElementAdapter);
+ xtextAdapter.dispose();
+ xtextAdapter = null;
+ }
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider#getContextObject()
+ */
+ public EObject getContextObject() {
+ final Object value = getValue();
+ return value instanceof EObject ? (EObject) value : null;
+ }
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java
new file mode 100644
index 00000000000..b3dc3dda2fd
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/UMLStyledTextReferenceDialog.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.xtext.widget.property;
+
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.uml.properties.xtext.widget.UMLXtextReferenceValueEditor;
+import org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * An editor representing a single reference in a StyledText widget with
+ * completion . A filtered selection dialog is used to edit the value. Also
+ * offers support for unsetting the value. This Editor needs a ContentProvider,
+ * and may use an optional LabelProvider, describing the objects that can be
+ * referred by this property.
+ */
+public class UMLStyledTextReferenceDialog extends AbstractPropertyEditor {
+
+ /**
+ * The ValueFactory used to create or edit Objects directly from this
+ * editor.
+ */
+ protected ReferenceValueFactory factory;
+
+ /**
+ * The SimpleTextReferenceDialog widget.
+ */
+ protected UMLXtextReferenceValueEditor editor;
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ */
+ public UMLStyledTextReferenceDialog(final Composite parent, final int style) {
+ setEditor(createReferenceDialog(parent, style));
+ }
+
+ /**
+ * Creates the reference dialog.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ * @return The reference dialog.
+ */
+ protected UMLXtextReferenceValueEditor createReferenceDialog(
+ final Composite parent, final int style) {
+ return editor = new UMLXtextReferenceValueEditor(parent, style);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ IStaticContentProvider provider = input
+ .getContentProvider(propertyPath);
+ editor.setLabelProvider(input.getLabelProvider(propertyPath));
+ editor.setContentProvider(provider);
+ editor.setDirectCreation(input.getDirectCreation(propertyPath));
+ editor.setMandatory(input.isMandatory(propertyPath));
+ if (null == factory) {
+ // Use the default factory from the DataSource
+ editor.setValueFactory(input.getValueFactory(propertyPath));
+ } else {
+ // Use the factory explicitly specified
+ editor.setValueFactory(factory);
+ }
+
+ super.doBinding();
+ }
+
+ /**
+ * Sets the ValueFactory used to create or edit Objects directly from this
+ * editor.
+ *
+ * @param factory
+ * The reference value factory.
+ */
+ public void setFactory(final ReferenceValueFactory factory) {
+ this.factory = factory;
+ editor.setValueFactory(factory);
+ }
+
+ /**
+ * Get the factory.
+ *
+ * @return The ValueFactory used to create or edit Objects directly from
+ * this editor.
+ */
+ public ReferenceValueFactory getFactory() {
+ return factory;
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
index 18825d8960d..3c64b7587eb 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java
@@ -30,9 +30,11 @@ import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.emf.databinding.EMFProperties;
import org.eclipse.emf.databinding.FeaturePath;
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.emf.ecore.ETypedElement;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -43,6 +45,8 @@ import org.eclipse.papyrus.infra.emf.utils.ProviderHelper;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.providers.EmptyContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.util.INameResolutionHelper;
+import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
import org.eclipse.papyrus.uml.properties.creation.ConnectorTypeEditorFactory;
import org.eclipse.papyrus.uml.properties.creation.MessageValueSpecificationFactory;
import org.eclipse.papyrus.uml.properties.creation.OwnedRuleCreationFactory;
@@ -57,9 +61,12 @@ import org.eclipse.papyrus.uml.tools.providers.ConstrainedElementContentProvider
import org.eclipse.papyrus.uml.tools.providers.UMLContainerContentProvider;
import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
import org.eclipse.papyrus.uml.tools.providers.UMLFilteredLabelProvider;
+import org.eclipse.papyrus.uml.tools.util.UMLReferenceConverter;
+import org.eclipse.papyrus.uml.tools.utils.NameResolutionHelper;
import org.eclipse.papyrus.views.properties.modelelement.EMFModelElement;
import org.eclipse.papyrus.views.properties.providers.FeatureContentProvider;
import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.Message;
import org.eclipse.uml2.uml.ParameterDirectionKind;
@@ -284,4 +291,38 @@ public class UMLModelElement extends EMFModelElement {
return null;
}
+ /**
+ * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#getNameResolutionHelper(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ @Override
+ public INameResolutionHelper getNameResolutionHelper(String propertyPath) {
+ EObject source = getSource();
+ Object feature = getFeature(propertyPath);
+ if (feature instanceof EStructuralFeature && source instanceof Element) {
+ EStructuralFeature f = (EStructuralFeature) feature;
+ EClassifier etype = f.getEType();
+ if (etype instanceof EClass) {
+ return new NameResolutionHelper((Element) source, (EClass) etype);
+ }
+ }
+ return super.getNameResolutionHelper(propertyPath);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement#getPapyrusConverter(java.lang.String)
+ *
+ * @param propertyPath
+ * @return
+ */
+ public IPapyrusConverter getPapyrusConverter(String propertyPath) {
+ INameResolutionHelper helper = getNameResolutionHelper(propertyPath);
+ if (helper != null) {
+ return new UMLReferenceConverter(helper, getFeature(propertyPath).isMany());
+ }
+ return null;
+ }
}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath
new file mode 100644
index 00000000000..59cf3977c7e
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project
new file mode 100644
index 00000000000..b8b4db247c1
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..c585cc455ae
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+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/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..cc192f084a3
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline,
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.quickfix
+Bundle-ActivationPolicy: lazy
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.xtext.ui,
+ org.eclipse.xtext.ui.shared,
+ org.eclipse.ui.editors,
+ org.eclipse.xtext.builder,
+ org.antlr.runtime,
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.gmf.runtime.diagram.ui,
+ org.eclipse.papyrus.extensionpoints.editors;bundle-version="1.0.2",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.2",
+ org.eclipse.uml2.uml,
+ org.apache.log4j,
+ org.eclipse.papyrus.uml.alf.common.ui;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.2",
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils;bundle-version="1.0.2"
+Bundle-Vendor: %providerName
+Bundle-Version: 1.0.2.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;singleton:=true
+Import-Package: org.apache.log4j
+Bundle-Description: %pluginDescription
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties
new file mode 100644
index 00000000000..7673e8696ef
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/build.properties
@@ -0,0 +1,9 @@
+source.. = src/,\
+ src-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties
new file mode 100644
index 00000000000..9b53717031e
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.properties
@@ -0,0 +1,13 @@
+#################################################################################
+# Copyright (c) 2015 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - initial API and implementation
+##################################################################################
+pluginName=Papyrus ValueSpecification xtext ui direct editor
+providerName=Eclipse Modeling Project
+pluginDescription=This allow to define the xtext ui editor for the ValueSpecification object \ No newline at end of file
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml
new file mode 100644
index 00000000000..7e54fcea8eb
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="umlvaluespecification"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <!-- copy qualified name -->
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
+ <activeWhen>
+ <and>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened">
+ <and>
+ <reference definitionId="isXtextEditorActive"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.embeddededitors"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"
+ label="UmlValueSpecification"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"
+ name="Validate">
+ </command>
+ <!-- copy qualified name -->
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <!-- copy qualified name -->
+ <menuContribution locationURI="popup:#TextEditorContext?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="menu:edit?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="umlvaluespecification">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="umlvaluespecification">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification -->
+ <extension
+ id="umlvaluespecification.check.fast"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="umlvaluespecification.check.normal"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="umlvaluespecification.check.expensive"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant">
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.extensionpoints.editors.DirectEditor">
+ <DirectEditor
+ contributor="CEA LIST"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecification.gif"
+ language="Advanced Value Specification Textual Editor"
+ objectToEdit="org.eclipse.uml2.uml.ValueSpecification">
+ <popupeditor
+ editorConfiguration="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.ValueSpecificationXtextDirectEditorConfiguration">
+ </popupeditor>
+ <Priority
+ name="Lowest">
+ </Priority>
+ </DirectEditor>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen
new file mode 100644
index 00000000000..ec5bf5b53e0
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml_gen
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
+ contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
+ default="true"
+ extensions="umlvaluespecification"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification Editor">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
+ commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
+ commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ <!-- copy qualified name -->
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
+ <activeWhen>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
+ commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
+ <activeWhen>
+ <and>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension point="org.eclipse.core.expressions.definitions">
+ <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ <and>
+ <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ <definition id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened">
+ <and>
+ <reference definitionId="isXtextEditorActive"/>
+ <with variable="activeEditor">
+ <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
+ value="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ forcePluginActivation="true"/>
+ </with>
+ </and>
+ </definition>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.coloring"
+ name="Syntax Coloring">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.templates"
+ name="Templates">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ name="UmlValueSpecification">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"
+ label="UmlValueSpecification"/>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Trigger expensive validation"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"
+ name="Validate">
+ </command>
+ <!-- copy qualified name -->
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ <command
+ id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ categoryId="org.eclipse.ui.category.edit"
+ description="Copy the qualified name for the selected element"
+ name="Copy Qualified Name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.edit">
+ <command
+ commandId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.validate"
+ style="push"
+ tooltip="Trigger expensive validation">
+ <visibleWhen checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <!-- copy qualified name -->
+ <menuContribution locationURI="popup:#TextEditorContext?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="menu:edit?after=copy">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened" />
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
+ <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
+ style="push" tooltip="Copy Qualified Name">
+ <visibleWhen checkEnabled="false">
+ <and>
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.XtextEditor.opened" />
+ <iterate>
+ <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
+ <command commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
+ commandId="org.eclipse.xtext.ui.editor.FindReferences">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+
+<!-- adding resource factories -->
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
+ type="umlvaluespecification">
+ </parser>
+ </extension>
+ <extension point="org.eclipse.xtext.extension_resourceServiceProvider">
+ <resourceServiceProvider
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
+ uriExtension="umlvaluespecification">
+ </resourceServiceProvider>
+ </extension>
+
+
+ <!-- marker definitions for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification -->
+ <extension
+ id="umlvaluespecification.check.fast"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.fast"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="umlvaluespecification.check.normal"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.normal"/>
+ <persistent value="true"/>
+ </extension>
+ <extension
+ id="umlvaluespecification.check.expensive"
+ name="UmlValueSpecification Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.xtext.ui.check.expensive"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.xtext.builder.participant">
+ <participant
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
+ fileExtensions="umlvaluespecification"
+ >
+ </participant>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.preferencePage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ category="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification"
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
+ id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.compiler.propertyPage"
+ name="Compiler">
+ <keywordReference id="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.keyword_UmlValueSpecification"/>
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject"/>
+ </enabledWhen>
+ <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
+ </page>
+ </extension>
+
+ <!-- Quick Outline -->
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
+ commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened">
+ </reference>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ description="Open the quick outline."
+ id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ name="Quick Outline">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:#TextEditorContext?after=group.open">
+ <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
+ style="push"
+ tooltip="Open Quick Outline">
+ <visibleWhen checkEnabled="false">
+ <reference definitionId="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification.Editor.opened"/>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <!-- quickfix marker resolution generator for org.eclipse.papyrus.uml.textedit.valuespecification.xtext.UmlValueSpecification -->
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.fast">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.normal">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ <markerResolutionGenerator
+ class="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
+ markerType="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.umlvaluespecification.check.expensive">
+ <attribute
+ name="FIXABLE_KEY"
+ value="true">
+ </attribute>
+ </markerResolutionGenerator>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml
new file mode 100644
index 00000000000..5ac368df45d
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.0.2-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java
new file mode 100644
index 00000000000..2ba0dd30183
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/AbstractUmlValueSpecificationUiModule.java
@@ -0,0 +1,137 @@
+
+/*
+ * generated by Xtext
+ */
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;
+
+import org.eclipse.xtext.ui.DefaultUiModule;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Manual modifications go to {org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.UmlValueSpecificationUiModule}
+ */
+@SuppressWarnings("all")
+public abstract class AbstractUmlValueSpecificationUiModule extends DefaultUiModule {
+
+ public AbstractUmlValueSpecificationUiModule(AbstractUIPlugin plugin) {
+ super(plugin);
+ }
+
+
+ // contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
+ public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
+ return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.parser.antlr.internal.InternalUmlValueSpecificationLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
+ public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() {
+ return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
+ public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
+ return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() {
+ return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class);
+ }
+
+ // contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
+ return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public Class<? extends org.eclipse.xtext.builder.IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
+ return org.eclipse.xtext.builder.BuilderParticipant.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public org.eclipse.core.resources.IWorkspaceRoot bindIWorkspaceRootToInstance() {
+ return org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot();
+ }
+
+ // contributed by org.eclipse.xtext.generator.generator.GeneratorFragment
+ public void configureBuilderPreferenceStoreInitializer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer.class).annotatedWith(com.google.inject.name.Names.named("builderPreferenceInitializer")).to(org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess.Initializer.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling.UmlValueSpecificationLabelProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
+ public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.labeling.UmlValueSpecificationDescriptionLabelProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline.UmlValueSpecificationOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.outline.UmlValueSpecificationOutlineTreeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.quickfix.UmlValueSpecificationQuickfixProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.UmlValueSpecificationProposalProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() {
+ return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() {
+ return org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.UmlValueSpecificationParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexerProvider(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class));
+ }
+
+ // contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
+ public void configureContentAssistLexer(com.google.inject.Binder binder) {
+ binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationLexer.class);
+ }
+
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java
new file mode 100644
index 00000000000..a87a6e3ac4d
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/UmlValueSpecificationExecutableExtensionFactory.java
@@ -0,0 +1,29 @@
+/*
+ * generated by Xtext
+ */
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;
+
+import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
+import org.osgi.framework.Bundle;
+
+import com.google.inject.Injector;
+
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.internal.UmlValueSpecificationActivator;
+
+/**
+ * This class was generated. Customizations should only happen in a newly
+ * introduced subclass.
+ */
+public class UmlValueSpecificationExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
+
+ @Override
+ protected Bundle getBundle() {
+ return UmlValueSpecificationActivator.getInstance().getBundle();
+ }
+
+ @Override
+ protected Injector getInjector() {
+ return UmlValueSpecificationActivator.getInstance().getInjector(UmlValueSpecificationActivator.ORG_ECLIPSE_PAPYRUS_UML_TEXTEDIT_VALUESPECIFICATION_XTEXT_UMLVALUESPECIFICATION);
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java
new file mode 100644
index 00000000000..19b188d3817
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/AbstractUmlValueSpecificationProposalProvider.java
@@ -0,0 +1,97 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
+import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
+
+/**
+ * Represents a generated, default implementation of superclass {@link org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider}.
+ * Methods are dynamically dispatched on the first parameter, i.e., you can override them
+ * with a more concrete subtype.
+ */
+@SuppressWarnings("all")
+public class AbstractUmlValueSpecificationProposalProvider extends org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider {
+
+ public void completeAbstractRule_Visibility(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeAbstractRule_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeAbstractRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor);
+ completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor);
+ completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor);
+ completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor);
+ completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(4)), context, acceptor);
+ }
+ public void completeAbstractRule_InstanceSpecification(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeAbstractRule_Undefined(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeLiteralBooleanRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ // subclasses may override
+ }
+ public void completeLiteralIntegerOrUnlimitedNaturalRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeLiteralRealRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeLiteralNullRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void completeLiteralStringRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+ }
+ public void completeUndefinedRule_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void completeVisibilityKind_Public(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void completeVisibilityKind_Private(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void completeVisibilityKind_Protected(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void completeVisibilityKind_Package(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+
+ public void complete_AbstractRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_LiteralBooleanRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_LiteralIntegerOrUnlimitedNaturalRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_LiteralRealRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_DOUBLE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_LiteralNullRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_LiteralStringRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_UndefinedRule(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+ public void complete_VisibilityKind(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
+ // subclasses may override
+ }
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java
new file mode 100644
index 00000000000..43100c04479
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/UmlValueSpecificationParser.java
@@ -0,0 +1,91 @@
+/*
+* generated by Xtext
+*/
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.antlr.runtime.RecognitionException;
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+
+import com.google.inject.Inject;
+
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess;
+
+public class UmlValueSpecificationParser extends AbstractContentAssistParser {
+
+ @Inject
+ private UmlValueSpecificationGrammarAccess grammarAccess;
+
+ private Map<AbstractElement, String> nameMappings;
+
+ @Override
+ protected org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser createParser() {
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser result = new org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser(null);
+ result.setGrammarAccess(grammarAccess);
+ return result;
+ }
+
+ @Override
+ protected String getRuleName(AbstractElement element) {
+ if (nameMappings == null) {
+ nameMappings = new HashMap<AbstractElement, String>() {
+ private static final long serialVersionUID = 1L;
+ {
+ put(grammarAccess.getAbstractRuleAccess().getAlternatives(), "rule__AbstractRule__Alternatives");
+ put(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2(), "rule__AbstractRule__Alternatives_0_2");
+ put(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0(), "rule__AbstractRule__ValueAlternatives_0_2_0_0");
+ put(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0(), "rule__LiteralBooleanRule__ValueAlternatives_0");
+ put(grammarAccess.getVisibilityKindAccess().getAlternatives(), "rule__VisibilityKind__Alternatives");
+ put(grammarAccess.getAbstractRuleAccess().getGroup_0(), "rule__AbstractRule__Group_0__0");
+ put(grammarAccess.getAbstractRuleAccess().getGroup_0_1(), "rule__AbstractRule__Group_0_1__0");
+ put(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0(), "rule__AbstractRule__VisibilityAssignment_0_0");
+ put(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0(), "rule__AbstractRule__NameAssignment_0_1_0");
+ put(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0(), "rule__AbstractRule__ValueAssignment_0_2_0");
+ put(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1(), "rule__AbstractRule__InstanceSpecificationAssignment_0_2_1");
+ put(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1(), "rule__AbstractRule__UndefinedAssignment_1");
+ put(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment(), "rule__LiteralBooleanRule__ValueAssignment");
+ put(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment(), "rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment");
+ put(grammarAccess.getLiteralRealRuleAccess().getValueAssignment(), "rule__LiteralRealRule__ValueAssignment");
+ put(grammarAccess.getLiteralNullRuleAccess().getValueAssignment(), "rule__LiteralNullRule__ValueAssignment");
+ put(grammarAccess.getLiteralStringRuleAccess().getValueAssignment(), "rule__LiteralStringRule__ValueAssignment");
+ put(grammarAccess.getUndefinedRuleAccess().getValueAssignment(), "rule__UndefinedRule__ValueAssignment");
+ put(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0(), "rule__VisibilityKind__PublicAssignment_0");
+ put(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1(), "rule__VisibilityKind__PrivateAssignment_1");
+ put(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2(), "rule__VisibilityKind__ProtectedAssignment_2");
+ put(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3(), "rule__VisibilityKind__PackageAssignment_3");
+ }
+ };
+ }
+ return nameMappings.get(element);
+ }
+
+ @Override
+ protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
+ try {
+ org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser typedParser = (org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal.InternalUmlValueSpecificationParser) parser;
+ typedParser.entryRuleAbstractRule();
+ return typedParser.getFollowElements();
+ } catch(RecognitionException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ @Override
+ protected String[] getInitialHiddenTokens() {
+ return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
+ }
+
+ public UmlValueSpecificationGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g
new file mode 100644
index 00000000000..0751a6ee5ab
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g
@@ -0,0 +1,882 @@
+/*
+* generated by Xtext
+*/
+grammar InternalUmlValueSpecification;
+
+options {
+ superClass=AbstractInternalContentAssistParser;
+
+}
+
+@lexer::header {
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+}
+
+@parser::header {
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess;
+
+}
+
+@parser::members {
+
+ private UmlValueSpecificationGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+}
+
+
+
+
+// Entry rule entryRuleAbstractRule
+entryRuleAbstractRule
+:
+{ before(grammarAccess.getAbstractRuleRule()); }
+ ruleAbstractRule
+{ after(grammarAccess.getAbstractRuleRule()); }
+ EOF
+;
+
+// Rule AbstractRule
+ruleAbstractRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getAbstractRuleAccess().getAlternatives()); }
+(rule__AbstractRule__Alternatives)
+{ after(grammarAccess.getAbstractRuleAccess().getAlternatives()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleLiteralBooleanRule
+entryRuleLiteralBooleanRule
+:
+{ before(grammarAccess.getLiteralBooleanRuleRule()); }
+ ruleLiteralBooleanRule
+{ after(grammarAccess.getLiteralBooleanRuleRule()); }
+ EOF
+;
+
+// Rule LiteralBooleanRule
+ruleLiteralBooleanRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); }
+(rule__LiteralBooleanRule__ValueAssignment)
+{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleLiteralIntegerOrUnlimitedNaturalRule
+entryRuleLiteralIntegerOrUnlimitedNaturalRule
+:
+{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); }
+ ruleLiteralIntegerOrUnlimitedNaturalRule
+{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule()); }
+ EOF
+;
+
+// Rule LiteralIntegerOrUnlimitedNaturalRule
+ruleLiteralIntegerOrUnlimitedNaturalRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); }
+(rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment)
+{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleLiteralRealRule
+entryRuleLiteralRealRule
+:
+{ before(grammarAccess.getLiteralRealRuleRule()); }
+ ruleLiteralRealRule
+{ after(grammarAccess.getLiteralRealRuleRule()); }
+ EOF
+;
+
+// Rule LiteralRealRule
+ruleLiteralRealRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); }
+(rule__LiteralRealRule__ValueAssignment)
+{ after(grammarAccess.getLiteralRealRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleLiteralNullRule
+entryRuleLiteralNullRule
+:
+{ before(grammarAccess.getLiteralNullRuleRule()); }
+ ruleLiteralNullRule
+{ after(grammarAccess.getLiteralNullRuleRule()); }
+ EOF
+;
+
+// Rule LiteralNullRule
+ruleLiteralNullRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); }
+(rule__LiteralNullRule__ValueAssignment)
+{ after(grammarAccess.getLiteralNullRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleLiteralStringRule
+entryRuleLiteralStringRule
+:
+{ before(grammarAccess.getLiteralStringRuleRule()); }
+ ruleLiteralStringRule
+{ after(grammarAccess.getLiteralStringRuleRule()); }
+ EOF
+;
+
+// Rule LiteralStringRule
+ruleLiteralStringRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); }
+(rule__LiteralStringRule__ValueAssignment)
+{ after(grammarAccess.getLiteralStringRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleUndefinedRule
+entryRuleUndefinedRule
+:
+{ before(grammarAccess.getUndefinedRuleRule()); }
+ ruleUndefinedRule
+{ after(grammarAccess.getUndefinedRuleRule()); }
+ EOF
+;
+
+// Rule UndefinedRule
+ruleUndefinedRule
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); }
+(rule__UndefinedRule__ValueAssignment)
+{ after(grammarAccess.getUndefinedRuleAccess().getValueAssignment()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+// Entry rule entryRuleVisibilityKind
+entryRuleVisibilityKind
+:
+{ before(grammarAccess.getVisibilityKindRule()); }
+ ruleVisibilityKind
+{ after(grammarAccess.getVisibilityKindRule()); }
+ EOF
+;
+
+// Rule VisibilityKind
+ruleVisibilityKind
+ @init {
+ int stackSize = keepStackSize();
+ }
+ :
+(
+{ before(grammarAccess.getVisibilityKindAccess().getAlternatives()); }
+(rule__VisibilityKind__Alternatives)
+{ after(grammarAccess.getVisibilityKindAccess().getAlternatives()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+rule__AbstractRule__Alternatives
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getGroup_0()); }
+(rule__AbstractRule__Group_0__0)
+{ after(grammarAccess.getAbstractRuleAccess().getGroup_0()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); }
+(rule__AbstractRule__UndefinedAssignment_1)
+{ after(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Alternatives_0_2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); }
+(rule__AbstractRule__ValueAssignment_0_2_0)
+{ after(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); }
+(rule__AbstractRule__InstanceSpecificationAssignment_0_2_1)
+{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__ValueAlternatives_0_2_0_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); }
+ ruleLiteralBooleanRule
+{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); }
+ ruleLiteralIntegerOrUnlimitedNaturalRule
+{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); }
+ ruleLiteralRealRule
+{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); }
+ ruleLiteralNullRule
+{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3()); }
+)
+
+ |(
+{ before(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); }
+ ruleLiteralStringRule
+{ after(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralBooleanRule__ValueAlternatives_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); }
+
+ 'true'
+
+{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0()); }
+)
+
+ |(
+{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); }
+
+ 'false'
+
+{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__VisibilityKind__Alternatives
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); }
+(rule__VisibilityKind__PublicAssignment_0)
+{ after(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0()); }
+)
+
+ |(
+{ before(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); }
+(rule__VisibilityKind__PrivateAssignment_1)
+{ after(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1()); }
+)
+
+ |(
+{ before(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); }
+(rule__VisibilityKind__ProtectedAssignment_2)
+{ after(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2()); }
+)
+
+ |(
+{ before(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); }
+(rule__VisibilityKind__PackageAssignment_3)
+{ after(grammarAccess.getVisibilityKindAccess().getPackageAssignment_3()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+rule__AbstractRule__Group_0__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__AbstractRule__Group_0__0__Impl
+ rule__AbstractRule__Group_0__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Group_0__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); }
+(rule__AbstractRule__VisibilityAssignment_0_0)?
+{ after(grammarAccess.getAbstractRuleAccess().getVisibilityAssignment_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__AbstractRule__Group_0__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__AbstractRule__Group_0__1__Impl
+ rule__AbstractRule__Group_0__2
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Group_0__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); }
+(rule__AbstractRule__Group_0_1__0)?
+{ after(grammarAccess.getAbstractRuleAccess().getGroup_0_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__AbstractRule__Group_0__2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__AbstractRule__Group_0__2__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Group_0__2__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); }
+(rule__AbstractRule__Alternatives_0_2)
+{ after(grammarAccess.getAbstractRuleAccess().getAlternatives_0_2()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+
+rule__AbstractRule__Group_0_1__0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__AbstractRule__Group_0_1__0__Impl
+ rule__AbstractRule__Group_0_1__1
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Group_0_1__0__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); }
+(rule__AbstractRule__NameAssignment_0_1_0)
+{ after(grammarAccess.getAbstractRuleAccess().getNameAssignment_0_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+rule__AbstractRule__Group_0_1__1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+ rule__AbstractRule__Group_0_1__1__Impl
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__Group_0_1__1__Impl
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); }
+
+ '='
+
+{ after(grammarAccess.getAbstractRuleAccess().getEqualsSignKeyword_0_1_1()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+
+
+
+
+
+rule__AbstractRule__VisibilityAssignment_0_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); }
+ ruleVisibilityKind{ after(grammarAccess.getAbstractRuleAccess().getVisibilityVisibilityKindParserRuleCall_0_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__NameAssignment_0_1_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); }
+ RULE_ID{ after(grammarAccess.getAbstractRuleAccess().getNameIDTerminalRuleCall_0_1_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__ValueAssignment_0_2_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); }
+(rule__AbstractRule__ValueAlternatives_0_2_0_0)
+{ after(grammarAccess.getAbstractRuleAccess().getValueAlternatives_0_2_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__InstanceSpecificationAssignment_0_2_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); }
+(
+{ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); }
+ RULE_ID{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationIDTerminalRuleCall_0_2_1_0_1()); }
+)
+{ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationInstanceSpecificationCrossReference_0_2_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__AbstractRule__UndefinedAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); }
+ ruleUndefinedRule{ after(grammarAccess.getAbstractRuleAccess().getUndefinedUndefinedRuleParserRuleCall_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralBooleanRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); }
+(rule__LiteralBooleanRule__ValueAlternatives_0)
+{ after(grammarAccess.getLiteralBooleanRuleAccess().getValueAlternatives_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); }
+ RULE_INT{ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueINTTerminalRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralRealRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); }
+ RULE_DOUBLE{ after(grammarAccess.getLiteralRealRuleAccess().getValueDOUBLETerminalRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralNullRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); }
+(
+{ before(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); }
+
+ 'null'
+
+{ after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); }
+)
+
+{ after(grammarAccess.getLiteralNullRuleAccess().getValueNullKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__LiteralStringRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); }
+ RULE_STRING{ after(grammarAccess.getLiteralStringRuleAccess().getValueSTRINGTerminalRuleCall_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__UndefinedRule__ValueAssignment
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); }
+(
+{ before(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); }
+
+ '<Undefined>'
+
+{ after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); }
+)
+
+{ after(grammarAccess.getUndefinedRuleAccess().getValueUndefinedKeyword_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__VisibilityKind__PublicAssignment_0
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); }
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); }
+
+ '+'
+
+{ after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); }
+)
+
+{ after(grammarAccess.getVisibilityKindAccess().getPublicPlusSignKeyword_0_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__VisibilityKind__PrivateAssignment_1
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); }
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); }
+
+ '-'
+
+{ after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); }
+)
+
+{ after(grammarAccess.getVisibilityKindAccess().getPrivateHyphenMinusKeyword_1_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__VisibilityKind__ProtectedAssignment_2
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); }
+(
+{ before(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); }
+
+ '#'
+
+{ after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); }
+)
+
+{ after(grammarAccess.getVisibilityKindAccess().getProtectedNumberSignKeyword_2_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+rule__VisibilityKind__PackageAssignment_3
+ @init {
+ int stackSize = keepStackSize();
+ }
+:
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); }
+(
+{ before(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); }
+
+ '~'
+
+{ after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); }
+)
+
+{ after(grammarAccess.getVisibilityKindAccess().getPackageTildeKeyword_3_0()); }
+)
+
+;
+finally {
+ restoreStackSize(stackSize);
+}
+
+
+RULE_DOUBLE : ('0'..'9')+ '.' ('0'..'9')+;
+
+RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
+
+RULE_INT : ('0'..'9')+;
+
+RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
+
+RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
+
+RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
+
+RULE_WS : (' '|'\t'|'\r'|'\n')+;
+
+RULE_ANY_OTHER : .;
+
+
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens
new file mode 100644
index 00000000000..4a9630aa190
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.tokens
@@ -0,0 +1,26 @@
+'#'=19
+'+'=17
+'-'=18
+'<Undefined>'=16
+'='=14
+'false'=13
+'null'=15
+'true'=12
+'~'=20
+RULE_ANY_OTHER=11
+RULE_DOUBLE=6
+RULE_ID=4
+RULE_INT=5
+RULE_ML_COMMENT=8
+RULE_SL_COMMENT=9
+RULE_STRING=7
+RULE_WS=10
+T__12=12
+T__13=13
+T__14=14
+T__15=15
+T__16=16
+T__17=17
+T__18=18
+T__19=19
+T__20=20
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java
new file mode 100644
index 00000000000..893a605954c
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationLexer.java
@@ -0,0 +1,1117 @@
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalUmlValueSpecificationLexer extends Lexer {
+ public static final int T__19=19;
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__20=20;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=10;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int EOF=-1;
+ public static final int RULE_DOUBLE=6;
+ public static final int RULE_ML_COMMENT=8;
+
+ // delegates
+ // delegators
+
+ public InternalUmlValueSpecificationLexer() {;}
+ public InternalUmlValueSpecificationLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalUmlValueSpecificationLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g"; }
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:11:7: ( 'true' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:11:9: 'true'
+ {
+ match("true");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:12:7: ( 'false' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:12:9: 'false'
+ {
+ match("false");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:13:7: ( '=' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:13:9: '='
+ {
+ match('=');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:14:7: ( 'null' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:14:9: 'null'
+ {
+ match("null");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:15:7: ( '<Undefined>' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:15:9: '<Undefined>'
+ {
+ match("<Undefined>");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
+ // $ANTLR start "T__17"
+ public final void mT__17() throws RecognitionException {
+ try {
+ int _type = T__17;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:16:7: ( '+' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:16:9: '+'
+ {
+ match('+');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__17"
+
+ // $ANTLR start "T__18"
+ public final void mT__18() throws RecognitionException {
+ try {
+ int _type = T__18;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:17:7: ( '-' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:17:9: '-'
+ {
+ match('-');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__18"
+
+ // $ANTLR start "T__19"
+ public final void mT__19() throws RecognitionException {
+ try {
+ int _type = T__19;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:18:7: ( '#' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:18:9: '#'
+ {
+ match('#');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__19"
+
+ // $ANTLR start "T__20"
+ public final void mT__20() throws RecognitionException {
+ try {
+ int _type = T__20;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:19:7: ( '~' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:19:9: '~'
+ {
+ match('~');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__20"
+
+ // $ANTLR start "RULE_DOUBLE"
+ public final void mRULE_DOUBLE() throws RecognitionException {
+ try {
+ int _type = RULE_DOUBLE;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:13: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:15: ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:15: ( '0' .. '9' )+
+ int cnt1=0;
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='0' && LA1_0<='9')) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:16: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt1 >= 1 ) break loop1;
+ EarlyExitException eee =
+ new EarlyExitException(1, input);
+ throw eee;
+ }
+ cnt1++;
+ } while (true);
+
+ match('.');
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:31: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:866:32: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_DOUBLE"
+
+ // $ANTLR start "RULE_ID"
+ public final void mRULE_ID() throws RecognitionException {
+ try {
+ int _type = RULE_ID;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: ( '^' )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0=='^') ) {
+ alt3=1;
+ }
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:11: '^'
+ {
+ match('^');
+
+ }
+ break;
+
+ }
+
+ if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:868:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ loop4:
+ do {
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')) ) {
+ alt4=1;
+ }
+
+
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop4;
+ }
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ID"
+
+ // $ANTLR start "RULE_INT"
+ public final void mRULE_INT() throws RecognitionException {
+ try {
+ int _type = RULE_INT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:10: ( ( '0' .. '9' )+ )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:12: ( '0' .. '9' )+
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:12: ( '0' .. '9' )+
+ int cnt5=0;
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( ((LA5_0>='0' && LA5_0<='9')) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:870:13: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt5 >= 1 ) break loop5;
+ EarlyExitException eee =
+ new EarlyExitException(5, input);
+ throw eee;
+ }
+ cnt5++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_INT"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+
+ if ( (LA8_0=='\"') ) {
+ alt8=1;
+ }
+ else if ( (LA8_0=='\'') ) {
+ alt8=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ {
+ match('\"');
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
+ loop6:
+ do {
+ int alt6=3;
+ int LA6_0 = input.LA(1);
+
+ if ( (LA6_0=='\\') ) {
+ alt6=1;
+ }
+ else if ( ((LA6_0>='\u0000' && LA6_0<='!')||(LA6_0>='#' && LA6_0<='[')||(LA6_0>=']' && LA6_0<='\uFFFF')) ) {
+ alt6=2;
+ }
+
+
+ switch (alt6) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:21: '\\\\' .
+ {
+ match('\\');
+ matchAny();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:28: ~ ( ( '\\\\' | '\"' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop6;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ {
+ match('\'');
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
+ loop7:
+ do {
+ int alt7=3;
+ int LA7_0 = input.LA(1);
+
+ if ( (LA7_0=='\\') ) {
+ alt7=1;
+ }
+ else if ( ((LA7_0>='\u0000' && LA7_0<='&')||(LA7_0>='(' && LA7_0<='[')||(LA7_0>=']' && LA7_0<='\uFFFF')) ) {
+ alt7=2;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:54: '\\\\' .
+ {
+ match('\\');
+ matchAny();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:872:61: ~ ( ( '\\\\' | '\\'' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop7;
+ }
+ } while (true);
+
+ match('\'');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_ML_COMMENT"
+ public final void mRULE_ML_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_ML_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:19: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*");
+
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:24: ( options {greedy=false; } : . )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0=='*') ) {
+ int LA9_1 = input.LA(2);
+
+ if ( (LA9_1=='/') ) {
+ alt9=2;
+ }
+ else if ( ((LA9_1>='\u0000' && LA9_1<='.')||(LA9_1>='0' && LA9_1<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ }
+ else if ( ((LA9_0>='\u0000' && LA9_0<=')')||(LA9_0>='+' && LA9_0<='\uFFFF')) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:874:52: .
+ {
+ matchAny();
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ match("*/");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ML_COMMENT"
+
+ // $ANTLR start "RULE_SL_COMMENT"
+ public final void mRULE_SL_COMMENT() throws RecognitionException {
+ try {
+ int _type = RULE_SL_COMMENT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ {
+ match("//");
+
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ loop10:
+ do {
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( ((LA10_0>='\u0000' && LA10_0<='\t')||(LA10_0>='\u000B' && LA10_0<='\f')||(LA10_0>='\u000E' && LA10_0<='\uFFFF')) ) {
+ alt10=1;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:24: ~ ( ( '\\n' | '\\r' ) )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:40: ( ( '\\r' )? '\\n' )?
+ int alt12=2;
+ int LA12_0 = input.LA(1);
+
+ if ( (LA12_0=='\n'||LA12_0=='\r') ) {
+ alt12=1;
+ }
+ switch (alt12) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: ( '\\r' )? '\\n'
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: ( '\\r' )?
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0=='\r') ) {
+ alt11=1;
+ }
+ switch (alt11) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:876:41: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_SL_COMMENT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:878:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ int cnt13=0;
+ loop13:
+ do {
+ int alt13=2;
+ int LA13_0 = input.LA(1);
+
+ if ( ((LA13_0>='\t' && LA13_0<='\n')||LA13_0=='\r'||LA13_0==' ') ) {
+ alt13=1;
+ }
+
+
+ switch (alt13) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:
+ {
+ if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ if ( cnt13 >= 1 ) break loop13;
+ EarlyExitException eee =
+ new EarlyExitException(13, input);
+ throw eee;
+ }
+ cnt13++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ // $ANTLR start "RULE_ANY_OTHER"
+ public final void mRULE_ANY_OTHER() throws RecognitionException {
+ try {
+ int _type = RULE_ANY_OTHER;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:880:16: ( . )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:880:18: .
+ {
+ matchAny();
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_ANY_OTHER"
+
+ public void mTokens() throws RecognitionException {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:8: ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt14=17;
+ alt14 = dfa14.predict(input);
+ switch (alt14) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:10: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:16: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:22: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:28: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:34: T__16
+ {
+ mT__16();
+
+ }
+ break;
+ case 6 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:40: T__17
+ {
+ mT__17();
+
+ }
+ break;
+ case 7 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:46: T__18
+ {
+ mT__18();
+
+ }
+ break;
+ case 8 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:52: T__19
+ {
+ mT__19();
+
+ }
+ break;
+ case 9 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:58: T__20
+ {
+ mT__20();
+
+ }
+ break;
+ case 10 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:64: RULE_DOUBLE
+ {
+ mRULE_DOUBLE();
+
+ }
+ break;
+ case 11 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:76: RULE_ID
+ {
+ mRULE_ID();
+
+ }
+ break;
+ case 12 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:84: RULE_INT
+ {
+ mRULE_INT();
+
+ }
+ break;
+ case 13 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:93: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 14 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:105: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 15 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:121: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 16 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:137: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 17 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:1:145: RULE_ANY_OTHER
+ {
+ mRULE_ANY_OTHER();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA14 dfa14 = new DFA14(this);
+ static final String DFA14_eotS =
+ "\1\uffff\2\23\1\uffff\1\23\1\21\4\uffff\1\34\1\21\1\uffff\3\21"+
+ "\2\uffff\1\23\1\uffff\1\23\1\uffff\1\23\6\uffff\1\34\5\uffff\3\23"+
+ "\1\51\1\23\1\53\1\uffff\1\54\2\uffff";
+ static final String DFA14_eofS =
+ "\55\uffff";
+ static final String DFA14_minS =
+ "\1\0\1\162\1\141\1\uffff\1\165\1\125\4\uffff\1\56\1\101\1\uffff"+
+ "\2\0\1\52\2\uffff\1\165\1\uffff\1\154\1\uffff\1\154\6\uffff\1\56"+
+ "\5\uffff\1\145\1\163\1\154\1\60\1\145\1\60\1\uffff\1\60\2\uffff";
+ static final String DFA14_maxS =
+ "\1\uffff\1\162\1\141\1\uffff\1\165\1\125\4\uffff\1\71\1\172\1\uffff"+
+ "\2\uffff\1\57\2\uffff\1\165\1\uffff\1\154\1\uffff\1\154\6\uffff"+
+ "\1\71\5\uffff\1\145\1\163\1\154\1\172\1\145\1\172\1\uffff\1\172"+
+ "\2\uffff";
+ static final String DFA14_acceptS =
+ "\3\uffff\1\3\2\uffff\1\6\1\7\1\10\1\11\2\uffff\1\13\3\uffff\1\20"+
+ "\1\21\1\uffff\1\13\1\uffff\1\3\1\uffff\1\5\1\6\1\7\1\10\1\11\1\14"+
+ "\1\uffff\1\12\1\15\1\16\1\17\1\20\6\uffff\1\1\1\uffff\1\4\1\2";
+ static final String DFA14_specialS =
+ "\1\2\14\uffff\1\1\1\0\36\uffff}>";
+ static final String[] DFA14_transitionS = {
+ "\11\21\2\20\2\21\1\20\22\21\1\20\1\21\1\15\1\10\3\21\1\16\3"+
+ "\21\1\6\1\21\1\7\1\21\1\17\12\12\2\21\1\5\1\3\3\21\32\14\3\21"+
+ "\1\13\1\14\1\21\5\14\1\2\7\14\1\4\5\14\1\1\6\14\3\21\1\11\uff81"+
+ "\21",
+ "\1\22",
+ "\1\24",
+ "",
+ "\1\26",
+ "\1\27",
+ "",
+ "",
+ "",
+ "",
+ "\1\36\1\uffff\12\35",
+ "\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "\0\37",
+ "\0\37",
+ "\1\40\4\uffff\1\41",
+ "",
+ "",
+ "\1\43",
+ "",
+ "\1\44",
+ "",
+ "\1\45",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\36\1\uffff\12\35",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\46",
+ "\1\47",
+ "\1\50",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "\1\52",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ "\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32\23",
+ "",
+ ""
+ };
+
+ static final short[] DFA14_eot = DFA.unpackEncodedString(DFA14_eotS);
+ static final short[] DFA14_eof = DFA.unpackEncodedString(DFA14_eofS);
+ static final char[] DFA14_min = DFA.unpackEncodedStringToUnsignedChars(DFA14_minS);
+ static final char[] DFA14_max = DFA.unpackEncodedStringToUnsignedChars(DFA14_maxS);
+ static final short[] DFA14_accept = DFA.unpackEncodedString(DFA14_acceptS);
+ static final short[] DFA14_special = DFA.unpackEncodedString(DFA14_specialS);
+ static final short[][] DFA14_transition;
+
+ static {
+ int numStates = DFA14_transitionS.length;
+ DFA14_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA14_transition[i] = DFA.unpackEncodedString(DFA14_transitionS[i]);
+ }
+ }
+
+ class DFA14 extends DFA {
+
+ public DFA14(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 14;
+ this.eot = DFA14_eot;
+ this.eof = DFA14_eof;
+ this.min = DFA14_min;
+ this.max = DFA14_max;
+ this.accept = DFA14_accept;
+ this.special = DFA14_special;
+ this.transition = DFA14_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | RULE_DOUBLE | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
+ }
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA14_14 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_14>='\u0000' && LA14_14<='\uFFFF')) ) {s = 31;}
+
+ else s = 17;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA14_13 = input.LA(1);
+
+ s = -1;
+ if ( ((LA14_13>='\u0000' && LA14_13<='\uFFFF')) ) {s = 31;}
+
+ else s = 17;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA14_0 = input.LA(1);
+
+ s = -1;
+ if ( (LA14_0=='t') ) {s = 1;}
+
+ else if ( (LA14_0=='f') ) {s = 2;}
+
+ else if ( (LA14_0=='=') ) {s = 3;}
+
+ else if ( (LA14_0=='n') ) {s = 4;}
+
+ else if ( (LA14_0=='<') ) {s = 5;}
+
+ else if ( (LA14_0=='+') ) {s = 6;}
+
+ else if ( (LA14_0=='-') ) {s = 7;}
+
+ else if ( (LA14_0=='#') ) {s = 8;}
+
+ else if ( (LA14_0=='~') ) {s = 9;}
+
+ else if ( ((LA14_0>='0' && LA14_0<='9')) ) {s = 10;}
+
+ else if ( (LA14_0=='^') ) {s = 11;}
+
+ else if ( ((LA14_0>='A' && LA14_0<='Z')||LA14_0=='_'||(LA14_0>='a' && LA14_0<='e')||(LA14_0>='g' && LA14_0<='m')||(LA14_0>='o' && LA14_0<='s')||(LA14_0>='u' && LA14_0<='z')) ) {s = 12;}
+
+ else if ( (LA14_0=='\"') ) {s = 13;}
+
+ else if ( (LA14_0=='\'') ) {s = 14;}
+
+ else if ( (LA14_0=='/') ) {s = 15;}
+
+ else if ( ((LA14_0>='\t' && LA14_0<='\n')||LA14_0=='\r'||LA14_0==' ') ) {s = 16;}
+
+ else if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='$' && LA14_0<='&')||(LA14_0>='(' && LA14_0<='*')||LA14_0==','||LA14_0=='.'||(LA14_0>=':' && LA14_0<=';')||(LA14_0>='>' && LA14_0<='@')||(LA14_0>='[' && LA14_0<=']')||LA14_0=='`'||(LA14_0>='{' && LA14_0<='}')||(LA14_0>='\u007F' && LA14_0<='\uFFFF')) ) {s = 17;}
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 14, _s, input);
+ error(nvae);
+ throw nvae;
+ }
+ }
+
+
+} \ No newline at end of file
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java
new file mode 100644
index 00000000000..0198b81e511
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecificationParser.java
@@ -0,0 +1,2405 @@
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contentassist.antlr.internal;
+
+import java.io.InputStream;
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
+import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.DFA;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.services.UmlValueSpecificationGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalUmlValueSpecificationParser extends AbstractInternalContentAssistParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'true'", "'false'", "'='", "'null'", "'<Undefined>'", "'+'", "'-'", "'#'", "'~'"
+ };
+ public static final int T__19=19;
+ public static final int RULE_ID=4;
+ public static final int RULE_STRING=7;
+ public static final int T__16=16;
+ public static final int T__15=15;
+ public static final int T__18=18;
+ public static final int T__17=17;
+ public static final int T__12=12;
+ public static final int T__14=14;
+ public static final int T__13=13;
+ public static final int RULE_ANY_OTHER=11;
+ public static final int T__20=20;
+ public static final int RULE_INT=5;
+ public static final int RULE_WS=10;
+ public static final int RULE_SL_COMMENT=9;
+ public static final int EOF=-1;
+ public static final int RULE_DOUBLE=6;
+ public static final int RULE_ML_COMMENT=8;
+
+ // delegates
+ // delegators
+
+
+ public InternalUmlValueSpecificationParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalUmlValueSpecificationParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalUmlValueSpecificationParser.tokenNames; }
+ public String getGrammarFileName() { return "../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g"; }
+
+
+
+ private UmlValueSpecificationGrammarAccess grammarAccess;
+
+ public void setGrammarAccess(UmlValueSpecificationGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+
+ @Override
+ protected Grammar getGrammar() {
+ return grammarAccess.getGrammar();
+ }
+
+ @Override
+ protected String getValueForTokenName(String tokenName) {
+ return tokenName;
+ }
+
+
+
+
+ // $ANTLR start "entryRuleAbstractRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:60:1: entryRuleAbstractRule : ruleAbstractRule EOF ;
+ public final void entryRuleAbstractRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:61:1: ( ruleAbstractRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:62:1: ruleAbstractRule EOF
+ {
+ before(grammarAccess.getAbstractRuleRule());
+ pushFollow(FOLLOW_ruleAbstractRule_in_entryRuleAbstractRule61);
+ ruleAbstractRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleAbstractRule68);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleAbstractRule"
+
+
+ // $ANTLR start "ruleAbstractRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:69:1: ruleAbstractRule : ( ( rule__AbstractRule__Alternatives ) ) ;
+ public final void ruleAbstractRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:73:2: ( ( ( rule__AbstractRule__Alternatives ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:74:1: ( ( rule__AbstractRule__Alternatives ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:74:1: ( ( rule__AbstractRule__Alternatives ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:75:1: ( rule__AbstractRule__Alternatives )
+ {
+ before(grammarAccess.getAbstractRuleAccess().getAlternatives());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:76:1: ( rule__AbstractRule__Alternatives )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:76:2: rule__AbstractRule__Alternatives
+ {
+ pushFollow(FOLLOW_rule__AbstractRule__Alternatives_in_ruleAbstractRule94);
+ rule__AbstractRule__Alternatives();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAbstractRuleAccess().getAlternatives());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleAbstractRule"
+
+
+ // $ANTLR start "entryRuleLiteralBooleanRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:88:1: entryRuleLiteralBooleanRule : ruleLiteralBooleanRule EOF ;
+ public final void entryRuleLiteralBooleanRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:89:1: ( ruleLiteralBooleanRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:90:1: ruleLiteralBooleanRule EOF
+ {
+ before(grammarAccess.getLiteralBooleanRuleRule());
+ pushFollow(FOLLOW_ruleLiteralBooleanRule_in_entryRuleLiteralBooleanRule121);
+ ruleLiteralBooleanRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getLiteralBooleanRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralBooleanRule128);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleLiteralBooleanRule"
+
+
+ // $ANTLR start "ruleLiteralBooleanRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:97:1: ruleLiteralBooleanRule : ( ( rule__LiteralBooleanRule__ValueAssignment ) ) ;
+ public final void ruleLiteralBooleanRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:101:2: ( ( ( rule__LiteralBooleanRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:102:1: ( ( rule__LiteralBooleanRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:102:1: ( ( rule__LiteralBooleanRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:103:1: ( rule__LiteralBooleanRule__ValueAssignment )
+ {
+ before(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:104:1: ( rule__LiteralBooleanRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:104:2: rule__LiteralBooleanRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__LiteralBooleanRule__ValueAssignment_in_ruleLiteralBooleanRule154);
+ rule__LiteralBooleanRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getLiteralBooleanRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleLiteralBooleanRule"
+
+
+ // $ANTLR start "entryRuleLiteralIntegerOrUnlimitedNaturalRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:116:1: entryRuleLiteralIntegerOrUnlimitedNaturalRule : ruleLiteralIntegerOrUnlimitedNaturalRule EOF ;
+ public final void entryRuleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:117:1: ( ruleLiteralIntegerOrUnlimitedNaturalRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:118:1: ruleLiteralIntegerOrUnlimitedNaturalRule EOF
+ {
+ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule());
+ pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule181);
+ ruleLiteralIntegerOrUnlimitedNaturalRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralIntegerOrUnlimitedNaturalRule188);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleLiteralIntegerOrUnlimitedNaturalRule"
+
+
+ // $ANTLR start "ruleLiteralIntegerOrUnlimitedNaturalRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:125:1: ruleLiteralIntegerOrUnlimitedNaturalRule : ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) ;
+ public final void ruleLiteralIntegerOrUnlimitedNaturalRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:129:2: ( ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:130:1: ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:130:1: ( ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:131:1: ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment )
+ {
+ before(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:132:1: ( rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:132:2: rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment_in_ruleLiteralIntegerOrUnlimitedNaturalRule214);
+ rule__LiteralIntegerOrUnlimitedNaturalRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getLiteralIntegerOrUnlimitedNaturalRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleLiteralIntegerOrUnlimitedNaturalRule"
+
+
+ // $ANTLR start "entryRuleLiteralRealRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:144:1: entryRuleLiteralRealRule : ruleLiteralRealRule EOF ;
+ public final void entryRuleLiteralRealRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:145:1: ( ruleLiteralRealRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:146:1: ruleLiteralRealRule EOF
+ {
+ before(grammarAccess.getLiteralRealRuleRule());
+ pushFollow(FOLLOW_ruleLiteralRealRule_in_entryRuleLiteralRealRule241);
+ ruleLiteralRealRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getLiteralRealRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralRealRule248);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleLiteralRealRule"
+
+
+ // $ANTLR start "ruleLiteralRealRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:153:1: ruleLiteralRealRule : ( ( rule__LiteralRealRule__ValueAssignment ) ) ;
+ public final void ruleLiteralRealRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:157:2: ( ( ( rule__LiteralRealRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:158:1: ( ( rule__LiteralRealRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:158:1: ( ( rule__LiteralRealRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:159:1: ( rule__LiteralRealRule__ValueAssignment )
+ {
+ before(grammarAccess.getLiteralRealRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:160:1: ( rule__LiteralRealRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:160:2: rule__LiteralRealRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__LiteralRealRule__ValueAssignment_in_ruleLiteralRealRule274);
+ rule__LiteralRealRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getLiteralRealRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleLiteralRealRule"
+
+
+ // $ANTLR start "entryRuleLiteralNullRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:172:1: entryRuleLiteralNullRule : ruleLiteralNullRule EOF ;
+ public final void entryRuleLiteralNullRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:173:1: ( ruleLiteralNullRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:174:1: ruleLiteralNullRule EOF
+ {
+ before(grammarAccess.getLiteralNullRuleRule());
+ pushFollow(FOLLOW_ruleLiteralNullRule_in_entryRuleLiteralNullRule301);
+ ruleLiteralNullRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getLiteralNullRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralNullRule308);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleLiteralNullRule"
+
+
+ // $ANTLR start "ruleLiteralNullRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:181:1: ruleLiteralNullRule : ( ( rule__LiteralNullRule__ValueAssignment ) ) ;
+ public final void ruleLiteralNullRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:185:2: ( ( ( rule__LiteralNullRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:186:1: ( ( rule__LiteralNullRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:186:1: ( ( rule__LiteralNullRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:187:1: ( rule__LiteralNullRule__ValueAssignment )
+ {
+ before(grammarAccess.getLiteralNullRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:188:1: ( rule__LiteralNullRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:188:2: rule__LiteralNullRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__LiteralNullRule__ValueAssignment_in_ruleLiteralNullRule334);
+ rule__LiteralNullRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getLiteralNullRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleLiteralNullRule"
+
+
+ // $ANTLR start "entryRuleLiteralStringRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:200:1: entryRuleLiteralStringRule : ruleLiteralStringRule EOF ;
+ public final void entryRuleLiteralStringRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:201:1: ( ruleLiteralStringRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:202:1: ruleLiteralStringRule EOF
+ {
+ before(grammarAccess.getLiteralStringRuleRule());
+ pushFollow(FOLLOW_ruleLiteralStringRule_in_entryRuleLiteralStringRule361);
+ ruleLiteralStringRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getLiteralStringRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleLiteralStringRule368);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleLiteralStringRule"
+
+
+ // $ANTLR start "ruleLiteralStringRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:209:1: ruleLiteralStringRule : ( ( rule__LiteralStringRule__ValueAssignment ) ) ;
+ public final void ruleLiteralStringRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:213:2: ( ( ( rule__LiteralStringRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:214:1: ( ( rule__LiteralStringRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:214:1: ( ( rule__LiteralStringRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:215:1: ( rule__LiteralStringRule__ValueAssignment )
+ {
+ before(grammarAccess.getLiteralStringRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:216:1: ( rule__LiteralStringRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:216:2: rule__LiteralStringRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__LiteralStringRule__ValueAssignment_in_ruleLiteralStringRule394);
+ rule__LiteralStringRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getLiteralStringRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleLiteralStringRule"
+
+
+ // $ANTLR start "entryRuleUndefinedRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:228:1: entryRuleUndefinedRule : ruleUndefinedRule EOF ;
+ public final void entryRuleUndefinedRule() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:229:1: ( ruleUndefinedRule EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:230:1: ruleUndefinedRule EOF
+ {
+ before(grammarAccess.getUndefinedRuleRule());
+ pushFollow(FOLLOW_ruleUndefinedRule_in_entryRuleUndefinedRule421);
+ ruleUndefinedRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getUndefinedRuleRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleUndefinedRule428);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleUndefinedRule"
+
+
+ // $ANTLR start "ruleUndefinedRule"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:237:1: ruleUndefinedRule : ( ( rule__UndefinedRule__ValueAssignment ) ) ;
+ public final void ruleUndefinedRule() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:241:2: ( ( ( rule__UndefinedRule__ValueAssignment ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:242:1: ( ( rule__UndefinedRule__ValueAssignment ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:242:1: ( ( rule__UndefinedRule__ValueAssignment ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:243:1: ( rule__UndefinedRule__ValueAssignment )
+ {
+ before(grammarAccess.getUndefinedRuleAccess().getValueAssignment());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:244:1: ( rule__UndefinedRule__ValueAssignment )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:244:2: rule__UndefinedRule__ValueAssignment
+ {
+ pushFollow(FOLLOW_rule__UndefinedRule__ValueAssignment_in_ruleUndefinedRule454);
+ rule__UndefinedRule__ValueAssignment();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getUndefinedRuleAccess().getValueAssignment());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleUndefinedRule"
+
+
+ // $ANTLR start "entryRuleVisibilityKind"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:256:1: entryRuleVisibilityKind : ruleVisibilityKind EOF ;
+ public final void entryRuleVisibilityKind() throws RecognitionException {
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:257:1: ( ruleVisibilityKind EOF )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:258:1: ruleVisibilityKind EOF
+ {
+ before(grammarAccess.getVisibilityKindRule());
+ pushFollow(FOLLOW_ruleVisibilityKind_in_entryRuleVisibilityKind481);
+ ruleVisibilityKind();
+
+ state._fsp--;
+
+ after(grammarAccess.getVisibilityKindRule());
+ match(input,EOF,FOLLOW_EOF_in_entryRuleVisibilityKind488);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end "entryRuleVisibilityKind"
+
+
+ // $ANTLR start "ruleVisibilityKind"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:265:1: ruleVisibilityKind : ( ( rule__VisibilityKind__Alternatives ) ) ;
+ public final void ruleVisibilityKind() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:269:2: ( ( ( rule__VisibilityKind__Alternatives ) ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:270:1: ( ( rule__VisibilityKind__Alternatives ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:270:1: ( ( rule__VisibilityKind__Alternatives ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:271:1: ( rule__VisibilityKind__Alternatives )
+ {
+ before(grammarAccess.getVisibilityKindAccess().getAlternatives());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:272:1: ( rule__VisibilityKind__Alternatives )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:272:2: rule__VisibilityKind__Alternatives
+ {
+ pushFollow(FOLLOW_rule__VisibilityKind__Alternatives_in_ruleVisibilityKind514);
+ rule__VisibilityKind__Alternatives();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getVisibilityKindAccess().getAlternatives());
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "ruleVisibilityKind"
+
+
+ // $ANTLR start "rule__AbstractRule__Alternatives"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:284:1: rule__AbstractRule__Alternatives : ( ( ( rule__AbstractRule__Group_0__0 ) ) | ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) );
+ public final void rule__AbstractRule__Alternatives() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:288:1: ( ( ( rule__AbstractRule__Group_0__0 ) ) | ( ( rule__AbstractRule__UndefinedAssignment_1 ) ) )
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>=RULE_ID && LA1_0<=RULE_STRING)||(LA1_0>=12 && LA1_0<=13)||LA1_0==15||(LA1_0>=17 && LA1_0<=20)) ) {
+ alt1=1;
+ }
+ else if ( (LA1_0==16) ) {
+ alt1=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 1, 0, input);
+
+ throw nvae;
+ }
+ switch (alt1) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:289:1: ( ( rule__AbstractRule__Group_0__0 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:289:1: ( ( rule__AbstractRule__Group_0__0 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:290:1: ( rule__AbstractRule__Group_0__0 )
+ {
+ before(grammarAccess.getAbstractRuleAccess().getGroup_0());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:291:1: ( rule__AbstractRule__Group_0__0 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:291:2: rule__AbstractRule__Group_0__0
+ {
+ pushFollow(FOLLOW_rule__AbstractRule__Group_0__0_in_rule__AbstractRule__Alternatives550);
+ rule__AbstractRule__Group_0__0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAbstractRuleAccess().getGroup_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:295:6: ( ( rule__AbstractRule__UndefinedAssignment_1 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:295:6: ( ( rule__AbstractRule__UndefinedAssignment_1 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:296:1: ( rule__AbstractRule__UndefinedAssignment_1 )
+ {
+ before(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:297:1: ( rule__AbstractRule__UndefinedAssignment_1 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:297:2: rule__AbstractRule__UndefinedAssignment_1
+ {
+ pushFollow(FOLLOW_rule__AbstractRule__UndefinedAssignment_1_in_rule__AbstractRule__Alternatives568);
+ rule__AbstractRule__UndefinedAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAbstractRuleAccess().getUndefinedAssignment_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__AbstractRule__Alternatives"
+
+
+ // $ANTLR start "rule__AbstractRule__Alternatives_0_2"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:306:1: rule__AbstractRule__Alternatives_0_2 : ( ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) | ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) );
+ public final void rule__AbstractRule__Alternatives_0_2() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:310:1: ( ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) ) | ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) ) )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>=RULE_INT && LA2_0<=RULE_STRING)||(LA2_0>=12 && LA2_0<=13)||LA2_0==15) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==RULE_ID) ) {
+ alt2=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:311:1: ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:311:1: ( ( rule__AbstractRule__ValueAssignment_0_2_0 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:312:1: ( rule__AbstractRule__ValueAssignment_0_2_0 )
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:313:1: ( rule__AbstractRule__ValueAssignment_0_2_0 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:313:2: rule__AbstractRule__ValueAssignment_0_2_0
+ {
+ pushFollow(FOLLOW_rule__AbstractRule__ValueAssignment_0_2_0_in_rule__AbstractRule__Alternatives_0_2601);
+ rule__AbstractRule__ValueAssignment_0_2_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAbstractRuleAccess().getValueAssignment_0_2_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:317:6: ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:317:6: ( ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:318:1: ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 )
+ {
+ before(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:319:1: ( rule__AbstractRule__InstanceSpecificationAssignment_0_2_1 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:319:2: rule__AbstractRule__InstanceSpecificationAssignment_0_2_1
+ {
+ pushFollow(FOLLOW_rule__AbstractRule__InstanceSpecificationAssignment_0_2_1_in_rule__AbstractRule__Alternatives_0_2619);
+ rule__AbstractRule__InstanceSpecificationAssignment_0_2_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getAbstractRuleAccess().getInstanceSpecificationAssignment_0_2_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__AbstractRule__Alternatives_0_2"
+
+
+ // $ANTLR start "rule__AbstractRule__ValueAlternatives_0_2_0_0"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:328:1: rule__AbstractRule__ValueAlternatives_0_2_0_0 : ( ( ruleLiteralBooleanRule ) | ( ruleLiteralIntegerOrUnlimitedNaturalRule ) | ( ruleLiteralRealRule ) | ( ruleLiteralNullRule ) | ( ruleLiteralStringRule ) );
+ public final void rule__AbstractRule__ValueAlternatives_0_2_0_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:332:1: ( ( ruleLiteralBooleanRule ) | ( ruleLiteralIntegerOrUnlimitedNaturalRule ) | ( ruleLiteralRealRule ) | ( ruleLiteralNullRule ) | ( ruleLiteralStringRule ) )
+ int alt3=5;
+ switch ( input.LA(1) ) {
+ case 12:
+ case 13:
+ {
+ alt3=1;
+ }
+ break;
+ case RULE_INT:
+ {
+ alt3=2;
+ }
+ break;
+ case RULE_DOUBLE:
+ {
+ alt3=3;
+ }
+ break;
+ case 15:
+ {
+ alt3=4;
+ }
+ break;
+ case RULE_STRING:
+ {
+ alt3=5;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 3, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt3) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:333:1: ( ruleLiteralBooleanRule )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:333:1: ( ruleLiteralBooleanRule )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:334:1: ruleLiteralBooleanRule
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0());
+ pushFollow(FOLLOW_ruleLiteralBooleanRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0652);
+ ruleLiteralBooleanRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleAccess().getValueLiteralBooleanRuleParserRuleCall_0_2_0_0_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:339:6: ( ruleLiteralIntegerOrUnlimitedNaturalRule )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:339:6: ( ruleLiteralIntegerOrUnlimitedNaturalRule )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:340:1: ruleLiteralIntegerOrUnlimitedNaturalRule
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1());
+ pushFollow(FOLLOW_ruleLiteralIntegerOrUnlimitedNaturalRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0669);
+ ruleLiteralIntegerOrUnlimitedNaturalRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleAccess().getValueLiteralIntegerOrUnlimitedNaturalRuleParserRuleCall_0_2_0_0_1());
+
+ }
+
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:345:6: ( ruleLiteralRealRule )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:345:6: ( ruleLiteralRealRule )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:346:1: ruleLiteralRealRule
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2());
+ pushFollow(FOLLOW_ruleLiteralRealRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0686);
+ ruleLiteralRealRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleAccess().getValueLiteralRealRuleParserRuleCall_0_2_0_0_2());
+
+ }
+
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:351:6: ( ruleLiteralNullRule )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:351:6: ( ruleLiteralNullRule )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:352:1: ruleLiteralNullRule
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3());
+ pushFollow(FOLLOW_ruleLiteralNullRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0703);
+ ruleLiteralNullRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleAccess().getValueLiteralNullRuleParserRuleCall_0_2_0_0_3());
+
+ }
+
+
+ }
+ break;
+ case 5 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:357:6: ( ruleLiteralStringRule )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:357:6: ( ruleLiteralStringRule )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:358:1: ruleLiteralStringRule
+ {
+ before(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4());
+ pushFollow(FOLLOW_ruleLiteralStringRule_in_rule__AbstractRule__ValueAlternatives_0_2_0_0720);
+ ruleLiteralStringRule();
+
+ state._fsp--;
+
+ after(grammarAccess.getAbstractRuleAccess().getValueLiteralStringRuleParserRuleCall_0_2_0_0_4());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__AbstractRule__ValueAlternatives_0_2_0_0"
+
+
+ // $ANTLR start "rule__LiteralBooleanRule__ValueAlternatives_0"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:368:1: rule__LiteralBooleanRule__ValueAlternatives_0 : ( ( 'true' ) | ( 'false' ) );
+ public final void rule__LiteralBooleanRule__ValueAlternatives_0() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:372:1: ( ( 'true' ) | ( 'false' ) )
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==12) ) {
+ alt4=1;
+ }
+ else if ( (LA4_0==13) ) {
+ alt4=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("", 4, 0, input);
+
+ throw nvae;
+ }
+ switch (alt4) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:373:1: ( 'true' )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:373:1: ( 'true' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:374:1: 'true'
+ {
+ before(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0());
+ match(input,12,FOLLOW_12_in_rule__LiteralBooleanRule__ValueAlternatives_0753);
+ after(grammarAccess.getLiteralBooleanRuleAccess().getValueTrueKeyword_0_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:381:6: ( 'false' )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:381:6: ( 'false' )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:382:1: 'false'
+ {
+ before(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1());
+ match(input,13,FOLLOW_13_in_rule__LiteralBooleanRule__ValueAlternatives_0773);
+ after(grammarAccess.getLiteralBooleanRuleAccess().getValueFalseKeyword_0_1());
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+
+ restoreStackSize(stackSize);
+
+ }
+ return ;
+ }
+ // $ANTLR end "rule__LiteralBooleanRule__ValueAlternatives_0"
+
+
+ // $ANTLR start "rule__VisibilityKind__Alternatives"
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:394:1: rule__VisibilityKind__Alternatives : ( ( ( rule__VisibilityKind__PublicAssignment_0 ) ) | ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) | ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) | ( ( rule__VisibilityKind__PackageAssignment_3 ) ) );
+ public final void rule__VisibilityKind__Alternatives() throws RecognitionException {
+
+ int stackSize = keepStackSize();
+
+ try {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:398:1: ( ( ( rule__VisibilityKind__PublicAssignment_0 ) ) | ( ( rule__VisibilityKind__PrivateAssignment_1 ) ) | ( ( rule__VisibilityKind__ProtectedAssignment_2 ) ) | ( ( rule__VisibilityKind__PackageAssignment_3 ) ) )
+ int alt5=4;
+ switch ( input.LA(1) ) {
+ case 17:
+ {
+ alt5=1;
+ }
+ break;
+ case 18:
+ {
+ alt5=2;
+ }
+ break;
+ case 19:
+ {
+ alt5=3;
+ }
+ break;
+ case 20:
+ {
+ alt5=4;
+ }
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("", 5, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt5) {
+ case 1 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:399:1: ( ( rule__VisibilityKind__PublicAssignment_0 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:399:1: ( ( rule__VisibilityKind__PublicAssignment_0 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:400:1: ( rule__VisibilityKind__PublicAssignment_0 )
+ {
+ before(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:401:1: ( rule__VisibilityKind__PublicAssignment_0 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:401:2: rule__VisibilityKind__PublicAssignment_0
+ {
+ pushFollow(FOLLOW_rule__VisibilityKind__PublicAssignment_0_in_rule__VisibilityKind__Alternatives807);
+ rule__VisibilityKind__PublicAssignment_0();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getVisibilityKindAccess().getPublicAssignment_0());
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:405:6: ( ( rule__VisibilityKind__PrivateAssignment_1 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:405:6: ( ( rule__VisibilityKind__PrivateAssignment_1 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:406:1: ( rule__VisibilityKind__PrivateAssignment_1 )
+ {
+ before(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:407:1: ( rule__VisibilityKind__PrivateAssignment_1 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:407:2: rule__VisibilityKind__PrivateAssignment_1
+ {
+ pushFollow(FOLLOW_rule__VisibilityKind__PrivateAssignment_1_in_rule__VisibilityKind__Alternatives825);
+ rule__VisibilityKind__PrivateAssignment_1();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getVisibilityKindAccess().getPrivateAssignment_1());
+
+ }
+
+
+ }
+ break;
+ case 3 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:411:6: ( ( rule__VisibilityKind__ProtectedAssignment_2 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:411:6: ( ( rule__VisibilityKind__ProtectedAssignment_2 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:412:1: ( rule__VisibilityKind__ProtectedAssignment_2 )
+ {
+ before(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2());
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:413:1: ( rule__VisibilityKind__ProtectedAssignment_2 )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:413:2: rule__VisibilityKind__ProtectedAssignment_2
+ {
+ pushFollow(FOLLOW_rule__VisibilityKind__ProtectedAssignment_2_in_rule__VisibilityKind__Alternatives843);
+ rule__VisibilityKind__ProtectedAssignment_2();
+
+ state._fsp--;
+
+
+ }
+
+ after(grammarAccess.getVisibilityKindAccess().getProtectedAssignment_2());
+
+ }
+
+
+ }
+ break;
+ case 4 :
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:417:6: ( ( rule__VisibilityKind__PackageAssignment_3 ) )
+ {
+ // ../org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src-gen/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contentassist/antlr/internal/InternalUmlValueSpecification.g:417:6: ( ( rule__VisibilityKind__PackageAssignment_3 ) )
+ // ../org.eclipse.papyrus.uml.textedit.valuespecifica