Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglefur2011-08-13 21:51:35 +0000
committerglefur2011-08-13 21:51:35 +0000
commit211668c58b6001febe43cd2e8be650b823a92097 (patch)
tree70863fabebc27ffddf20131518a3dcc5e5a2985c /plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse
parentcc6a9fb14d7d4d980c64b9ad963bd51d58d78ae3 (diff)
downloadorg.eclipse.eef-211668c58b6001febe43cd2e8be650b823a92097.tar.gz
org.eclipse.eef-211668c58b6001febe43cd2e8be650b823a92097.tar.xz
org.eclipse.eef-211668c58b6001febe43cd2e8be650b823a92097.zip
UPDATED from other branches
Diffstat (limited to 'plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/EEFCodegenPlugin.classbin1592 -> 0 bytes
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/DynamicPropertiesEditionComponent.mtl193
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/PropertiesEditionComponent.mtl213
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl423
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractPropertiesInitializer.classbin3283 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractTransformer.classbin4789 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ComponentTransformer.classbin7102 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/IPropertiesInitializer.classbin317 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/PropertiesInitializer.classbin12065 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ViewTransformer.classbin10949 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/AbstractPropertiesGeneratorLauncher.classbin3380 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EEFLauncher.classbin2116 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EMFPropertiesLauncher.classbin586 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/IPropertiesGeneratorLauncher.classbin303 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/gmf/GMF1DescriptorsGeneratorLauncher.classbin2596 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesGeneratorLaunchersServices.classbin3478 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesInitializerStrategyServices.classbin3641 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/BundleHelper.classbin2418 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/EMFHelper.classbin4594 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/ExtensionHelper.classbin7430 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/ConditionalStep.classbin2245 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/IdentityStep.classbin780 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Step.classbin1601 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/StepWithInput.classbin537 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow$1.classbin1353 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow.classbin6057 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/AddDependency.classbin1809 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFCode.classbin2244 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFModels.classbin6142 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFCode.classbin3405 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditCode.classbin2439 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditorCode.classbin2453 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFModelCode.classbin2446 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/InitializeGenModel.classbin4950 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML$PluginXMLSearcher.classbin1618 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML.classbin3057 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/util/GenmodelHelper.classbin6567 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowContext.classbin1685 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowVariable.classbin941 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.classbin5818 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.java379
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.mtl76
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.classbin5923 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.java379
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.mtl30
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/FormPropertiesEditionPart.mtl407
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/IPropertiesEditionPart.mtl129
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/PropertiesEditionPart.mtl394
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/ViewsRepository.mtl111
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/GMF_Plugin_xml.mtl113
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/plugin_xml.mtl119
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/properties/PropertySection.mtl195
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessages.mtl121
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesProperties.mtl58
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesPropertiesFR.mtl58
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionPartProvider.mtl76
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionProvider.mtl69
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PropertiesEditionProvider.mtl241
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportMarker.classbin2398 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportService.classbin1040 -> 0 bytes
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/common.mtl562
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/filters.mtl91
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/importservice.mtl19
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/naming.mtl301
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/typeUtils.mtl37
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/viewCommon.mtl295
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1$1.classbin1757 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1.classbin4463 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction.classbin4870 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/GenerateEEFAction.classbin3567 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/EEFGenerationCallback.classbin381 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback$1.classbin1371 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback.classbin1993 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerateAll.classbin4033 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerationHelper.classbin4429 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/ImportOrganizer.classbin2704 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/actions/InitializeEEFModelsAction.classbin4384 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$1.classbin1178 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$2.classbin1588 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog.classbin4605 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$1.classbin1139 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$EEFElementEditorReferenceError.classbin1544 -> 0 bytes
-rw-r--r--plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction.classbin9034 -> 0 bytes
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetControl.mtl102
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetFormImpl.mtl89
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetGettersSetters.mtl363
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetSWTImpl.mtl89
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxControl.mtl71
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxFormImpl.mtl60
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxGettersSetters.mtl33
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxSWTImpl.mtl60
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboControl.mtl109
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboFormImpl.mtl75
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboGettersSetters.mtl125
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboSWTImpl.mtl72
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customControl.mtl45
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customFormImpl.mtl36
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customSWTImpl.mtl36
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerControl.mtl54
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerFormImpl.mtl75
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerGettersSetters.mtl86
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerSWTImpl.mtl73
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerControl.mtl251
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerFormImpl.mtl141
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerGettersSetters.mtl169
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerSWTImpl.mtl131
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableControl.mtl120
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableFormImpl.mtl72
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableGettersSetters.mtl132
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableSWTImpl.mtl72
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupFormImpl.mtl43
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupSWTImpl.mtl41
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxFormImpl.mtl51
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxSWTImpl.mtl50
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerControl.mtl73
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerFormImpl.mtl72
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerGettersSetters.mtl85
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerSWTImpl.mtl67
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorControl.mtl49
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorFormImpl.mtl112
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorGettersSetters.mtl86
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorSWTImpl.mtl109
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioControl.mtl63
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioFormImpl.mtl61
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioGettersSetters.mtl91
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioSWTImpl.mtl62
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableControl.mtl229
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableFormImpl.mtl378
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableGettersSetters.mtl137
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableSWTImpl.mtl378
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextControl.mtl59
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextFormImpl.mtl152
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextGettersSetters.mtl33
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextSWTImpl.mtl152
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogControl.mtl63
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogFormImpl.mtl94
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogGettersSetters.mtl34
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogSWTImpl.mtl93
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerControl.mtl34
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerFormImpl.mtl89
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerGettersSetters.mtl126
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerSWTImpl.mtl102
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionControl.mtl317
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionFormImpl.mtl325
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionGettersSetters.mtl143
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionSWTImpl.mtl327
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textControl.mtl72
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textFormImpl.mtl74
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textGettersSetters.mtl34
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textSWTImpl.mtl86
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaControl.mtl58
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaFormImpl.mtl66
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaGettersSetters.mtl33
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaSWTImpl.mtl66
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxFormImpl.mtl40
-rwxr-xr-xplugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxSWTImpl.mtl39
156 files changed, 0 insertions, 12778 deletions
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/EEFCodegenPlugin.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/EEFCodegenPlugin.class
deleted file mode 100644
index d8d9a2bff..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/EEFCodegenPlugin.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/DynamicPropertiesEditionComponent.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/DynamicPropertiesEditionComponent.mtl
deleted file mode 100755
index 09b6056e0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/DynamicPropertiesEditionComponent.mtl
+++ /dev/null
@@ -1,193 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module DynamicPropertiesEditionComponent('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/views/1.0.0','http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[import typeUtils /]
-
-[template public DynamicPropertiesEditionComponent(peContext : PropertiesEditionContext, basePackage : String)]
-[for (pec : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
- [for (topLevelView : View | pec.views) ? (topLevelView.explicit)]
-[if (pec.mustDynamicPecBeGenerated(topLevelView))]
-[file (pec.fullFilePath(topLevelView), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [pec.componentsPackage()/];
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import [pec.model.qualifiedName(basePackage)/];
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
-import org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.impl.parts.NullCompositePropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPartProviderService;
-
-import [topLevelView.pepQualifiedInterface()/];
-import [topLevelView.owningViewsRepository().vrQualifiedClass()/];
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
-[if (pec.model.eefPackage(basePackage) <> subPec.model.eefPackage(basePackage))]
- [for (subView : View | subPec.views) ? (subView.ancestors()->includes(topLevelView))]
-import [subPec.subPECQualifiedClass(subView)/];
- [/for]
-[/if]
-[/for]
-[additionalImports()/]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [pec.subPECClass(topLevelView)/] extends ComposedPropertiesEditionComponent {
-
- public static String [topLevelView.viewPartConstant(pec)/] = "[topLevelView.viewKey(pec).toASCII()/]"; //$NON-NLS-1$
-
- private String['['/][']'/] parts = {[topLevelView.viewPartConstant(pec)/]};
-
- /**
- * The EObject to edit
- * [peContext.associatedGenModel().generationMark()/]
- */
- private [pec.model.name/] [pec.model.name.toJavaIdentifier()/];
-
- /**
- * The [topLevelView.viewKey(pec)/] part
- * [peContext.associatedGenModel().generationMark()/]
- */
- private [topLevelView.pepInterface()/] [topLevelView.viewIdentifier(pec)/];
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#partsList()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String['['/][']'/] partsList() {
- return parts;
- }
-
-[comment]
-Implemented later ...
-[for (view : View | pec.views) ? (pec.mustBeGenerated())]
- private [pec.subPECClass(view)/] [pec.subPECClass(view).toLowerFirst()/];
-[/for]
-[/comment]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) ? (subPec.mustBeGenerated())]
- [for (view : View | subPec.views) ? (view.ancestors()->includes(topLevelView))]
- /**
- * The [subPec.subPECClass(view)/] sub component
- * [peContext.associatedGenModel().generationMark()/]
- */
- protected [subPec.subPECClass(view)/] [subPec.subPECClass(view).toLowerFirst()/];
-
- [/for]
-[/for]
- /**
- * Parameterized constructor
- *
- * @param [pec.model.name.toJavaIdentifier()/] the EObject to edit
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [pec.subPECClass(topLevelView)/](EObject [pec.model.name.toJavaIdentifier()/], String editing_mode) {
- super(editing_mode);
- if ([pec.model.name.toJavaIdentifier()/] instanceof [pec.model.name/]) {
-[comment]
-Implemented later ...
-[for (view : View | pec.views) ? (pec.mustBeGenerated())]
- [pec.subPECClass(view).toLowerFirst()/] = new [pec.subPECClass(view)/]([pec.model.name.toJavaIdentifier().trim()/], editing_mode);
- addSubComponent([pec.subPECClass(view).toLowerFirst()/]);
-[/for]
-[/comment]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) ? (subPec.mustBeGenerated())]
- [for (view : View | subPec.views) ? (view.ancestors()->includes(topLevelView))]
- [subPec.subPECClass(view).toLowerFirst()/] = new [subPec.subPECClass(view)/]([pec.model.name.toJavaIdentifier()/], editing_mode);
- addSubComponent([subPec.subPECClass(view).toLowerFirst()/]);
- [/for]
-[/for]
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#
- * getPropertiesEditionPart(int, java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public IPropertiesEditionPart getPropertiesEditionPart(int kind, String key) {
- if ([topLevelView.viewPartConstant(pec)/].equals(key) && [pec.model.name.toJavaIdentifier()/] == null) {
- IPropertiesEditionPartProvider provider = PropertiesEditionPartProviderService.getInstance().getProvider([topLevelView.owningViewsRepository().vrClass()/].class);
- if (provider != null) {
- [topLevelView.viewIdentifier(pec)/] = ([topLevelView.pepInterface()/])provider.getPropertiesEditionPart([topLevelView.editorID()/].class, kind, this);
- }
- return (IPropertiesEditionPart)[topLevelView.viewIdentifier(pec)/];
- }
- return new NullCompositePropertiesEditionPart(this);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#translatePart(java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public java.lang.Class translatePart(String key) {
- if ([topLevelView.viewPartConstant(pec)/].equals(key))
- return [topLevelView.editorID()/].class;
- return super.translatePart(key);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#mustBeComposed(java.lang.Object, int)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public boolean mustBeComposed(Object key, int kind) {
- return [for (view : View | pec.dynamicViews(topLevelView)) separator (' || ')]key == [view.editorID()/].class[/for];
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent
- * #initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.resource.ResourceSet)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void initPart(Object key, int kind, EObject element, ResourceSet allResource) {
- if (key == [topLevelView.editorID()/].class) {
- ((IPropertiesEditionPart)[topLevelView.viewIdentifier(pec)/]).setContext(element, allResource);
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) ? (subPec.mustBeGenerated())]
- [for (view : View | subPec.views) ? (view.ancestors()->includes(topLevelView))]
- [subPec.subPECClass(view).toLowerFirst()/].setPropertiesEditionPart([view.editorID()/].class, kind, [topLevelView.viewIdentifier(pec)/].get[view.name.toJavaClassifier()/]SubView());
- [subPec.subPECClass(view).toLowerFirst()/].initPart([view.editorID()/].class, kind, element);
- [/for]
-[/for]
- }
- }
-}
-[/file]
- [/if]
- [/for]
-[/for]
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionComponent, view : View)]
-[pec.subPECQualifiedClass(view).toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/PropertiesEditionComponent.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/PropertiesEditionComponent.mtl
deleted file mode 100755
index 29018bd9b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/PropertiesEditionComponent.mtl
+++ /dev/null
@@ -1,213 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PropertiesEditionComponent('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import naming /]
-[import common /]
-
-[template private defaultImports(pec : PropertiesEditionComponent, basePackage : String)]
-import org.eclipse.emf.ecore.EObject;
-import [pec.model.qualifiedName(basePackage)/];
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionProvider;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionComponentService;
-import org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent;
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
-[if (pec.model.eefPackage(basePackage) <> subPec.model.eefPackage(basePackage))]
- [for (view : View | subPec.views) ? (view.explicit)]
-import [subPec.subPECQualifiedClass(view)/];
- [/for]
-[/if]
-[/for]
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-[for (view : View | pec.views) ? (view.explicit)]
-import [view.pepQualifiedInterface()/];
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
- [for (view : View | subPec.views) ? (view.explicit and view.ancestors()->select(oclIsKindOf(View)).oclAsType(View)->excludesAll(pec.views->asSequence()))]
- [if (view.isA1stLevelReferencedView(pec))]
-import [subPec.pecQualifiedClass()/];
- [else]
-import [subPec.subPECQualifiedClass(view)/];
- [/if]
- [/for]
-[/for]
-[for (vr : ViewsRepository | pec.views->asSequence()->union(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)).views).owningViewsRepository()->asSet())]
-import [vr.vrQualifiedClass()/];
-[/for]
-[additionalImports()/]
-[/template]
-
-[template public PropertiesEditionComponent(peContext : PropertiesEditionContext, basePackage : String)]
-[for (pec : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[if (pec.needComposedEditionComponent())]
-[file (pec.fullFilePath(), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [pec.componentsPackage()/];
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultImports(basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultImports(basePackage)/]
-
-// [/protected]
-[/if]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [pec.pecClass()/] extends ComposedPropertiesEditionComponent {
-
-[for (view : View | pec.views) separator ('\n') ? (view.explicit)]
- /**
- * The [view.viewKey(pec)/] part
- * [peContext.associatedGenModel().generationMark()/]
- */
- private [view.pepInterface()/] [view.viewIdentifier(pec)/];
-
- /**
- * The [pec.subPECClass(view)/] sub component
- * [peContext.associatedGenModel().generationMark()/]
- */
- protected [pec.subPECClass(view)/] [pec.subPECClass(view).toLowerFirst()/];
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
-[for (view : View | subPec.views) ? (view.explicit and view.ancestors()->select(oclIsKindOf(View)).oclAsType(View)->excludesAll(pec.views->asSequence()))]
- [if (view.isA1stLevelReferencedView(pec))]
- /**
- * The [subPec.pecClass()/] sub component
- * [peContext.associatedGenModel().generationMark()/]
- */
- protected [subPec.pecClass()/] [subPec.pecClass().toLowerFirst()/];
-
- [else]
- /**
- * The [subPec.subPECClass(view)/] sub component
- * [peContext.associatedGenModel().generationMark()/]
- */
- protected [subPec.subPECClass(view)/] [subPec.subPECClass(view).toLowerFirst()/];
-
- [/if]
-[/for]
-[/for]
- /**
- * Parameterized constructor
- *
- * @param [pec.model.name.toJavaIdentifier()/] the EObject to edit
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [pec.pecClass()/](PropertiesEditingContext editingContext, EObject [pec.model.name.toJavaIdentifier()/], String editing_mode) {
- super(editingContext, editing_mode);
- if ([pec.model.name.toJavaIdentifier()/] instanceof [pec.model.name/]) {
- PropertiesEditingProvider provider = null;
-[for (view : View | pec.views) ? (view.explicit)]
- provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt([pec.model.name.toJavaIdentifier()/], PropertiesEditingProvider.class);
- [pec.subPECClass(view).toLowerFirst()/] = ([pec.subPECClass(view)/])provider.getPropertiesEditingComponent(editingContext, editing_mode, [pec.subPECClass(view)/].[view.viewPartConstant(pec)/], [pec.subPECClass(view)/].class);
- addSubComponent([pec.subPECClass(view).toLowerFirst()/]);
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
- [for (view : View | subPec.views) ? (view.explicit and view.ancestors()->select(oclIsKindOf(View)).oclAsType(View)->excludesAll(pec.views->asSequence()))]
- provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt([pec.model.name.toJavaIdentifier()/], PropertiesEditingProvider.class);
- [if (view.isA1stLevelReferencedView(pec))]
- [subPec.pecClass().toLowerFirst()/] = ([subPec.pecClass()/])provider.getPropertiesEditingComponent(editingContext, editing_mode, [subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/], [subPec.pecClass()/].class);
- addSubComponent([subPec.pecClass().toLowerFirst()/]);
- [else]
- [subPec.pecClass().toLowerFirst()/] = ([subPec.pecClass()/])provider.getPropertiesEditingComponent(editingContext, editing_mode, [subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/], [subPec.pecClass()/].class);
- addSubComponent([subPec.subPECClass(view).toLowerFirst()/]);
- [/if]
- [/for]
-[/for]
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#
- * getPropertiesEditionPart(int, java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public IPropertiesEditionPart getPropertiesEditionPart(int kind, String key) {
-[for (view : View | pec.views) ? (view.explicit)]
- if ([pec.subPECClass(view)/].[view.viewPartConstant(pec)/].equals(key)) {
- [view.viewIdentifier(pec)/] = ([view.pepInterface()/])[pec.subPECClass(view).toLowerFirst()/].getPropertiesEditionPart(kind, key);
- return (IPropertiesEditionPart)[view.viewIdentifier(pec)/];
- }
-[/for]
- return super.getPropertiesEditionPart(kind, key);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#
- * setPropertiesEditionPart(java.lang.Object, int,
- * org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void setPropertiesEditionPart(java.lang.Object key, int kind, IPropertiesEditionPart propertiesEditionPart) {
-[for (view : View | pec.views) ? (view.explicit)]
- if ([view.editorID()/].class == key) {
- super.setPropertiesEditionPart(key, kind, propertiesEditionPart);
- [view.viewIdentifier(pec)/] = ([view.pepInterface()/])propertiesEditionPart;
- }
-[/for]
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.ComposedPropertiesEditionComponent#
- * initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.ecore.resource.ResourceSet)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void initPart(java.lang.Object key, int kind, EObject element, ResourceSet allResource) {
-[for (view : View | pec.views)]
- if (key == [view.editorID()/].class) {
- super.initPart(key, kind, element, allResource);
- [for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding.oclAsType(PropertiesEditionComponent))]
- [for (refView : View | subPec.views->select(explicit))]
- [if (view.eAllContents(ViewReference).oclAsType(ViewReference).view->select(oclIsKindOf(View)).oclAsType(View)->includes(refView))]
- [subPec.pecClass().toLowerFirst()/].setPropertiesEditionPart([refView.editorID()/].class, kind, [view.viewIdentifier(pec)/].get[refView.name.toJavaClassifier()/]ReferencedView());
- [subPec.pecClass().toLowerFirst()/].initPart([refView.editorID()/].class, kind, element, allResource);
- [/if]
- [/for]
- [/for]
- }
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding.oclAsType(PropertiesEditionComponent))]
- [for (refView : View | subPec.views->select(explicit))]
- if (key == [refView.editorID()/].class) {
- super.initPart(key, kind, element, allResource);
- [comment what about referenced view resolution in this case ? /]
- [/for]
- }
-[/for]
- }
-}
-[/file]
-[/if]
-[/for]
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionComponent)]
-[pec.pecQualifiedClass().toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(pec : PropertiesEditionComponent)]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl
deleted file mode 100755
index a96bc4b9d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/components/SubPropertiesEditionComponent.mtl
+++ /dev/null
@@ -1,423 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module SubPropertiesEditionComponent('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/views/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0','http://www.eclipse.org/emf/2002/Ecore','http://www.eclipse.org/emf/eef/mapping/filters/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[import widgetControl /]
-[import typeUtils /]
-[import filters /]
-
-[template private defaultImports(pec : PropertiesEditionComponent, view : View, basePackage : String)]
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.command.IdentityCommand;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.BasicDiagnostic;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.ecore.EcorePackage;
-import [pec.model.qualifiedName(basePackage)/];
-import org.eclipse.emf.eef.runtime.EEFRuntimePlugin;
-[comment add import for external ViewReference (stored in another resource)/]
-[view.manageImportForViewReferences(pec, basePackage)/]
-[comment add import for ViewReference/]
-import org.eclipse.emf.ecore.EStructuralFeature;
-[for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement)) ? ((not model.eType.oclIsKindOf(EDataType)) or model.eType.oclIsKindOf(EEnum))]
-import [pee.model.eType.qualifiedName(basePackage)/];
-[if (not pee.navigation.oclIsUndefined() and pee.navigation.oclIsKindOf(SimpleModelNavigation) and not pee.navigation.oclAsType(SimpleModelNavigation).discriminatorType.oclIsUndefined())]
-import [pee.navigation.oclAsType(SimpleModelNavigation).discriminatorType.qualifiedName(basePackage)/];
-[/if]
-[/for]
-[for (ePackage : EPackage | pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement)->select((not model.eType.oclIsKindOf(EDataType)) or model.eType.oclIsKindOf(EEnum)).model.eType.ePackage->asSet())]
-import [ePackage.qualifiedMetamodelPackage()/];
-import [ePackage.qualifiedMetamodelFactory()/];
-[/for]
-[for (v : View | view.eAllContents(ViewReference).oclAsType(ViewReference).view)]
-[for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(v).oclAsType(PropertiesEditionElement)) ? ((not model.eType.oclIsKindOf(EDataType)) or model.eType.oclIsKindOf(EEnum))]
-import [pee.model.eType.qualifiedName(basePackage)/];
-[if (model.eType.oclIsTypeOf(EEnum))]
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnumLiteral;
-[/if]
-[/for]
-[/for]
-[if (pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement)->select(model.eType.oclIsKindOf(EEnum))->notEmpty())]
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnumLiteral;
-[/if]
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.Diagnostician;
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.common.util.WrappedException;
-[if (pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement).views->select(representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.util.EContentAdapter;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.DeleteCommand;
-[/if]
-[if (pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement).views->select(representation.name = 'ReferencesTable' or representation.name = 'AdvancedReferencesTable')->notEmpty())]
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.ecore.resource.Resource;
-[/if]
-[if (pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement).views->select(representation.name = 'MultiValuedEditor')->notEmpty())]
-import org.eclipse.emf.common.util.EList;
-[/if]
-import org.eclipse.emf.edit.domain.EditingDomain;
-[for (ePackage : EPackage | pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement).model.eContainingClass.ePackage->asSet()->including(pec.model.oclAsType(EClass).ePackage))]
-import [ePackage.qualifiedMetamodelPackage()/];
-[/for]
-[comment]
-[let deferredPec : PropertiesEditionComponent = if (pec.views->includes(view))
- then pec
- else pec.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif]
-import [view.owningViewsRepository().vrPackage()/].parts.[view.pepInterface()/];
-[/let]
-[/comment]
-import [view.pepQualifiedInterface()/];
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener;
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
-import [pec.pecQualifiedComponentSuperClass()/];
-import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
-import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesContextService;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPartProviderService;
-[for (element : PropertiesEditionElement | pec.involvedEditionElementsInView(view)) ? (element.views->select(representation.name = 'EMFComboViewer')->notEmpty() or element.views->select(representation.name = 'EObjectFlatComboViewer')->notEmpty() or element.views->select(representation.name = 'AdvancedEObjectFlatComboViewer')->notEmpty())]
-import [element.model.eType.qualifiedName(basePackage)/];
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-[/for]
-[for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement)->select(views->select(representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty()))]
-import [pee.model.eType.qualifiedName(basePackage)/];
-[/for]
-[for (vr : ViewsRepository | pec.involvedViews().owningViewsRepository()->asSet())]
-import [vr.vrQualifiedClass()/];
-[/for]
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.Viewer;
-[comment for filters /]
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-[for (element : PropertiesEditionElement | pec.involvedEditionElementsInView(view)) ? (element.bindingFilters->notEmpty())]
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectStrictFilter;
-import org.eclipse.emf.eef.runtime.impl.utils.EEFUtils;
-import org.eclipse.emf.eef.runtime.impl.utils.EEFConverterUtil;
-[for (bindingFilter : BindingFilter | element.bindingFilters) ? (bindingFilter.oclIsTypeOf(OnlyReferenceTypeFilter))]
-import [bindingFilter.oclAsType(OnlyReferenceTypeFilter).reference.eContainingClass.qualifiedMetamodelPackage()/];
-[/for]
-[/for]
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-[view.additionalImports()/]
-[/template]
-
-[template public SubPropertiesEditionComponent(peContext : PropertiesEditionContext, basePackage : String)]
-[for (pec : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[if (pec.mustBeGenerated())]
- [for (view : View | pec.views) ? (not view.isDynamicView())]
-[file (pec.fullFilePath(view, basePackage), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [pec.componentsPackage()/];
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultImports(view, basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultImports(view, basePackage)/]
-
-// [/protected]
-[/if]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark().trim()/]
- */
-public class [pec.subPECClass(view)/] extends [pec.pecComponentSuperClass()/] {
-
- [peContext.associatedGenModel().generationComment()/]
- public static String [view.viewPartConstant(pec)/] = "[view.viewKey(pec).toASCII()/]"; //$NON-NLS-1$
-
- [for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(view))][editionElement.additionalComponentField(view, pec)/][/for]
- [for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(components::PropertiesEditionElement)->select(pee : PropertiesEditionElement | pee.canGeneratemodelNavigation()))][editionElement.additionalComponentFieldForModelNavigation(view, pec)/][/for]
- /**
- * Default constructor
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [pec.subPECClass(view)/](PropertiesEditingContext editingContext, EObject [pec.model.name.toJavaIdentifier()/], String editing_mode) {
- super(editingContext, [pec.model.name.toJavaIdentifier()/], editing_mode);
- parts = new String['['/][']'/] { [view.viewPartConstant(pec)/] };
- repositoryKey = [view.owningViewsRepository().vrClass()/].class;
- partKey = [view.editorID()/].class;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.ecore.resource.ResourceSet)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
- setInitializing(true);
- if (editingPart != null && key == partKey) {
- editingPart.setContext(elt, allResource);
- final [pec.model.name/] [pec.model.name.toJavaIdentifier()/] = ([pec.model.name/])elt;
- final [view.pepInterface()/] [view.viewIdentifier(pec)/] = ([view.pepInterface()/])editingPart;
- // init values
- [if (view.oclIsKindOf(views::CustomView) and not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for'.concat(view.name).concat(' custom view initialization'))]
-
- // [/protected]
- [else]
- [for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view))]
- [pee.updater(view, pec)/]
- [/for]
- [/if]
- // init filters
-[for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view))]
- [pee.filterUpdater(view, pec)/]
-[/for]
- // init values for referenced views
- [view.updaterForReferencedViews(pec)/]
- // init filters for referenced views
- [view.filterUpdaterForReferencedViews(pec)/]
- }
- setInitializing(false);
- }
-
-[for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view))]
-[pee.javaDeclarationFilter()/]
-[/for]
-[view.javaDeclarationFilterForReferencedViews(pec)/]
-[if (pec.involvedEditionElementsInView(view).oclAsType(components::PropertiesEditionElement)->select(pee : PropertiesEditionElement | pee.hasModelNavigation())->notEmpty())]
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.impl.components.SinglePartPropertiesEditingComponent#shouldProcess(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- */
- protected boolean shouldProcess(IPropertiesEditionEvent event) {
- [for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(components::PropertiesEditionElement)->select(pee : PropertiesEditionElement | pee.hasModelNavigation()))]
- if (event.getAffectedEditor() == [pee.views->first().editorID()/]) {
- return ([pee.name.toJavaIdentifier()/]Settings.getValue() == null) ? (event.getNewValue() != null) : (![pee.name.toJavaIdentifier()/]Settings.getValue().equals(event.getNewValue()));
- }
- [/for]
- return super.shouldProcess(event);
- }
-[/if]
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#associatedFeature(java.lang.Object)
- */
- protected EStructuralFeature associatedFeature(Object editorKey) {
- [for (pee : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(components::PropertiesEditionElement)->select(pee : PropertiesEditionElement | not pee.hasModelNavigation()))]
- if (editorKey == [pee.views->first().editorID()/]) {
- return [pee.metamodelGetter()/];
- }
- [/for]
- return super.associatedFeature(editorKey);
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void updateSemanticModel(final IPropertiesEditionEvent event) {
- [if (view.oclIsTypeOf(views::CustomView) and not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for updateSemanticModel body')]
-
- // [/protected]
- [else]
- [pec.model.name/] [pec.model.name.toJavaIdentifier().disambiguation('event')/] = ([pec.model.name/])semanticObject;
- [for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(view).oclAsType(PropertiesEditionElement)->select(pee : PropertiesEditionElement | pee.model.changeable and not pee.views->first().readOnly))]
- if ([editionElement.views->first().editorID()/] == event.getAffectedEditor()) {
- [editionElement.declareEObjectUpdater(view, pec)/]
- }
- [/for]
- [/if]
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updatePart(org.eclipse.emf.common.notify.Notification)
- */
- public void updatePart(Notification msg) {
- if (editingPart.isVisible()) {
- [if (view.oclIsTypeOf(views::CustomView) and not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for updatePart body')]
-
- // [/protected]
- [else]
- [view.pepInterface()/] [view.viewIdentifier(pec)/] = ([view.pepInterface()/])editingPart;
- [for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(view))]
- [editionElement.liveUpdater(view, pec)/]
- [/for]
- [comment add ViewReference support/]
- [view.liveUpdaterForReferencedViews(pec)/]
- [/if]
- }
- }
-
-[if (not pec.properties.oclAsType(PropertiesEditionElement).views->includesAll(view.eAllContents(views::ElementEditor)))]
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#mustBeComposed(java.lang.Object, int)
- */
- public boolean mustBeComposed(Object key, int kind) {
- [let containers : Set(views::Container) = view.eAllContents(ElementEditor)->reject(e : ElementEditor | not pec.properties.views->includes(e)).ancestors()->select(e | e.oclIsTypeOf(views::Container))->asOrderedSet()]
- return [for (pee : PropertiesEditionElement | pec.properties.oclAsType(PropertiesEditionElement)->select(pee : PropertiesEditionElement | view.eAllContents(ElementEditor)->includes(pee.views->first()))) separator (' || ')]key == [pee.views->first().editorID()/][/for][if (containers->notEmpty())] || [for (cont : views::Container | containers) separator (' || ')]key == [cont.editorID()/].class[/for][/if];
- [/let]
- }
-[/if][if (pec.properties.oclAsType(PropertiesEditionElement)->select(localPee : PropertiesEditionElement | localPee.model.required)->notEmpty())]
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#isRequired(java.lang.Object, int)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public boolean isRequired(Object key, int kind) {
- return [for (pee : PropertiesEditionElement | pec.properties.oclAsType(PropertiesEditionElement)->select(f : PropertiesEditionElement | f.model.required)) separator (' || ')]key == [pee.views->first().editorID()/][/for];
- }
-[/if]
-[if (pec.properties.oclAsType(PropertiesEditionElement)->select(localPee : PropertiesEditionElement | not localPee.helpText().oclIsUndefined() and not (localPee.helpText().trim() = 'null'))->notEmpty())]
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#getHelpContent(java.lang.Object, int)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String getHelpContent(Object key, int kind) {
- [for (pee : PropertiesEditionElement | pec.properties.oclAsType(PropertiesEditionElement)->select(f : PropertiesEditionElement | not f.helpText().oclIsUndefined() and not (f.helpText().trim() = 'null')))]
- if (key == [pee.views->first().editorID()/])
- return [pee.helpText().trim()/]; //$NON-NLS-1$
- [/for]
- return super.getHelpContent(key, kind);
- }
-[/if]
-
-[pec.validateValue(peContext, view)/]
-}
-[/file]
- [/for]
-[/if]
-[/for]
-[/template]
-
-[template public validateValue (pec : PropertiesEditionComponent, peContext : PropertiesEditionContext, view : View) ]
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#validateValue(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Diagnostic validateValue(IPropertiesEditionEvent event) {
- Diagnostic ret = Diagnostic.OK_INSTANCE;
- if (event.getNewValue() != null) {
- try {
-[for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(view)) ? (editionElement.model.oclIsTypeOf(EAttribute))]
- if ([editionElement.views->first().editorID()/] == event.getAffectedEditor()) {
- [if (editionElement.model.many)]
- BasicDiagnostic chain = new BasicDiagnostic();
- for (Iterator iterator = ((List)event.getNewValue()).iterator(); iterator.hasNext();) {
- chain.add(Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), iterator.next()));
- }
- ret = chain;
- [else]
- Object newValue = event.getNewValue();
- [if (editionElement.model.eType.instanceClassName <> 'String')]
- if (newValue instanceof String) {
- newValue = EcoreUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue);
- }
- [/if]
- ret = Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), newValue);
- [/if]
- }
-[/for]
-[comment add ViewReference support/]
-[for ( v : View | view.referencedViews())]
- [for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(v)) ? (editionElement.model.oclIsTypeOf(EAttribute))]
- if ([editionElement.views->first().editorID()/] == event.getAffectedEditor()) {
- [if (editionElement.model.many)]
- BasicDiagnostic chain = new BasicDiagnostic();
- for (Iterator iterator = ((List)event.getNewValue()).iterator(); iterator.hasNext();) {
- chain.add(Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), iter.next()));
- }
- ret = chain;
- [else]
- Object newValue = event.getNewValue();
- if (newValue instanceof String) {
- newValue = EcoreUtil.createFromString([editionElement.metamodelGetter()/].getEAttributeType(), (String)newValue);
- }
- ret = Diagnostician.INSTANCE.validate([editionElement.metamodelGetter()/].getEAttributeType(), newValue);
- [/if]
- }
- [/for]
-[/for]
- } catch (IllegalArgumentException iae) {
- ret = BasicDiagnostic.toDiagnostic(iae);
- } catch (WrappedException we) {
- ret = BasicDiagnostic.toDiagnostic(we);
- }
- }
- return ret;
- }
-
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionComponent, view : View, basePackage : String)]
-[pec.subPECQualifiedClass(view).toPath()/].java
-[/template]
-
-[template public manageImportForViewReferences(view : View, pec : PropertiesEditionComponent, basePackage : String)]
-[for (v : View | view.referencedViews())]
-[for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(v)->select(i | i.oclAsType(EObject).eResource() <> pec.oclAsType(EObject).eResource()))]
-import [editionElement.model.eContainingClass.qualifiedMetamodelPackage()/];
-[/for]
-[for (viewsRepository : ViewsRepository | v.owningViewsRepository())]
-import [viewsRepository.vrQualifiedClass()/];
-[/for]
-[if (v.referencedViews()->notEmpty())]
-[manageImportForViewReferences(v, v.involvedPropertiesEditionComponent(), basePackage)/]
-[/if]
-[/for]
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractPropertiesInitializer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractPropertiesInitializer.class
deleted file mode 100644
index 1048b69dc..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractPropertiesInitializer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractTransformer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractTransformer.class
deleted file mode 100644
index f145b7666..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/AbstractTransformer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ComponentTransformer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ComponentTransformer.class
deleted file mode 100644
index c03ed138b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ComponentTransformer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/IPropertiesInitializer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/IPropertiesInitializer.class
deleted file mode 100644
index 1a65b8692..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/IPropertiesInitializer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/PropertiesInitializer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/PropertiesInitializer.class
deleted file mode 100644
index 76c2b98c9..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/PropertiesInitializer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ViewTransformer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ViewTransformer.class
deleted file mode 100644
index 8950ff265..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/initializer/ViewTransformer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/AbstractPropertiesGeneratorLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/AbstractPropertiesGeneratorLauncher.class
deleted file mode 100644
index f0b56ff36..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/AbstractPropertiesGeneratorLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EEFLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EEFLauncher.class
deleted file mode 100644
index 95d468eef..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EEFLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EMFPropertiesLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EMFPropertiesLauncher.class
deleted file mode 100644
index e7bdc0b8a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/EMFPropertiesLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/IPropertiesGeneratorLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/IPropertiesGeneratorLauncher.class
deleted file mode 100644
index 1f103b56b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/IPropertiesGeneratorLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/gmf/GMF1DescriptorsGeneratorLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/gmf/GMF1DescriptorsGeneratorLauncher.class
deleted file mode 100644
index 1be457946..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/launcher/gmf/GMF1DescriptorsGeneratorLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesGeneratorLaunchersServices.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesGeneratorLaunchersServices.class
deleted file mode 100644
index 6e563b0cb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesGeneratorLaunchersServices.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesInitializerStrategyServices.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesInitializerStrategyServices.class
deleted file mode 100644
index e5ea484dd..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/services/PropertiesInitializerStrategyServices.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/BundleHelper.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/BundleHelper.class
deleted file mode 100644
index 1c6b667ad..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/BundleHelper.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/EMFHelper.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/EMFHelper.class
deleted file mode 100644
index 618244235..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/EMFHelper.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/ExtensionHelper.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/ExtensionHelper.class
deleted file mode 100644
index 91d511e04..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/core/util/ExtensionHelper.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/ConditionalStep.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/ConditionalStep.class
deleted file mode 100644
index 67805a573..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/ConditionalStep.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/IdentityStep.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/IdentityStep.class
deleted file mode 100644
index 834cb856f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/IdentityStep.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Step.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Step.class
deleted file mode 100644
index bda38ce75..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Step.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/StepWithInput.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/StepWithInput.class
deleted file mode 100644
index 0a05e2959..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/StepWithInput.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow$1.class
deleted file mode 100644
index 079b4759a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow.class
deleted file mode 100644
index 15e7fba29..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/Workflow.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/AddDependency.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/AddDependency.class
deleted file mode 100644
index 982994f68..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/AddDependency.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFCode.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFCode.class
deleted file mode 100644
index 45d6c4e5f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFCode.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFModels.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFModels.class
deleted file mode 100644
index d3b6d3d68..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEEFModels.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFCode.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFCode.class
deleted file mode 100644
index 57d07660f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFCode.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditCode.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditCode.class
deleted file mode 100644
index 98e49aebb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditCode.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditorCode.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditorCode.class
deleted file mode 100644
index 05aff6342..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFEditorCode.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFModelCode.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFModelCode.class
deleted file mode 100644
index 53c184ae7..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/GenerateEMFModelCode.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/InitializeGenModel.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/InitializeGenModel.class
deleted file mode 100644
index 938dea7f3..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/InitializeGenModel.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML$PluginXMLSearcher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML$PluginXMLSearcher.class
deleted file mode 100644
index f3b665514..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML$PluginXMLSearcher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML.class
deleted file mode 100644
index 06d5376b5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/impl/MergePluginXML.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/util/GenmodelHelper.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/util/GenmodelHelper.class
deleted file mode 100644
index 0a5eaae4d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/util/GenmodelHelper.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowContext.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowContext.class
deleted file mode 100644
index ad7100182..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowContext.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowVariable.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowVariable.class
deleted file mode 100644
index 9303729e1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/flow/var/WorkflowVariable.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.class
deleted file mode 100644
index d3567294d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.java b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.java
deleted file mode 100644
index 458a78dd6..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.eef.codegen.launcher;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener;
-import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy;
-import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator;
-import org.eclipse.emf.common.util.BasicMonitor;
-import org.eclipse.emf.common.util.Monitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * Entry point of the 'EEFLauncher' generation module.
- *
- * @generated
- */
-public class EEFLauncher extends AbstractAcceleoGenerator {
- /**
- * The name of the module.
- *
- * @generated
- */
- public static final String MODULE_FILE_NAME = "/org/eclipse/emf/eef/codegen/launcher/EEFLauncher";
-
- /**
- * The name of the templates that are to be generated.
- *
- * @generated
- */
- public static final String[] TEMPLATE_NAMES = { "EEFLauncher" };
-
- /**
- * The list of properties files from the launch parameters (Launch configuration).
- *
- * @generated
- */
- private List<String> propertiesFiles = new ArrayList<String>();
-
- /**
- * Allows the public constructor to be used. Note that a generator created
- * this way cannot be used to launch generations before one of
- * {@link #initialize(EObject, File, List)} or
- * {@link #initialize(URI, File, List)} is called.
- * <p>
- * The main reason for this constructor is to allow clients of this
- * generation to call it from another Java file, as it allows for the
- * retrieval of {@link #getProperties()} and
- * {@link #getGenerationListeners()}.
- * </p>
- *
- * @generated
- */
- public EEFLauncher() {
- // Empty implementation
- }
-
- /**
- * This allows clients to instantiates a generator with all required information.
- *
- * @param modelURI
- * URI where the model on which this generator will be used is located.
- * @param targetFolder
- * This will be used as the output folder for this generation : it will be the base path
- * against which all file block URLs will be resolved.
- * @param arguments
- * If the template which will be called requires more than one argument taken from the model,
- * pass them here.
- * @throws IOException
- * This can be thrown in three scenarios : the module cannot be found, it cannot be loaded, or
- * the model cannot be loaded.
- * @generated
- */
- public EEFLauncher(URI modelURI, File targetFolder,
- List<? extends Object> arguments) throws IOException {
- initialize(modelURI, targetFolder, arguments);
- }
-
- /**
- * This allows clients to instantiates a generator with all required information.
- *
- * @param model
- * We'll iterate over the content of this element to find Objects matching the first parameter
- * of the template we need to call.
- * @param targetFolder
- * This will be used as the output folder for this generation : it will be the base path
- * against which all file block URLs will be resolved.
- * @param arguments
- * If the template which will be called requires more than one argument taken from the model,
- * pass them here.
- * @throws IOException
- * This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded.
- * @generated
- */
- public EEFLauncher(EObject model, File targetFolder,
- List<? extends Object> arguments) throws IOException {
- initialize(model, targetFolder, arguments);
- }
-
- /**
- * This can be used to launch the generation from a standalone application.
- *
- * @param args
- * Arguments of the generation.
- * @generated
- */
- public static void main(String[] args) {
- try {
- if (args.length < 2) {
- System.out.println("Arguments not valid : {model, folder}.");
- } else {
- URI modelURI = URI.createFileURI(args[0]);
- File folder = new File(args[1]);
-
- List<String> arguments = new ArrayList<String>();
-
- /*
- * Add in this list all the arguments used by the starting point of the generation
- * If your main template is called on an element of your model and a String, you can
- * add in "arguments" this "String" attribute.
- */
-
- EEFLauncher generator = new EEFLauncher(modelURI, folder, arguments);
-
- /*
- * Add the properties from the launch arguments.
- * If you want to programmatically add new arguments, add them in "propertiesFiles"
- * You can add the absolute path of a properties files, or even a project relative path.
- * If you want to add another "protocol" for your properties files, please override
- * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader.
- * The basic properties loader will look for properties in the current project if the path
- * of the properties file is like this "packagea.packageb.packagec.default" for a properties
- * file named default.properties, or if the path is an absolute path. With a new property
- * loader you could for example, look for properties files in a bundle.
- */
-
- for (int i = 2; i < args.length; i++) {
- generator.addPropertiesFile(args[i]);
- }
-
- generator.doGenerate(new BasicMonitor());
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Launches the generation described by this instance.
- *
- * @param monitor
- * This will be used to display progress information to the user.
- * @throws IOException
- * This will be thrown if any of the output files cannot be saved to disk.
- * @generated
- */
- @Override
- public void doGenerate(Monitor monitor) throws IOException {
- /*
- * TODO if you wish to change the generation as a whole, override this. The default behavior should
- * be sufficient in most cases. If you want to change the content of this method, do NOT forget to
- * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag,
- * any compilation of the Acceleo module with the main template that has caused the creation of this
- * class will revert your modifications. If you encounter a problem with an unresolved proxy during the
- * generation, you can remove the comments in the following instructions to check for problems. Please
- * note that those instructions may have a significant impact on the performances.
- */
-
- //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model);
-
- //if (model != null && model.eResource() != null) {
- // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors();
- // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) {
- // System.err.println(diagnostic.toString());
- // }
- //}
-
- super.doGenerate(monitor);
- }
-
- /**
- * If this generator needs to listen to text generation events, listeners can be returned from here.
- *
- * @return List of listeners that are to be notified when text is generated through this launch.
- * @generated
- */
- @Override
- public List<IAcceleoTextGenerationListener> getGenerationListeners() {
- List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners();
- /*
- * TODO if you need to listen to generation event, add listeners to the list here. If you want to change
- * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method
- * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications.
- */
- return listeners;
- }
-
- /**
- * If you need to change the way files are generated, this is your entry point.
- * <p>
- * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates
- * files on the fly. If you only need to preview the results, return a new
- * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of
- * the running Eclipse and can be used standalone.
- * </p>
- * <p>
- * If you need the file generation to be aware of the workspace (A typical example is when you wanna
- * override files that are under clear case or any other VCS that could forbid the overriding), then
- * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}.
- * <b>Note</b>, however, that this <b>cannot</b> be used standalone.
- * </p>
- * <p>
- * All three of these default strategies support merging through JMerge.
- * </p>
- *
- * @return The generation strategy that is to be used for generations launched through this launcher.
- * @generated
- */
- public IAcceleoGenerationStrategy getGenerationStrategy() {
- return super.getGenerationStrategy();
- }
-
- /**
- * This will be called in order to find and load the module that will be launched through this launcher.
- * We expect this name not to contain file extension, and the module to be located beside the launcher.
- *
- * @return The name of the module that is to be launched.
- * @generated
- */
- @Override
- public String getModuleName() {
- return MODULE_FILE_NAME;
- }
-
- /**
- * If the module(s) called by this launcher require properties files, return their qualified path from
- * here.Take note that the first added properties files will take precedence over subsequent ones if they
- * contain conflicting keys.
- * <p>
- * Properties need to be in source folders, the path that we expect to get as a result of this call are of
- * the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file
- * named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by
- * a call to {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".
- * </p>
- *
- * @return The list of properties file we need to add to the generation context.
- * @see java.util.ResourceBundle#getBundle(String)
- * @generated
- */
- @Override
- public List<String> getProperties() {
- /*
- * TODO if your generation module requires access to properties files, add their qualified path to the list here.
- * Properties files are expected to be in source folders, and the path here to be the qualified path as if referring
- * to a Java class. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample",
- * the path that needs be added to this list is "org.eclipse.acceleo.sample.messages". If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation of
- * this class will revert your modifications.
- */
- return propertiesFiles;
- }
-
- /**
- * Adds a properties file in the list of properties files.
- *
- * @param propertiesFile
- * The properties file to add.
- * @generated
- * @since 3.1
- */
- @Override
- public void addPropertiesFile(String propertiesFile) {
- this.propertiesFiles.add(propertiesFile);
- }
-
- /**
- * This will be used to get the list of templates that are to be launched by this launcher.
- *
- * @return The list of templates to call on the module {@link #getModuleName()}.
- * @generated
- */
- @Override
- public String[] getTemplateNames() {
- return TEMPLATE_NAMES;
- }
-
- /**
- * This can be used to update the resource set's package registry with all needed EPackages.
- *
- * @param resourceSet
- * The resource set which registry has to be updated.
- * @generated
- */
- @Override
- public void registerPackages(ResourceSet resourceSet) {
- super.registerPackages(resourceSet);
- if (!isInWorkspace(org.eclipse.emf.eef.components.ComponentsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.components.ComponentsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.components.ComponentsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.MappingPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.MappingPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.MappingPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.navigation.NavigationPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.navigation.NavigationPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.navigation.NavigationPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.filters.FiltersPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.filters.FiltersPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.filters.FiltersPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.views.ViewsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.views.ViewsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.views.ViewsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.toolkits.ToolkitsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.toolkits.ToolkitsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.toolkits.ToolkitsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.EEFGen.EEFGenPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.EEFGen.EEFGenPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.EEFGen.EEFGenPackage.eINSTANCE);
- }
-
- /*
- * TODO If you need additional package registrations, you can register them here. The following line
- * (in comment) is an example of the package registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
- * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications. You can use the method
- * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
- * To register a package properly, please follow the following conventions:
- *
- * if (!isInWorkspace(UMLPackage.class)) {
- * // The normal package registration if your metamodel is in a plugin.
- * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- * } else {
- * // The package registration that will be used if the metamodel is not deployed in a plugin.
- * // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
- * resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
- * }
- */
- }
-
- /**
- * This can be used to update the resource set's resource factory registry with all needed factories.
- *
- * @param resourceSet
- * The resource set which registry has to be updated.
- * @generated
- */
- @Override
- public void registerResourceFactories(ResourceSet resourceSet) {
- super.registerResourceFactories(resourceSet);
- /*
- * TODO If you need additional resource factories registrations, you can register them here. the following line
- * (in comment) is an example of the resource factory registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation
- * of this class will revert your modifications.
- */
-
- // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.mtl
deleted file mode 100644
index 03dfcabbc..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/EEFLauncher.mtl
+++ /dev/null
@@ -1,76 +0,0 @@
-[comment encoding = UTF-8
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module EEFLauncher('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import org::eclipse::emf::eef::codegen::components::PropertiesEditionComponent /]
-[import org::eclipse::emf::eef::codegen::components::DynamicPropertiesEditionComponent /]
-[import org::eclipse::emf::eef::codegen::components::SubPropertiesEditionComponent /]
-[import org::eclipse::emf::eef::codegen::providers::ContextMessages /]
-[import org::eclipse::emf::eef::codegen::providers::ContextMessagesProperties /]
-[import org::eclipse::emf::eef::codegen::providers::ContextMessagesPropertiesFR /]
-[import org::eclipse::emf::eef::codegen::providers::PackagePropertiesEditionProvider /]
-[import org::eclipse::emf::eef::codegen::providers::PropertiesEditionProvider /]
-[import org::eclipse::emf::eef::codegen::providers::PackagePropertiesEditionPartProvider /]
-[import org::eclipse::emf::eef::codegen::parts::ViewsRepository /]
-[import org::eclipse::emf::eef::codegen::parts::IPropertiesEditionPart /]
-[import org::eclipse::emf::eef::codegen::parts::PropertiesEditionPart /]
-[import org::eclipse::emf::eef::codegen::parts::FormPropertiesEditionPart /]
-[import org::eclipse::emf::eef::codegen::plugin::plugin_xml /]
-[import org::eclipse::emf::eef::codegen::plugin::GMF_Plugin_xml /]
-[import org::eclipse::emf::eef::codegen::properties::PropertySection /]
-
-[template public EEFLauncher(genModel : EEFGenModel)]
-[comment @main /]
-[for (editionContext : GenEditionContext | genModel.editionContexts)]
- [let peContext : PropertiesEditionContext = editionContext.PropertiesEditionContext]
- [let basePackage : String = editionContext.basePackage]
-
- [SubPropertiesEditionComponent(peContext, basePackage)/]
-
- [PropertiesEditionComponent(peContext, basePackage)/]
- [DynamicPropertiesEditionComponent(peContext, basePackage)/]
- [PropertiesEditionProvider(peContext, basePackage)/]
-
- [if (editionContext.descriptorsGenericPropertiesViews)]
- [plugin_xml(peContext, basePackage)/]
- [/if]
-
- [PropertiesEditionPart(peContext, basePackage)/]
- [FormPropertiesEdionPart(peContext, basePackage)/]
-
- [let eObjects : Sequence(EObject) = peContext.model.ecorePackage.eAllContents()->select(oclIsKindOf(EPackage))->including(peContext.model.ecorePackage)]
- [for (eObject : EObject | eObjects)]
- [if (eObject.oclIsKindOf(EPackage))]
- [PackagePropertiesEditionProvider(peContext, eObject.oclAsType(EPackage))/]
- [/if]
- [/for]
- [/let]
-
- [comment][GMF_Plugin_xml(peContext, basePackage)/][/comment]
- [comment][PropertySection(peContext, basePackage)/][/comment]
-
- [/let]
- [/let]
-[/for]
-
-[for (genViewsRepository : GenViewsRepository | genModel.viewsRepositories)]
- [let viewsRepository : ViewsRepository = genViewsRepository.viewsRepository]
- [IPropertiesEditionPart(viewsRepository)/]
- [ViewsRepository(viewsRepository)/]
- [ContextMessages(viewsRepository)/]
- [ContextMessagesProperties(viewsRepository)/]
- [ContextMessagesPropertiesFR(viewsRepository)/]
- [PackagePropertiesEditionPartProvider(viewsRepository)/]
- [/let]
-[/for]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.class
deleted file mode 100644
index d55aa5bc7..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.java b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.java
deleted file mode 100644
index b50aa33b5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.eef.codegen.launcher;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener;
-import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy;
-import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator;
-import org.eclipse.emf.common.util.BasicMonitor;
-import org.eclipse.emf.common.util.Monitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * Entry point of the 'GMF1DescriptorsGeneratorLauncher' generation module.
- *
- * @generated
- */
-public class GMF1DescriptorsGeneratorLauncher extends AbstractAcceleoGenerator {
- /**
- * The name of the module.
- *
- * @generated
- */
- public static final String MODULE_FILE_NAME = "/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher";
-
- /**
- * The name of the templates that are to be generated.
- *
- * @generated
- */
- public static final String[] TEMPLATE_NAMES = { "GMF1DescriptorsGeneratorLauncher" };
-
- /**
- * The list of properties files from the launch parameters (Launch configuration).
- *
- * @generated
- */
- private List<String> propertiesFiles = new ArrayList<String>();
-
- /**
- * Allows the public constructor to be used. Note that a generator created
- * this way cannot be used to launch generations before one of
- * {@link #initialize(EObject, File, List)} or
- * {@link #initialize(URI, File, List)} is called.
- * <p>
- * The main reason for this constructor is to allow clients of this
- * generation to call it from another Java file, as it allows for the
- * retrieval of {@link #getProperties()} and
- * {@link #getGenerationListeners()}.
- * </p>
- *
- * @generated
- */
- public GMF1DescriptorsGeneratorLauncher() {
- // Empty implementation
- }
-
- /**
- * This allows clients to instantiates a generator with all required information.
- *
- * @param modelURI
- * URI where the model on which this generator will be used is located.
- * @param targetFolder
- * This will be used as the output folder for this generation : it will be the base path
- * against which all file block URLs will be resolved.
- * @param arguments
- * If the template which will be called requires more than one argument taken from the model,
- * pass them here.
- * @throws IOException
- * This can be thrown in three scenarios : the module cannot be found, it cannot be loaded, or
- * the model cannot be loaded.
- * @generated
- */
- public GMF1DescriptorsGeneratorLauncher(URI modelURI, File targetFolder,
- List<? extends Object> arguments) throws IOException {
- initialize(modelURI, targetFolder, arguments);
- }
-
- /**
- * This allows clients to instantiates a generator with all required information.
- *
- * @param model
- * We'll iterate over the content of this element to find Objects matching the first parameter
- * of the template we need to call.
- * @param targetFolder
- * This will be used as the output folder for this generation : it will be the base path
- * against which all file block URLs will be resolved.
- * @param arguments
- * If the template which will be called requires more than one argument taken from the model,
- * pass them here.
- * @throws IOException
- * This can be thrown in two scenarios : the module cannot be found, or it cannot be loaded.
- * @generated
- */
- public GMF1DescriptorsGeneratorLauncher(EObject model, File targetFolder,
- List<? extends Object> arguments) throws IOException {
- initialize(model, targetFolder, arguments);
- }
-
- /**
- * This can be used to launch the generation from a standalone application.
- *
- * @param args
- * Arguments of the generation.
- * @generated
- */
- public static void main(String[] args) {
- try {
- if (args.length < 2) {
- System.out.println("Arguments not valid : {model, folder}.");
- } else {
- URI modelURI = URI.createFileURI(args[0]);
- File folder = new File(args[1]);
-
- List<String> arguments = new ArrayList<String>();
-
- /*
- * Add in this list all the arguments used by the starting point of the generation
- * If your main template is called on an element of your model and a String, you can
- * add in "arguments" this "String" attribute.
- */
-
- GMF1DescriptorsGeneratorLauncher generator = new GMF1DescriptorsGeneratorLauncher(modelURI, folder, arguments);
-
- /*
- * Add the properties from the launch arguments.
- * If you want to programmatically add new arguments, add them in "propertiesFiles"
- * You can add the absolute path of a properties files, or even a project relative path.
- * If you want to add another "protocol" for your properties files, please override
- * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader.
- * The basic properties loader will look for properties in the current project if the path
- * of the properties file is like this "packagea.packageb.packagec.default" for a properties
- * file named default.properties, or if the path is an absolute path. With a new property
- * loader you could for example, look for properties files in a bundle.
- */
-
- for (int i = 2; i < args.length; i++) {
- generator.addPropertiesFile(args[i]);
- }
-
- generator.doGenerate(new BasicMonitor());
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Launches the generation described by this instance.
- *
- * @param monitor
- * This will be used to display progress information to the user.
- * @throws IOException
- * This will be thrown if any of the output files cannot be saved to disk.
- * @generated
- */
- @Override
- public void doGenerate(Monitor monitor) throws IOException {
- /*
- * TODO if you wish to change the generation as a whole, override this. The default behavior should
- * be sufficient in most cases. If you want to change the content of this method, do NOT forget to
- * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag,
- * any compilation of the Acceleo module with the main template that has caused the creation of this
- * class will revert your modifications. If you encounter a problem with an unresolved proxy during the
- * generation, you can remove the comments in the following instructions to check for problems. Please
- * note that those instructions may have a significant impact on the performances.
- */
-
- //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model);
-
- //if (model != null && model.eResource() != null) {
- // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors();
- // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) {
- // System.err.println(diagnostic.toString());
- // }
- //}
-
- super.doGenerate(monitor);
- }
-
- /**
- * If this generator needs to listen to text generation events, listeners can be returned from here.
- *
- * @return List of listeners that are to be notified when text is generated through this launch.
- * @generated
- */
- @Override
- public List<IAcceleoTextGenerationListener> getGenerationListeners() {
- List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners();
- /*
- * TODO if you need to listen to generation event, add listeners to the list here. If you want to change
- * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method
- * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications.
- */
- return listeners;
- }
-
- /**
- * If you need to change the way files are generated, this is your entry point.
- * <p>
- * The default is {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; it generates
- * files on the fly. If you only need to preview the results, return a new
- * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. Both of these aren't aware of
- * the running Eclipse and can be used standalone.
- * </p>
- * <p>
- * If you need the file generation to be aware of the workspace (A typical example is when you wanna
- * override files that are under clear case or any other VCS that could forbid the overriding), then
- * return a new {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy}.
- * <b>Note</b>, however, that this <b>cannot</b> be used standalone.
- * </p>
- * <p>
- * All three of these default strategies support merging through JMerge.
- * </p>
- *
- * @return The generation strategy that is to be used for generations launched through this launcher.
- * @generated
- */
- public IAcceleoGenerationStrategy getGenerationStrategy() {
- return super.getGenerationStrategy();
- }
-
- /**
- * This will be called in order to find and load the module that will be launched through this launcher.
- * We expect this name not to contain file extension, and the module to be located beside the launcher.
- *
- * @return The name of the module that is to be launched.
- * @generated
- */
- @Override
- public String getModuleName() {
- return MODULE_FILE_NAME;
- }
-
- /**
- * If the module(s) called by this launcher require properties files, return their qualified path from
- * here.Take note that the first added properties files will take precedence over subsequent ones if they
- * contain conflicting keys.
- * <p>
- * Properties need to be in source folders, the path that we expect to get as a result of this call are of
- * the form &lt;package>.&lt;properties file name without extension>. For example, if you have a file
- * named "messages.properties" in package "org.eclipse.acceleo.sample", the path that needs be returned by
- * a call to {@link #getProperties()} is "org.eclipse.acceleo.sample.messages".
- * </p>
- *
- * @return The list of properties file we need to add to the generation context.
- * @see java.util.ResourceBundle#getBundle(String)
- * @generated
- */
- @Override
- public List<String> getProperties() {
- /*
- * TODO if your generation module requires access to properties files, add their qualified path to the list here.
- * Properties files are expected to be in source folders, and the path here to be the qualified path as if referring
- * to a Java class. For example, if you have a file named "messages.properties" in package "org.eclipse.acceleo.sample",
- * the path that needs be added to this list is "org.eclipse.acceleo.sample.messages". If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation of
- * this class will revert your modifications.
- */
- return propertiesFiles;
- }
-
- /**
- * Adds a properties file in the list of properties files.
- *
- * @param propertiesFile
- * The properties file to add.
- * @generated
- * @since 3.1
- */
- @Override
- public void addPropertiesFile(String propertiesFile) {
- this.propertiesFiles.add(propertiesFile);
- }
-
- /**
- * This will be used to get the list of templates that are to be launched by this launcher.
- *
- * @return The list of templates to call on the module {@link #getModuleName()}.
- * @generated
- */
- @Override
- public String[] getTemplateNames() {
- return TEMPLATE_NAMES;
- }
-
- /**
- * This can be used to update the resource set's package registry with all needed EPackages.
- *
- * @param resourceSet
- * The resource set which registry has to be updated.
- * @generated
- */
- @Override
- public void registerPackages(ResourceSet resourceSet) {
- super.registerPackages(resourceSet);
- if (!isInWorkspace(org.eclipse.emf.eef.components.ComponentsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.components.ComponentsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.components.ComponentsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.MappingPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.MappingPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.MappingPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.navigation.NavigationPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.navigation.NavigationPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.navigation.NavigationPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.mapping.filters.FiltersPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.mapping.filters.FiltersPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.mapping.filters.FiltersPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.ecore.EcorePackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getNsURI(), org.eclipse.emf.ecore.EcorePackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.views.ViewsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.views.ViewsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.views.ViewsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.toolkits.ToolkitsPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.toolkits.ToolkitsPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.toolkits.ToolkitsPackage.eINSTANCE);
- }
- if (!isInWorkspace(org.eclipse.emf.eef.EEFGen.EEFGenPackage.class)) {
- resourceSet.getPackageRegistry().put(org.eclipse.emf.eef.EEFGen.EEFGenPackage.eINSTANCE.getNsURI(), org.eclipse.emf.eef.EEFGen.EEFGenPackage.eINSTANCE);
- }
-
- /*
- * TODO If you need additional package registrations, you can register them here. The following line
- * (in comment) is an example of the package registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to
- * "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template
- * that has caused the creation of this class will revert your modifications. You can use the method
- * "isInWorkspace(Class c)" to check if the package that you are about to register is in the workspace.
- * To register a package properly, please follow the following conventions:
- *
- * if (!isInWorkspace(UMLPackage.class)) {
- * // The normal package registration if your metamodel is in a plugin.
- * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE);
- * } else {
- * // The package registration that will be used if the metamodel is not deployed in a plugin.
- * // This should be used if your metamodel is in your workspace and if you are using binary resource serialization.
- * resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);
- * }
- */
- }
-
- /**
- * This can be used to update the resource set's resource factory registry with all needed factories.
- *
- * @param resourceSet
- * The resource set which registry has to be updated.
- * @generated
- */
- @Override
- public void registerResourceFactories(ResourceSet resourceSet) {
- super.registerResourceFactories(resourceSet);
- /*
- * TODO If you need additional resource factories registrations, you can register them here. the following line
- * (in comment) is an example of the resource factory registration for UML. If you want to change the content
- * of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method to "@generated NOT".
- * Without this new tag, any compilation of the Acceleo module with the main template that has caused the creation
- * of this class will revert your modifications.
- */
-
- // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
- }
-
-}
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.mtl
deleted file mode 100644
index e7b37530f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/launcher/GMF1DescriptorsGeneratorLauncher.mtl
+++ /dev/null
@@ -1,30 +0,0 @@
-[comment encoding = UTF-8
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module GMF1DescriptorsGeneratorLauncher('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import org::eclipse::emf::eef::codegen::plugin::GMF_Plugin_xml /]
-[import org::eclipse::emf::eef::codegen::properties::PropertySection /]
-
-[template public GMF1DescriptorsGeneratorLauncher(genModel : EEFGenModel)]
-[comment @main /]
-[for (editionContext : GenEditionContext | genModel.editionContexts)]
- [let basePackage : String = editionContext.basePackage]
- [let peContext : PropertiesEditionContext = editionContext.PropertiesEditionContext]
- [if (editionContext.gmfPropertiesViews)]
- [GMF_Plugin_xml(peContext, basePackage)/]
- [PropertySection(peContext, basePackage)/]
- [/if]
- [/let]
- [/let]
-[/for]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/FormPropertiesEditionPart.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/FormPropertiesEditionPart.mtl
deleted file mode 100755
index d6cf76e02..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/FormPropertiesEditionPart.mtl
+++ /dev/null
@@ -1,407 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module FormPropertiesEditionPart('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[import widgetGettersSetters /]
-[import widgetFormImpl /]
-
-[comment Defines the default imports for a Form Part.
- @param pec the PropertiesEditionComponent associated to the view
- @param view the View generating the Form
- @param basePackage the generation package prefix
- /]
-[template private defaultImports(pec : PropertiesEditionComponent, view : View, basePackage : String)]
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
-import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
-[if (view.eAllContents(ElementEditor).oclAsType(ElementEditor)->notEmpty())]
-import org.eclipse.osgi.util.NLS;
-[/if]
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.IExpansionListener;
-import org.eclipse.ui.forms.widgets.Form;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.IExpansionListener;
-
-[for (ePackage : EPackage | pec.involvedEditionElements().oclAsType(PropertiesEditionElement).model.eContainingClass.ePackage->asSet()->including(pec.model.oclAsType(EClass).ePackage))]
-import [ePackage.qualifiedMetamodelPackage()/];
-[/for]
-[for (viewRepository : ViewsRepository | pec.involvedViews().oclAsType(View).owningViewsRepository()->asSet())]
-import [viewRepository.qualifiedMessagesProvider()/];
-[/for]
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
-import [view.partQualifiedSuperclass()/];
-[if (view.eAllContents(ElementEditor).oclAsType(ElementEditor)->select(representation.name = 'ReferencesTable' or representation.name = 'AdvancedReferencesTable' or representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext;
-[/if]
-import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
-import org.eclipse.emf.eef.runtime.ui.widgets.FormUtils;
-import [view.pepQualifiedInterface()/];
-[for (widget : Widget | view.eAllContents(ElementEditor).oclAsType(ElementEditor).representation->asSet()) ]
-[widget.manageImports(pec, view, basePackage)/]
-[/for]
-[for (widget : Widget | view.eAllContents(Container).oclAsType(Container).representation->asSet()) ? (not widget.oclIsUndefined())]
-[widget.manageImports(pec, view, basePackage)/]
-[/for]
-[for (viewsRepository : ViewsRepository | view.eAllContents(ViewReference).oclAsType(ViewReference).view.oclAsType(View).owningViewsRepository()->append(view.owningViewsRepository()))]
-import [viewsRepository.vrQualifiedClass()/];
-[/for]
-[if (view.eAllContents(ViewReference)->notEmpty() or view.eAllContents(View)->notEmpty())]
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPartProviderService;
-[for (viewRef : ViewReference | view.eAllContents(ViewReference).oclAsType(ViewReference)) ]
-import [viewRef.view.oclAsType(View).pepQualifiedInterface()/];
-[for (widget : Widget | viewRef.view.eAllContents(ElementEditor).oclAsType(ElementEditor).representation->asSet())]
-[widget.manageImports(pec, view, basePackage)/]
-[/for]
-[/for]
-[for (subView : View | view.elements->select(oclIsKindOf(View))) ]
-import [subView.pepQualifiedInterface()/];
-[/for]
-[/if]
-[view.additionalImports()/]
-[/template]
-
-[comment Defines the default imports for a custom Form Part.
- @param pec the PropertiesEditionComponent associated to the view
- @param view the View generating the Form
- @param basePackage the generation package prefix
- /]
-[template private defaultMinimalImports(pec : PropertiesEditionComponent, view : View, basePackage : String)]
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-
-import [pec.model.qualifiedName(basePackage)/];
-import [pec.model.eefPackage(basePackage)/].parts.[view.pepInterface()/];
-[/template]
-
-[template public FormPropertiesEdionPart(peContext : PropertiesEditionContext, basePackage : String)]
-[for (inputPEC : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[for (view : View | inputPEC.involvedViews()) ? (view.oclIsTypeOf(View))][let pec : PropertiesEditionComponent = if (inputPEC.views->includes(view))
- then inputPEC
- else inputPEC.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif]
-[if (view.mustBeGenerated(inputPEC))]
- [file (fullFilePath(view), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [view.partsFormPackage()/];
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultImports(view, basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultImports(view, basePackage)/]
-
-// [/protected]
-[/if]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [view.pepFormClass()/] extends [view.partSuperclass()/] implements IFormPropertiesEditionPart, [view.pepInterface()/] {
-
-[for (element : ViewElement | view.eAllContents()) ? (element.oclIsKindOf(ElementEditor))][let editor : ElementEditor = element.oclAsType(ElementEditor)]
- [editor.widgetDeclaration()/]
-[/let][/for]
-[comment managing ViewReferences/]
-[view.widgetDeclarationForViewReference()/]
-[comment managing SubViews/]
-[view.widgetDeclarationForSubViews()/]
-
- /**
- * Default constructor
- * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [view.pepFormClass()/](IPropertiesEditionComponent editionComponent) {
- super(editionComponent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
- * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
- ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
- Form form = scrolledForm.getForm();
- view = form.getBody();
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- view.setLayout(layout);
- createControls(widgetFactory, view);
- return scrolledForm;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
- * createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void createControls(final FormToolkit widgetFactory, Composite view) {
- [view.compositionSequence()/]
- composer = new PartComposer([view.compositionStepName()/]) {
-
- @Override
- public Composite addToPart(Composite parent, Object key) {
- [for (aView : ViewElement | view.eAllContents(ViewElement).oclAsType(ViewElement)->select(not oclIsKindOf(CustomElementEditor) and owningView() = view))]
- if (key == [aView.editorID()/][if (aView.oclIsKindOf(Container))].class[/if]) {
- return [aView.implementation()/]
- }
- [/for]
- return parent;
- }
- };
- composer.compose(view);
-[comment][for (aView : ViewElement | view.elements)]
-[aView.implementation()/]
-
-[/for]
-[if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for additional ui definition')]
-
- // [/protected]
-[/if]
-[/comment]
- }
-[for (aView : ViewElement | view.eAllContents(ViewElement).oclAsType(ViewElement)->select(not oclIsKindOf(CustomElementEditor) and owningView() = view))]
-[aView.additionalImplementation(pec, inputPEC)/]
-
-[/for]
-
-[for (subView : View | view.elements->select(oclIsKindOf(View)))]
-[subView.additionalImplementation(pec, inputPEC)/]
-
-[/for]
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void firePropertiesChanged(IPropertiesEditionEvent event) {
-[if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for tab synchronization')]
-
- // [/protected]
-[/if]
- }
-[for (elementEditor : ElementEditor | view.eAllContents(ElementEditor).oclAsType(ElementEditor)->select(not oclIsKindOf(CustomElementEditor) and owningView() = view))]
-
-[elementEditor.getterImplementation(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()))/]
-
-[elementEditor.setterImplementation(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()))/]
-
-[/for]
-[comment managing viewReference/]
-[view.elementEditorGetterSettersForViewReference(pec, basePackage)/]
-[comment managing subView/]
-[view.elementEditorGetterSettersForSubViews(pec, basePackage)/]
-
-[if (not peContext.associatedGenModel().useJMergeForUserCode)]
-[for (viewElement : ViewElement | view.eAllContents(CustomElementEditor).oclAsType(CustomElementEditor)->select(owningView() = view))]
- // [protected ('for '.concat(viewElement.name).concat(' specific getters and setters implementation'))]
-
- // [/protected]
-[/for]
-[/if]
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String getTitle() {
- return [view.owningViewsRepository().messagesProvider()/].[view.name.toJavaClassifier()/]_Part_Title;
- }
-
-[view.additionalMethods()/]
-
-}
-[/file]
-[/if]
-[/let][/for]
-[for (view : View | inputPEC.involvedViews()) ? (inputPEC.explicit and view.oclIsTypeOf(CustomView))][let pec : PropertiesEditionComponent = if (inputPEC.views->includes(view))
- then inputPEC
- else inputPEC.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif]
- [file (fullFilePath(view), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [view.partsFormPackage()/]
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultMinimalImports(view, basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultMinimalImports(view, basePackage)/]
-
-// [/protected]
-[/if]
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [view.pepFormClass()/] extends CompositePropertiesEditionPart implements IFormPropertiesEditionPart, [view.pepInterface()/] {
-
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('widgets declaration')]
-
- // [/protected]
- [/if]
- /**
- * Default constructor
- * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [view.pepFormClass()/](IPropertiesEditionComponent editionComponent) {
- super(editionComponent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
- * createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
- ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
- Form form = scrolledForm.getForm();
- view = form.getBody();
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- view.setLayout(layout);
- createControls(widgetFactory, view);
- return scrolledForm;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
- * createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void createControls(final FormToolkit widgetFactory, Composite p_view) {
- view = widgetFactory.createComposite(p_view, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- view.setLayout(layout);
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('view visual definition')]
-
- // [/protected]
- [/if]
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void firePropertiesChanged(IPropertiesEditionEvent event) {
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for tab synchronization')]
-
- // [/protected]
- [/if]
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String getTitle() {
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for title')]
- return "CustomTitle";
- // [/protected]
- [else]
- return "CustomTitle";
- [/if]
- }
-
-[view.additionalMethods()/]
-
-}
-[/file]
-[/let][/for]
-[/for]
-[/template]
-
-[template public additionalMethods(view : View)]
- [if (not view.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected ('additional methods')]
-
- // [/protected]
- [/if]
-[/template]
-
-[template public fullFilePath(view : View)]
-[view.pepFormQualifiedClass().toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/IPropertiesEditionPart.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/IPropertiesEditionPart.mtl
deleted file mode 100755
index 47e5a53d2..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/IPropertiesEditionPart.mtl
+++ /dev/null
@@ -1,129 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module IPropertiesEditionPart('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/views/toolkits/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[import widgetGettersSetters /]
-
-[template private defaultImports (view : View) ]
-import java.util.List;
-import java.util.Map;
-
-[view.genImports()/]
-[for (viewReference : ViewReference | view.eAllContents(ViewReference))]
-[viewReference.view.genImports()/]
-[/for]
-[view.additionalImports()/]
-[/template]
-
-[template public IPropertiesEditionPart(viewRepository : ViewsRepository)]
-[for (view : View | viewRepository.eAllContents(View).oclAsType(View))]
-[file (fullFilePath(view), false)]
-[viewRepository.associatedGenModel().licenceText().trim()/]
-package [view.partsPackage()/];
-
-[if (viewRepository.associatedGenModel().useJMergeForUserCode)]
-[view.defaultImports()/]
-[else]
-// [protected ('for imports')]
-[view.defaultImports()/]
-
-// [/protected]
-[/if]
-
-/**
- * [viewRepository.associatedGenModel().authorText().trim()/]
- * [viewRepository.associatedGenModel().generationMark()/]
- */
-public interface [view.pepInterface()/] {
-
-[for (elementEditor : ElementEditor | view.eAllContents(ElementEditor).oclAsType(ElementEditor)->select(not oclIsKindOf(CustomElementEditor) and owningView() = view))]
-[elementEditor.genDeclaration()/]
-
-[/for]
-[for (subView : View | view.eAllContents(View))]
-[subView.genDeclarationForSubViews()/]
-[/for]
-[comment viewReference Support/]
-[view.genDeclarationForViewReference()/]
-
-[if (not viewRepository.associatedGenModel().useJMergeForUserCode)]
-[for (viewElement : ViewElement | view.eAllContents(ElementEditor)->select(oclIsTypeOf(CustomElementEditor)))]
- // [protected ('for '.concat(viewElement.name).concat(' specific getters and setters declaration'))]
-
- // [/protected]
-[/for]
-[/if]
-
- /**
- * Returns the internationalized title text.
- *
- * @return the internationalized title text.
- * [viewRepository.associatedGenModel().generationMark()/]
- */
- public String getTitle();
-
- [if (not viewRepository.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for additional methods')]
-
- // [/protected]
- [/if]
-
-}
-[/file]
-[/for]
-[for (view : View | viewRepository.eAllContents(CustomView).oclAsType(CustomView))]
- [file (fullFilePath(view), false)]
-[viewRepository.associatedGenModel().licenceText().trim()/]
-package [view.partsPackage()/];
-
-[if (not viewRepository.associatedGenModel().useJMergeForUserCode)]
-// [protected ('for imports')]
-
-// [/protected]
-[/if]
-
-/**
- * [viewRepository.associatedGenModel().authorText().trim()/]
- * [viewRepository.associatedGenModel().generationMark()/]
- */
-public interface [view.pepInterface()/] {
-
- /**
- * Returns the internationalized title text.
- *
- * @return the internationalized title text.
- * [viewRepository.associatedGenModel().generationMark()/]
- */
- public String getTitle();
-
- [if (not viewRepository.associatedGenModel().useJMergeForUserCode)]
- // [protected (' for getters and setters declaration')]
-
- // [/protected]
- [/if]
-
-}
-[/file]
-[/for]
-[/template]
-
-[template public fullFilePath(view : View)]
-[view.pepQualifiedInterface().toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/PropertiesEditionPart.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/PropertiesEditionPart.mtl
deleted file mode 100755
index fd0aac62a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/PropertiesEditionPart.mtl
+++ /dev/null
@@ -1,394 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PropertiesEditionPart('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import naming /]
-[import common /]
-[import viewCommon /]
-[import widgetGettersSetters /]
-[import widgetSWTImpl /]
-
-[comment Defines the default imports for a Form Part.
- @param pec the PropertiesEditionComponent associated to the view
- @param view the View generating the Form
- @param basePackage the generation package prefix
- /]
-[template private defaultImports (pec : PropertiesEditionComponent, view : View, basePackage : String) ]
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent;
-import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->notEmpty())]
-import org.eclipse.osgi.util.NLS;
-[/if]
-import org.eclipse.swt.SWT;
-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.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-
-[for (ePackage : EPackage | pec.involvedEditionElements().oclAsType(PropertiesEditionElement).model.eContainingClass.ePackage->asSet()->including(pec.model.oclAsType(EClass).ePackage))]
-import [ePackage.qualifiedMetamodelPackage()/];
-[/for]
-[for (viewRepository : ViewsRepository | pec.involvedViews().oclAsType(views::View).owningViewsRepository()->asSet())]
-import [viewRepository.qualifiedMessagesProvider()/];
-[/for]
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart;
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'ReferencesTable' or representation.name = 'AdvancedReferencesTable' or representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext;
-[/if]
-
-import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils;
-import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
-import [view.pepQualifiedInterface()/];
-[for (widget : Widget | view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor).representation->asSet()) ? (not widget.oclIsUndefined())]
-[widget.manageImports(pec, view, basePackage)/]
-[/for]
-[for (widget : Widget | view.eAllContents(views::Container).oclAsType(views::Container).representation->asSet()) ? (not widget.oclIsUndefined())]
-[widget.manageImports(pec, view, basePackage)/]
-[/for]
-[for (viewsRepository : ViewsRepository | view.eAllContents(views::ViewReference).oclAsType(views::ViewReference).view.oclAsType(views::View).owningViewsRepository()->append(view.owningViewsRepository()))]
-import [viewsRepository.vrQualifiedClass()/];
-[/for]
-[if (view.eAllContents(views::ViewReference)->notEmpty() or view.eAllContents(views::View)->notEmpty())]
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionPartProviderService;
-[for (viewRef : ViewReference | view.eAllContents(views::ViewReference).oclAsType(views::ViewReference)) ]
-import [viewRef.view.oclAsType(views::View).pepQualifiedInterface()/];
- [for (widget : Widget | viewRef.view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor).representation->asSet())]
-[widget.manageImports(pec, view, basePackage)/]
- [/for]
-[/for]
-[for (subView : View | view.elements->select(oclIsKindOf(views::View))) ]
-import [subView.pepQualifiedInterface()/];
-[/for]
-[/if]
-[view.additionalImports()/]
-[/template]
-
-[comment Defines the default imports for a custom Form Part.
- @param pec the PropertiesEditionComponent associated to the view
- @param view the View generating the Form
- @param basePackage the generation package prefix
- /]
-[template private defaultMinimalImports(pec : PropertiesEditionComponent, view : View, basePackage : String) ]
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart;
-import [view.partQualifiedSuperclass()/];
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-
-import [pec.model.qualifiedName(basePackage)/];
-import [view.pepQualifiedInterface()/];
-[/template]
-
-[template public PropertiesEditionPart(peContext : PropertiesEditionContext, basePackage : String)]
-[for (inputPEC : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[for (view : View | inputPEC.involvedViews()) ? (view.oclIsTypeOf(views::View))][let pec : PropertiesEditionComponent = if (inputPEC.views->includes(view))
- then inputPEC
- else inputPEC.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif]
-[if (view.mustBeGenerated(inputPEC))]
- [file (fullFilePath(view), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [view.partsImplPackage()/];
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultImports(view, basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultImports(view, basePackage)/]
-
-// [/protected]
-[/if]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [view.pepClass()/] extends [view.partSuperclass()/] implements ISWTPropertiesEditionPart, [view.pepInterface()/] {
-
-[for (element : ViewElement | view.eAllContents()) ? (element.oclIsKindOf(ElementEditor))][let editor : ElementEditor = element.oclAsType(ElementEditor)]
-[editor.widgetDeclaration()/]
-[/let][/for]
-[comment managing ViewReferences/]
-[view.widgetDeclarationForViewReference()/]
-[comment managing ViewReferences/]
-[view.widgetDeclarationForSubViews()/]
-
- /**
- * Default constructor
- * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [view.pepClass()/](IPropertiesEditionComponent editionComponent) {
- super(editionComponent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
- * createFigure(org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Composite createFigure(final Composite parent) {
- view = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- view.setLayout(layout);
- createControls(view);
- return view;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
- * createControls(org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void createControls(Composite view) {
- [view.compositionSequence()/]
- composer = new PartComposer([view.compositionStepName()/]) {
-
- @Override
- public Composite addToPart(Composite parent, Object key) {
- [for (aView : ViewElement | view.eAllContents(views::ViewElement).oclAsType(views::ViewElement)->select(not oclIsKindOf(views::CustomElementEditor) and owningView() = view))]
- if (key == [aView.editorID()/][if (aView.oclIsKindOf(Container))].class[/if]) {
- return [aView.implementation()/]
- }
- [/for]
- return parent;
- }
- };
- composer.compose(view);
-[comment][for (aView : ViewElement | view.elements)]
-[aView.implementation()/]
-
-[/for]
-
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for additional ui definition')]
-
- // [/protected]
- [/if][/comment]
- }
-
-[for (aView : ViewElement | view.eAllContents(views::ViewElement).oclAsType(views::ViewElement)->select(not oclIsTypeOf(views::CustomElementEditor) and owningView() = view)) ]
-[aView.additionalImplementation(pec, inputPEC)/]
-
-[/for]
-
-[for (subView : View | view.elements->select(oclIsKindOf(views::View))) ]
-[subView.additionalImplementation(pec, inputPEC)/]
-
-[/for]
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void firePropertiesChanged(IPropertiesEditionEvent event) {
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for tab synchronization')]
-
- // [/protected]
- [/if]
- }
-[for (elementEditor : ElementEditor | view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(not oclIsTypeOf(views::CustomElementEditor) and owningView() = view))]
-
-[elementEditor.getterImplementation(fullPartInterfacePath(pec.model.eefPackage(basePackage), view.pepInterface()))/]
-
-[elementEditor.setterImplementation(fullPartInterfacePath(pec.model.eefPackage(basePackage), view.pepInterface()))/]
-
-[/for]
-
-[comment managing viewReference/]
-[view.elementEditorGetterSettersForViewReference(pec, basePackage)/]
-
-[comment managing subView/]
-[view.elementEditorGetterSettersForSubViews(pec, basePackage)/]
-
-[if (not peContext.associatedGenModel().useJMergeForUserCode)]
-[for (viewElement : ViewElement | view.eAllContents(views::CustomElementEditor).oclAsType(views::CustomElementEditor)->select(owningView() = view))]
- // [protected ('for '.concat(viewElement.name).concat(' specific getters and setters implementation'))]
-
- // [/protected]
-
-[/for]
-[/if]
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String getTitle() {
- return [view.owningViewsRepository().messagesProvider()/].[view.name.toJavaClassifier()/]_Part_Title;
- }
-
-[view.additionalMethods()/]
-
-}
-[/file]
-[/if]
-[/let][/for]
-[for (view : View | inputPEC.involvedViews()) ? (inputPEC.explicit and view.oclIsTypeOf(views::CustomView))][let pec : PropertiesEditionComponent = if (inputPEC.views->includes(view))
- then inputPEC
- else inputPEC.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif]
- [file (fullFilePath(view), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [view.partsImplPackage()/];
-
-[if (peContext.associatedGenModel().useJMergeForUserCode)]
-[pec.defaultMinimalImports(view, basePackage)/]
-[else]
-// [protected ('for imports')]
-[pec.defaultMinimalImports(view, basePackage)/]
-
-// [/protected]
-[/if]
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- */
-public class [view.pepClass()/] extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, [view.pepInterface()/] {
-
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('widgets declaration')]
-
- // [/protected]
- [/if]
- /**
- * Default constructor
- * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part
- * [peContext.associatedGenModel().generationMark()/]
- */
- public [view.pepClass()/](IPropertiesEditionComponent editionComponent) {
- super(editionComponent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
- * createFigure(org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Composite createFigure(final Composite parent) {
- view = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- view.setLayout(layout);
- createControls(view);
- return view;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
- * createControls(org.eclipse.swt.widgets.Composite)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void createControls(Composite p_view) {
- view = new Composite(p_view, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- view.setLayout(layout);
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('view visual definition')]
-
- // [/protected]
- [/if]
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void firePropertiesChanged(IPropertiesEditionEvent event) {
- [if (not peContext.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for tab synchronization')]
-
- // [/protected]
- [/if]
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public String getTitle() {
- [if (peContext.associatedGenModel().useJMergeForUserCode)]
- return "CustomTitle";
- [else]
- // [protected ('for title')]
- return "CustomTitle";
- // [/protected]
- [/if]
- }
-
-[view.additionalMethods()/]
-
-}
-[/file]
-[/let][/for]
-[/for]
-[/template]
-
-[template public additionalMethods(view : View)]
- [if (not view.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected ('additional methods')]
-
- // [/protected]
- [/if]
-[/template]
-
-[template public fullFilePath(view : View)]
-[view.pepQualifiedClass().toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/ViewsRepository.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/ViewsRepository.mtl
deleted file mode 100755
index 89322c4f2..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/parts/ViewsRepository.mtl
+++ /dev/null
@@ -1,111 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module ViewsRepository('http://www.eclipse.org/emf/eef/views/1.0.0','http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[comment
- This template will generate a file for each ViewRepository in the EEF model.
- /]
-[template public ViewsRepository(viewRepository : ViewsRepository)]
-[file (viewRepository.fullFilePath(), false)]
-[viewRepository.associatedGenModel().licenceText().trim()/]
-package [viewRepository.partsPackage()/];
-
-/**
- * [viewRepository.associatedGenModel().authorText().trim()/]
- * [viewRepository.associatedGenModel().generationMark()/]
- */
-public class [viewRepository.vrClass()/] {
-
- public static final int SWT_KIND = 0;
-
- public static final int FORM_KIND = 1;
-
-[viewRepository.viewDescriptors()/]
-}
-[/file]
-[/template]
-
-[comment
- Template used to call recursively on the viewRepository to get views
- /]
-[template public viewDescriptors(viewRepository : ViewsRepository)]
-[for (view : View | viewRepository.views)]
-[view.viewDescriptor()/]
-[/for]
-[for (category : Category | viewRepository.eAllContents(views::Category))]
-[for (view : View |category.views )]
-[view.viewDescriptor()/]
-[/for]
-[/for]
-[/template]
-
-[comment Template used to generate code for each views /]
-[template public viewDescriptor(view : View)]
-
- /**
- * [view.name/] view descriptor
- * [view.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public static class [view.identifiedElementKey().toJavaClassifier()/] {
-[if (view.oclIsTypeOf(views::CustomView) and not view.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected ('for '.concat(view.name).concat(' keys'))]
-
- // [/protected]
-[else]
-[for (viewElement : ViewElement | view.elements)]
- [viewElement.viewElementDescriptor()/]
-[/for]
-[/if]
- }
-[/template]
-
-[comment
- Template used to generate code for each elementEditor. it calls recursively on the content of each viewElement
- /]
-[template public viewElementDescriptor(viewElement : ViewElement)]
-[if (viewElement.oclIsTypeOf(views::ElementEditor))]
-[viewElement.owningViewsRepository().associatedGenModel().generationComment()/]
-public static String [viewElement.oclAsType(views::ElementEditor).identifiedElementKey().toJavaIdentifier()/] = "[viewElement.oclAsType(views::ElementEditor).qualifiedIdentifier/]";
-[elseif (viewElement.oclIsTypeOf(views::CustomElementEditor) and not viewElement.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
-// [protected ('for '.concat(viewElement.name).concat(' ElementEditor key'))]
-
-// [/protected]
-[elseif (viewElement.oclIsTypeOf(views::Container))]
- public static class [viewElement.oclAsType(Container).identifiedElementKey().toJavaClassifier()/] {
-
- [for (ve : ViewElement | viewElement.oclAsType(views::Container).elements)]
- [ve.viewElementDescriptor()/]
- [/for]
-
- }
-[elseif (viewElement.oclIsTypeOf(views::View))]
-[for (v : View | viewElement.oclAsType(views::View))]
- [v.viewDescriptor()/]
-[/for]
-[elseif (viewElement.oclIsTypeOf(views::ViewReference))]
-[viewElement.owningViewsRepository().associatedGenModel().generationComment()/]
-public static String [viewElement.oclAsType(views::ViewReference).identifiedElementKey().toJavaIdentifier()/] = "[viewElement.oclAsType(views::ViewReference).qualifiedIdentifier/]";
-[else]
- //TODO FIXME invalid case for template public viewElementDescriptor(viewElement : ViewElement) in module ViewsRepository.mtl, viewElement : [viewElement/]
-[/if]
-[/template]
-
-[comment
- Template used to determine the viewRepository's generated file full path
- /]
-[template public fullFilePath(repository : ViewsRepository)]
-[repository.vrQualifiedClass().toPath()/].java
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/GMF_Plugin_xml.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/GMF_Plugin_xml.mtl
deleted file mode 100755
index 2f785382a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/GMF_Plugin_xml.mtl
+++ /dev/null
@@ -1,113 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module GMF_Plugin_xml('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel')/]
-
-[import common /]
-[import naming /]
-
-[template public GMF_Plugin_xml(editionContext : PropertiesEditionContext, basePackage : String)]
- [file (editionContext.model.ecorePackage.name.concat('_properties.plugin.xml'), false)]
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- [if (editionContext.contributorID(basePackage)->notEmpty())]
- <propertyContributor contributorId="[editionContext.contributorID(basePackage).trim()/]" labelProvider="[editionContext.labelProvider()/]">
- [else]
- <propertyContributor contributorId="org.eclipse.gmf.runtime.diagram.ui.properties" labelProvider="org.eclipse.gmf.runtime.common.ui.services.util.CommonLabelProvider">
- [/if]
- <propertyCategory
- category="default">
- </propertyCategory>
- <propertyCategory
- category="extended">
- </propertyCategory>
- <propertyCategory
- category="advanced">
- </propertyCategory>
- </propertyContributor>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
-[if (editionContext.contributorID(basePackage)->notEmpty())]
- <propertyTabs contributorId="[editionContext.contributorID(basePackage).trim()/]">
-[else]
- <propertyTabs contributorId="org.eclipse.gmf.runtime.diagram.ui.properties">
-[/if]
- <propertyTab
- label="Base"
- category="default"
- id="Base">
- </propertyTab>
- <propertyTab
- label="Propriétés"
- category="extended"
- id="Proprietes">
- </propertyTab>
- <propertyTab
- label="Stéréotypes"
- category="extended"
- id="Stereotypes">
- </propertyTab>
-[for (pec : PropertiesEditionComponent | editionContext.eAllContents(PropertiesEditionComponent).oclAsType(PropertiesEditionComponent))]
-[if (pec.explicit)]
-[for (view : View | pec.involvedViews()->asOrderedSet())][if (view.viewKey(pec) <> 'Base' and view.viewKey(pec) <> 'Propriétés' and view.viewKey(pec) <> 'Stéréotypes')]
-[editionContext.propertyTab(basePackage, view, pec)/]
-[/if][/for]
-[/if]
-[/for]
- </propertyTabs>
- </extension>
- <extension point="org.eclipse.ui.views.properties.tabbed.propertySections">
-[if (editionContext.contributorID(basePackage)->notEmpty())]
- <propertySections contributorId="[editionContext.contributorID(basePackage).trim()/]">
-[else]
- <propertySections contributorId="org.eclipse.gmf.runtime.diagram.ui.properties">
-[/if]
-[for (pec : PropertiesEditionComponent | editionContext.eAllContents(PropertiesEditionComponent).oclAsType(PropertiesEditionComponent)) ? (pec.mustBeGenerated())]
-[for (view : View | pec.views->asOrderedSet()) ? (view.explicit)]
- <propertySection
- class="[pec.qualifiedPropertySection(view)/]"
- filter="[pec.qualifiedPropertySection(view)/]"
- id="[pec.editionContext().contextCompletePackage()/].section.[pec.propertySection(view)/]"
-[if (pec.involvedViews()->indexOf(view) = 1)]
- tab="Base">
-[else]
- tab="[pec.model.qualifiedName(pec.model.ePackage.associatedGenPackage().basePackage)/].[view.viewKey(pec).toASCII().replaceAll(' ', '_')/]">
-[/if]
- </propertySection>
-[/for]
-[/for]
- </propertySections>
- </extension>
- [/file]
-[/template]
-
-[template public propertyTab(editionContext : PropertiesEditionContext, basePackage : String, view : View, pec : PropertiesEditionComponent)]
- <propertyTab
- label="[view.viewKey(pec).trim()/]"
- category="extended"
- id="[pec.model.ePackage.associatedGenPackage().basePackage/].[pec.model.ePackage.name/].[pec.model.name/].[view.viewKey(pec).toASCII().replaceAll(' ', '_')/]"
-[if (pec.involvedViews()->indexOf(view) = 2)]
- afterTab="Base">
-[else]
- afterTab="[pec.model.ePackage.associatedGenPackage().basePackage/].[pec.model.ePackage.name/].[pec.model.name/].[pec.previousView(view).name.toASCII().replaceAll(' ', '_')/]">
-[/if]
- </propertyTab>
-[/template]
-
-[template public labelProvider(editionContext : PropertiesEditionContext)]
-org.eclipse.gmf.runtime.common.ui.services.util.CommonLabelProvider
-[/template]
-
-[query public previousView(pec : PropertiesEditionComponent, view : View) : View =
- pec.involvedViews()->at(pec.involvedViews()->indexOf(view) - 1).oclAsType(View)/]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/plugin_xml.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/plugin_xml.mtl
deleted file mode 100755
index 828b62659..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/plugin/plugin_xml.mtl
+++ /dev/null
@@ -1,119 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module plugin_xml('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public plugin_xml(editionContext : PropertiesEditionContext, basePackage : String)]
- [file (editionContext.model.ecorePackage.name.concat('_properties.plugin.xml'), false)]
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
- <plugin>
-
- <!-- EEF extensions -->
- [for (ePackage : EPackage | editionContext.model.ecorePackage.eAllContents(EPackage)->including(editionContext.model.ecorePackage))]
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri="[ePackage.nsURI/]"
- class="[editionContext.providersPackage()/].[ePackage.pecPackageProviderClass()/]"
- supportedTypes="org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider"/>
- </extension>
- [/for]
-[for (genViewRepository : GenViewsRepository | editionContext.associatedGenModel().viewsRepositories)]
- <extension
- point="org.eclipse.emf.eef.runtime.PropertiesEditionPartProvider">
- <PropertiesEditionPartProvider
- providerClass="[genViewRepository.viewsRepository.pepQualifiedProvider()/]">
- </PropertiesEditionPartProvider>
- </extension>
-[/for]
-
- <!-- Tabbed properties views extension -->
- <extension
- point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <propertyContributor
- contributorId="[editionContext.contributorID(basePackage).trim()/]">
- <propertyCategory
- category="default">
- </propertyCategory>
- <propertyCategory
- category="extended">
- </propertyCategory>
- <propertyCategory
- category="advanced">
- </propertyCategory>
- </propertyContributor>
- </extension>
- <extension
- point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
- <propertyTabs
- contributorId="[editionContext.contributorID(basePackage).trim()/]">
- <propertyTab
- label="Base"
- category="default"
- id="Base">
- </propertyTab>
-[for (pec : PropertiesEditionComponent | editionContext.eAllContents(PropertiesEditionComponent).oclAsType(PropertiesEditionComponent))]
-[for (view : View | pec.involvedViews()->asOrderedSet())][if (view.viewKey(pec) <> 'Base')]
-[editionContext.propertyTab(basePackage, view, pec)/]
-[/if][/for]
-[/for]
- </propertyTabs>
- </extension>
-[propertySections(editionContext, basePackage)/]
- </plugin>
-[/file]
-[/template]
-
-[template public propertySections(editionContext : PropertiesEditionContext, basePackage : String) ]
- <extension
- point="org.eclipse.ui.views.properties.tabbed.propertySections">
- <propertySections
- contributorId="[editionContext.contributorID(basePackage).trim()/]">
-[for (pec : PropertiesEditionComponent | editionContext.eAllContents(PropertiesEditionComponent).oclAsType(PropertiesEditionComponent)) ? (pec.explicit)]
-[for (view : View | pec.involvedViews()->asOrderedSet())]
- <propertySection
- class="org.eclipse.emf.eef.runtime.ui.properties.sections.PropertiesEditionSection"
- id="[pec.model.eefPackage(basePackage)/].section.[pec.model.name/]"
- tab="[view.viewKey(pec).toASCII()/]">
- <input
- type="[pec.model.qualifiedName(basePackage)/]">
- </input>
- </propertySection>
-[/for]
-[/for]
- </propertySections>
- </extension>
-[/template]
-
-[template public propertyTab(editionContext : PropertiesEditionContext, basePackage : String, view : View, pec : PropertiesEditionComponent)]
- <propertyTab
- label="[view.viewKey(pec)/]"
- category="extended"
- id="[view.viewKey(pec).toASCII()/]"
-[if (pec.involvedViews()->indexOf(view) = 2)]
- afterTab="Base">
-[else]
- afterTab="[pec.previousView(view).name.toASCII()/]">
-[/if]
- </propertyTab>
-[/template]
-
-[template public labelProvider(editionContext : PropertiesEditionContext)]
-org.eclipse.gmf.runtime.common.ui.services.util.CommonLabelProvider
-[/template]
-
-[query public previousView(pec : PropertiesEditionComponent, view : View) : View =
- pec.involvedViews()->at(pec.involvedViews()->indexOf(view)).oclAsType(View)/]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/properties/PropertySection.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/properties/PropertySection.mtl
deleted file mode 100755
index a7c5ef2d3..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/properties/PropertySection.mtl
+++ /dev/null
@@ -1,195 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PropertySection('http://www.eclipse.org/emf/eef/components/1.0.0','http://www.eclipse.org/emf/eef/views/1.0.0','http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-
-[template public PropertySection(peContext : PropertiesEditionContext, basePackage : String)]
-[for (pec : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[if (pec.explicit and pec.involvedViews()->size() > 0)]
- [for (view : View | pec.views) ? (view.explicit)]
-[file (pec.fullFilePath(view), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [pec.editionContext().propertiesPackage()/];
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.domain.IEditingDomainProvider;
-import org.eclipse.emf.eef.runtime.api.adapters.SemanticAdapter;
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionProvider;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesEditionComponentService;
-import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.views.properties.tabbed.AbstractPropertySection;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-import [pec.model.ePackage.qualifiedMetamodelPackage()/];
-import [pec.model.eefPackage(basePackage)/].components.[pec.subPECClass(view)/];
-
-[additionalImports()/]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- */
-public class [pec.propertySection(view)/] extends AbstractPropertySection implements IFilter {
-
- [peContext.associatedGenModel().generationComment()/]
- private Composite parent;
-
- [peContext.associatedGenModel().generationComment()/]
- private IPropertiesEditionComponent propertiesEditionComponent;
-
- /**
- * The current selected object or the first object in the selection when
- * multiple objects are selected.
- * [peContext.associatedGenModel().generationMark()/]
- */
- protected EObject eObject;
-
- /**
- * The view manager
- * [peContext.associatedGenModel().generationMark()/]
- */
- private IPropertiesEditionPart editionPart = null;
-
- /**
- * @see org.eclipse.ui.views.properties.tabbed.ISection#createControls(org.eclipse.swt.widgets.Composite,
- * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
- super.createControls(parent, aTabbedPropertySheetPage);
- this.parent = parent;
- }
-
- /**
- * @see org.eclipse.ui.views.properties.tabbed.ISection#setInput(org.eclipse.ui.IWorkbenchPart,
- * org.eclipse.jface.viewers.ISelection)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void setInput(IWorkbenchPart part, ISelection selection) {
- super.setInput(part, selection);
- if (!(selection instanceof IStructuredSelection) ||
- !((part instanceof IEditingDomainProvider) || part.getAdapter(IEditingDomainProvider.class) != null)) {
- return;
- }
-
- Object firstElement = ((IStructuredSelection) selection).getFirstElement();
- EObject newEObject = resolveSemanticObject(firstElement);
-
- EditingDomain editingDomain = null;
- if (part instanceof IEditingDomainProvider)
- editingDomain = ((IEditingDomainProvider) part).getEditingDomain();
- else if (part.getAdapter(IEditingDomainProvider.class) != null)
- editingDomain = ((IEditingDomainProvider)part.getAdapter(IEditingDomainProvider.class)).getEditingDomain();
-
- if (editingDomain != null && newEObject != null && newEObject != eObject) {
- eObject = newEObject;
- if (eObject != null) {
- IPropertiesEditionProvider provider = PropertiesEditionComponentService.getInstance().getProvider(eObject);
- if (this.propertiesEditionComponent != null)
- this.propertiesEditionComponent.dispose();
- this.propertiesEditionComponent = provider.getPropertiesEditionComponent(eObject, IPropertiesEditionComponent.LIVE_MODE);
- if (this.propertiesEditionComponent != null) {
- this.propertiesEditionComponent.setLiveEditingDomain(editingDomain);
- // FIXME: find a better way to define the Form constant
- this.editionPart = propertiesEditionComponent.getPropertiesEditionPart(1, [pec.subPECClass(view)/].[view.viewPartConstant(pec)/]); //$NON-NLS-1$
- if (editionPart instanceof IFormPropertiesEditionPart) {
- for (int i = 0; i < parent.getChildren().length; i++) {
- Composite child = (Composite) parent.getChildren()['['/]i[']'/];
- child.dispose();
- }
- ((IFormPropertiesEditionPart) this.editionPart).createFigure(parent, getWidgetFactory());
- parent.layout();
- propertiesEditionComponent.initPart(propertiesEditionComponent.translatePart([pec.subPECClass(view)/].[view.viewPartConstant(pec)/]), 1, eObject);
- }
- }
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#dispose()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public void dispose() {
- super.dispose();
- if (this.propertiesEditionComponent != null) {
- this.propertiesEditionComponent.dispose();
- this.propertiesEditionComponent = null;
- this.editionPart = null;
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public boolean select(Object toTest) {
- EObject eObjectToTest = resolveSemanticObject(toTest);
- return eObjectToTest != null && eObjectToTest.eClass() == [pec.model.metamodelPackage()/].eINSTANCE.get[pec.model.name.toJavaMetamodelIdentifier()/]();
- }
-
-[pec.resolveSemanticObject()/]
-
-[additionalMethods()/]
-
-}
-[/file]
- [/for]
-[/if]
-[/for]
-[/template]
-
-[template public resolveSemanticObject(pec : PropertiesEditionComponent)]
- private EObject resolveSemanticObject(Object object) {
- if (object instanceof EObject) {
- return (EObject)object;
- } else if (object instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable)object;
- if (adaptable.getAdapter(SemanticAdapter.class) != null) {
- SemanticAdapter semanticAdapter = (SemanticAdapter)adaptable
- .getAdapter(SemanticAdapter.class);
- return semanticAdapter.getEObject();
- } else if (adaptable.getAdapter(EObject.class) != null) {
- return (EObject)adaptable.getAdapter(EObject.class);
- }
- }
- return null;
- }
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionComponent, view : View)]
-[pec.qualifiedPropertySection(view).toPath()/].java
-[/template]
-
-[comment overrides this template if additional imports are needed/]
-[template public additionalImports(v : View)]
-[/template]
-
-[comment overrides this template if additional methods are needed/]
-[template public additionalMethods(v : View)]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessages.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessages.mtl
deleted file mode 100755
index a8af2e42c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessages.mtl
+++ /dev/null
@@ -1,121 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module ContextMessages('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public ContextMessages(viewsRepository : ViewsRepository)]
- [file (viewsRepository.fullFilePath(), false)]
-[viewsRepository.associatedGenModel().licenceText().trim()/]
-package [viewsRepository.messagesProviderPackage()/];
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * [viewsRepository.associatedGenModel().authorText().trim()/]
- * [viewsRepository.associatedGenModel().generationMark()/]
- */
-public class [viewsRepository.messagesProvider()/] extends NLS {
- [viewsRepository.associatedGenModel().generationComment()/]
- private static final String BUNDLE_NAME = "[viewsRepository.messagesProviderPackage()/].[viewsRepository.messagesProperties()/]"; //$NON-NLS-1$
-
-[for (group : ViewElement | viewsRepository.eAllContents(views::Container)->select(e | e.oclIsTypeOf(views::Container))) separator ('\n') ? (group.representationName('Group'))]
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String [group.groupKey(group.owningView())/];
-[/for]
-
-[for (view : View | viewsRepository.eAllContents(views::View)) separator ('\n') ]
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String [view.name.toJavaClassifier()/]_ReadOnly;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String [view.name.toJavaClassifier()/]_Part_Title;
-[/for]
-
-[for (editor : ElementEditor | viewsRepository.eAllContents(views::ElementEditor)) separator ('\n') ]
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String [editor.editorKey(editor.owningView())/];
-[/for]
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_DocumentationLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_IntegerValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_FloatValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_ShortValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_LongValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_ByteValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_BigIntegerValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_BigDecimalValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_DoubleValueMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_PropertiesGroupLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_RequiredFeatureMessage;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_AddTableViewerLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_EditTableViewerLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_RemoveTableViewerLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_AddListViewerLabel;
-
- [viewsRepository.associatedGenModel().generationComment()/]
- public static String PropertiesEditionPart_RemoveListViewerLabel;
-
- [if (not viewsRepository.associatedGenModel().useJMergeForUserCode)]
- // [protected ('for additionnal NLS Constants')]
-
- // [/protected]
-
- [/if]
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, [viewsRepository.messagesProvider()/].class);
- }
-
- [viewsRepository.associatedGenModel().generationComment()/]
- private [viewsRepository.messagesProvider()/]() {
- //protect instanciation
- }
-}
-[/file]
-[/template]
-
-[template public fullFilePath(viewsRepository : ViewsRepository)]
-[viewsRepository.messagesProviderPackage().toPath()/]/[viewsRepository.messagesProvider()/].java
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesProperties.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesProperties.mtl
deleted file mode 100755
index 155709dac..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesProperties.mtl
+++ /dev/null
@@ -1,58 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module ContextMessagesProperties('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public ContextMessagesProperties(viewsRepository : ViewsRepository)]
- [file (viewsRepository.fullFilePath(), false)]
-[viewsRepository.associatedGenModel().propertiesLicenceText().trim()/]
-
-# [protected ('for titles customization')]
-
-# [/protected]
-
-# default values ...
-[for (group : ViewElement | viewsRepository.eAllContents(views::Container)->select(e | e.oclIsTypeOf(views::Container))) ? (group.representation.name = 'Group')]
-[group.groupKey(group.owningView())/]=[group.name.toUpperFirst().toUnicode()/]
-[/for]
-[for (view : View | viewsRepository.eAllContents(views::View))]
-[view.name.toJavaClassifier()/]_ReadOnly=This property is read only
-[view.name.toJavaClassifier()/]_Part_Title=[view.name/]
-[/for]
-[for (editor : ElementEditor | viewsRepository.eAllContents(views::ElementEditor))]
-[editor.editorKey(editor.owningView())/]=[editor.name.toUpperFirst().toUnicode()/][if (editor.representation.name <> 'Checkbox' and editor.representation.name <> 'MultiValuedEditor')] : [/if]
-[/for]
-PropertiesEditionPart_PropertiesGroupLabel=Properties
-PropertiesEditionPart_EditTableViewerLabel=Edit
-PropertiesEditionPart_DocumentationLabel=Documentation
-PropertiesEditionPart_RequiredFeatureMessage=The property {0} of the object shall be filled
-PropertiesEditionPart_RemoveTableViewerLabel=Delete
-PropertiesEditionPart_RemoveListViewerLabel=Delete
-PropertiesEditionPart_IntegerValueMessage=The property {0} shall be an integer
-PropertiesEditionPart_FloatValueMessage=The property {0} shall be a float
-PropertiesEditionPart_ShortValueMessage=The property {0} shall be a short
-PropertiesEditionPart_DoubleValueMessage=The property {0} shall be a double
-PropertiesEditionPart_ByteValueMessage=The property {0} shall be a byte
-PropertiesEditionPart_LongValueMessage=The property {0} shall be a long
-PropertiesEditionPart_BigIntegerValueMessage=The property {0} shall be a BigInteger
-PropertiesEditionPart_BigDecimalValueMessage=The property {0} shall be a BigDecimal
-PropertiesEditionPart_AddTableViewerLabel=Add
-PropertiesEditionPart_AddListViewerLabel=Add
-[/file]
-[/template]
-
-[template public fullFilePath(viewsRepository : ViewsRepository)]
-[viewsRepository.messagesProviderPackage().toPath()/]/[viewsRepository.messagesProperties()/].properties
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesPropertiesFR.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesPropertiesFR.mtl
deleted file mode 100755
index 533038fd5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/ContextMessagesPropertiesFR.mtl
+++ /dev/null
@@ -1,58 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module ContextMessagesPropertiesFR('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/views/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public ContextMessagesPropertiesFR(viewsRepository : ViewsRepository)]
- [file (viewsRepository.fullFilePath(), false)]
-[viewsRepository.associatedGenModel().propertiesLicenceText().trim()/]
-
-# [protected ('for titles customization')]
-
-# [/protected]
-
-# default values ...
-[for (group : ViewElement | viewsRepository.eAllContents(views::Container)->select(e | e.oclIsTypeOf(views::Container))) ? (group.representation.name = 'Group')]
-[group.groupKey(group.owningView())/]=[group.name.toUpperFirst().toUnicode()/]
-[/for]
-[for (view : View | viewsRepository.eAllContents(View))]
-[view.name.toJavaClassifier()/]_ReadOnly=Cette propri\u00E9t\u00E9 est en lecture seule
-[view.name.toJavaClassifier()/]_Part_Title=[view.name/]
-[/for]
-[for (editor : ElementEditor | viewsRepository.eAllContents(ElementEditor))]
-[editor.editorKey(editor.owningView())/]=[editor.name.toUpperFirst().toUnicode()/][if (editor.representation.name <> 'Checkbox' and editor.representation.name <> 'MultiValuedEditor')] : [/if]
-[/for]
-PropertiesEditionPart_PropertiesGroupLabel=Propri\u00E9t\u00E9s
-PropertiesEditionPart_EditTableViewerLabel=Editer
-PropertiesEditionPart_DocumentationLabel=Documentation
-PropertiesEditionPart_RequiredFeatureMessage=La propri\u00E9t\u00E9 {0} de l\u0027objet doit \u00EAtre renseign\u00E9e
-PropertiesEditionPart_RemoveTableViewerLabel=Supprimer
-PropertiesEditionPart_RemoveListViewerLabel=Supprimer
-PropertiesEditionPart_IntegerValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un entier
-PropertiesEditionPart_FloatValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un flottant
-PropertiesEditionPart_ShortValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un short
-PropertiesEditionPart_DoubleValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un double
-PropertiesEditionPart_ByteValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un byte
-PropertiesEditionPart_LongValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un long
-PropertiesEditionPart_BigIntegerValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un BigInteger
-PropertiesEditionPart_BigDecimalValueMessage=La propri\u00E9t\u00E9 {0} doit \u00EAtre un BigDecimal
-PropertiesEditionPart_AddTableViewerLabel=Ajouter
-PropertiesEditionPart_AddListViewerLabel=Ajouter
-[/file]
-[/template]
-
-[template public fullFilePath(viewsRepository : ViewsRepository)]
-[viewsRepository.messagesProviderPackage().toPath()/]/[viewsRepository.messagesProperties()/]_fr.properties
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionPartProvider.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionPartProvider.mtl
deleted file mode 100755
index 5fa51601c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionPartProvider.mtl
+++ /dev/null
@@ -1,76 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PackagePropertiesEditionPartProvider('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public PackagePropertiesEditionPartProvider(v : ViewsRepository)]
- [file (v.fullFilePath(), false)]
-[v.associatedGenModel().licenceText().trim()/]
-package [v.vrPackage()/]providers;
-
-import [v.vrPackage()/]parts.[v.vrClass()/];
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
-[for (view : View | v.eAllContents(views::View)) ? (view.elements->size() > 0)]
-import [view.pepQualifiedFormClass()/];
-import [view.pepQualifiedClass()/];
-[/for]
-
-[v.additionalImports()/]
-
-
-/**
- * [v.associatedGenModel().authorText().trim()/]
- * [v.associatedGenModel().generationMark()/]
- */
-public class [v.pepProvider()/] implements IPropertiesEditionPartProvider {
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#provides(java.lang.Object)
- * [v.associatedGenModel().generationMark()/]
- */
- public boolean provides(Object key) {
- return key == [v.vrClass()/].class;
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#getPropertiesEditionPart(java.lang.Object, int, org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent)
- * [v.associatedGenModel().generationMark()/]
- */
- public IPropertiesEditionPart getPropertiesEditionPart(Object key, int kind, IPropertiesEditionComponent component) {
- [for (view : View | v.eAllContents(views::View)) ? (view.elements->size() > 0)]
- if (key == [view.editorID()/].class) {
- if (kind == [v.vrClass()/].SWT_KIND)
- return new [view.pepClass()/](component);
- if (kind == [v.vrClass()/].FORM_KIND)
- return new [view.pepFormClass()/](component);
- }
- [/for]
- return null;
- }
-
-}
-[/file]
-[/template]
-
-[template public additionalImports (v : ViewsRepository) ]
-[/template]
-
-[template public fullFilePath(repository : ViewsRepository)]
-[repository.pepQualifiedProvider().toPath()/].java
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionProvider.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionProvider.mtl
deleted file mode 100755
index 3b852698d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PackagePropertiesEditionProvider.mtl
+++ /dev/null
@@ -1,69 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PackagePropertiesEditionProvider('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel')/]
-
-[import common /]
-[import naming /]
-
-[template public PackagePropertiesEditionProvider(peContext : PropertiesEditionContext, ePackage : EPackage)]
- [file (peContext.fullFilePath(ePackage), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [peContext.providersPackage()/];
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.Adapter;
-import [if ((not peContext.associatedEMFGenModel(ePackage).basePackage.oclIsUndefined()) and (peContext.associatedEMFGenModel(ePackage).basePackage.size() > 0))][peContext.associatedEMFGenModel(ePackage).basePackage/].[/if][ePackage.name/].util.[ePackage.name.toJavaClassifier()/];
-[peContext.additionalImports()/]
-
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [ePackage.pecPackageProviderClass()/] extends [peContext.associatedEMFGenModel(ePackage).prefix/]AdapterFactory {
-
-[for (eclass : EClass | ePackage.significantClass())]
- [let pec : PropertiesEditionComponent = eclass.associatedPEC(peContext)]
- [if (not pec.oclIsUndefined() and pec.mustBeGenerated())]
- /**
- * {@inheritDoc}
- * @see [peContext.associatedEMFGenModel(ePackage).basePackage/].[ePackage.name/].util.[peContext.associatedEMFGenModel(ePackage).prefix/]AdapterFactory#create[eclass.name.toJavaIdentifierDelegate().toUpperFirst()/]Adapter()
- * [peContext.associatedGenModel().generationMark()/]
- */
- public Adapter create[eclass.name.toJavaIdentifierDelegate().toUpperFirst()/]Adapter() {
- [if (pec.referencedBinding->size() > 0)]
- List<PropertiesEditingProvider> providers = new ArrayList<PropertiesEditingProvider>([pec.referencedBinding->size()/]);
- [for (binding : PropertiesEditionComponent | pec.referencedBinding.binding.oclAsType(PropertiesEditionComponent))]
- providers.add((PropertiesEditingProvider)create[binding.model.name.toJavaIdentifierDelegate().toUpperFirst()/]Adapter());
- [/for]
- return new [pec.pecProviderClass()/](providers);
- [else]
- return new [pec.pecProviderClass()/]();
- [/if]
- }
- [/if]
- [/let]
-[/for]
-
-}
-[/file]
-[/template]
-
-[template public additionalImports (peContext : PropertiesEditionContext) ]
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionContext, ePackage : EPackage)]
-[pec.pecPackageProviderQualifiedClass(ePackage).toPath()/].java
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PropertiesEditionProvider.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PropertiesEditionProvider.mtl
deleted file mode 100755
index 43849b075..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/providers/PropertiesEditionProvider.mtl
+++ /dev/null
@@ -1,241 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module PropertiesEditionProvider('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[import common /]
-[import naming /]
-
-[template public PropertiesEditionProvider(peContext : PropertiesEditionContext, basePackage : String)]
-[for (pec : PropertiesEditionComponent | peContext.eAllContents(PropertiesEditionComponent))]
-[if (pec.mustBeGenerated())]
- [file (pec.fullFilePath(), false)]
-[peContext.associatedGenModel().licenceText().trim()/]
-package [pec.providersPackage()/];
-
-import java.util.List;
-
-import [pec.model.completePackage()/].[pec.model.metamodelPackage()/];
-import [pec.model.qualifiedName(basePackage)/];
-import [pec.pecRootProviderQualifiedClass()/];
-import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
-import org.eclipse.emf.eef.runtime.context.PropertiesEditingContext;
-
-
-[if (pec.needComposedEditionComponent())]
-import [pec.model.completePackage()/].components.[pec.pecClass()/];
-[/if]
-[for (view : View | pec.views)]
-import [pec.model.completePackage()/].components.[pec.subPECClass(view)/];
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
- [for (view : View | subPec.views) ? (view.explicit)]
-import [subPec.model.ePackage.completePackage()/].components.[subPec.subPECClass(view)/];
- [/for]
-[/for]
-[peContext.additionalImports()/]
-/**
- * [peContext.associatedGenModel().authorText().trim()/]
- * [peContext.associatedGenModel().generationMark()/]
- */
-public class [pec.pecProviderClass()/] extends [pec.pecRootProviderClass()/] {
-
- /**
- * Constructor without provider for super types.
- */
- public [pec.pecProviderClass()/]() {
- super();
- }
-
- /**
- * Constructor with providers for super types.
- * @param superProviders providers to use for super types.
- */
- public [pec.pecProviderClass()/](List<PropertiesEditingProvider> superProviders) {
- super(superProviders);
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public boolean provides(PropertiesEditingContext editingContext) {
- return (editingContext.getEObject() instanceof [pec.model.name/])
- && ([pec.model.metamodelPackage()/].eINSTANCE.get[pec.model.name.toJavaMetamodelIdentifier()/]() == editingContext.getEObject().eClass());
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public boolean provides(PropertiesEditingContext editingContext, String part) {
- return (editingContext.getEObject() instanceof [pec.model.name/]) [pec.provideForPart().trim()/];
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.Class)
- * [peContext.associatedGenModel().generationMark()/]
- */
- @SuppressWarnings("rawtypes")
- public boolean provides(PropertiesEditingContext editingContext, java.lang.Class refinement) {
- return (editingContext.getEObject() instanceof [pec.model.name/]) [pec.provideForClass().trim()/];
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#provides(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.String, java.lang.Class)
- * [peContext.associatedGenModel().generationMark()/]
- */
- @SuppressWarnings("rawtypes")
- public boolean provides(PropertiesEditingContext editingContext, String part, java.lang.Class refinement) {
- return (editingContext.getEObject() instanceof [pec.model.name/]) [pec.provideForPartAndClass().trim()/];
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode) {
- if (editingContext.getEObject() instanceof [pec.model.name/]) {
- return new [pec.pecClass()/](editingContext, editingContext.getEObject(), mode);
- }
- return super.getPropertiesEditingComponent(editingContext, mode);
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.String, java.lang.String)
- * [peContext.associatedGenModel().generationMark()/]
- */
- public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part) {
- if (editingContext.getEObject() instanceof [pec.model.name/]) {
-[for (view : View | pec.views) ? (view.explicit)]
- if ([pec.subPECClass(view)/].[view.viewPartConstant(pec)/].equals(part))
- return new [pec.subPECClass(view)/](editingContext, editingContext.getEObject(), mode);
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
- [for (view : View | subPec.views) ? (view.explicit and view.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))]
- if ([subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/].equals(part))
- return new [subPec.pecClass()/](editingContext, editingContext.getEObject(), mode);
- [/for]
-[/for]
- }
- return super.getPropertiesEditingComponent(editingContext, mode, part);
- }
-
- /**
- * {@inheritDoc}
- * @see org.eclipse.emf.eef.runtime.providers.PropertiesEditingProvider#getPropertiesEditingComponent(org.eclipse.emf.eef.runtime.context.PropertiesEditingContext, java.lang.String, java.lang.String, java.lang.Class)
- */
- @SuppressWarnings("rawtypes")
- public IPropertiesEditionComponent getPropertiesEditingComponent(PropertiesEditingContext editingContext, String mode, String part, java.lang.Class refinement) {
- if (editingContext.getEObject() instanceof [pec.model.name/]) {
-[for (view : View | pec.views) ? (view.explicit)]
- if ([pec.subPECClass(view)/].[view.viewPartConstant(pec)/].equals(part)
- && refinement == [pec.subPECClass(view)/].class)
- return new [pec.subPECClass(view)/](editingContext, editingContext.getEObject(), mode);
-[/for]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent)))]
- [for (view : View | subPec.views) ? (view.explicit and view.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))]
- if ([subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/].equals(part)
- && refinement == [subPec.pecClass()/].class)
- return new [subPec.pecClass()/](editingContext, editingContext.getEObject(), mode);
- [/for]
-[/for]
- }
- return super.getPropertiesEditingComponent(editingContext, mode, part, refinement);
- }
-
-}
-[/file]
-[/if]
-[/for]
-[/template]
-
-[template public additionalImports (peContext : PropertiesEditionContext) ]
-[/template]
-
-[template public provideForPart(pec : PropertiesEditionComponent)]
-[if (pec.providePart().size() > 0)]
-&& ([pec.providePart().replaceAll('\n', '').replaceAll('\n\r','')/])
-[/if]
-[/template]
-
-[template public providePart(pec : PropertiesEditionComponent)]
-[let view : View = pec.views->select(v:views::View | v.explicit)->first()]
-[if (not view.oclIsUndefined())][for (v : View | pec.views) separator (' || ') ? (v.explicit)]
-[pec.subPECClass(v)/].[v.viewPartConstant(pec)/].equals(part)[/for][/if]
-[if (pec.referencedBinding->size()>0)][let subPec : PropertiesEditionComponent = pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent)]
-[if (not subPec.oclIsUndefined())][let view2 : View = subPec.views->select(v:views::View | v.explicit and v.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))->first()]
-[if (not view2.oclIsUndefined())][if (not view.oclIsUndefined())] || [/if]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) separator (' || ')]
-[for (view : View | subPec.views) separator (' || ') ? (view.explicit and view.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))]
-[subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/].equals(part)[/for][/for]
-[/if][/let][/if]
-[/let]
-[/if]
-[/let]
-[/template]
-
-[template public provideForClass(pec : PropertiesEditionComponent)]
-[if (pec.provideClass().size() > 0)]
-&& ([pec.provideClass().replaceAll('\n', '').replaceAll('\n\r','')/])
-[/if]
-[/template]
-
-[template public provideClass(pec : PropertiesEditionComponent)]
-[let view : View = pec.views->select(v:views::View | v.explicit)->first()]
-[if (not view.oclIsUndefined())][for (v : View | pec.views) separator (' || ') ? (v.explicit)]
-refinement == [pec.subPECClass(v)/].class[/for][/if]
-[if (pec.referencedBinding->size()>0)][let subPec : PropertiesEditionComponent = pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent)]
-[if (not subPec.oclIsUndefined())][let view2 : View = subPec.views->select(v:views::View | v.explicit and v.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))->first()]
-[if (not view2.oclIsUndefined())][if (not view.oclIsUndefined())] || [/if]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) separator (' || ')]
-[for (view : View | subPec.views) separator (' || ') ? (view.explicit and view.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))]
-refinement == [subPec.pecClass()/].class[/for][/for]
-[/if][/let][/if]
-[/let]
-[/if]
-[/let]
-[/template]
-
-
-[template public provideForPartAndClass(pec : PropertiesEditionComponent)]
-[if (pec.providePartAndClass().size() > 0)]
-&& ([pec.providePartAndClass().replaceAll('\n', '').replaceAll('\n\r','')/])
-[/if]
-[/template]
-
-[template public providePartAndClass(pec : PropertiesEditionComponent)]
-[let view : View = pec.views->select(v:views::View | v.explicit)->first()]
-[if (not view.oclIsUndefined())][for (v : View | pec.views) separator (' || ') ? (v.explicit)]
-([pec.subPECClass(v)/].[v.viewPartConstant(pec)/].equals(part) && refinement == [pec.subPECClass(v)/].class)[/for][/if]
-[if (pec.referencedBinding->size()>0)][let subPec : PropertiesEditionComponent = pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent)]
-[if (not subPec.oclIsUndefined())][let view2 : View = subPec.views->select(v:views::View | v.explicit and v.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))->first()]
-[if (not view2.oclIsUndefined())][if (not view.oclIsUndefined())] || [/if]
-[for (subPec : PropertiesEditionComponent | pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))) separator (' || ')]
-[for (view : View | subPec.views) separator (' || ') ? (view.explicit and view.ancestors()->select(oclIsKindOf(views::View)).oclAsType(views::View)->excludesAll(pec.views->asSequence()))]
-([subPec.subPECClass(view)/].[view.viewPartConstant(subPec)/].equals(part) && refinement == [subPec.pecClass()/].class)[/for][/for]
-[/if][/let][/if]
-[/let]
-[/if]
-[/let]
-[/template]
-
-[template public fullFilePath(pec : PropertiesEditionComponent)]
-[pec.pecProviderQualifiedClass().toPath()/].java
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportMarker.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportMarker.class
deleted file mode 100644
index 558df5f4a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportMarker.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportService.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportService.class
deleted file mode 100644
index ddba3600e..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/ImportService.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/common.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/common.mtl
deleted file mode 100755
index b146e4268..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/common.mtl
+++ /dev/null
@@ -1,562 +0,0 @@
-[comment encoding=UTF-8
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module common('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0')/]
-
-[comment --------------- Common queries --------------- /]
-
-[comment Check if at least one views of the propertyBinding is contained by the given view /]
-[query public involvedViews(pec : PropertiesEditionComponent) : Sequence(View) =
- pec.views->asSequence()->union(pec.referencedBinding.binding.views->select(ancestors(View)->excludesAll(pec.views->asSequence())))/]
-
-[query public involvedEditionElements(pec : PropertiesEditionComponent) : Sequence(T) =
- pec.properties->asSequence()->union(pec.referencedBinding.binding.properties)/]
-
-[query public editionContext(pec : PropertiesEditionComponent) : PropertiesEditionContext =
- if (pec.ancestors()->select(oclIsTypeOf(PropertiesEditionContext))->notEmpty()) then
- pec.ancestors()->select(oclIsTypeOf(PropertiesEditionContext))->first().oclAsType(PropertiesEditionContext)
- else null
- endif/]
-
-[query public owningView(element : ViewElement) : View =
- if (element.oclIsKindOf(View))
- then element.oclAsType(View)
- else element.container.owningView()
- endif/]
-
-[query public owningViewString(element : ViewElement) : String =
- if (element.oclIsKindOf(View))
- then element.oclAsType(View).name.toJavaClassifier()
- else element.container.owningViewString()
- endif/]
-
-[query public hasOwningViewsRepository(view : View) : Boolean = view.ancestors()->select(oclIsTypeOf(ViewsRepository))->notEmpty()/]
-
-[query public owningViewsRepository(view : View) : ViewsRepository =
- if (view.hasOwningViewsRepository()) then
- view.ancestors()->select(oclIsTypeOf(ViewsRepository))->first().oclAsType(ViewsRepository)
- else null
- endif/]
-
-[query public owningViewsRepository(element : ViewElement) : ViewsRepository =
- element.owningView().owningViewsRepository()/]
-
-[query public referencedViews(view : View) : Sequence(T) =
- view.eAllContents(views::ViewReference).oclAsType(views::ViewReference).view->select(oclIsTypeOf(views::View)).oclAsType(views::View)/]
-
-[query public ownedBy(element : ViewElement, view : View) : Boolean =
- element.owningView() = view/]
-
-[query public involvedEditionElementsInView(pec : PropertiesEditionComponent, v : View) : Sequence(T) =
- pec.involvedEditionElements().oclAsType(PropertiesEditionElement)->select(views->first().ownedBy(v))/]
-
-[query public propertiesEditionElement(element : ElementEditor, pec : PropertiesEditionComponent) : PropertiesEditionElement =
- pec.properties->select(views->includes(element))->first()/]
-
-[query public relatedComponent(view : View, pec : PropertiesEditionComponent) : PropertiesEditionComponent =
- if (pec.views->includes(view))
- then pec.oclAsType(PropertiesEditionComponent)
- else pec.referencedBinding.binding->select(views->includes(view))->first().oclAsType(PropertiesEditionComponent)
- endif/]
-
-[query public fullPartInterfacePath(pepCompletePackage : String, pepInterface : String) : String =
- pepCompletePackage.concat('.parts.').concat(pepInterface)/]
-
-[query public associatedGenFeature(pee : PropertiesEditionElement) : GenFeature =
- pee.model.eInverse()->select(oclIsKindOf(GenFeature))->first().oclAsType(GenFeature)/]
-
-[query public associatedGenPackage(p : EPackage) : GenPackage =
- p.eInverse(GenPackage)->first()/]
-
-[query public associatedGenPackage(pec : PropertiesEditionComponent) : GenPackage =
- pec.model.ePackage.associatedGenPackage()/]
-
-[query public associatedGenContext(peco : PropertiesEditionContext) : GenEditionContext =
- peco.eInverse()->select(oclIsKindOf(GenEditionContext))->first().oclAsType(GenEditionContext)/]
-
-[query public associatedGenContext(peco : PropertiesEditionComponent) : GenEditionContext =
- peco.editionContext().associatedGenContext() /]
-
-[query public associatedGenModel(pec : PropertiesEditionContext) : EEFGenModel =
- pec.associatedGenContext().eefGenModel/]
-
-[query public associatedEMFGenModel(pec : PropertiesEditionContext, ePackage : EPackage) : GenPackage =
- if (pec.model.ecorePackage = ePackage)
- then pec.model
- else if (pec.model.eAllContents(GenPackage)->select(p : GenPackage | p.ecorePackage = ePackage)->size() > 0)
- then pec.model.eAllContents(GenPackage)->select(p : GenPackage | p.ecorePackage = ePackage)->first()
- else null
- endif
- endif/]
-
-[query public associatedGenRepository(view : View) : GenViewsRepository =
- view.owningViewsRepository().associatedGenRepository()/]
-
-[query public associatedGenRepository(viewsRepository : ViewsRepository) : GenViewsRepository =
- if (viewsRepository.eInverse()->select(oclIsKindOf(GenViewsRepository))->notEmpty())
- then viewsRepository.eInverse()->select(oclIsKindOf(GenViewsRepository))->first().oclAsType(GenViewsRepository)
- else null
- endif/]
-
-[query public associatedGenModel(viewsRepository : ViewsRepository) : EEFGenModel =
- if not viewsRepository.associatedGenRepository().oclIsUndefined()
- then viewsRepository.associatedGenRepository().eefGenModel
- else null
- endif/]
-
-[query public associatedPEC(eclass : EClass, peContext : PropertiesEditionContext) : PropertiesEditionComponent = if eclass.eInverse(PropertiesEditionComponent)->isEmpty() then null else eclass.eInverse(PropertiesEditionComponent)->first() endif/]
-
-[query public significantClass(ePackage : EPackage) : Set(EClass) = ePackage.eClassifiers->select(oclIsKindOf(EClass)).oclAsType(EClass).classAndHierarchy()->asOrderedSet() /]
-
-[query private classAndHierarchy(eclass : EClass) : Set(EClass) = eclass.eSuperTypes.classAndHierarchy()->including(eclass)->asOrderedSet() /]
-
-
-[comment Defines if a SubPropertiesEditionComponent must be generated. A SubPropertiesEdtionComponent must be generated if :
- - its 'explicit' property is set to true
- - A ElementBindingReference reference it and it contains at least 1 PEE/]
-[query public mustBeGenerated(pec : PropertiesEditionComponent) : Boolean =
- (pec.explicit and (pec.eAllContents(PropertiesEditionElement)->notEmpty() or pec.referencedBinding->notEmpty())) or pec.eInverse()->select(oclIsTypeOf(ElementBindingReference))->notEmpty()/]
-
-[comment Defines if a ComposedPropertiesEditionComponent must be generated. A ComposedPropertiesEditionComponent must be generated if :
- - its 'explicit' property is set to true and it has more than 1 view to manage
- - the component has to manage only reference binding /]
-[query public needComposedEditionComponent(pec : PropertiesEditionComponent) : Boolean =
- (pec.explicit and pec.involvedViews()->size() > 1) or (pec.views->isEmpty() and pec.involvedViews()->notEmpty())/]
-
-[comment Defines if a DynamicPropertiesEditionComponent must be generated. A DynamicPropertiesEdtionComponent must be generated if :
- - its 'explicit' property is set to true
- - the given view is a dynamic view /]
-[query public mustDynamicPecBeGenerated(pec : PropertiesEditionComponent, view : View) : Boolean =
- pec.explicit and view.isDynamicView()/]
-
-[comment A view is Dynamic if it have subViews ... /]
-[query public isDynamicView(view : View) : Boolean =
- view.elements->select(oclIsKindOf(views::View))->notEmpty()/]
-
-[query public dynamicViews(pec : PropertiesEditionComponent, topLevelView : View) : Sequence(T) =
- pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent) and oclAsType(PropertiesEditionComponent).mustBeGenerated()).views->select(ancestors()->includes(topLevelView))/]
-
-[comment TODOGLF: List of parts that a component have to manage/]
-[query public partToManage(pec : PropertiesEditionComponent) : Sequence(View) = pec.involvedViews()/]
-
-[query public mustBeGenerated(view : View, pec : PropertiesEditionComponent) : Boolean =
- view.oclAsType(EObject).eResource() = pec.oclAsType(EObject).eResource()/]
-
-[query public needBeGenerated(ref : ViewReference) : Boolean =
- if (ref.view.oclIsTypeOf(views::View))
- then not ref.view.oclAsType(views::View).involvedPropertiesEditionComponent().oclIsUndefined()
- else false
- endif/]
-
-[query public isA1stLevelReferencedView(toCheck : View, pec : PropertiesEditionComponent) : Boolean =
- pec.views.eAllContents(views::ViewReference).oclAsType(views::ViewReference).view->select(oclIsKindOf(views::View)).oclAsType(views::View)->includes(toCheck)/]
-
-[comment ----- StructuralFeatures classification ----- /]
-[query public isReferenceMany(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EReference)
- and not (feature.oclAsType(EReference).containment)
- and feature.many/]
-
-[query public isReferenceSingle(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EReference)
- and not (feature.oclAsType(EReference).containment)
- and not (feature.many)/]
-
-[query public isContainment(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EReference)
- and feature.oclAsType(EReference).containment/]
-
-[query public isContainmentMany(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EReference)
- and feature.oclAsType(EReference).containment
- and feature.many/]
-
-[query public isContainmentSingle(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EReference)
- and feature.oclAsType(EReference).containment
- and not (feature.many)/]
-
-[query public isAttributeMany(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EAttribute)
- and feature.many/]
-
-[query public isAttributeSingle(feature : EStructuralFeature) : Boolean =
- feature.oclIsTypeOf(EAttribute)
- and not (feature.many)/]
-
-[comment ---- Views related queries ----- /]
-[query public representationName(editionElement : PropertiesEditionElement, nameToCheck : String) : Boolean =
- editionElement.views->first().representation.name = nameToCheck/]
-
-[query public representationName(view : ViewElement, nameToCheck : String) : Boolean =
- view.representation.name = nameToCheck/]
-
-[comment ----- Editor ID queries ---------/]
-[query public editorIDSequence(editorElement : IdentifiedElement) : Sequence(T) =
- editorElement.qualifiedIdentifier.tokenize('::')/]
-
-[query public identifiedElementKey(editorElement : IdentifiedElement) : String =
- editorElement.qualifiedIdentifier.tokenize('::')->last()/]
-
-[comment ----- Model Navigation ---------/]
-[query public hasModelNavigation(pee : PropertiesEditionElement) : Boolean =
- not pee.navigation.oclIsUndefined()/]
-
-[query public canGeneratemodelNavigation(pee : PropertiesEditionElement) : Boolean =
- pee.hasModelNavigation() and pee.model.oclIsTypeOf(ecore::EAttribute) /]
-
-
-[comment --------------- Common templates --------------- /]
-[template public ecorePackageSignature(e : EStructuralFeature)]
-[e.eContainingClass.name.toUpperFirst()/]_[e.name.toUpperFirst()/]
-[/template]
-
-[template public ecoreCompletePackageGetter(editor : PropertiesEditionElement)]
-get[editor.model.ecorePackageSignature()/]()
-[/template]
-
-[template public ecoreCompletePackageGetter(s : SimpleModelNavigation)]
-get[s.feature.ecorePackageSignature()/]()
-[/template]
-
-[template public ecoreCompletePackageSetter(editor : PropertiesEditionElement)]
-set[editor.model.ecorePackageSignature()/]()
-[/template]
-
-[query public ecoreGenModelAnnotation(modelElement : EModelElement) : OrderedSet(EAnnotation) =
- modelElement.eAnnotations->select(annot : EAnnotation | annot.source = 'http://www.eclipse.org/emf/2002/GenModel')/]
-
-[query public ecoreDocumentationAnnotation(modelElement : EModelElement) : Sequence(EStringToStringMapEntry) =
- modelElement.ecoreGenModelAnnotation()->first().details.oclAsType(EStringToStringMapEntry)
- ->select(entry : EStringToStringMapEntry | entry.key = 'documentation')/]
-
-[query public ecoreHelp(modelElement : EModelElement) : String =
- if (modelElement.ecoreGenModelAnnotation()->size() = 1)
- then if (modelElement.ecoreDocumentationAnnotation()->size() = 1)
- then modelElement.ecoreDocumentationAnnotation()->first().value.replaceAll('"','\\"').replaceAll('\n','').replaceAll('\r','')
- else null
- endif
- else null
- endif/]
-
-[template public helpText(pee : PropertiesEditionElement)]
-[if (not pee.views->first().owningViewsRepository().associatedGenRepository().oclIsUndefined())]
-[if (pee.views->first().owningViewsRepository().associatedGenRepository().helpStrategy = HELP_STRATEGY::GENMODEL)]
-[if ((not pee.associatedGenFeature().oclIsUndefined()) and (not pee.associatedGenFeature().propertyDescription.oclIsUndefined()))]"[pee.associatedGenFeature().propertyDescription.replaceAll('"','\\"')/]"[else]null[/if]
-[elseif (pee.views->first().owningViewsRepository().associatedGenRepository().helpStrategy = HELP_STRATEGY::ECOREMODEL)]
-[if (pee.model.ecoreHelp().oclIsUndefined())]"[pee.model.ecoreHelp().trim()/]"[else]null[/if]
-[/if]
-[/if]
-[/template]
-
-[template public licenceText(eefGenModel : EEFGenModel)]
-[if (not eefGenModel.license.oclIsUndefined())]
-[eefGenModel.license/]
-[else]
-/**
- * Generated with Acceleo
- */
-[/if]
-[/template]
-
-[template public propertiesLicenceText(eefGenModel : EEFGenModel)]
-[if (not eefGenModel.license.oclIsUndefined())]
-[eefGenModel.license.replaceAll('/\\*\\*', '#').replaceAll(' \\*/', '#').replaceAll(' \\*', '#')/]
-[else]
-#
-# Generated with Acceleo
-#
-[/if]
-[/template]
-
-[template public generationMark(eefGenModel : EEFGenModel) ]
-[if (eefGenModel.useJMergeForUserCode)]@generated[/if]
-[/template]
-
-[template public generationComment(eefGenModel : EEFGenModel) ]
-[if (eefGenModel.useJMergeForUserCode)]
-/**
- * [eefGenModel.generationMark()/]
- */
-[/if]
-[/template]
-
-[template public authorText(eefGenModel : EEFGenModel)]
-[if (not eefGenModel.author.oclIsUndefined())]
-@author [eefGenModel.author/]
-[/if]
-[/template]
-
-[comment --------------- View Common templates --------------- /]
-[template public viewCompletePackageGetter(view : ViewElement)]
-[view.viewPackageGetter()/]()
-[/template]
-
-[template public viewPackageGetter(view : ViewElement)]
-get[view.viewPackageSignature()/]
-[/template]
-
-[template public viewPackageSignature(view : ViewElement)]
-[view.name.toJavaClassifier()/]
-[/template]
-
-[template public viewPackageSetter(view : ViewElement)]
-set[view.viewPackageSignature()/]
-[/template]
-
-[template public viewCompletePackageSetter(view : ViewElement)]
-[view.viewPackageSetter()/]([view.toJavaType().trim()/] newValue)
-[/template]
-
-[template public toJavaType(view : ViewElement)]
-[if (view.representationName('Text') or view.representationName('Textarea') or view.representationName('RichText') or view.representationName('ImageViewer') or view.representationName('SelectionDialog'))]
-String
-[elseif (view.representationName('EMFComboViewer'))]
-Enumerator
-[elseif (view.representationName('MultiValuedEditor'))]
-EList
-[elseif (view.representationName('EObjectFlatComboViewer') or view.representationName('AdvancedEObjectFlatComboViewer') or view.representationName('SingleCompositionViewer'))]
-EObject
-[elseif (view.representationName('ReferencesTable') or view.representationName('AdvancedReferencesTable') or view.representationName('FlatReferencesTable') or view.representationName('TableComposition') or view.representationName('AdvancedTableComposition'))]
-List
-[elseif (view.representationName('Checkbox'))]
-Boolean
-[elseif (view.representationName('Radio'))]
-[comment can be used for Enums or Boolean/]
-Object
-[elseif (view.representationName('Combo'))]
-[comment can be used for References, Enums or Boolean/]
-Object
-[else]
-//FIXME ERROR INVALID CASE INTO template public toJavaType(view : ViewElement) in common.mtl module for representation [view.representation.name/]
-[/if]
-[/template]
-
-[template public toPath(s : String)][s.substituteAll('.', '/')/][/template]
-
-[comment][esc/][if (esc = 'class' or esc = 'package' or esc = 'default' or esc = 'case' or esc = 'if' or esc = 'else' or esc = 'while' or esc = 'for' or esc = 'do' or esc = 'until' or esc = 'transient' or esc = 'interface')]_[/if][/let][/comment]
-[template public toASCII(s : String)]
-[s.substituteAll('à', 'a')
- .substituteAll('é', 'e')
- .substituteAll('è', 'e')
- .substituteAll('ê', 'e')
- .substituteAll('ë', 'e')
- .substituteAll('ï', 'i')
- .substituteAll('î', 'i')
- .substituteAll('ö', 'o')
- .substituteAll('ô', 'o')
- .substituteAll('ù', 'u')
- .substituteAll('ü', 'u')
- .substituteAll('û', 'u')
- .substituteAll('-', '')/]
-[/template]
-
-[comment template used for the properties files to handle accents /]
-[template public toUnicode(s : String)]
-[s.substituteAll('à', '\\u00E0').substituteAll('À', '\\u00C0')
- .substituteAll('á', '\\u00E1').substituteAll('Á', '\\u00C1')
- .substituteAll('â', '\\u00E2').substituteAll('Â', '\\u00C2')
- .substituteAll('ä', '\\u00E4').substituteAll('Ä', '\\u00C4')
- .substituteAll('æ', '\\u00E6').substituteAll('Æ', '\\u00C6')
- .substituteAll('ç', '\\u00E7').substituteAll('Ç', '\\u00C8')
- .substituteAll('é', '\\u00E9').substituteAll('É', '\\u00C9')
- .substituteAll('ê', '\\u00EA').substituteAll('Ê', '\\u00CA')
- .substituteAll('ë', '\\u00EB').substituteAll('Ë', '\\u00CC')
- .substituteAll('í', '\\u00EC').substituteAll('Í', '\\u00CC')
- .substituteAll('î', '\\u00EE').substituteAll('Î', '\\u00CE')
- .substituteAll('ï', '\\u00EF').substituteAll('Ï', '\\u00CF')
- .substituteAll('ñ', '\\u00F1').substituteAll('Ñ', '\\u00D1')
- .substituteAll('ò', '\\u00F2').substituteAll('Ò', '\\u00D2')
- .substituteAll('ó', '\\u00F3').substituteAll('Ó', '\\u00D3')
- .substituteAll('ô', '\\u00F4').substituteAll('Ô', '\\u00D4')
- .substituteAll('ö', '\\u00F6').substituteAll('Ö', '\\u00D6')
- .substituteAll('ù', '\\u00F9').substituteAll('Ù', '\\u00D9')
- .substituteAll('ú', '\\u00FA').substituteAll('Ú', '\\u00DA')
- .substituteAll('û', '\\u00FB').substituteAll('Û', '\\u00DB')
- .substituteAll('ü', '\\u00FC').substituteAll('Ü', '\\u00DC')
- .substituteAll('œ', '\\u0153').substituteAll('Œ', '\\u0152')
- .substituteAll('«', '\\u00AB').substituteAll('»', '\\u00BB')
- .substituteAll('$', '\\u0024').substituteAll('€', '\\u20AC')
- .substituteAll('\'', '\\u0027')/]
-[/template]
-
-[comment Sequence{1..s.size()}->
- iterate(i; result : String = "" |
- if i = 1 then result.concat(s.substring(i,i).toLower())
- else if s.substring(i,i) = " " then result
- else result.concat(s.substring(i,i))
- endif
- ) /]
-
-[comment TODO: fixed in Acceleo 3.0.0M7/]
-[query public startsWithADigit(s : String) : Boolean = not s.first(1).isAlpha()/]
-[comment][query public startsWithADigit(s : String) : Boolean =
- s.firstChar() = '0'
- or s.firstChar() = '1'
- or s.firstChar() = '2'
- or s.firstChar() = '3'
- or s.firstChar() = '4'
- or s.firstChar() = '5'
- or s.firstChar() = '6'
- or s.firstChar() = '7'
- or s.firstChar() = '8'
- or s.firstChar() = '9'/][/comment]
-
-[template public firstChar(s : String)]
-[if (s.oclIsUndefined())][''/][elseif (s = '')][''/][else][s.substring(1,1)/][/if]
-[/template]
-
-[template public toJavaIdentifierDelegate(s : String)]
-[if (s.startsWithADigit())]_[/if][for (str : String | s.toASCII().tokenize(' '))][str.toUpperFirst()/][/for]
-[/template]
-
-[comment === escape some special keywords (java and EEF) /]
-[template public toJavaIdentifier(s : String)]
-[s.toJavaIdentifierDelegate().toLowerFirst().replaceAll('(?i)^((title)|(parent)|(abstract)|(continue)|(for)|(new)|(switch)|(assert)|(default)|(goto)|(package)|(synchronized)|(boolean)|(do)|(if)|(private)|(this)|(break)|(double)|(implements)|(protected)|(throw)|(byte)|(else)|(import)|(public)|(throws)|(case)|(enum)|(instanceof)|(return)|(transient)|(catch)|(extends)|(int)|(short)|(try)|(char)|(final)|(interface)|(static)|(void)|(class)|(finally)|(long)|(strictfp)|(volatile)|(const)|(float)|(native)|(super)|(while))$','$1_')/]
-[/template]
-
-[template public toJavaClassifier(s : String)]
-[s.toJavaIdentifier().toUpperFirst()/]
-[/template]
-
-[template public toJavaMetamodelIdentifier(s : String)]
-[s.replaceAll('^(Class)$','$1_')/]
-[/template]
-
-[template public toJavaConstant(s: String)]
-[s.toJavaIdentifier().toUpper()/]
-[/template]
-
-[comment ==== For multiples model features getters (thanks to UML !) ==== /]
-[template public toMany(s: String)]
-[s/]
-[/template]
-
-[comment ==== For boolean model features getters (thanks to UML !) ==== /]
-[template public booleanGetter(feature : EStructuralFeature)]
-is
-[/template]
-
-[template public completePackage(eClassifier : EClassifier)]
-[ePackage.completePackage()/]
-[/template]
-
-[template public completePackage(ePackage : EPackage)]
-[if ((not ePackage.associatedGenPackage().basePackage.oclIsUndefined()) and (ePackage.associatedGenPackage().basePackage.size() > 0))][ePackage.associatedGenPackage().basePackage/].[/if][ePackage.name/]
-[/template]
-
-[template public eefPackage(eClassifier : EClassifier, basePackage : String)]
-[eClassifier.ePackage.eefPackage(basePackage)/]
-[/template]
-
-[template public eefPackage(ePackage : EPackage, basePackage : String)]
-[if ((not ePackage.associatedGenPackage().basePackage.oclIsUndefined()) and (ePackage.associatedGenPackage().basePackage.size() > 0))][basePackage/].[/if][ePackage.name/]
-[/template]
-
-[template public qualifiedName(eClassifier : EClassifier)]
-[eClassifier.completePackage()/].[eClassifier.name/]
-[/template]
-
-[comment @deprecated/]
-[template public qualifiedName(eClassifier : EClassifier, basePackage : String)]
-[eClassifier.completePackage()/].[eClassifier.name/]
-[/template]
-
-[query public metamodelPrefix(ePackage : EPackage) : String =
- if ePackage.nsURI= 'http://www.eclipse.org/emf/2002/Ecore'
- then 'Ecore'
- else if ePackage.nsURI = 'http://www.eclipse.org/emf/2003/XMLType'
- then 'XMLType'
- else ePackage.eInverse(GenPackage)->first().prefix
- endif
- endif/]
-
-[template public metamodelPackage(ePackage : EPackage)]
-[ePackage.metamodelPrefix()/]Package
-[/template]
-
-[template public metamodelFactory(ePackage : EPackage)]
-[ePackage.metamodelPrefix()/]Factory
-[/template]
-
-[template public metamodelPackage(eClassifier : EClassifier)]
-[eClassifier.ePackage.metamodelPackage()/]
-[/template]
-
-[comment @deprecated /]
-[comment][template public qualifiedMetamodelPackage(ePackage : EPackage, basePackage : String)]
-[ePackage.completePackage()/].[ePackage.metamodelPackage()/]
-[/template][/comment]
-
-[comment @deprecated /]
-[comment][template public qualifiedMetamodelPackage(eClassifier : EClassifier, basePackage : String)]
-[eClassifier.ePackage.qualifiedMetamodelPackage(basePackage)/]
-[/template][/comment]
-
-[template public qualifiedMetamodelPackage(ePackage : EPackage)]
-[ePackage.completePackage()/].[ePackage.metamodelPackage()/]
-[/template]
-
-[template public qualifiedMetamodelPackage(eClassifier : EClassifier)]
-[eClassifier.ePackage.qualifiedMetamodelPackage()/]
-[/template]
-
-[template public qualifiedMetamodelFactory(ePackage : EPackage)]
-[ePackage.completePackage()/].[ePackage.metamodelFactory()/]
-[/template]
-
-[template public metamodelGetter(s : SimpleModelNavigation)]
-[s.feature.eContainingClass.metamodelPackage()/].eINSTANCE.[s.ecoreCompletePackageGetter()/]
-[/template]
-
-[template public metamodelGetter(p : PropertiesEditionElement)]
-[p.model.eContainingClass.metamodelPackage()/].eINSTANCE.[p.ecoreCompletePackageGetter()/]
-[/template]
-
-[template public metamodelGetter(c : EClassifier)]
-[c.metamodelPackage()/].eINSTANCE.get[c.name/]()
-[/template]
-
-[comment queries for model navigation /]
-[query public simpleModelNavigationType(modelNavigation : SimpleModelNavigation) : String =
- if (modelNavigation.discriminatorType.oclIsUndefined())
- then modelNavigation.feature.eType.name
- else modelNavigation.discriminatorType.name
- endif/]
-
-[query public simpleModelNavigationMetamodelFactory(modelNavigation : SimpleModelNavigation) : String =
- if (modelNavigation.discriminatorType.oclIsUndefined())
- then modelNavigation.feature.eType.ePackage.metamodelPrefix()
- else modelNavigation.discriminatorType.ePackage.metamodelPrefix()
- endif/]
-
-[comment]
-@param PropertiesEditionElement the PEE of the composition
-@param EStructuralFeature : the feature of the composition
-[/comment]
-[query public involvedPropertiesEditionElement(peElement : PropertiesEditionElement, f : EStructuralFeature) : PropertiesEditionElement =
- peElement.element.category.eContainer(PropertiesEditionContext).categories.bindings->select(oclIsTypeOf(PropertiesEditionComponent)).oclAsType(PropertiesEditionComponent).properties->select(oclIsTypeOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->select(pee : PropertiesEditionElement | pee.model=f)->first()/]
-
-[query public involvedPropertiesEditionElement(element : ElementEditor, pec : PropertiesEditionComponent) : PropertiesEditionElement =
- element.eInverse()->select(oclIsTypeOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->first()/]
-
-[query public involvedPropertiesEditionElement(element : ElementEditor) : PropertiesEditionElement =
- element.eInverse()->select(oclIsTypeOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->first()/]
-
-[query public involvedPropertiesEditionElement(view : ViewElement, pec : PropertiesEditionComponent) : PropertiesEditionElement =
- pec.involvedEditionElements().oclAsType(PropertiesEditionElement)->select(views.oclAsType(ViewElement)->includes(view))->first()/]
-
-[query public involvedPropertiesEditionComponent(view : View) : PropertiesEditionComponent =
- if (view.eInverse()->select(oclIsTypeOf(PropertiesEditionComponent))->notEmpty())
- then view.eInverse()->select(oclIsTypeOf(PropertiesEditionComponent))->first()
- else null
- endif/]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/filters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/filters.mtl
deleted file mode 100755
index 4e89e47d2..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/filters.mtl
+++ /dev/null
@@ -1,91 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module filters('http://www.eclipse.org/emf/eef/mapping/filters/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0')/]
-
-[import naming /]
-[import common /]
-
-[template public filterBody(bindingFilter : BindingFilter, editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-// FIXME default case for filter body generation.
-[/template]
-
-[template public filterBody(filter : JavaDeclarationFilter, editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
- [view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [filter.methodName/](viewer, parentElement, element);
- }
-
- });
-[/template]
-
-[template public filterBody(filter : JavaExpressionFilter, editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
- [view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- [if (filter.javaBody->size()> 0)][filter.javaBody/][else]return false;[/if]
- }
-
- });
-[/template]
-
-[template public filterBody(filter : OnlyReferenceTypeFilter, editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
- [view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- Object result = EEFUtils.choiceOfValues([pec.subPECClass(view)/].this.semanticObject, [filter.reference.eContainingClass.metamodelPackage()/].eINSTANCE.get[filter.reference.ecorePackageSignature()/]());
- if (result instanceof Collection) {
- return ((Collection)result).contains(element);
- } else if (result instanceof ResourceSet && element instanceof EObject) {
- return ((EObject)element).eResource() != null && ((EObject)element).eResource().getResourceSet() != null && ((EObject)element).eResource().getResourceSet().equals(result);
- }
- return element instanceof Resource;
- }
- });
-[/template]
-
-[template public filterBody(bindingFilter : OCLFilter, editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
- // OCLFilter not implemented yet
-[/template]
-
-[template public javaDeclarationFilter(pee : PropertiesEditionElement)]
-[for (bindingFilter : JavaDeclarationFilter | pee.bindingFilters->select(oclIsTypeOf(filters::JavaDeclarationFilter))) separator ('\n')]
- /**
- * [bindingFilter.documentation/]
- */
- private boolean [bindingFilter.methodName/](Viewer viewer, Object parentElement, Object element){
- [if (pee.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
- return true;
- [else]
- // [protected ('for user filter '.concat(bindingFilter.methodName))]
- return true;
- // [/protected]
- [/if]
- }
-[/for]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/importservice.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/importservice.mtl
deleted file mode 100755
index 2f7f9136a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/importservice.mtl
+++ /dev/null
@@ -1,19 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
- [module importservice('http://www.eclipse.org/emf/2002/Ecore')/]
-
-[query public addImport(arg0 : EObject, arg1 : String) : OclVoid
- = invoke('org.eclipse.emf.eef.codegen.services.ImportService', 'addImport(org.eclipse.emf.ecore.EObject, java.lang.String)', Sequence{arg0, arg1}) /]
-
-[query public getImports(arg0 : EObject) : String
- = invoke('org.eclipse.emf.eef.codegen.services.ImportService', 'getImports(org.eclipse.emf.ecore.EObject)', Sequence{arg0}) /] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/naming.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/naming.mtl
deleted file mode 100755
index 02f7c9426..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/naming.mtl
+++ /dev/null
@@ -1,301 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module naming('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/navigation/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0', 'http://www.eclipse.org/emf/2002/GenModel')/]
-
-[import common /]
-
-[comment --------------------------------------------------------------------------
- Master packages management
- ---------------------------------------------------------------------------------- /]
-[template public contextPackage(peContext : PropertiesEditionContext)]
-[peContext.associatedGenContext().basePackage/]
-[/template]
-
-[template public contextCompletePackage(peContext : PropertiesEditionContext)]
-[if ((not peContext.associatedGenContext().basePackage.oclIsUndefined()) and (peContext.associatedGenContext().basePackage.size() > 0))][peContext.associatedGenContext().basePackage/].[/if][peContext.model.ecorePackage.name/]
-[/template]
-
-[template public vrPackage(repository : ViewsRepository) post (trim())]
-[if ((not repository.associatedGenRepository().basePackage.oclIsUndefined()) and (repository.associatedGenRepository().basePackage.size() > 0))][repository.associatedGenRepository().basePackage/].[/if]
-[/template]
-
-[comment --------------------------------------------------------------------------
- Components naming
- ---------------------------------------------------------------------------------- /]
-[template public componentsPackage(pec : PropertiesEditionComponent)]
-[pec.editionContext().contextCompletePackage()/].components
-[/template]
-
-[template public pecClass(pec : PropertiesEditionComponent)]
-[pec.name.toUpperFirst()/]PropertiesEditionComponent
-[/template]
-
-[template public pecQualifiedClass(pec : PropertiesEditionComponent)]
-[pec.componentsPackage()/].[pec.pecClass()/]
-[/template]
-
-[template public subPECClass(pec : PropertiesEditionComponent, view : View)]
-[pec.name.toUpperFirst()/][if (pec.involvedViews()->size() > 1)][view.viewKey(pec).toJavaClassifier()/][/if]PropertiesEditionComponent
-[/template]
-
-[template public subPECQualifiedClass(pec : PropertiesEditionComponent, view : View)]
-[pec.componentsPackage()/].[pec.subPECClass(view)/]
-[/template]
-
-[template public pecQualifiedComponentSuperClass(pec : PropertiesEditionComponent) post (trim())]
-[if (pec.associatedGenContext().leafComponentsSuperClass.oclIsUndefined() or pec.associatedGenContext().leafComponentsSuperClass.size() = 0)]
-org.eclipse.emf.eef.runtime.impl.components.SinglePartPropertiesEditingComponent
-[else]
-[pec.associatedGenContext().leafComponentsSuperClass/]
-[/if]
-[/template]
-
-[template public pecComponentSuperClass(pec : PropertiesEditionComponent) post (trim())]
-[if (pec.associatedGenContext().leafComponentsSuperClass.oclIsUndefined() or pec.associatedGenContext().leafComponentsSuperClass.size() = 0)]
-SinglePartPropertiesEditingComponent
-[else]
-[pec.associatedGenContext().leafComponentsSuperClass.tokenize('.')->last()/]
-[/if]
-[/template]
-
-
-[comment --------------------------------------------------------------------------
- Providers naming
- ---------------------------------------------------------------------------------- /]
-[template public providersPackage(pec : PropertiesEditionComponent)]
-[pec.editionContext().contextCompletePackage()/].providers
-[/template]
-
-[template public pecProviderClass(pec : PropertiesEditionComponent)]
-[pec.name.toJavaClassifier()/]PropertiesEditionProvider
-[/template]
-
-[template public pecProviderQualifiedClass(pec : PropertiesEditionComponent)]
-[pec.providersPackage()/].[pec.pecProviderClass()/]
-[/template]
-
-[template public providersPackage(pec : PropertiesEditionContext)]
-[pec.contextCompletePackage()/].providers
-[/template]
-
-[template public pecRootProviderQualifiedClass(pec : PropertiesEditionComponent) post (trim())]
-[if (pec.associatedGenContext().propertiesEditingProvidersSuperClass.oclIsUndefined() or pec.associatedGenContext().propertiesEditingProvidersSuperClass.size() = 0)]
-org.eclipse.emf.eef.runtime.providers.impl.PropertiesEditingProviderImpl
-[else]
-[pec.associatedGenContext().propertiesEditingProvidersSuperClass/]
-[/if]
-[/template]
-
-[template public pecRootProviderClass(pec : PropertiesEditionComponent) post (trim())]
-[if (pec.associatedGenContext().propertiesEditingProvidersSuperClass.oclIsUndefined() or pec.associatedGenContext().propertiesEditingProvidersSuperClass.size() = 0)]
-PropertiesEditingProviderImpl
-[else]
-[pec.associatedGenContext().propertiesEditingProvidersSuperClass.tokenize('.')->last()/]
-[/if]
-[/template]
-
-[template public pecPackageProviderClass(ePack : EPackage)]
-[ePack.name.toJavaClassifier()/]EEFAdapterFactory
-[/template]
-
-[template public pecPackageProviderClass(pec : PropertiesEditionContext)]
-[pec.model.ecorePackage.pecPackageProviderClass()/]
-[/template]
-
-[template public pecPackageProviderQualifiedClass(pec : PropertiesEditionContext, ePackage : EPackage)]
-[pec.providersPackage()/].[ePackage.pecPackageProviderClass()/]
-[/template]
-
-[comment --------------------------------------------------------------------------
- Parts naming
- ---------------------------------------------------------------------------------- /]
-[template public partsPackage(repository : ViewsRepository)]
-[repository.vrPackage()/]parts
-[/template]
-
-[template public partsPackage(view : View)]
-[view.owningViewsRepository().vrPackage()/]parts
-[/template]
-
-[template public partsImplPackage(view : View)]
-[view.partsPackage()/].impl
-[/template]
-
-[template public partsFormPackage(view : View)]
-[view.partsPackage()/].forms
-[/template]
-
-[template public pepInterface(view : View)]
-[view.name.toJavaClassifier()/]PropertiesEditionPart
-[/template]
-
-[template public pepQualifiedInterface(view : View)]
-[view.partsPackage()/].[view.pepInterface()/]
-[/template]
-
-[template public pepClass(view : View)]
-[view.name.toJavaClassifier()/]PropertiesEditionPartImpl
-[/template]
-
-[template public pepQualifiedClass(view : View)]
-[view.partsImplPackage()/].[view.pepClass()/]
-[/template]
-
-[template public pepQualifiedFormClass(view : View)]
-[view.partsFormPackage()/].[view.pepFormClass()/]
-[/template]
-
-[template public pepFormClass(view : View)]
-[view.name.toJavaClassifier()/]PropertiesEditionPartForm
-[/template]
-
-[template public pepFormQualifiedClass(view : View)]
-[view.partsFormPackage()/].[view.pepFormClass()/]
-[/template]
-
-[template public partQualifiedSuperclass(view : View) post (trim())]
-[if (view.associatedGenRepository().partsSuperClass.oclIsUndefined() or view.associatedGenRepository().partsSuperClass.size() = 0)]
-org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart
-[else]
-[view.associatedGenRepository().partsSuperClass/]
-[/if]
-[/template]
-
-[template public partSuperclass(view : View) post (trim())]
-[if (view.associatedGenRepository().partsSuperClass.oclIsUndefined() or view.associatedGenRepository().partsSuperClass.size() = 0)]
-CompositePropertiesEditionPart
-[else]
-[view.associatedGenRepository().partsSuperClass.tokenize('.')->last()/]
-[/if]
-[/template]
-
-[template public vrClass(repository : ViewsRepository)]
-[repository.name.toJavaClassifier()/]ViewsRepository
-[/template]
-
-[template public vrQualifiedClass(repository : ViewsRepository)]
-[repository.partsPackage()/].[repository.vrClass()/]
-[/template]
-
-[template public partsProviderPackage(repository : ViewsRepository)]
-[repository.vrPackage()/]providers
-[/template]
-
-[template public pepProvider(repository : ViewsRepository)]
-[repository.name.toJavaClassifier()/]PropertiesEditionPartProvider
-[/template]
-
-[template public pepQualifiedProvider(repository : ViewsRepository)]
-[repository.partsProviderPackage()/].[repository.pepProvider()/]
-[/template]
-
-[comment --------------------------------------------------------------------------
- i18n management
- ---------------------------------------------------------------------------------- /]
-[template public messagesProperties(viewsRepository : ViewsRepository)]
-[viewsRepository.name.toJavaIdentifier()/]Messages
-[/template]
-
-[template public messagesProvider(viewsRepository : ViewsRepository)]
-[viewsRepository.name.toJavaClassifier()/]Messages
-[/template]
-
-[template public messagesProviderPackage(viewsRepository : ViewsRepository)]
-[viewsRepository.associatedGenRepository().basePackage/].providers
-[/template]
-
-[template public qualifiedMessagesProvider(viewsRepository : ViewsRepository)]
-[viewsRepository.messagesProviderPackage()/].[viewsRepository.messagesProvider()/]
-[/template]
-
-[comment containingView must be remove when bug # resolved /]
-[template public groupKey(group : ViewElement, containingView : View) ? (group.oclIsTypeOf(views::Container) and group.representation.name = 'Group')]
-[containingView.name.toJavaClassifier()/]PropertiesEditionPart_[group.name.toJavaClassifier()/]GroupLabel
-[/template]
-
-[template public editorKey(editor : ViewElement, containingView : View)]
-[containingView.name.toJavaClassifier()/]PropertiesEditionPart_[editor.name.toJavaClassifier()/]Label
-[/template]
-
-[comment --------------------------------------------------------------------------
- Properties management
- ---------------------------------------------------------------------------------- /]
-[template public propertiesPackage(pec : PropertiesEditionContext)]
-[pec.contextCompletePackage()/].properties
-[/template]
-
-[template public propertySection(pec : PropertiesEditionComponent, view : View)]
-[pec.name.toJavaClassifier()/][view.viewKey(pec).toJavaClassifier()/]PropertySection
-[/template]
-
-[template public qualifiedPropertySection(pec : PropertiesEditionComponent, view : View)]
-[pec.editionContext().propertiesPackage()/].[pec.propertySection(view)/]
-[/template]
-
-[template public contributorID(editionContext : PropertiesEditionContext, basePackage : String)]
-[if (not editionContext.associatedGenContext().oclIsUndefined() and not editionContext.associatedGenContext().descriptorsContributorID.oclIsUndefined() and editionContext.associatedGenContext().descriptorsContributorID <> '')]
-[editionContext.associatedGenContext().descriptorsContributorID/]
-[else]
-[editionContext.model.ecorePackage.eefPackage(basePackage)/].properties
-[/if]
-[/template]
-
-[comment --------------------------------------------------------------------------
- Misc
- ---------------------------------------------------------------------------------- /]
-[template public viewClassifier(view : View)]
-[view.name.toJavaClassifier()/]
-[/template]
-
-[template public editionElementPackage(pee : PropertiesEditionElement)]
-[if (pee.model.eType.ePackage.name = 'ecore')]EcorePackage[else][pee.model.eType.ePackage.eInverse().oclAsType(EObject)->select(eClass().name = 'GenPackage')->asSequence()->first().oclAsType(GenPackage).prefix/]Package[/if]
-[/template]
-
-[comment FIXME: once template call on a model navigation bug fix /]
-[template public metamodelFactory(pee : PropertiesEditionElement)]
-[pee.model.eType.ePackage.metamodelPrefix()/]Factory
-[/template]
-
-[template public viewPartConstant(view : View, pec : PropertiesEditionComponent)]
-[view.viewKey(pec).toJavaConstant()/]_PART
-[/template]
-
-[template public viewKey(view : View, pec : PropertiesEditionComponent)]
-[if (view.name = pec.name or view.eInverse()->first().oclIsTypeOf(views::ViewReference))]Base[else][view.name/][/if]
-[/template]
-
-[template public viewIdentifier(view : View, pec : PropertiesEditionComponent)]
-[view.viewKey(pec).toJavaIdentifier()/]Part
-[/template]
-
-[template public editorID(viewElement : ViewElement)]
-// FIXME: defines the editorID computing for the element : [viewElement/]
-[/template]
-
-[template public editorID(editor : ElementEditor)]
-[editor.owningView().owningViewsRepository().vrClass()/].[for (s : String | editor.editorIDSequence()->subSequence(2, editor.editorIDSequence()->size() - 1)) separator ('.')][s.toJavaClassifier()/][/for].[editor.identifiedElementKey().toJavaIdentifier()/]
-[/template]
-
-[template public editorID(containerElement : Container)]
-[containerElement.owningView().owningViewsRepository().vrClass()/].[for (s : String | containerElement.editorIDSequence()->subSequence(2, containerElement.editorIDSequence()->size())) separator ('.')][s.toJavaClassifier()/][/for]
-[/template]
-
-[template public editorID(view : View)]
-[view.owningViewsRepository().vrClass()/].[for (s : String | view.editorIDSequence()->subSequence(2, view.editorIDSequence()->size())) separator ('.')][s.toJavaClassifier()/][/for]
-[/template]
-
-[template public editorID(reference : ViewReference)]
-[reference.owningView().owningViewsRepository().vrClass()/].[for (s : String | reference.editorIDSequence()->subSequence(2, reference.editorIDSequence()->size() - 1)) separator ('.')][s.toJavaClassifier()/][/for].[reference.identifiedElementKey().toJavaIdentifier()/]
-[/template]
-
-[query public disambiguation(input : String, exclude : String) : String = if (input = exclude) then input.concat('_') else input endif /]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/typeUtils.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/typeUtils.mtl
deleted file mode 100755
index 16dc62c2c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/typeUtils.mtl
+++ /dev/null
@@ -1,37 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module typeUtils('http://www.eclipse.org/emf/2002/Ecore')/]
-
-[query public isBoolean(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'EBool' or eType.name = 'EBoolean' or eType.name = 'Boolean' or eType.name = 'boolean'/]
-
-[query public isString(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'EString' or eType.name = 'String' or eType.instanceClassName = 'java.lang.String'/]
-
-[query public isInteger(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'EInteger' or eType.name = 'Integer' or eType.name = 'EInt' or eType.instanceClassName = 'int' or eType.instanceClassName = 'java.lang.Integer'/]
-
-[query public isShort(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'EShort' or eType.name = 'Short' or eType.instanceClassName = 'java.lang.Short' or eType.instanceClassName = 'short'/]
-
-[query public isEnum(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.oclIsKindOf(EEnum)/]
-
-[query public isLong(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'ELong' or eType.name = 'Long'/]
-
-[query public isDouble(a : EAttribute) : Boolean =
- not oclIsUndefined() and eType.name = 'EDouble' or eType.name = 'Double'/]
-
-[query public isPrimitiveType(a : EStructuralFeature) : Boolean =
- not oclIsUndefined() and eType.instanceClassName = 'byte' or eType.instanceClassName = 'short' or eType.instanceClassName = 'int' or eType.instanceClassName = 'long' or eType.instanceClassName = 'float' or eType.instanceClassName = 'double' or eType.instanceClassName = 'char' or eType.instanceClassName = 'boolean'/]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/viewCommon.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/viewCommon.mtl
deleted file mode 100755
index ec095c598..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/services/viewCommon.mtl
+++ /dev/null
@@ -1,295 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module viewCommon('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/navigation/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore')/]
-
-[import common /]
-[import naming /]
-[import widgetGettersSetters /]
-[import typeUtils /]
-
-[comment]
-Common tools for views generation purpose.
-TODO: externalise model/controler reference after Unedic non-reg
-[/comment]
-
-[comment --------------- Views related templates --------------- /]
-[template public genDeclaration(elementEditor : ElementEditor)]
-[elementEditor.getterDeclaration()/]
-
-[elementEditor.setterDeclaration()/]
-
-[/template]
-
-[template public genDeclarationForSubView(view : View)]
- [view.getterForSubViewDeclaration()/]
-[/template]
-
-[template public genDeclarationForReferencedView(view : View)]
- [view.getterForReferencedViewDeclaration()/]
-[/template]
-
-[template public genDeclarationForViewReference(view : View)]
-[for (viewReference : ViewReference | view.eAllContents(views::ViewReference))]
-[viewReference.view.oclAsType(views::View).genDeclarationForReferencedView()/]
- [for (elementEditor : ElementEditor | viewReference.view.eAllContents(views::ElementEditor)->select(oclIsTypeOf(views::ElementEditor)))]
-[elementEditor.genDeclaration()/]
- [/for]
-[if (viewReference.view.eAllContents(views::ViewReference)->notEmpty())][genDeclarationForViewReferenceDelegate(viewReference.view.oclAsType(views::View))/][/if]
-[/for]
-[/template]
-
-[template public genDeclarationForViewReferenceDelegate(view : View)]
-[for (viewReference : ViewReference | view.eAllContents(views::ViewReference))]
- [for (elementEditor : ElementEditor | viewReference.view.eAllContents(views::ElementEditor)->select(oclIsTypeOf(views::ElementEditor)))]
-[elementEditor.genDeclaration()/]
- [/for]
-[if (viewReference.view.eAllContents(views::ViewReference)->notEmpty())][genDeclarationForViewReferenceDelegate(viewReference.view.oclAsType(views::View))/][/if]
-[/for]
-[/template]
-
-[template public genDeclarationForSubViews(view : View)]
-[view.genDeclarationForSubView()/]
-
-[for (elementEditor : ElementEditor | view.eAllContents(views::ElementEditor)->select(oclIsTypeOf(views::ElementEditor)))]
-[elementEditor.genDeclaration()/]
-[/for]
-[/template]
-
-[template public genImports(view : ViewElement)]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'ReferencesTable' or representation.name = 'TableComposition' or representation.name = 'AdvancedReferencesTable' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import java.util.List;
-import org.eclipse.emf.ecore.EReference;
-[/if]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'TableComposition' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import java.util.Map;
-[/if]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'MultiValuedEditor')->notEmpty())]
-import org.eclipse.emf.common.util.EList;
-[/if]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'EMFComboViewer' or representation.name = 'Radio')->notEmpty())]
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.common.util.Enumerator;
-[/if]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'EObjectFlatComboViewer' or representation.name = 'AdvancedEObjectFlatComboViewer' or representation.name = 'ReferencesTable' or representation.name = 'TableComposition' or representation.name = 'AdvancedReferencesTable' or representation.name = 'AdvancedTableComposition')->notEmpty())]
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-[/if]
-[if (view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name = 'Combo' )->notEmpty())]
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/if]
-[if (view.eAllContents(views::View)->notEmpty() or view.eAllContents(views::ViewReference)->notEmpty())]
-import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
-[/if]
-[/template]
-
-[template public compositionStepName(view : IdentifiedElement)]
-[view.identifiedElementKey().toJavaIdentifier()/]Step
-[/template]
-
-[template public compositionSequence(view : View)]
-CompositionSequence [view.compositionStepName()/] = new BindingCompositionSequence(propertiesEditionComponent);
-[for (elem : ViewElement | view.elements)]
-[elem.compositionSequence()/]
-[/for]
-[/template]
-
-[template public compositionSequence(viewElement : ViewElement)]
-// FIXME: composition step generation must be defined for this case : [viewElement/]
-[/template]
-
-[template public compositionSequence(containerElement : Container)]
-[if (containerElement.elements->size() > 1)]
-CompositionStep [containerElement.compositionStepName()/] = [containerElement.eContainer().oclAsType(IdentifiedElement).compositionStepName()/].addStep([containerElement.editorID()/].class);
-[for (element : ViewElement | containerElement.elements)]
-[element.compositionSequence()/]
-[/for]
-[else]
-[containerElement.eContainer().oclAsType(IdentifiedElement).compositionStepName()/]
- .addStep([containerElement.editorID()/].class)[if (containerElement.elements->isEmpty())];[else]
-
- .addStep([containerElement.elements->first().editorID()/]);
- [/if]
-[/if]
-[/template]
-
-[template public compositionSequence(reference : ViewReference)]
-[reference.eContainer().oclAsType(IdentifiedElement).compositionStepName()/].addStep([reference.editorID()/]);
-[/template]
-
-[template public compositionSequence(editor : ElementEditor)]
-[editor.eContainer().oclAsType(IdentifiedElement).compositionStepName()/].addStep([editor.editorID()/]);
-[/template]
-
-[template public additionalComponentFieldForModelNavigation(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-
-/**
- * Settings for [editionElement.name/] editor
- */
-protected EEFEditorSettingsImpl [editionElement.name.toJavaIdentifier()/]Settings = (EEFEditorSettingsImpl) EEFEditorSettingsBuilder.create(semanticObject, [editionElement.metamodelGetter()/])
- [editionElement.navigation.generateNavigation()/]
- .build();
-
-[/template]
-
-[template public generateNavigation(navigation : ModelNavigation)/]
-
-[template public generateNavigation(navigation : CustomModelNavigation)]
-// [protected ('for '.concat(navigation.eContainer(PropertiesEditionElement).name).concat(' model navigation implementation'))]
-
-// [/protected]
-[/template]
-
-[template public generateNavigation(navigation : SimpleModelNavigation)]
-.nextStep(NavigationStepBuilder.create([navigation.metamodelGetter()/])[if (not navigation.index.oclIsUndefined())]
-
- .index([navigation.index/])[/if][if (not navigation.discriminatorType.oclIsUndefined())]
-
- .discriminator([navigation.discriminatorType.metamodelGetter()/])[/if].build())
-[/template]
-
-[template public generateNavigation(navigation : ChainedModelNavigation)]
-[navigation.current.generateNavigation()/]
-[navigation.next.generateNavigation()/]
-[/template]
-
-[comment ====== Widgets getters signature ====== /]
-[template public partGetterAddSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'ReferencesTable' or editor.views->first().representation.name = 'AdvancedReferencesTable')]
-public List get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]ToAdd()
-[/template]
-
-[template public partGetterRemoveSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'ReferencesTable' or editor.views->first().representation.name = 'AdvancedReferencesTable')]
-public List get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]ToRemove()
-[/template]
-
-[template public partGetterAddSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'TableComposition')]
-public List get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]ToAdd()
-[/template]
-
-[template public partGetterEditSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'TableComposition')]
-public Map get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]ToEdit()
-[/template]
-
-[template public partGetterRemoveSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'TableComposition')]
-public List get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]ToRemove()
-[/template]
-
-[template public partGetterTableListSignature(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'TableComposition')]
-public List get[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/]()
-[/template]
-
-[comment ====== Widgets setters signature ====== /]
-[template public partSetterSignature(editor : PropertiesEditionElement)]
-public void [editor.ecoreCompletePackageSetter()/]
-[/template]
-
-[template public partSetterAddSignature(editor : PropertiesEditionElement)]
-public void add[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/](EObject newValue)
-[/template]
-
-[template public partSetterRemoveSignature(editor : PropertiesEditionElement)]
-public void remove[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/](EObject value)
-[/template]
-
-[template public partSetterUpdateSignature(editor : PropertiesEditionElement)]
-public void update[editor.model.eContainingClass.name.toUpperFirst()/]_[editor.model.name.toUpperFirst()/](EObject value)
-[/template]
-
-[comment ====== Widgets getters ====== /]
-[template public partSetter(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'MultiValuedEditor')]
-[editor.partSetterSignature()/] {
- [editor.views->first().name.toJavaIdentifier()/]List = newValue;
- [editor.views->first().name.toJavaIdentifier()/]Text.setText([editor.views->first().name.toJavaIdentifier()/]List.toString());
- }
-[/template]
-
-[template public partSetter(editor : PropertiesEditionElement) ? (editor.model.oclAsType(EAttribute).isString() and (editor.model.upperBound = 0 or editor.model.upperBound = 1))]
-[editor.partSetterSignature()/] {
- [editor.views->first().name.toJavaIdentifier()/].setText(newValue);
- }
-[/template]
-
-[template public partSetter(editor : PropertiesEditionElement) ? (editor.model.oclAsType(EAttribute).isBoolean())]
-[editor.partSetterSignature()/] {
- [editor.views->first().name.toJavaIdentifier()/].setSelection(newValue.booleanValue());
- }
-[/template]
-
-[template public partSetter(editor : PropertiesEditionElement) ? (editor.model.oclAsType(EAttribute).isInteger() or editor.model.oclAsType(EAttribute).isShort()or editor.model.oclAsType(EAttribute).isLong())]
-[editor.partSetterSignature()/] {
- [editor.views->first().name.toJavaIdentifier()/].setText(newValue.toString());
- }
-[/template]
-
-[template public partSetter(editor : PropertiesEditionElement) ? (editor.views->first().representation.name = 'EObjectFlatComboViewer' or editor.views->first().representation.name = 'AdvancedEObjectFlatComboViewer')]
-[editor.partSetterSignature()/] {
- if (newValue != null)
- [editor.views->first().name.toJavaIdentifier()/].setSelection(new StructuredSelection(newValue));
- else
- [editor.views->first().name.toJavaIdentifier()/].setSelection(new StructuredSelection());
- }
-[/template]
-
-[comment === ViewReference managing ===/]
-[template public elementEditorGetterSettersForViewReference(view : View, pec : PropertiesEditionComponent, basePackage : String)]
-[for (viewRef : ViewReference | view.eAllContents(views::ViewReference)->select(oclIsTypeOf(views::ViewReference)))]
-[viewRef.view.oclAsType(views::View).getterForReferencedViewImplementation(pec.model.eefPackage(basePackage).fullPartInterfacePath(view.pepInterface()))/]
-[for (elementEditor : ElementEditor | viewRef.view.eAllContents(views::ElementEditor)->select(oclIsTypeOf(views::ElementEditor)))]
-[elementEditor.getterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),viewRef.view.oclAsType(views::View))/]
-
-[elementEditor.setterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),viewRef.view.oclAsType(views::View))/]
-
-[/for]
-[viewRef.view.oclAsType(views::View).elementEditorGetterSettersForSubViewReference(pec, basePackage, viewRef)/]
-[/for]
-[/template]
-
-[template public elementEditorGetterSettersForSubViewReference(view : View, pec : PropertiesEditionComponent, basePackage : String, initViewRef : ViewReference)]
-[for (viewRef : ViewReference | view.eAllContents(views::ViewReference)->select(oclIsTypeOf(views::ViewReference)))]
-[for (elementEditor : ElementEditor | viewRef.view.eAllContents(views::ElementEditor)->select(oclIsTypeOf(views::ElementEditor)))]
-[elementEditor.getterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),initViewRef.view.oclAsType(views::View))/]
-
-[elementEditor.setterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),initViewRef.view.oclAsType(views::View))/]
-
-[/for]
-[viewRef.view.oclAsType(views::View).elementEditorGetterSettersForSubViewReference(pec, basePackage, initViewRef)/]
-[/for]
-[/template]
-
-[template public elementEditorGetterSettersForSubViews(view : View, pec : PropertiesEditionComponent, basePackage : String)]
-[for (subView : View | view.elements->select(oclIsTypeOf(views::View)))]
-[subView.getterForSubViewImplementationDelegate(pec.model.eefPackage(basePackage).fullPartInterfacePath(view.pepInterface()))/]
-[for (elementEditor : ElementEditor | subView.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(owningView() = subView))]
-[elementEditor.getterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),subView)/]
-
-[elementEditor.setterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),subView)/]
-
-[/for]
-[subView.elementEditorGetterSettersForSubViewsDelegate(pec, basePackage, subView)/]
-[/for]
-[/template]
-
-[template public elementEditorGetterSettersForSubViewsDelegate(view : View, pec : PropertiesEditionComponent, basePackage : String, initView : View)]
-[for (subView : View | view.elements->select(oclIsTypeOf(views::View)))]
-[for (elementEditor : ElementEditor | subView.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(owningView() = subView))]
-[elementEditor.getterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),initView)/]
-
-
-[elementEditor.setterImplementationDelegate(fullPartInterfacePath(pec.model.eefPackage(basePackage),view.pepInterface()),initView)/]
-[/for]
-[view.elementEditorGetterSettersForSubViewsDelegate(pec, basePackage, initView)/]
-[/for]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1$1.class
deleted file mode 100644
index 7c5f2f386..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1.class
deleted file mode 100644
index ab5c5d280..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction.class
deleted file mode 100644
index 00c244631..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/AbstractGenerateEEFAction.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/GenerateEEFAction.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/GenerateEEFAction.class
deleted file mode 100644
index 03ef25a58..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/actions/GenerateEEFAction.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/EEFGenerationCallback.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/EEFGenerationCallback.class
deleted file mode 100644
index e99d9a99b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/EEFGenerationCallback.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback$1.class
deleted file mode 100644
index 669da5c41..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback.class
deleted file mode 100644
index 1dcae16eb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/callback/imports/JDTImportsOrganisationCallback.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerateAll.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerateAll.class
deleted file mode 100644
index 763bcb31a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerateAll.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerationHelper.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerationHelper.class
deleted file mode 100644
index 365d1e70d..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/GenerationHelper.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/ImportOrganizer.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/ImportOrganizer.class
deleted file mode 100644
index 528a8b5b4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/generators/common/ImportOrganizer.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/actions/InitializeEEFModelsAction.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/actions/InitializeEEFModelsAction.class
deleted file mode 100644
index 53d1d3093..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/actions/InitializeEEFModelsAction.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$1.class
deleted file mode 100644
index 90e7090a5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$2.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$2.class
deleted file mode 100644
index 7d48d5655..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog$2.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog.class
deleted file mode 100644
index 884004e66..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/initializer/ui/InitializeEEFModelsDialog.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$1.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$1.class
deleted file mode 100644
index cb7d24ab1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$1.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$EEFElementEditorReferenceError.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$EEFElementEditorReferenceError.class
deleted file mode 100644
index decb2aca4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction$EEFElementEditorReferenceError.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction.class b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction.class
deleted file mode 100644
index e7bfba7cc..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/ui/validators/actions/PurifyEEFModelsAction.class
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetControl.mtl
deleted file mode 100755
index 89e2271cf..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetControl.mtl
+++ /dev/null
@@ -1,102 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
-
- This module define the widget generation. It is composed of templates that need to be
- override by the templates that implements wigdets for EEF.
- /]
-[module widgetControl('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0')/]
-
-[import naming /]
-[import common /]
-[import filters /]
-
-[comment ===== Widget generation API ===== /]
-
-[comment declareEObjectUpdate : templates that override this one must define the method to update an EObject when a view throw an update
- event /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-// FIXME INVALID CASE you must override the template 'declareEObjectUpdater' for the case : [editionElement.name/], [view.name/], [pec.name/].
-[/template]
-
-[comment liveupdater : templates that override this one must define the behaviour of the generated widget when the associated
- feature of the edited element has changed /]
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-// FIXME INVALID CASE INTO template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) in widgetControl.mtl module, with the values : [editionElement.name/], [view.name/], [pec.name/].
-[/template]
-
-[comment updater : templates that override this one must define the operation to execute at the initialization of the
- component for the given widget /]
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-// FIXME NO VALID CASE INTO template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) in widgetControl.mtl module, with the values : [editionElement.name/], [view.name/], [pec.name/].
-[/template]
-
-[comment filterUpdater : templates that override this one must define the operation to execute at the initialization of the
- component for the filters of the given widget /]
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)]
-// FIXME NO VALID CASE INTO template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) in widgetControl.mtl module, with the values : [editionElement.name/], [view.name/], [pec.name/].
-[/template]
-
-[comment additionalComponentField : templates that override this one must definethe additional fields to generate in the component
- manage the given element /]
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent)/]
-
-[template public liveUpdaterForReferencedViews(view : View, pec : PropertiesEditionComponent)]
-[for (v : View | view.referencedViews())]
-[for (editionElement : PropertiesEditionElement | pec.properties->select(oclIsKindOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->select(views->first().ownedBy(v)))]
-[editionElement.liveUpdater(v, pec)/]
-[/for]
-[comment][if (v.referencedViews()->notEmpty())][v.liveUpdaterForReferencedViews(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent))/][/if][/comment]
-[/for]
-[/template]
-
-[template public updaterForReferencedViews(view : View, pec : PropertiesEditionComponent)]
-[for (v : View | view.referencedViews())]
- [view.viewIdentifier(pec)/].get[v.name.toJavaClassifier()/]ReferencedView().setContext(elt, allResource);
-[for (editionElement : PropertiesEditionElement | pec.properties->select(oclIsKindOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->select(views->first().ownedBy(v)))]
-[editionElement.updater(v, pec)/]
-[/for]
-[comment][if (v.referencedViews()->notEmpty())][v.updaterForSubReferencedViews(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent), pec)/][/if][/comment]
-[/for]
-[/template]
-
-[template public updaterForSubReferencedViews(view : View, pec : PropertiesEditionComponent, inputPEC : PropertiesEditionComponent)]
-[for (v : View | view.referencedViews())]
-[for (editionElement : PropertiesEditionElement | pec.properties->select(oclIsKindOf(PropertiesEditionElement)).oclAsType(PropertiesEditionElement)->select(views->first().ownedBy(v)))]
-[editionElement.updater(v, inputPEC)/]
-[/for]
-[comment][if (v.referencedViews()->notEmpty())][v.updaterForSubReferencedViews(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent), inputPEC)/][/if][/comment]
-[/for]
-[/template]
-
-[template public filterUpdaterForReferencedViews(view : View, pec : PropertiesEditionComponent)]
-[for (v : View | view.referencedViews())]
-[for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(v))]
-[editionElement.filterUpdater(view, pec)/]
-[/for]
-[comment][if (v.referencedViews()->notEmpty())][v.filterUpdaterForReferencedViews(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent))/][/if][/comment]
-[/for]
-[/template]
-
-[template public javaDeclarationFilterForReferencedViews(view : View, pec : PropertiesEditionComponent)]
-[for (v : View | view.referencedViews())]
-[for (editionElement : PropertiesEditionElement | pec.involvedEditionElementsInView(v))]
-[editionElement.javaDeclarationFilter()/]
-[/for]
-[comment][if (v.referencedViews()->notEmpty())][v.filterUpdaterForReferencedViews(pec.referencedBinding.binding->select(oclIsTypeOf(PropertiesEditionComponent))->first().oclAsType(PropertiesEditionComponent))/][/if][/comment]
-[/for]
-[/template]
-
-[comment Global template used to fix bug #347122 /]
-[template public additionalBusinessFilterProtectedArea(editionElement : PropertiesEditionElement)]
-// [protected ('for additional businessfilters for '.concat(editionElement.name))]
-// [/protected]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetFormImpl.mtl
deleted file mode 100755
index 2ae2da3a4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetFormImpl.mtl
+++ /dev/null
@@ -1,89 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module widgetFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-
-
-[comment ====== Widgets implementation ====== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) /]
-
-[template public widgetDeclaration(editor : ElementEditor)]
-//FIXME INVALID CASE INTO template public widgetDeclaration(editor : ElementEditor) in viewFormUtils.mtl module
-[/template]
-
-[template public implementation(editor : ViewElement)]
-//FIXME INVALID CASE INTO template public implementation(editor : ViewElement, pec : PropertiesEditionComponent) in viewUtils.mtl module
-[/template]
-
-[template public additionalImplementation(editor : ViewElement, pec : PropertiesEditionComponent, inputPEC : PropertiesEditionComponent)]
-//FIXME INVALID CASE INTO template public additionalImplementation(editor : ViewElement, pec : PropertiesEditionComponent, inputPEC : PropertiesEditionComponent) in viewUtils.mtl module
-[/template]
-
-[comment ===== ViewReference support ===== /]
-[template public widgetDeclaration(reference : ViewReference)]
-private [reference.view.oclAsType(views::View).pepInterface()/] [reference.view.oclAsType(views::View).pepInterface().toLowerFirst()/];
-[/template]
-
-[template public widgetDeclarationForViewReference(view : View)]
-[for (element : ViewElement | view.eAllContents(views::ViewReference))]
- [element.oclAsType(ViewReference).widgetDeclaration()/]
-[/for]
-[/template]
-
-[template public implementation(reference : ViewReference)]
-create[reference.view.name.toJavaClassifier()/](widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(reference : ViewReference, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent)][let referencedView : View = reference.view.oclAsType(views::View)]
- protected Composite create[reference.view.name.toJavaClassifier()/](FormToolkit widgetFactory, Composite container) {
- IPropertiesEditionPartProvider provider = PropertiesEditionPartProviderService.getInstance().getProvider([referencedView.owningViewsRepository().vrClass()/].class);
- [referencedView.pepInterface().toLowerFirst()/] = ([referencedView.pepInterface()/])provider.getPropertiesEditionPart([referencedView.editorID()/].class, [referencedView.owningViewsRepository().vrClass()/].FORM_KIND, propertiesEditionComponent);
- ((IFormPropertiesEditionPart)[referencedView.pepInterface().toLowerFirst()/]).createControls(widgetFactory, container);
- return container;
- }
-[/let][/template]
-
-[comment ===== SubView support ===== /]
-[template public widgetDeclaration(subView : View)]
-private [subView.pepInterface()/] [subView.pepInterface().toLowerFirst()/];
-[/template]
-
-[template public widgetDeclarationForSubViews(view : View)]
-[for (element : ViewElement | view.elements->select(oclIsKindOf(views::View)))]
- [element.oclAsType(View).widgetDeclaration()/]
-[/for]
-[/template]
-
-[template public implementation(view : View)]
- if (propertiesEditionComponent.mustBeComposed([view.editorID()/].class, [view.owningViewsRepository().vrClass()/].FORM_KIND))
- create[view.name.toJavaClassifier()/]SubView(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(view : View, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent)]
- protected Composite create[view.name.toJavaClassifier()/]SubView(FormToolkit widgetFactory, Composite container) {
- IPropertiesEditionPartProvider provider = PropertiesEditionPartProviderService.getInstance().getProvider([view.owningViewsRepository().vrClass()/].class);
- [view.pepInterface().toLowerFirst()/] = ([view.pepInterface()/])provider.getPropertiesEditionPart([view.editorID()/].class, [view.owningViewsRepository().vrClass()/].FORM_KIND, propertiesEditionComponent);
- ((IFormPropertiesEditionPart)[view.pepInterface().toLowerFirst()/]).createControls(widgetFactory, container);
- return container;
- }
-[/template]
-
-[comment --------------- Views related queries --------------- /]
-
-[query public editionPart(editor : ViewElement) : String =
- if (editor.container.oclIsTypeOf(views::Container)) then editor.container.editionPart()
- else editor.container.oclAsType(View).pepFormClass()
- endif/]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetGettersSetters.mtl
deleted file mode 100755
index 48eebeeea..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetGettersSetters.mtl
+++ /dev/null
@@ -1,363 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module widgetGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0')/]
-
-[import common/]
-[import naming/]
-
-[comment TODO: A TRAITER /]
-[template public initSignature(elementEditor : ElementEditor) /]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) /]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) /]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) /]
-
-[comment ====== View getters for declaration ====== /]
-[template public getterForSubViewDeclaration(view : View)]
-[view.getterForSubViewSignatureDocumentation()/]
- [view.getterForSubViewSignature()/];
-[/template]
-
-[template public getterForReferencedViewDeclaration(view : View)]
-[view.getterForReferencedViewSignatureDocumentation()/]
- [view.getterForReferencedViewSignature()/];
-[/template]
-
-[comment ====== Widgets View getters for declaration ====== /]
-[template public getterDeclaration(elementEditor : ElementEditor)]
-[elementEditor.getterSignatureDocumentation()/]
-[elementEditor.getterSignature()/];
-[/template]
-
-[comment ====== Signatures ====== /]
-[template public getterForSubViewSignature(view : View)]
- public IPropertiesEditionPart get[view.name.toJavaClassifier()/]SubView()
-[/template]
-
-[template public getterForReferencedViewSignature(view : View)]
-public IPropertiesEditionPart get[view.name.toJavaClassifier()/]ReferencedView()
-[/template]
-
-[template public getterSignature(elementEditor : ElementEditor)]
- public [elementEditor.toJavaType().trim()/] [elementEditor.viewCompletePackageGetter()/]
-[/template]
-
-[template public getterAddSignature(elementEditor : ElementEditor)]
- public List [elementEditor.viewPackageGetter()/]ToAdd()
-[/template]
-
-[template public getterRemoveSignature(elementEditor : ElementEditor)]
- public List [elementEditor.viewPackageGetter()/]ToRemove()
-[/template]
-
-[template public getterMoveSignature(elementEditor : ElementEditor)]
- public List [elementEditor.viewPackageGetter()/]ToMove()
-[/template]
-
-[template public getterEditSignature(elementEditor : ElementEditor)]
- public Map [elementEditor.viewPackageGetter()/]ToEdit()
-[/template]
-
-[template public getterTableListSignature(elementEditor : ElementEditor)]
- public List [elementEditor.viewPackageGetter()/]Table()
-[/template]
-
-[template public getterForSubViewSignatureDocumentation(view : View)]
- /**
- * @return the [view.name/] SubView
- * [view.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterForReferencedViewSignatureDocumentation(view : View)]
-/**
- * @return the [view.name/] referenced view
- * [view.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the [elementEditor.name/]
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterAddSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the [elementEditor.name/] to add
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterRemoveSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the [elementEditor.name/] to remove
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterMoveSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the [elementEditor.name/] to move
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterEditSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the [elementEditor.name/] to edit
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterTableListSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return the current [elementEditor.name/] table
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[comment ====== Widgets View setters for declaration ====== /]
-[template public setterDeclaration(elementEditor : ElementEditor)]
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-[/template]
-
-[template public setterSignature(elementEditor : ElementEditor)]
- public void [elementEditor.viewCompletePackageSetter()/]
-[/template]
-
-[template public setterButtonModeSignature(elementEditor : ElementEditor)]
- public void [elementEditor.viewPackageSetter()/]ButtonMode(ButtonsModeEnum newValue)
-[/template]
-
-[template public updateSignature(elementEditor : ElementEditor)]
- public void update[elementEditor.viewPackageSignature()/]()
-[/template]
-
-[template public setterSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Defines a new [elementEditor.name/]
- * @param newValue the new [elementEditor.name/] to set
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public setterButtonModeSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Defines the button mode
- * @param newValue the new mode to set
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public updateSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Update the [elementEditor.name/]
- * @param newValue the [elementEditor.name/] to update
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public addFilterSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Adds the given filter to the [elementEditor.name/] edition editor.
- *
- * @param filter
- * a viewer filter
- * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public addFilterSignature(elementEditor : ElementEditor)]
- public void addFilterTo[elementEditor.viewPackageSignature()/](ViewerFilter filter)
-[/template]
-
-[template public addBusinessFilterSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Adds the given filter to the [elementEditor.name/] edition editor.
- *
- * @param filter
- * a viewer filter
- * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter)
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public addBusinessFilterSignature(elementEditor : ElementEditor)]
- public void addBusinessFilterTo[elementEditor.viewPackageSignature()/](ViewerFilter filter)
-[/template]
-
-[template public isContainedInTableSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * @return true if the given element is contained inside the [elementEditor.name/] table
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public isContainedInTableSignature(elementEditor : ElementEditor)]
- public boolean isContainedIn[elementEditor.viewPackageSignature()/]Table(EObject element)
-[/template]
-
-[comment ====== Widgets getter implementation ====== /]
-[template public getterImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
-[getterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.getterSignatureImplementation()/]
-[/template]
-
-[comment delegate implementation for SubView/]
-[template public getterForSubViewImplementationDelegate(view : View, fullInterfacePath : String)]
-[view.getterForSubViewSignatureDocumentationImplementation(fullInterfacePath)/]
- [view.getterForSubViewSignature()/] {
- return (IPropertiesEditionPart) [view.pepInterface().toLowerFirst()/];
- }
-[/template]
-
-[comment delegate implementation for ViewReference/]
-[template public getterForReferencedViewImplementation(view : View, fullInterfacePath : String)]
-[view.getterForReferencedViewSignatureDocumentationImplementation(fullInterfacePath)/]
- [view.getterForReferencedViewSignature()/] {
- return (IPropertiesEditionPart) [view.pepInterface().toLowerFirst()/];
- }
-[/template]
-
-[template public getterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View)]
-[getterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.getterSignature()/] {
- return [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewCompletePackageGetter()/];
- }
-[/template]
-
-[template public getterSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#[elementEditor.viewCompletePackageGetter()/]
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterForSubViewSignatureDocumentationImplementation(view : View, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#get[view.name.toJavaClassifier()/]SubView()
- * [view.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterForReferencedViewSignatureDocumentationImplementation(view : View, fullInterfacePath : String)]
-/**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#get[view.name.toJavaClassifier()/]ReferencedView()
- * [view.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.getterSignature()/] {
- //FIXME ERROR NO VALID CASE INTO template public getterSignatureImplementation(elementEditor : ElementEditor) in viewgetterSetters.mtl module
- return null;
- }
-[/template]
-
-[comment ====== Widgets setter implementation ====== /]
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View)]
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](newValue);
- }
-[/template]
-
-[comment Setters/]
-[template public setterSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#[elementEditor.viewCompletePackageSetter()/]
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.setterSignature()/] {
- // FIXME ERROR NO VALID CASE INTO template public setterSignatureImplementation(elementEditor : ElementEditor) in widgetGettersSetters.mtl module
- }
-[/template]
-
-[template public setterButtonModeSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.setterButtonModeSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].setButtonMode(newValue);
- }
-[/template]
-
-[template public updateSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#update[elementEditor.viewPackageSignature()/]()
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public updateSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.updateSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].refresh();
-}
-[/template]
-
-[comment ======== AddFilter signature implementation ======/]
-[template public addFilterSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#addFilter[elementEditor.viewPackageSignature()/](ViewerFilter filter)
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[template public addFilterSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.addFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].addFilter(filter);
- }
-[/template]
-
-[comment ======== AddBusinessFilter signature implementation ======/]
-[template public addBusinessFilterSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#addBusinessFilter[elementEditor.viewPackageSignature()/](ViewerFilter filter)
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
-
-[comment ======== IsContainedInXYZTable signature implementation ======/]
-[template public isContainedInTableSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#isContainedIn[elementEditor.viewPackageSignature()/]Table(EObject element)
- * [elementEditor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetSWTImpl.mtl
deleted file mode 100755
index 6414d60b1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/api/widgetSWTImpl.mtl
+++ /dev/null
@@ -1,89 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module widgetSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore')/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-
-[comment ===== Case DEFAULT = NEED TO BE THE LAST CHOICE ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) /]
-
-[template public widgetDeclaration(editor : ElementEditor)]
-//FIXME INVALID CASE INTO template public widgetDeclaration(editor : ElementEditor) in viewUtils.mtl module for elementEditor [editor.name/]
-[/template]
-
-[template public implementation(editor : ViewElement)]
-//FIXME INVALID CASE INTO template public implementation(editor : ViewElement) in viewUtils.mtl module
-[/template]
-
-[template public additionalImplementation(editor : ViewElement, pec : PropertiesEditionComponent, inputPEC : PropertiesEditionComponent)]
-//FIXME INVALID CASE INTO template public additionalImplementation(editor : ViewElement, pec : PropertiesEditionComponent, inputPEC : PropertiesEditionComponent) in viewUtils.mtl module
-[/template]
-
-[comment ===== ViewReference support ===== /]
-[template public widgetDeclaration(reference : ViewReference)]
- private [reference.view.oclAsType(views::View).pepInterface()/] [reference.view.oclAsType(views::View).pepInterface().toLowerFirst()/];
-[/template]
-
-[template public implementation(reference : ViewReference)]
-create[reference.view.name.toJavaClassifier()/](parent);
-[/template]
-
-[template public additionalImplementation(reference : ViewReference, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent)][let referencedView : View = reference.view.oclAsType(views::View)]
- protected Composite create[referencedView.name.toJavaClassifier()/](Composite container) {
- IPropertiesEditionPartProvider provider = PropertiesEditionPartProviderService.getInstance().getProvider([referencedView.owningViewsRepository().vrClass()/].class);
- [referencedView.pepInterface().toLowerFirst()/] = ([referencedView.pepInterface()/])provider.getPropertiesEditionPart([referencedView.editorID()/].class, [referencedView.owningViewsRepository().vrClass()/].SWT_KIND, propertiesEditionComponent);
- ((ISWTPropertiesEditionPart)[referencedView.pepInterface().toLowerFirst()/]).createControls(container);
- return container;
- }
-[/let]
-[/template]
-
-[template public widgetDeclarationForViewReference(view : View)]
-[for (element : ViewElement | view.eAllContents(views::ViewReference))]
-[element.oclAsType(ViewReference).widgetDeclaration()/]
-[/for]
-[/template]
-
-[comment ===== SubView support ===== /]
-[template public widgetDeclaration(subView : View)]
- private [subView.pepInterface()/] [subView.pepInterface().toLowerFirst()/];
-[/template]
-
-[template public implementation(view : View)]
- if (propertiesEditionComponent.mustBeComposed([view.editorID()/].class, [view.owningViewsRepository().vrClass()/].SWT_KIND))
- create[view.name.toJavaClassifier()/]SubView(parent);
-[/template]
-
-[template public additionalImplementation(view : View, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent)]
- protected Composite create[view.name.toJavaClassifier()/]SubView(Composite container) {
- IPropertiesEditionPartProvider provider = PropertiesEditionPartProviderService.getInstance().getProvider([view.owningViewsRepository().vrClass()/].class);
- [view.pepInterface().toLowerFirst()/] = ([view.pepInterface()/])provider.getPropertiesEditionPart([view.editorID()/].class, [view.owningViewsRepository().vrClass()/].SWT_KIND, propertiesEditionComponent);
- ((ISWTPropertiesEditionPart)[view.pepInterface().toLowerFirst()/]).createControls(container);
- return container;
- }
-[/template]
-
-[template public widgetDeclarationForSubViews(view : View)]
-[for (element : View | view.elements->select(oclIsKindOf(views::View)))]
-[element.oclAsType(View).widgetDeclaration()/]
-[/for]
-[/template]
-
-[comment --------------- Views related queries --------------- /]
-
-[query public editionPart(editor : ViewElement) : String =
- if (editor.container.oclIsTypeOf(views::Container)) then editor.container.editionPart()
- else editor.container.oclAsType(View).pepClass()
- endif/]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxControl.mtl
deleted file mode 100755
index cf8d7b1ff..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxControl.mtl
+++ /dev/null
@@ -1,71 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module checkboxControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = Checkbox ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox') and not editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((Boolean)event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox'))]
-[if (editionElement.model.oclAsType(EAttribute).isBoolean())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = Checkbox
-[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox') and not editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [if (editionElement.model.oclAsType("EAttribute").eType.instanceClassName = 'boolean')]
- [if (editionElement.model.many)]
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].[editionElement.model.booleanGetter()/][editionElement.model.name.toMany().toUpperFirst()/]());
- [else]
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].[editionElement.model.booleanGetter()/][editionElement.model.name.toUpperFirst()/]());
- [/if]
- [elseif (editionElement.model.oclAsType(EAttribute).isBoolean())]
- [if (editionElement.model.many)]
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toMany().toUpperFirst()/]());
- [else]
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
- [/if]
- [else]
- //FIXME invalid case in updater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = Checkbox
- [/if]
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox'))]
-[comment no filters for checkbox /]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = Checkbox - ModelNavigation ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox') and editionElement.canGeneratemodelNavigation())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue((Boolean)event.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Checkbox') and editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [if (editionElement.model.oclAsType("EAttribute").eType.instanceClassName = 'boolean')]
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([editionElement.name.toJavaIdentifier()/]Settings.getValue());
- [else]
- //FIXME invalid case in updater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = Checkbox
- [/if]
-}
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxFormImpl.mtl
deleted file mode 100755
index 8854d7690..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxFormImpl.mtl
+++ /dev/null
@@ -1,60 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module checkboxFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = Checkbox ===== /]
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Checkbox')]
-protected Button [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Checkbox')]
-create[editor.name.toJavaClassifier()/]Checkbox(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Checkbox')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Checkbox(FormToolkit widgetFactory, Composite parent) {
- [editor.name.toJavaIdentifier()/] = widgetFactory.createButton(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], SWT.CHECK);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- [editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean([editor.name.toJavaIdentifier()/].getSelection())));
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxGettersSetters.mtl
deleted file mode 100755
index 90aacb47c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxGettersSetters.mtl
+++ /dev/null
@@ -1,33 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module checkboxGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('Checkbox'))]
-[elementEditor.getterSignature()/] {
- return Boolean.valueOf([elementEditor.name.toJavaIdentifier()/].getSelection());
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('Checkbox'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(newValue.booleanValue());
- } else {
- [elementEditor.name.toJavaIdentifier()/].setSelection(false);
- }
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxSWTImpl.mtl
deleted file mode 100755
index 775e4adb0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/checkbox/checkboxSWTImpl.mtl
+++ /dev/null
@@ -1,60 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module checkboxSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Checkbox')]
- protected Button [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Checkbox')]
-create[editor.name.toJavaClassifier()/]Checkbox(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Checkbox')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Checkbox(Composite parent) {
- [editor.name.toJavaIdentifier()/] = new Button(parent, SWT.CHECK);
- [editor.name.toJavaIdentifier()/].setText([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/]);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- [editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean([editor.name.toJavaIdentifier()/].getSelection())));
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboControl.mtl
deleted file mode 100755
index 1602bcbc2..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboControl.mtl
+++ /dev/null
@@ -1,109 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module comboControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-[import filters /]
-
-[comment ===== Case : model = Reference - view = Combo ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isReferenceSingle() and editionElement.representationName('Combo'))]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.name/])event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isReferenceSingle() and editionElement.representationName('Combo'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isReferenceSingle() and editionElement.representationName('Combo'))]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/](allResource, [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isReferenceSingle() and editionElement.representationName('Combo'))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.name.toUpperFirst()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- * [view.owningViewsRepository().associatedGenModel().generationComment()/]
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [editionElement.model.eType.name/]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Reference - view = Combo ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo'))]
-[pec.model.name.toJavaIdentifier()/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.instanceClassName/])event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo') and not editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [if (pec.eContainer(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
- [defaultInitialization()/]
- [else]
- // [protected ('for '.concat(editionElement.name).concat(' editor initialization'))]
- [defaultInitialization()/]
- // [/protected]
- [/if]
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/](input[editionElement.name.toJavaClassifier()/], [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
-}
-[/template]
-
-[template private defaultInitialization(editionElement : PropertiesEditionElement) ]
-java.util.Collection<Object> input[editionElement.name.toJavaClassifier()/] = new ArrayList<Object>(3);
-input[editionElement.name.toJavaClassifier()/].add("one");
-input[editionElement.name.toJavaClassifier()/].add("two");
-input[editionElement.name.toJavaClassifier()/].add("three");
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo'))]
-[/template]
-
-[comment ===== Case : model = Reference - view = Combo - ModelNavigation ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo') and editionElement.canGeneratemodelNavigation())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue(([editionElement.model.eType.instanceClassName/])event.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Combo') and editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [if (pec.eContainer(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
- [defaultInitialization()/]
- [else]
- // [protected ('for '.concat(editionElement.name).concat(' editor initialization'))]
- [defaultInitialization()/]
- // [/protected]
- [/if]
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/](input[editionElement.name.toJavaClassifier()/], [editionElement.name.toJavaIdentifier()/]Settings.getValue());
-}
-[/template]
-
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboFormImpl.mtl
deleted file mode 100755
index 6363a107a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboFormImpl.mtl
+++ /dev/null
@@ -1,75 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module comboFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = Combo ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'Combo')]
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider;
-import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Combo')]
-protected EMFComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Combo')]
-create[editor.name.toJavaClassifier()/]EMFComboViewer(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Combo')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]EMFComboViewer(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new EMFComboViewer(parent);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].getCombo().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, get[editor.name.toJavaClassifier()/]()));
- }
-
- });
- [editor.name.toJavaIdentifier()/].setContentProvider(new EMFListContentProvider());
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getCombo(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getCombo(), "eef::[editor.representation.name/]");
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboGettersSetters.mtl
deleted file mode 100755
index 4c306aac8..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboGettersSetters.mtl
+++ /dev/null
@@ -1,125 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module comboGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('Combo'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-
-[elementEditor.addFilterSignatureDocumentation()/]
-[elementEditor.addFilterSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('Combo'))]
- public void init[elementEditor.viewPackageSignature()/](Object input, Object currentValue)
-[/template]
-
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('Combo'))]
- /**
- * Init the [elementEditor.name/]
- * @param input choice of values
- * @param currentValue the current value
- */
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('Combo'))]
-[elementEditor.getterSignature()/] {
- if ([elementEditor.name.toJavaIdentifier()/].getSelection() instanceof StructuredSelection) {
- return ((StructuredSelection) [elementEditor.name.toJavaIdentifier()/].getSelection()).getFirstElement();
- }
- return "";
- }
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('Combo'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('Combo'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](allResources, current);
- }
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](newValue);
- }
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addBusinessFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('Combo'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].modelUpdating(new StructuredSelection(newValue));
- } else {
- [elementEditor.name.toJavaIdentifier()/].modelUpdating(new StructuredSelection("")); //$NON-NLS-1$
- }
- }
-[/template]
-
-[template public setterButtonModeSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) ? (elementEditor.representationName('Combo'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#[elementEditor.viewPackageSetter()/]ButtonMode(ButtonsModeEnum newValue)
- */
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('Combo'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](Object input, Object currentValue)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('Combo'))]
-[elementEditor.initSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].setInput(input);
- if (currentValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(currentValue));
- }
- }
-[/template]
-
-[template public addBusinessFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('Combo'))]
-[elementEditor.addBusinessFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].addBusinessRuleFilter(filter);
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboSWTImpl.mtl
deleted file mode 100755
index fcadec804..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/combo/comboSWTImpl.mtl
+++ /dev/null
@@ -1,72 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module comboSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'Combo')]
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider;
-import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Combo')]
- protected EMFComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Combo')]
-create[editor.name.toJavaClassifier()/]EMFComboViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Combo')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]EMFComboViewer(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new EMFComboViewer(parent);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].getCombo().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, get[editor.name.toJavaClassifier()/]()));
- }
-
- });
- [editor.name.toJavaIdentifier()/].setContentProvider(new EMFListContentProvider());
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getCombo(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getCombo(), "eef::[editor.representation.name/]"); //$NON-NLS-1$
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customControl.mtl
deleted file mode 100755
index cacbb34f0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customControl.mtl
+++ /dev/null
@@ -1,45 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module customControl('http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import common /]
-
-[comment ===== Case : model = any - view = CustomElementEditor ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.views->first().oclIsTypeOf(views::CustomElementEditor))]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-// [protected ('for update'.concat(editionElement.name.toJavaClassifier()).concat(' method body'))]
-// [/protected]
-[/if]
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.views->first().oclIsTypeOf(views::CustomElementEditor))]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
- // [protected ('for '.concat(editionElement.name).concat(' live update'))]
-
- // [/protected]
-[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.views->first().oclIsTypeOf(views::CustomElementEditor))]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-// [protected (' for '.concat(editionElement.name).concat(' command update'))]
-// [/protected]
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.views->first().oclIsTypeOf(views::CustomElementEditor))]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-// [protected (' for '.concat(editionElement.name).concat(' filter update'))]
-// [/protected]
-[/if]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customFormImpl.mtl
deleted file mode 100755
index 258530f1e..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customFormImpl.mtl
+++ /dev/null
@@ -1,36 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module customFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public widgetDeclaration(editor : CustomElementEditor) overrides widgetDeclaration]
- [if (not editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected (' for '.concat(editor.name).concat(' widgets declarations'))]
-
- // [/protected]
- [/if]
-[/template]
-
-[template public implementation(editor : CustomElementEditor) overrides implementation]
-[if (not editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected ('for '.concat(editor.name).concat(' widgets implementation'))]
-
- // [/protected]
-[/if]
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customSWTImpl.mtl
deleted file mode 100755
index 347e75172..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/custom/customSWTImpl.mtl
+++ /dev/null
@@ -1,36 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module customSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public widgetDeclaration(editor : CustomElementEditor) overrides widgetDeclaration]
- [if (not editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected (' for '.concat(editor.name).concat(' widgets declarations'))]
-
- // [/protected]
- [/if]
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.oclIsTypeOf(views::CustomElementEditor))]
- [if (not editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- // [protected ('for '.concat(editor.name).concat(' implementation'))]
-
- // [/protected]
- [/if]
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerControl.mtl
deleted file mode 100755
index a47aeb714..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerControl.mtl
+++ /dev/null
@@ -1,54 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module emfcomboviewerControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = EMFComboViewer ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer') and not editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.name/])event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer'))]
-[if (editionElement.model.oclAsType(EAttribute).isEnum())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = EMFComboViewer
-[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer') and not editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]((EEnum) [editionElement.metamodelGetter()/].getEType(), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer'))]
-[comment no filters for emfcomboviewer /]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = EMFComboViewer - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer') and editionElement.canGeneratemodelNavigation())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue(([editionElement.model.eType.name/])event.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('EMFComboViewer') and editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]((EEnum) [editionElement.metamodelGetter()/].getEType(), [editionElement.name.toJavaIdentifier()/]Settings.getValue());
-}
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerFormImpl.mtl
deleted file mode 100755
index d472ced45..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerFormImpl.mtl
+++ /dev/null
@@ -1,75 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module emfcomboviewerFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'EMFComboViewer')]
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'EMFComboViewer')]
-protected EMFComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'EMFComboViewer')]
-create[editor.name.toJavaClassifier()/]EMFComboViewer(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'EMFComboViewer')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]EMFComboViewer(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new EMFComboViewer(parent);
- [editor.name.toJavaIdentifier()/].setContentProvider(new ArrayContentProvider());
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory()));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].getCombo().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewCompletePackageGetter()/]));
- }
-
- });
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerGettersSetters.mtl
deleted file mode 100755
index 262e08ef5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerGettersSetters.mtl
+++ /dev/null
@@ -1,86 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module emfcomboviewerGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('EMFComboViewer'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('EMFComboViewer'))]
- public void init[elementEditor.viewPackageSignature()/](EEnum eenum, Enumerator current)
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('EMFComboViewer'))]
- /**
- * Init the [elementEditor.name/]
- * @param eenum the enum to manage
- * @param current the current value
- */
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('EMFComboViewer'))]
-[elementEditor.getterSignature()/] {
- EEnumLiteral selection = (EEnumLiteral) ((StructuredSelection) [elementEditor.name.toJavaIdentifier()/].getSelection()).getFirstElement();
- return selection.getInstance();
- }
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('EMFComboViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('EMFComboViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](eenum, current);
- }
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](newValue);
- }
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('EMFComboViewer'))]
-[elementEditor.initSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].setInput(eenum.getELiterals());
- [elementEditor.name.toJavaIdentifier()/].modelUpdating(new StructuredSelection(current));
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('EMFComboViewer'))]
-[elementEditor.setterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].modelUpdating(new StructuredSelection(newValue));
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('EMFComboViewer'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](EEnum eenum, Enumerator current)
- */
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerSWTImpl.mtl
deleted file mode 100755
index 8b0aff3fe..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/emfcomboviewer/emfcomboviewerSWTImpl.mtl
+++ /dev/null
@@ -1,73 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module emfcomboviewerSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'EMFComboViewer')]
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EEnumLiteral;
-import org.eclipse.emf.eef.runtime.ui.providers.EMFListContentProvider;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'EMFComboViewer')]
- protected EMFComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'EMFComboViewer')]
-create[editor.name.toJavaClassifier()/]EMFComboViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'EMFComboViewer')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]EMFComboViewer(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new EMFComboViewer(parent);
- [editor.name.toJavaIdentifier()/].setContentProvider(new ArrayContentProvider());
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory()));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].getCombo().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewCompletePackageGetter()/]));
- }
-
- });
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerControl.mtl
deleted file mode 100755
index f40bf4523..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerControl.mtl
+++ /dev/null
@@ -1,251 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module eobjectflatcomboviewerControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-[import filters /]
-
-[comment ===== Case : model = Reference(1) - view = EObjectFlatComboViewer or AdvancedEObjectFlatComboViewer ===== /]
-[query public validCaseForSingleReference(editionElement : PropertiesEditionElement) : Boolean =
- not editionElement.hasModelNavigation()
- and editionElement.model.isReferenceSingle()
- and (editionElement.representationName('EObjectFlatComboViewer') or editionElement.representationName('AdvancedEObjectFlatComboViewer'))/]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForSingleReference())]
-
-/**
- * Settings for [editionElement.name/] EObjectFlatComboViewer
- */
-private EObjectFlatComboSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForSingleReference())]
-if (event.getKind() == PropertiesEditionEvent.SET) {
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(([editionElement.model.eType.name/])event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [editionElement.model.eType.name/] eObject = [editionElement.metamodelFactory()/].eINSTANCE.create[editionElement.model.eType.name/]();
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy != null) {
- policy.execute();
- }
- }
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(eObject);
- [else]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForSingleReference())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForSingleReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- // init part
- [editionElement.name.toJavaIdentifier()/]Settings = new EObjectFlatComboSettings([pec.model.name.toJavaIdentifier()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
- // set the button mode
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]ButtonMode(ButtonsModeEnum.BROWSE);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (not editionElement.hasModelNavigation() and editionElement.model.isReferenceSingle() and (editionElement.representationName('EObjectFlatComboViewer')))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
-/**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
-public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [editionElement.model.eType.name/]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (not editionElement.hasModelNavigation() and editionElement.model.isReferenceSingle() and (editionElement.representationName('AdvancedEObjectFlatComboViewer')))]
-[/template]
-
-[comment ===== Case : model = Simple Navigation A (0-1) -> B (0-1) -> C - view = EObjectFlatComboViewer or AdvancedEObjectFlatComboViewer ===== /]
-[query public validCaseForContainmentNavigation(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.hasModelNavigation()
- and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentSingle() and editionElement.model.isReferenceSingle()
- and (editionElement.representationName('EObjectFlatComboViewer') or editionElement.representationName('AdvancedEObjectFlatComboViewer')) /]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForContainmentNavigation())]
-
-/**
- * Settings for [editionElement.name/] EObjectFlatComboViewer
- */
-private EObjectFlatComboSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForContainmentNavigation())]
-if (event.getKind() == PropertiesEditionEvent.SET) {
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(([editionElement.model.eType.name/])event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [editionElement.model.eType.name/] eObject = [editionElement.metamodelFactory()/].eINSTANCE.create[editionElement.model.eType.name/]();
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy != null) {
- policy.execute();
- }
- }
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(eObject);
- [else]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForContainmentNavigation())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForContainmentNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- // init part
- [editionElement.name.toJavaIdentifier()/]Settings = new EObjectFlatComboSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
- // set the button mode
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]ButtonMode(ButtonsModeEnum.BROWSE);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.hasModelNavigation() and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentSingle() and editionElement.model.isReferenceSingle() and (editionElement.representationName('EObjectFlatComboViewer')))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [editionElement.model.eType.name/]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.hasModelNavigation() and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentSingle() and editionElement.model.isReferenceSingle() and (editionElement.representationName('AdvancedEObjectFlatComboViewer')))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[/template]
-
-[comment ===== Case : model = Containment(1), Simple navigation or not - view = EObjectFlatComboViewer or AdvancedEObjectFlatComboViewer ===== /]
-[query public validCaseForContainment(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.model.isContainmentSingle()
- and (editionElement.representationName('EObjectFlatComboViewer') or editionElement.representationName('AdvancedEObjectFlatComboViewer')) /]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForContainment())]
-
-/**
- * Settings for [editionElement.name/] EObjectFlatComboViewer
- */
-private EObjectFlatComboSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForContainment())]
-if (event.getKind() == PropertiesEditionEvent.SET) {
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(([editionElement.model.eType.name/])event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [editionElement.model.eType.name/] eObject = [editionElement.metamodelFactory()/].eINSTANCE.create[editionElement.model.eType.name/]();
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, eObject, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(eObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy != null) {
- policy.execute();
- }
- }
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference(eObject);
- [else]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForContainment())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[/template]
-
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForContainment() and not editionElement.hasModelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- // init part
- [editionElement.name.toJavaIdentifier()/]Settings = new EObjectFlatComboSettings([pec.model.name.toJavaIdentifier()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
- // set the button mode
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]ButtonMode(ButtonsModeEnum.CREATE);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForContainment())]
-[comment no filters on creation/]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerFormImpl.mtl
deleted file mode 100755
index 8a824ddb6..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerFormImpl.mtl
+++ /dev/null
@@ -1,141 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module eobjectflatcomboviewerFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = EObjectFlatComboViewer ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'EObjectFlatComboViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'EObjectFlatComboViewer')]
-protected EObjectFlatComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'EObjectFlatComboViewer')]
-create[editor.name.toJavaClassifier()/]FlatComboViewer(parent, widgetFactory);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'EObjectFlatComboViewer')]
- /**
- * @param parent the parent composite
- * @param widgetFactory factory to use to instanciante widget of the form
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]FlatComboViewer(Composite parent, FormToolkit widgetFactory) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- widgetFactory.adapt([editor.name.toJavaIdentifier()/]);
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, get[editor.name.toJavaClassifier()/]()));
- }
-
- });
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
-[comment ===== Case Widget = AdvancedEObjectFlatComboViewer ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedEObjectFlatComboViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.AdvancedEObjectFlatComboViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-import org.eclipse.emf.eef.runtime.ui.widgets.AdvancedEObjectFlatComboViewer.EObjectFlatComboViewerListener;
-import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider;
-import org.eclipse.emf.eef.runtime.api.policies.IPropertiesEditionPolicy;
-import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext;
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
-protected AdvancedEObjectFlatComboViewer [editor.name.toJavaIdentifier()/];
- protected ViewerFilter [editor.name.toJavaIdentifier()/]Filter;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
-create[editor.name.toJavaClassifier()/]FlatComboViewer(parent, widgetFactory);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
- /**
- * @param parent the parent composite
- * @param widgetFactory factory to use to instanciante widget of the form
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]FlatComboViewer(Composite parent, FormToolkit widgetFactory) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- // create callback listener
- EObjectFlatComboViewerListener listener = new EObjectFlatComboViewerListener(){
- public void handleSet(EObject element){
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, element));
- }
- public void navigateTo(EObject element){ }
-
- public EObject handleCreate() {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- return null;
- }
-
- };
- //create widget
- [editor.name.toJavaIdentifier()/] = new AdvancedEObjectFlatComboViewer([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], resourceSet, [editor.name.toJavaIdentifier()/]Filter, propertiesEditionComponent.getEditingContext().getAdapterFactory(), listener);
- [editor.name.toJavaIdentifier()/].createControls(parent, widgetFactory);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerGettersSetters.mtl
deleted file mode 100755
index 8c928c73b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerGettersSetters.mtl
+++ /dev/null
@@ -1,169 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module eobjectflatcomboviewerGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-
-[elementEditor.setterButtonModeSignatureDocumentation()/]
-[elementEditor.setterButtonModeSignature()/];
-
-[elementEditor.addFilterSignatureDocumentation()/]
-[elementEditor.addFilterSignature()/];
-
-[elementEditor.addBusinessFilterSignatureDocumentation()/]
-[elementEditor.addBusinessFilterSignature()/];
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
- /**
- * Init the [elementEditor.name/]
- * @param settings the combo setting
- */
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
- public void init[elementEditor.viewPackageSignature()/](EObjectFlatComboSettings settings)
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('EObjectFlatComboViewer'))]
-[elementEditor.getterSignature()/] {
- if ([elementEditor.name.toJavaIdentifier()/].getSelection() instanceof StructuredSelection) {
- Object firstElement = ((StructuredSelection) [elementEditor.name.toJavaIdentifier()/].getSelection()).getFirstElement();
- if (firstElement instanceof EObject)
- return (EObject) firstElement;
- }
- return null;
- }
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getSelection();
- }
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-
-[setterButtonModeSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterButtonModeSignatureImplementation()/]
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignatureImplementation()/]
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](settings);
- }
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](newValue);
- }
-
-[setterButtonModeSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterButtonModeSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/]ButtonMode(newValue);
- }
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addBusinessFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('EObjectFlatComboViewer'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(newValue));
- } else {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection()); //$NON-NLS-1$
- }
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(newValue));
- } else {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection()); //$NON-NLS-1$
- }
- }
-[/template]
-
-[template public setterButtonModeSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#[elementEditor.viewPackageSetter()/]ButtonMode(ButtonsModeEnum newValue)
- */
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](EObjectFlatComboSettings)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('EObjectFlatComboViewer'))]
-[elementEditor.initSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].setInput(settings);
- if (current != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(settings.getValue()));
- }
- }
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[elementEditor.initSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].setInput(settings);
- if (current != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(settings.getValue()));
- }
- }
-[/template]
-
-[template public addBusinessFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('EObjectFlatComboViewer') or elementEditor.representationName('AdvancedEObjectFlatComboViewer'))]
-[elementEditor.addBusinessFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].addBusinessRuleFilter(filter);
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerSWTImpl.mtl
deleted file mode 100755
index c73d2fd68..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/eobjectflatcomboviewer/eobjectflatcomboviewerSWTImpl.mtl
+++ /dev/null
@@ -1,131 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module eobjectflatcomboviewerSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[comment ===== Case Widget = EObjectFlatComboViewer ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports? (widget.name = 'EObjectFlatComboViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'EObjectFlatComboViewer')]
- protected EObjectFlatComboViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'EObjectFlatComboViewer')]
-create[editor.name.toJavaClassifier()/]FlatComboViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'EObjectFlatComboViewer')]
- /**
- * @param parent the parent composite
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]FlatComboViewer(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
-
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, get[editor.name.toJavaClassifier()/]()));
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
-[comment ===== Case Widget = AdvancedEObjectFlatComboViewer ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedEObjectFlatComboViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.AdvancedEObjectFlatComboViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.ButtonsModeEnum;
-import org.eclipse.emf.eef.runtime.ui.widgets.AdvancedEObjectFlatComboViewer.EObjectFlatComboViewerListener;
-import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider;
-import org.eclipse.emf.eef.runtime.api.policies.IPropertiesEditionPolicy;
-import org.eclipse.emf.eef.runtime.impl.policies.EObjectPropertiesEditionContext;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
- private AdvancedEObjectFlatComboViewer [editor.name.toJavaIdentifier()/];
- protected ViewerFilter [editor.name.toJavaIdentifier()/]Filter;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
-create[editor.name.toJavaClassifier()/]AdvancedFlatComboViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedEObjectFlatComboViewer')]
- /**
- * @param parent the parent composite
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]AdvancedFlatComboViewer(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- // create callback listener
- EObjectFlatComboViewerListener listener = new EObjectFlatComboViewerListener(){
- public void handleSet(EObject element){
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, element));
- }
- public void navigateTo(EObject element){ }
-
- public EObject handleCreate() {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- return null;
- }
- };
- //create widget
- [editor.name.toJavaIdentifier()/] = new AdvancedEObjectFlatComboViewer([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], resourceSet, [editor.name.toJavaIdentifier()/]Filter, propertiesEditionComponent.getEditingContext().getAdapterFactory(), listener);
- [editor.name.toJavaIdentifier()/].createControls(parent);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableControl.mtl
deleted file mode 100755
index 716c4ff97..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableControl.mtl
+++ /dev/null
@@ -1,120 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module flatreferencestableControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-[import filters /]
-
-[comment ===== Case : model = Reference(*) - view = FlatReferencesTable===== /]
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (not editionElement.hasModelNavigation() and editionElement.model.isReferenceMany() and editionElement.representationName('FlatReferencesTable'))]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-private ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (not editionElement.hasModelNavigation() and editionElement.model.isReferenceMany() and editionElement.representationName('FlatReferencesTable'))]
-if (event.getKind() == PropertiesEditionEvent.SET)
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference((List<EObject>) event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (not editionElement.hasModelNavigation() and editionElement.model.isReferenceMany() and editionElement.representationName('FlatReferencesTable'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? ((not editionElement.hasModelNavigation()) and editionElement.model.isReferenceMany() and editionElement.representationName('FlatReferencesTable'))]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? ((not editionElement.hasModelNavigation()) and editionElement.model.isReferenceMany() and editionElement.representationName('FlatReferencesTable'))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof EObject)
- return (![view.viewIdentifier(pec)/].isContainedIn[editionElement.views->first().viewPackageSignature()/]Table((EObject)element));
- return [if (not editionElement.model.required)]element instanceof String && element.equals("")[else]false[/if];
- }
-
-});
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectStrictFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Reference(*) in Simple Navigation - view = FlatReferencesTable===== /]
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.hasModelNavigation() and editionElement.representationName('FlatReferencesTable'))]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-private ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.hasModelNavigation() and editionElement.representationName('FlatReferencesTable'))]
-if (event.getKind() == PropertiesEditionEvent.SET)
- [editionElement.name.toJavaIdentifier()/]Settings.setToReference((List<EObject>) event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.hasModelNavigation() and editionElement.representationName('FlatReferencesTable'))]
-if ([editionElement.name.toJavaIdentifier()/]Settings.isAffectingFeature((EStructuralFeature)msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.hasModelNavigation() and editionElement.representationName('FlatReferencesTable'))]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.hasModelNavigation() and editionElement.representationName('FlatReferencesTable'))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof EObject)
- return (![view.viewIdentifier(pec)/].isContainedIn[editionElement.views->first().viewPackageSignature()/]Table((EObject)element));
- return [if (not editionElement.model.required)]element instanceof String && element.equals("")[else]false[/if];
- }
-
-});
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectStrictFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableFormImpl.mtl
deleted file mode 100755
index be919e0a8..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableFormImpl.mtl
+++ /dev/null
@@ -1,72 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module flatreferencestableFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = ReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'FlatReferencesTable')]
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'FlatReferencesTable')]
- protected FlatReferencesTable [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'FlatReferencesTable')]
-create[editor.name.toJavaClassifier()/]FlatReferencesTable(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'FlatReferencesTable')]
- /**
- * @param parent
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]FlatReferencesTable(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new FlatReferencesTable(parent);
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
-
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (event.getSelection() instanceof StructuredSelection)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection)event.getSelection()).toList()));
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableGettersSetters.mtl
deleted file mode 100755
index b021f4ffa..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableGettersSetters.mtl
+++ /dev/null
@@ -1,132 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module flatreferencestableGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-
-[template public getterDeclaration(elementEditor : ElementEditor) overrides getterDeclaration ? (elementEditor.representationName('FlatReferencesTable'))]
-[/template]
-
-[template public getterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides getterImplementation ? (elementEditor.representationName('FlatReferencesTable'))]
-[/template]
-
-[template public getterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides getterImplementationDelegate ? (elementEditor.representationName('FlatReferencesTable'))]
-[/template]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('FlatReferencesTable'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.updateSignatureDocumentation()/]
-[elementEditor.updateSignature()/];
-
-[elementEditor.addFilterSignatureDocumentation()/]
-[elementEditor.addFilterSignature()/];
-
-[elementEditor.addBusinessFilterSignatureDocumentation()/]
-[elementEditor.addBusinessFilterSignature()/];
-
-[elementEditor.isContainedInTableSignatureDocumentation()/]
-[elementEditor.isContainedInTableSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('FlatReferencesTable'))]
- public void init[elementEditor.viewPackageSignature()/](ReferencesTableSettings settings)
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('FlatReferencesTable'))]
- /**
- * Init the [elementEditor.name/]
- * @param settings settings for the [elementEditor.name/] ReferencesTable
- */
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('FlatReferencesTable'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignatureImplementation()/]
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignatureImplementation()/]
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignatureImplementation()/]
-
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('FlatReferencesTable'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](settings);
- }
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.update[elementEditor.viewPackageSignature()/]();
- }
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addBusinessFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignature()/] {
- return [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.isContainedIn[elementEditor.viewPackageSignature()/]Table(element);
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('FlatReferencesTable'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](ReferencesTableSettings)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('FlatReferencesTable'))]
-[elementEditor.initSignature()/] {
- if (current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- [elementEditor.name.toJavaIdentifier()/].setInput(settings);
- }
-[/template]
-
-[template public addFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('FlatReferencesTable'))]
-[elementEditor.addFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].addFilter(filter);
- }
-[/template]
-
-[template public addBusinessFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('FlatReferencesTable'))]
-[elementEditor.addBusinessFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].addBusinessRuleFilter(filter);
- }
-[/template]
-
-[template public isContainedInTableSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('FlatReferencesTable'))]
-[elementEditor.isContainedInTableSignature()/] {
- return ((ReferencesTableSettings)[elementEditor.name.toJavaIdentifier()/].getInput()).contains(element);
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableSWTImpl.mtl
deleted file mode 100755
index 811d61736..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/flatreferencestable/flatreferencestableSWTImpl.mtl
+++ /dev/null
@@ -1,72 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module flatreferencestableSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[comment ===== Case Widget = ReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'FlatReferencesTable')]
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'FlatReferencesTable')]
- protected FlatReferencesTable [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'FlatReferencesTable')]
-create[editor.name.toJavaClassifier()/]FlatReferencesTable(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'FlatReferencesTable')]
- /**
- * @param parent
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]FlatReferencesTable(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new FlatReferencesTable(parent);
- [editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
-
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (event.getSelection() instanceof StructuredSelection)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection)event.getSelection()).toList()));
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupFormImpl.mtl
deleted file mode 100755
index aeb247524..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupFormImpl.mtl
+++ /dev/null
@@ -1,43 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module groupFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public implementation(editor : Container) overrides implementation ? (editor.representation.name = 'Group')]
-create[editor.name.toJavaClassifier()/]Group(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Group')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]Group(FormToolkit widgetFactory, final Composite parent) {
- Section [editor.name.toJavaIdentifier()/]Section = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
- [editor.name.toJavaIdentifier()/]Section.setText([editor.owningViewsRepository().messagesProvider()/].[editor.groupKey(editor.owningView())/]);
- GridData [editor.name.toJavaIdentifier()/]SectionData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]SectionData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Section.setLayoutData([editor.name.toJavaIdentifier()/]SectionData);
- Composite [editor.name.toJavaIdentifier()/]Group = widgetFactory.createComposite([editor.name.toJavaIdentifier()/]Section);
- GridLayout [editor.name.toJavaIdentifier()/]GroupLayout = new GridLayout();
- [editor.name.toJavaIdentifier()/]GroupLayout.numColumns = 3;
- [editor.name.toJavaIdentifier()/]Group.setLayout([editor.name.toJavaIdentifier()/]GroupLayout);
- [editor.name.toJavaIdentifier()/]Section.setClient([editor.name.toJavaIdentifier()/]Group);
- return [editor.name.toJavaIdentifier()/]Group;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupSWTImpl.mtl
deleted file mode 100755
index d504508eb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/group/groupSWTImpl.mtl
+++ /dev/null
@@ -1,41 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module groupSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public implementation(editor : Container) overrides implementation ? (editor.representation.name = 'Group')]
-create[editor.name.toJavaClassifier()/]Group(parent);
-[/template]
-
-[template public additionalImplementation(editor : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Group')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]Group(Composite parent) {
- Group [editor.name.toJavaIdentifier()/]Group = new Group(parent, SWT.NONE);
- [editor.name.toJavaIdentifier()/]Group.setText([editor.owningViewsRepository().messagesProvider()/].[editor.groupKey(editor.owningView())/]);
- GridData [editor.name.toJavaIdentifier()/]GroupData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]GroupData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Group.setLayoutData([editor.name.toJavaIdentifier()/]GroupData);
- GridLayout [editor.name.toJavaIdentifier()/]GroupLayout = new GridLayout();
- [editor.name.toJavaIdentifier()/]GroupLayout.numColumns = 3;
- [editor.name.toJavaIdentifier()/]Group.setLayout([editor.name.toJavaIdentifier()/]GroupLayout);
- return [editor.name.toJavaIdentifier()/]Group;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxFormImpl.mtl
deleted file mode 100755
index 251c5a75c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxFormImpl.mtl
+++ /dev/null
@@ -1,51 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module hboxFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'HorizontalBox')]
-import org.eclipse.emf.eef.runtime.ui.widgets.HorizontalBox;
-[/template]
-
-[template public implementation(container : Container) overrides implementation ? (container.representation.name = 'HorizontalBox')]
-create[container.name.toJavaClassifier()/]HBox(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(container : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (container.representation.name = 'HorizontalBox')]
- /**
- * [container.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[container.name.toJavaClassifier()/]HBox(FormToolkit widgetFactory, Composite parent) {
- Composite container = widgetFactory.createComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan=3;
- container.setLayoutData(gridData);
- HorizontalBox [container.name.toJavaIdentifier()/]HBox = new HorizontalBox(container);
- [if (container.elements->select(representation.name='Checkbox')->notEmpty())]
- //Apply constraint for checkbox
- GridData constraint = new GridData(GridData.FILL_HORIZONTAL);
- constraint.horizontalAlignment = GridData.BEGINNING;
- [container.name.toJavaIdentifier()/]HBox.setLayoutData(constraint);
- [/if]
- widgetFactory.adapt([container.name.toJavaIdentifier()/]HBox);
- return [container.name.toJavaIdentifier()/]HBox;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxSWTImpl.mtl
deleted file mode 100755
index 11d1280e5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/hbox/hboxSWTImpl.mtl
+++ /dev/null
@@ -1,50 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module hboxSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'HorizontalBox')]
-import org.eclipse.emf.eef.runtime.ui.widgets.HorizontalBox;
-[/template]
-
-[template public implementation(container : Container) overrides implementation ? (container.representation.name = 'HorizontalBox')]
-create[container.name.toJavaClassifier()/]HBox(parent);
-[/template]
-
-[template public additionalImplementation(container : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (container.representation.name = 'HorizontalBox')]
- /**
- * [container.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[container.name.toJavaClassifier()/]HBox(Composite parent) {
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 3;
- container.setLayoutData(gridData);
- HorizontalBox [container.name.toJavaIdentifier()/]HBox = new HorizontalBox(container);
- [if (container.elements->select(representation.name='Checkbox')->notEmpty())]
- //Apply constraint for checkbox
- GridData constraint = new GridData(GridData.FILL_HORIZONTAL);
- constraint.horizontalAlignment = GridData.BEGINNING;
- [container.name.toJavaIdentifier()/]HBox.setLayoutData(constraint);
- [/if]
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerControl.mtl
deleted file mode 100755
index 8c939fd76..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerControl.mtl
+++ /dev/null
@@ -1,73 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module imageViewerControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = Text ===== /]
-[comment @Override widgetControl.declareEObjectUpdater /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived and not editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((String)event.getNewValue());
-[/template]
-
-[comment @Override widgetControl.liveUpdater /]
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived)]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/])){
-[if (editionElement.model.oclAsType(EAttribute).isString())]
- if (msg.getNewValue() != null) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]((String)msg.getNewValue());
- }
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = ImageViewer
-[/if]
- else {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]("");
- }
-}
-[/template]
-
-[comment @Override widgetControl.updater /]
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.oclAsType(EAttribute).isString())]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/](EcoreUtil.getIdentification([pec.model.name.toJavaIdentifier()/]), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toJavaClassifier()/]());
-}
-[else]
-//FIXME invalid case in updater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = ImageViewer
-[/if]
-[/template]
-
-[comment @Override widgetControl.filterUpdater /]
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived)]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = Text - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived and editionElement.canGeneratemodelNavigation())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue((String)event.getNewValue());
-[/template]
-
-[comment @Override widgetControl.updater /]
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('ImageViewer') and not editionElement.model.derived and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.oclAsType(EAttribute).isString())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.getValue() && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/](EcoreUtil.getIdentification([pec.model.name.toJavaIdentifier()/]), [editionElement.name.toJavaIdentifier()/]Settings.getValue());
-}
-[else]
-//FIXME invalid case in updater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = ImageViewer
-[/if]
-[/template]
-
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerFormImpl.mtl
deleted file mode 100755
index 874fe1f44..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerFormImpl.mtl
+++ /dev/null
@@ -1,72 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module imageViewerFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'ImageViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.imageviewer.EEFImageViewer;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('ImageViewer'))]
-protected EEFImageViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('ImageViewer'))]
-create[editor.name.toJavaClassifier()/]ImageViewer(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('ImageViewer'))]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]ImageViewer(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new EEFImageViewer(parent, SWT.BORDER);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData();
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultLayoutData()/]
- [else]
- // [protected (' for '.concat(editor.name).concat(' layout data customization'))]
- [editor.defaultLayoutData()/]
- // [/protected]
- [/if]
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewCompletePackageGetter()/]));
- }
- });
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
-[template private defaultLayoutData (editor : ElementEditor) ]
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 200;
- [editor.name.toJavaIdentifier()/]Data.horizontalAlignment = SWT.CENTER;
- [editor.name.toJavaIdentifier()/]Data.verticalAlignment = SWT.CENTER;
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerGettersSetters.mtl
deleted file mode 100755
index 5b9ed4f27..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerGettersSetters.mtl
+++ /dev/null
@@ -1,85 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module imageViewerGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[comment ================== Getter generation ================== /]
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('ImageViewer'))]
-[elementEditor.getterSignature()/] {
- ISelection selection = [elementEditor.name.toJavaIdentifier()/].getSelection();
- if (selection instanceof StructuredSelection && ((StructuredSelection)selection).getFirstElement() instanceof String) {
- return (String)((StructuredSelection)selection).getFirstElement();
- }
- return null;
- }
-[/template]
-
-[comment ================== Setter generation ================== /]
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('ImageViewer'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('ImageViewer'))]
- /**
- * Init the [elementEditor.name/]
- * @param key the key of the editor
- * @param current the new path of the pics
- */
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('ImageViewer'))]
- public void init[elementEditor.viewPackageSignature()/](String key, String newValue)
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('ImageViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('ImageViewer'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(newValue));
- } else {
- [elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection("")); //$NON-NLS-1$
- }
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('ImageViewer'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](String key, String newValue)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('ImageViewer'))]
-[elementEditor.initSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].initViewer(key, newValue);
- } else {
- [elementEditor.name.toJavaIdentifier()/].initViewer(key, ""); //$NON-NLS-1$
- }
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerSWTImpl.mtl
deleted file mode 100755
index bb8ac79aa..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/imageviewer/imageViewerSWTImpl.mtl
+++ /dev/null
@@ -1,67 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module imageViewerSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'ImageViewer')]
-import org.eclipse.emf.eef.runtime.ui.widgets.imageviewer.EEFImageViewer;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('ImageViewer'))]
- protected EEFImageViewer [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('ImageViewer'))]
- create[editor.name.toJavaClassifier()/]ImageViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('ImageViewer'))]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]ImageViewer(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new EEFImageViewer(parent, SWT.BORDER);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData();
- // [protected (' for '.concat(editor.name).concat(' layout data customization'))]
- [defaultLayoutData()/]
- // [/protected]
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewCompletePackageGetter()/]));
- }
- });
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
-[template private defaultLayoutData (editor : ElementEditor) ]
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 200;
- [editor.name.toJavaIdentifier()/]Data.horizontalAlignment = SWT.CENTER;
- [editor.name.toJavaIdentifier()/]Data.verticalAlignment = SWT.CENTER;
-
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorControl.mtl
deleted file mode 100755
index 5054579ff..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorControl.mtl
+++ /dev/null
@@ -1,49 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module multivaluededitorControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(*) - view = MultiValuedEditor ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeMany() and editionElement.representationName('MultiValuedEditor'))]
-if (event.getKind() == PropertiesEditionEvent.SET) {
- [pec.model.name.toJavaIdentifier().disambiguation('event')/].get[editionElement.model.name.toMany().toUpperFirst()/]().clear();
- [pec.model.name.toJavaIdentifier().disambiguation('event')/].get[editionElement.model.name.toMany().toUpperFirst()/]().addAll(((List) event.getNewValue()));
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeMany() and editionElement.representationName('MultiValuedEditor'))]
-[if (editionElement.model.oclAsType(EAttribute).many)]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].set[editionElement.views->first().name.toJavaClassifier()/]((([pec.model.name.toJavaClassifier()/])semanticObject).get[editionElement.views->first().name.toMany().toJavaClassifier()/]());
-}
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(*) : [editionElement.model.name/] - view = MultiValuedEditor
-[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeMany() and editionElement.representationName('MultiValuedEditor'))]
-[if (editionElement.model.many)]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toMany().toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toMany().toUpperFirst()/]());
-[else]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeMany() and editionElement.representationName('MultiValuedEditor'))]
-[comment no filters for multiValuedEditor /]
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorFormImpl.mtl
deleted file mode 100755
index 294c903cf..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorFormImpl.mtl
+++ /dev/null
@@ -1,112 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module multivaluededitorFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'MultiValuedEditor')]
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.Enumerator;
-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.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesContextService;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'MultiValuedEditor')]
-protected Text [editor.name.toJavaIdentifier()/];
- protected Button edit[editor.name.toJavaClassifier()/];
- private EList [editor.name.toJavaIdentifier()/]List;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'MultiValuedEditor')]
-create[editor.name.toJavaClassifier()/]MultiValuedEditor(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'MultiValuedEditor')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]MultiValuedEditor(FormToolkit widgetFactory, Composite parent) {
- [editor.name.toJavaIdentifier()/] = widgetFactory.createText(parent, "", SWT.READ_ONLY); //$NON-NLS-1$
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- edit[editor.name.toJavaClassifier()/] = widgetFactory.createButton(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], SWT.NONE);
- GridData edit[editor.name.toJavaClassifier()/]Data = new GridData();
- edit[editor.name.toJavaClassifier()/].setLayoutData(edit[editor.name.toJavaClassifier()/]Data);
- edit[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- EEFFeatureEditorDialog dialog = new EEFFeatureEditorDialog(
- [editor.name.toJavaIdentifier()/].getShell(), "[pec.model.name/]", new AdapterFactoryLabelProvider(adapterFactory), //$NON-NLS-1$
- [editor.name.toJavaIdentifier()/]List, [editor.involvedPropertiesEditionElement().metamodelGetter()/].getEType(), null,
- false, true,
- null, null);
- if (dialog.open() == Window.OK) {
- [editor.name.toJavaIdentifier()/]List = dialog.getResult();
- if ([editor.name.toJavaIdentifier()/]List == null) {
- [editor.name.toJavaIdentifier()/]List = new BasicEList();
- }
- [editor.name.toJavaIdentifier()/].setText([editor.name.toJavaIdentifier()/]List.toString());
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new BasicEList([editor.name.toJavaIdentifier()/]List)));
- setHasChanged(true);
- }
- }
- });
- EditingUtils.setID(edit[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(edit[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::browsebutton"); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorGettersSetters.mtl
deleted file mode 100755
index 94c851a19..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorGettersSetters.mtl
+++ /dev/null
@@ -1,86 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module multivaluededitorGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('MultiValuedEditor'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/]List;
- }
-[/template]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('MultiValuedEditor'))]
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-
-[elementEditor.addSignatureDocumentation()/]
-[elementEditor.addSignature()/];
-
-[elementEditor.removeSignatureDocumentation()/]
-[elementEditor.removeSignature()/];
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('MultiValuedEditor'))]
-[elementEditor.setterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]List = newValue;
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText([elementEditor.name.toJavaIdentifier()/]List.toString());
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-
-[elementEditor.addSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]List.add(newValue);
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText([elementEditor.name.toJavaIdentifier()/]List.toString());
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-
-[elementEditor.removeSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]List.remove(newValue);
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText([elementEditor.name.toJavaIdentifier()/]List.toString());
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-[/template]
-
-
-[template public addSignatureDocumentation(elementEditor : ElementEditor) ]
- /**
- * Add a value to the [elementEditor.name/] multivalued attribute.
- * @param newValue the value to add
- */
-[/template]
-
-[template public addSignature(elementEditor : ElementEditor) ]
- public void addTo[elementEditor.name.toJavaClassifier()/](Object newValue)
-[/template]
-
-[template public removeSignatureDocumentation(elementEditor : ElementEditor) ]
- /**
- * Remove a value to the [elementEditor.name/] multivalued attribute.
- * @param newValue the value to remove
- */
-[/template]
-
-[template public removeSignature(elementEditor : ElementEditor) ]
- public void removeTo[elementEditor.name.toJavaClassifier()/](Object newValue)
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorSWTImpl.mtl
deleted file mode 100755
index 5e9f74079..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/multivaluededitor/multivaluededitorSWTImpl.mtl
+++ /dev/null
@@ -1,109 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module multivaluededitorSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'MultiValuedEditor')]
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.Enumerator;
-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.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.edit.ui.celleditor.FeatureEditorDialog;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.emf.eef.runtime.impl.services.PropertiesContextService;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'MultiValuedEditor')]
- protected Text [editor.name.toJavaIdentifier()/];
- protected Button edit[editor.name.toJavaClassifier()/];
- private EList [editor.name.toJavaIdentifier()/]List;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'MultiValuedEditor')]
-create[editor.name.toJavaClassifier()/]MultiValuedEditor(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'MultiValuedEditor')]
- protected Composite create[editor.name.toJavaClassifier()/]MultiValuedEditor(Composite parent) {
- [editor.name.toJavaIdentifier()/] = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- edit[editor.name.toJavaClassifier()/] = new Button(parent, SWT.NONE);
- edit[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/]);
- GridData edit[editor.name.toJavaClassifier()/]Data = new GridData();
- edit[editor.name.toJavaClassifier()/].setLayoutData(edit[editor.name.toJavaClassifier()/]Data);
- edit[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- EEFFeatureEditorDialog dialog = new EEFFeatureEditorDialog(
- [editor.name.toJavaIdentifier()/].getShell(), "[pec.model.name/]", new AdapterFactoryLabelProvider(adapterFactory), //$NON-NLS-1$
- [editor.name.toJavaIdentifier()/]List, [editor.involvedPropertiesEditionElement().metamodelGetter()/].getEType(), null,
- false, true,
- null, null);
- if (dialog.open() == Window.OK) {
- [editor.name.toJavaIdentifier()/]List = dialog.getResult();
- if ([editor.name.toJavaIdentifier()/]List == null) {
- [editor.name.toJavaIdentifier()/]List = new BasicEList();
- }
- [editor.name.toJavaIdentifier()/].setText([editor.name.toJavaIdentifier()/]List.toString());
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new BasicEList([editor.name.toJavaIdentifier()/]List)));
- setHasChanged(true);
- }
- }
- });
- EditingUtils.setID(edit[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(edit[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::browsebutton"); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioControl.mtl
deleted file mode 100755
index 3057810dc..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioControl.mtl
+++ /dev/null
@@ -1,63 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module radioControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = Radio ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Radio') and not editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.name/])event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Radio') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.oclAsType(EAttribute).isEnum())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = Radio
-[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.representationName('Radio') and not editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]((EEnum) [editionElement.metamodelGetter()/].getEType(), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]());
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Radio'))]
-[comment not filters for radio /]
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Radio'))]
-[if (editionElement.model.oclAsType(EAttribute).isEnum())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](([editionElement.views->first().toJavaType().trim()/])msg.getNewValue());
-[else]
-//FIXME invalid case in liveUpdater(), Case : model = Attribute(1) : [editionElement.model.name/] - view = Radio
-[/if]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = Radio - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Radio') and editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.name/])event.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.representationName('Radio') and editionElement.canGeneratemodelNavigation())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]((EEnum) [editionElement.metamodelGetter()/].getEType(), [editionElement.name.toJavaIdentifier()/]Settings.getValue());
-}
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioFormImpl.mtl
deleted file mode 100755
index 9b08302ff..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioFormImpl.mtl
+++ /dev/null
@@ -1,61 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module radioFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'Radio')]
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.eef.runtime.ui.widgets.RadioViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Radio')]
-protected RadioViewer [editor.name.toJavaIdentifier()/]RadioViewer;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Radio')]
-create[editor.name.toJavaClassifier()/]RadioViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Radio')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]RadioViewer(Composite parent) {
- [editor.name.toJavaIdentifier()/]RadioViewer = new RadioViewer(parent, SWT.CHECK);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/]RadioViewer.setEnabled(false);
- [editor.name.toJavaIdentifier()/]RadioViewer.setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]RadioViewer.setLayoutData([editor.name.toJavaIdentifier()/]Data);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null);
- [editor.name.toJavaIdentifier()/]RadioViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((EEnumLiteral)((StructuredSelection)event.getSelection()).getFirstElement()).getInstance()));
- }
- });
- [editor.name.toJavaIdentifier()/]RadioViewer.setID([editor.editorID()/]);
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioGettersSetters.mtl
deleted file mode 100755
index 1eaa0feff..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioGettersSetters.mtl
+++ /dev/null
@@ -1,91 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module radioGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('Radio'))]
-[elementEditor.getterSignature()/] {
- if ([elementEditor.name.toJavaIdentifier()/]RadioViewer.getSelection() instanceof StructuredSelection) {
- StructuredSelection sSelection = (StructuredSelection) [elementEditor.name.toJavaIdentifier()/]RadioViewer.getSelection();
- return sSelection.getFirstElement();
- }
- return null;
- }
-[/template]
-
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('Radio'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('Radio'))]
- public void init[elementEditor.viewPackageSignature()/](EEnum eenum, Enumerator current)
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('Radio'))]
- /**
- * Init the [elementEditor.name/]
- * @param eenum the enum to manage
- * @param current the current value
- */
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('Radio'))]
-[elementEditor.setterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]RadioViewer.setSelection(new StructuredSelection(newValue));
- }
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('Radio'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('Radio'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](eenum, current);
- }
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](new StructuredSelection(newValue));
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('Radio'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](EEnum eenum, Enumerator current)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('Radio'))]
-[elementEditor.initSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]RadioViewer.setInput(eenum.getELiterals());
- [elementEditor.name.toJavaIdentifier()/]RadioViewer.setSelection(new StructuredSelection(current));
- }
-[/template]
-
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioSWTImpl.mtl
deleted file mode 100755
index ae8243242..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/radio/radioSWTImpl.mtl
+++ /dev/null
@@ -1,62 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module radioSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'Radio')]
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.eef.runtime.ui.widgets.RadioViewer;
-import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Radio')]
- protected RadioViewer [editor.name.toJavaIdentifier()/]RadioViewer;
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Radio')]
-create[editor.name.toJavaClassifier()/]RadioViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Radio')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]RadioViewer(Composite parent) {
- [editor.name.toJavaIdentifier()/]RadioViewer = new RadioViewer(parent, SWT.CHECK);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/]RadioViewer.setEnabled(false);
- [editor.name.toJavaIdentifier()/]RadioViewer.setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]RadioViewer.setLayoutData([editor.name.toJavaIdentifier()/]Data);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null);
- [editor.name.toJavaIdentifier()/]RadioViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((EEnumLiteral)((StructuredSelection)event.getSelection()).getFirstElement()).getInstance()));
- }
- });
- [editor.name.toJavaIdentifier()/]RadioViewer.setID([editor.editorID()/]);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null);
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableControl.mtl
deleted file mode 100755
index 6459dcade..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableControl.mtl
+++ /dev/null
@@ -1,229 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module referencetableControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-[import filters /]
-
-[comment ===== Case : model = Reference(*) - view = ReferencesTable or AdvancedReferencesTable===== /]
-[query public validCaseForSimpleReference(editionElement : PropertiesEditionElement) : Boolean =
- not editionElement.hasModelNavigation()
- and editionElement.model.isReferenceMany()
- and editionElement.representationName('ReferencesTable') or editionElement.representationName('AdvancedReferencesTable') /]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForSimpleReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-private ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForSimpleReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- if (event.getNewValue() instanceof [editionElement.model.eType.name/]) {
- [editionElement.name.toJavaIdentifier()/]Settings.addToReference((EObject) event.getNewValue());
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForSimpleReference())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForSimpleReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? ((not editionElement.hasModelNavigation()) and editionElement.model.isReferenceMany() and editionElement.representationName('ReferencesTable'))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof EObject)
- return (![view.viewIdentifier(pec)/].isContainedIn[editionElement.views->first().viewPackageSignature()/]Table((EObject)element));
- return [if (not editionElement.model.required)]element instanceof String && element.equals("")[else]false[/if];
- }
-
-});
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectStrictFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? ((not editionElement.hasModelNavigation()) and editionElement.model.isReferenceMany() and editionElement.representationName('AdvancedReferencesTable'))]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof EObject)
- return (![view.viewIdentifier(pec)/].isContainedIn[editionElement.views->first().viewPackageSignature()/]Table((EObject)element));
- return element instanceof Resource;
- }
-
-});
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Reference(*) in Simple Navigation - view = ReferencesTable or AdvancedReferencesTable===== /]
-[query public validCaseForMultipleModelReference(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.hasModelNavigation()
- and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentSingle() and editionElement.model.isReferenceMany()
- and (editionElement.representationName('ReferencesTable') or editionElement.representationName('AdvancedReferencesTable'))/]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForMultipleModelReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-private ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForMultipleModelReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- if (event.getNewValue() instanceof [editionElement.model.eType.name/]) {
- [editionElement.name.toJavaIdentifier()/]Settings.addToReference((EObject) event.getNewValue());
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForMultipleModelReference())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.isAffectingFeature((EStructuralFeature)msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForMultipleModelReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForMultipleModelReference())]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (element instanceof EObject)
- return (![view.viewIdentifier(pec)/].isContainedIn[editionElement.views->first().viewPackageSignature()/]Table((EObject)element));
- return [if (not editionElement.model.required)]element instanceof String && element.equals("")[else]false[/if];
- }
-
-});
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new EObjectStrictFilter([editionElement.editionElementPackage()/].eINSTANCE.get[editionElement.model.eType.name/]()));
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Reference(1) - view = ReferencesTable or AdvancedReferencesTable===== /]
-[query public validCaseForSingleModelReference(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.hasModelNavigation()
- and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentMany() and editionElement.model.isReferenceSingle()
- and (editionElement.representationName('ReferencesTable') or editionElement.representationName('AdvancedReferencesTable'))/]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForSingleModelReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-private ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForSingleModelReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- if (event.getNewValue() instanceof [editionElement.model.eType.name/]) {
- [editionElement.name.toJavaIdentifier()/]Settings.addToReference((EObject) event.getNewValue());
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForSingleModelReference())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.isAffectingFeature((EStructuralFeature)msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-}
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForSingleModelReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForSingleModelReference())]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [editionElement.model.eType.name/]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template] \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableFormImpl.mtl
deleted file mode 100755
index 17ab14ab5..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableFormImpl.mtl
+++ /dev/null
@@ -1,378 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module referencetableFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = ReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'ReferencesTable')]
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'ReferencesTable')]
- protected TableViewer [editor.name.toJavaIdentifier()/];
- protected Button add[editor.name.toJavaClassifier()/];
- protected Button remove[editor.name.toJavaClassifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'ReferencesTable')]
-create[editor.name.toJavaClassifier()/]ReferencesTable(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'ReferencesTable')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]ReferencesTable(FormToolkit widgetFactory, Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData();
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- [editor.name.toJavaIdentifier()/] = create[editor.name.toJavaClassifier()/]Viewer(parent, widgetFactory, adapterFactory);
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Data.minimumHeight = 120;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 120;
- [editor.name.toJavaIdentifier()/].getTable().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getTable(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getTable(), "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- create[editor.name.toJavaClassifier()/]ControlPanel(parent, widgetFactory);
- return parent;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected TableViewer create[editor.name.toJavaClassifier()/]Viewer(Composite container, FormToolkit widgetFactory, AdapterFactory adapter) {
- org.eclipse.swt.widgets.Table table = widgetFactory.createTable(container, SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- [if (editor.readOnly)]
- table.setEnabled(false);
- table.setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData gd = new GridData();
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- gd.verticalAlignment = GridData.FILL;
- table.setLayoutData(gd);
- table.setLinesVisible(true);
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultColumnInitialisation()/]
- [else]
- // [protected ('for table '.concat(editor.name).concat(' s columns definition'))]
- [editor.defaultColumnInitialisation()/]
- // [/protected]
- [/if]
-
- TableViewer result = new TableViewer(table);
- result.setLabelProvider(new ITableLabelProvider() {
-
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultLabelProviderInitialisaion()/]
- [else]
- // [protected ('for table '.concat(editor.name).concat(' label provider'))]
- [editor.defaultLabelProviderInitialisaion()/]
-
- // [/protected]
- [/if]
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- });
- return result;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void create[editor.name.toJavaClassifier()/]ControlPanel(Composite container, FormToolkit widgetFactory) {
- Composite result = widgetFactory.createComposite(container, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- result.setLayout(layout);
- add[editor.name.toJavaClassifier()/] = widgetFactory.createButton(result, [editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_AddListViewerLabel, SWT.NONE);
- [if (editor.readOnly)]
- add[editor.name.toJavaClassifier()/].setEnabled(false);
- add[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData addData = new GridData(GridData.FILL_HORIZONTAL);
- add[editor.name.toJavaClassifier()/].setLayoutData(addData);
- add[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- add[editor.name.toJavaClassifier()/]();
- }
-
- });
- EditingUtils.setID(add[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(add[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::addbutton"); //$NON-NLS-1$
- remove[editor.name.toJavaClassifier()/] = widgetFactory.createButton(result, [editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_RemoveListViewerLabel, SWT.NONE);
- [if (editor.readOnly)]
- remove[editor.name.toJavaClassifier()/].setEnabled(false);
- remove[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData removeData = new GridData(GridData.FILL_HORIZONTAL);
- remove[editor.name.toJavaClassifier()/].setLayoutData(removeData);
- remove[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- remove[editor.name.toJavaClassifier()/]((IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection());
- }
- }
-
- });
- EditingUtils.setID(remove[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(remove[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::removebutton"); //$NON-NLS-1$
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void add[editor.name.toJavaClassifier()/]() {
-
- EMFModelViewerDialog dialog = new EMFModelViewerDialog(new AdapterFactoryLabelProvider(adapterFactory), [editor.name.toJavaIdentifier()/].getInput(), [editor.name.toJavaIdentifier()/]Filters, [editor.name.toJavaIdentifier()/]BusinessFilters, false, true) {
- public void process(IStructuredSelection selection) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- }
-
- };
- dialog.open();
- [editor.name.toJavaIdentifier()/].refresh();
- }
-
- /**
- * @param selection the [editor.name/] to remove
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void remove[editor.name.toJavaClassifier()/](IStructuredSelection selection) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, elem));
- }
- [editor.name.toJavaIdentifier()/].refresh();
- }
-[/template]
-
-[template private defaultLabelProviderInitialisaion (editor : ElementEditor) ]
- public String getColumnText(Object object, int columnIndex) {
- AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(adapterFactory);
- if (object instanceof EObject) {
- switch (columnIndex) {
- case 0:
- return labelProvider.getText(object);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
-[/template]
-
-[template private defaultColumnInitialisation (editor : ElementEditor) ]
- TableColumn name = new TableColumn(table, SWT.NONE);
- name.setWidth(80);
- name.setText("Label"); //$NON-NLS-1$
-
-[/template]
-
-[comment ===== Case Widget = AdvancedReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedReferencesTable')]
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog;
-import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
-import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPolicyProvider;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedReferencesTable')]
- protected ReferencesTable [editor.name.toJavaIdentifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'AdvancedReferencesTable')]
-create[editor.name.toJavaClassifier()/]ReferencesTable(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedReferencesTable')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]ReferencesTable(FormToolkit widgetFactory, Composite parent) {
- this.[editor.name.toJavaIdentifier()/] = new ReferencesTable([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], new ReferencesTableListener () {
- public void handleAdd() { add[editor.name.toJavaClassifier()/](); }
- public void handleEdit(EObject element) { edit[editor.name.toJavaClassifier()/](element); }
- public void handleMove(EObject element, int oldIndex, int newIndex) { move[editor.name.toJavaClassifier()/](element, oldIndex, newIndex); }
- public void handleRemove(EObject element) { removeFrom[editor.name.toJavaClassifier()/](element); }
- public void navigateTo(EObject element) { }
- });
- this.[editor.name.toJavaIdentifier()/].setHelpText(propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- this.[editor.name.toJavaIdentifier()/].createControls(parent, widgetFactory);
- this.[editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- if (e.item != null && e.item.getData() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
- }
- }
-
- });
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- this.[editor.name.toJavaIdentifier()/].disableMove();
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- [editor.name.toJavaIdentifier()/].setEEFType("eef::[editor.representation.name/]"); //$NON-NLS-1$
- return parent;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void add[editor.name.toJavaClassifier()/]() {
- [editor.defaultAddOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void move[editor.name.toJavaClassifier()/](EObject element, int oldIndex, int newIndex) {
- [editor.defaultMoveOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void removeFrom[editor.name.toJavaClassifier()/](EObject element) {
- [editor.defaultRemoveOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void edit[editor.name.toJavaClassifier()/](EObject element) {
- [editor.defaultEditOperation()/]
- }
-[/template]
-
-[template public defaultAddOperation (editor : ElementEditor) ]
-TabElementTreeSelectionDialog dialog = new TabElementTreeSelectionDialog([editor.name.toJavaIdentifier()/].getInput(), [editor.name.toJavaIdentifier()/]Filters, [editor.name.toJavaIdentifier()/]BusinessFilters,
-"[editor.name/]", propertiesEditionComponent.getEditingContext().getAdapterFactory(), current.eResource()) {
- @Override
- public void process(IStructuredSelection selection) {
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/],
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- [editor.name.toJavaIdentifier()/].refresh();
- }
-};
-dialog.open();
-[/template]
-
-[template public defaultMoveOperation (editor : ElementEditor) ]
-propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
-[editor.name.toJavaIdentifier()/].refresh();
-[/template]
-
-[template public defaultEditOperation (editor : ElementEditor) ]
-EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
-PropertiesEditingProvider provider = (PropertiesEditingProvider)adapterFactory.adapt(element, PropertiesEditingProvider.class);
-if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy != null) {
- policy.execute();
- [editor.name.toJavaIdentifier()/].refresh();
- }
-}
-[/template]
-
-[template public defaultRemoveOperation (editor : ElementEditor) ]
-propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
-[editor.name.toJavaIdentifier()/].refresh();
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableGettersSetters.mtl
deleted file mode 100755
index 9817d891b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableGettersSetters.mtl
+++ /dev/null
@@ -1,137 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module referencetableGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-
-[template public getterDeclaration(elementEditor : ElementEditor) overrides getterDeclaration ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[/template]
-
-[template public getterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides getterImplementation ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[/template]
-
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.updateSignatureDocumentation()/]
-[elementEditor.updateSignature()/];
-
-[elementEditor.addFilterSignatureDocumentation()/]
-[elementEditor.addFilterSignature()/];
-
-[elementEditor.addBusinessFilterSignatureDocumentation()/]
-[elementEditor.addBusinessFilterSignature()/];
-
-[elementEditor.isContainedInTableSignatureDocumentation()/]
-[elementEditor.isContainedInTableSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
- public void init[elementEditor.viewPackageSignature()/](ReferencesTableSettings settings)
-[/template]
-
-[template public getterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides getterImplementationDelegate ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
- /**
- * Init the [elementEditor.name/]
- * @param settings settings for the [elementEditor.name/] ReferencesTable
- */
-[/template]
-
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignatureImplementation()/]
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignatureImplementation()/]
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignatureImplementation()/]
-
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](settings);
- }
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.update[elementEditor.viewPackageSignature()/]();
- }
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addBusinessFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignature()/] {
- return [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.isContainedIn[elementEditor.viewPackageSignature()/]Table(element);
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[elementEditor.initSignature()/] {
- if (current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
- [elementEditor.name.toJavaIdentifier()/].setContentProvider(contentProvider);
- [elementEditor.name.toJavaIdentifier()/].setInput(settings);
- }
-[/template]
-
-[template public addFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[elementEditor.addFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]Filters.add(filter);
- }
-[/template]
-
-[template public addBusinessFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[elementEditor.addBusinessFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]BusinessFilters.add(filter);
- }
-[/template]
-
-[template public isContainedInTableSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('ReferencesTable') or elementEditor.representationName('AdvancedReferencesTable'))]
-[elementEditor.isContainedInTableSignature()/] {
- return ((ReferencesTableSettings)[elementEditor.name.toJavaIdentifier()/].getInput()).contains(element);
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableSWTImpl.mtl
deleted file mode 100755
index 47f74fbc1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/referencetable/referencetableSWTImpl.mtl
+++ /dev/null
@@ -1,378 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module referencetableSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[comment ===== Case Widget = ReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'ReferencesTable')]
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'ReferencesTable')]
- protected TableViewer [editor.name.toJavaIdentifier()/];
- protected Button add[editor.name.toJavaClassifier()/];
- protected Button remove[editor.name.toJavaClassifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'ReferencesTable')]
-create[editor.name.toJavaClassifier()/]ReferencesTable(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'ReferencesTable')]
- /**
- * @param parent
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]ReferencesTable(Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData();
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- [editor.name.toJavaIdentifier()/] = create[editor.name.toJavaClassifier()/]Viewer(parent, adapterFactory);
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Data.minimumHeight = 120;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 120;
- [editor.name.toJavaIdentifier()/].getTable().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getTable(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getTable(), "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- create[editor.name.toJavaClassifier()/]ControlPanel(parent);
- return parent;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected TableViewer create[editor.name.toJavaClassifier()/]Viewer(Composite container, AdapterFactory adapter) {
- org.eclipse.swt.widgets.Table table = new org.eclipse.swt.widgets.Table(container, SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- [if (editor.readOnly)]
- table.setEnabled(false);
- table.setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData gd = new GridData();
- gd.grabExcessHorizontalSpace = true;
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessVerticalSpace = true;
- gd.verticalAlignment = GridData.FILL;
- table.setLayoutData(gd);
- table.setLinesVisible(true);
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultColumnInitialisation()/]
- [else]
- // [protected ('for table '.concat(editor.name).concat(' s columns definition'))]
- [editor.defaultColumnInitialisation()/]
- // [/protected]
- [/if]
-
- TableViewer result = new TableViewer(table);
- result.setLabelProvider(new ITableLabelProvider() {
-
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultLabelProviderInitialisation()/]
- [else]
- // [protected ('for table '.concat(editor.name).concat(' label provider'))]
- [editor.defaultLabelProviderInitialisation()/]
- // [/protected]
- [/if]
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- });
- return result;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void create[editor.name.toJavaClassifier()/]ControlPanel(Composite container) {
- Composite result = new Composite(container, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- result.setLayout(layout);
- add[editor.name.toJavaClassifier()/] = new Button(result, SWT.NONE);
- add[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_AddListViewerLabel);
- [if (editor.readOnly)]
- add[editor.name.toJavaClassifier()/].setEnabled(false);
- add[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData addData = new GridData(GridData.FILL_HORIZONTAL);
- add[editor.name.toJavaClassifier()/].setLayoutData(addData);
- add[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- add[editor.name.toJavaClassifier()/]();
- }
-
- });
- EditingUtils.setID(add[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(add[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::addbutton"); //$NON-NLS-1$
- remove[editor.name.toJavaClassifier()/] = new Button(result, SWT.NONE);
- remove[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_RemoveListViewerLabel);
- [if (editor.readOnly)]
- remove[editor.name.toJavaClassifier()/].setEnabled(false);
- remove[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData removeData = new GridData(GridData.FILL_HORIZONTAL);
- remove[editor.name.toJavaClassifier()/].setLayoutData(removeData);
- remove[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- remove[editor.name.toJavaClassifier()/]((IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection());
- }
- }
-
- });
- EditingUtils.setID(remove[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(remove[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::removebutton"); //$NON-NLS-1$
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void add[editor.name.toJavaClassifier()/]() {
- EMFModelViewerDialog dialog = new EMFModelViewerDialog(new AdapterFactoryLabelProvider(adapterFactory), [editor.name.toJavaIdentifier()/].getInput(), [editor.name.toJavaIdentifier()/]Filters, [editor.name.toJavaIdentifier()/]BusinessFilters, false, true) {
- public void process(IStructuredSelection selection) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- }
-
- };
- dialog.open();
- [editor.name.toJavaIdentifier()/].refresh();
- }
-
- /**
- * @param selection the [editor.name/] to remove
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void remove[editor.name.toJavaClassifier()/](IStructuredSelection selection) {
- for (Iterator iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, elem));
- }
- [editor.name.toJavaIdentifier()/].refresh();
- }
-[/template]
-
-[template private defaultLabelProviderInitialisation(editor : ElementEditor) ]
- public String getColumnText(Object object, int columnIndex) {
- AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(adapterFactory);
- if (object instanceof EObject) {
- switch (columnIndex) {
- case 0:
- return labelProvider.getText(object);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
-[/template]
-
-[template private defaultColumnInitialisation (editor : ElementEditor) ]
- TableColumn name = new TableColumn(table, SWT.NONE);
- name.setWidth(80);
- name.setText("Label"); //$NON-NLS-1$
-
-[/template]
-
-[comment ===== Case Widget = AdvancedReferencesTable ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedReferencesTable')]
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.jface.viewers.StructuredSelection;
-import java.util.Iterator;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFModelViewerDialog;
-import org.eclipse.emf.eef.runtime.ui.widgets.TabElementTreeSelectionDialog;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
-import org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedReferencesTable')]
- protected ReferencesTable [editor.name.toJavaIdentifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'AdvancedReferencesTable')]
-create[editor.name.toJavaClassifier()/]AdvancedReferencesTable(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedReferencesTable')]
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]AdvancedReferencesTable(Composite parent) {
- this.[editor.name.toJavaIdentifier()/] = new ReferencesTable([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], new ReferencesTableListener() {
- public void handleAdd() { add[editor.name.toJavaClassifier()/](); }
- public void handleEdit(EObject element) { edit[editor.name.toJavaClassifier()/](element); }
- public void handleMove(EObject element, int oldIndex, int newIndex) { move[editor.name.toJavaClassifier()/](element, oldIndex, newIndex); }
- public void handleRemove(EObject element) { removeFrom[editor.name.toJavaClassifier()/](element); }
- public void navigateTo(EObject element) { }
- });
- this.[editor.name.toJavaIdentifier()/].setHelpText(propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- this.[editor.name.toJavaIdentifier()/].createControls(parent);
- this.[editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- if (e.item != null && e.item.getData() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
- }
- }
-
- });
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- this.[editor.name.toJavaIdentifier()/].disableMove();
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- [editor.name.toJavaIdentifier()/].setEEFType("eef::[editor.representation.name/]"); //$NON-NLS-1$
- return parent;
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void add[editor.name.toJavaClassifier()/]() {
- [editor.defaultAddOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void move[editor.name.toJavaClassifier()/](EObject element, int oldIndex, int newIndex) {
- [editor.defaultMoveOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void removeFrom[editor.name.toJavaClassifier()/](EObject element) {
- [editor.defaultRemoveOperation()/]
- }
-
- /**
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected void edit[editor.name.toJavaClassifier()/](EObject element) {
- [editor.defaultEditOperation()/]
- }
-[/template]
-
-[template public defaultAddOperation (editor : ElementEditor) ]
-TabElementTreeSelectionDialog dialog = new TabElementTreeSelectionDialog([editor.name.toJavaIdentifier()/].getInput(), [editor.name.toJavaIdentifier()/]Filters, [editor.name.toJavaIdentifier()/]BusinessFilters,
-"[editor.name/]", propertiesEditionComponent.getEditingContext().getAdapterFactory(), current.eResource()) {
- @Override
- public void process(IStructuredSelection selection) {
- for (Iterator<?> iter = selection.iterator(); iter.hasNext();) {
- EObject elem = (EObject) iter.next();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/],
- PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
- }
- [editor.name.toJavaIdentifier()/].refresh();
- }
-};
-dialog.open();
-[/template]
-
-[template public defaultMoveOperation (editor : ElementEditor) ]
-propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
-[editor.name.toJavaIdentifier()/].refresh();
-[/template]
-
-[template public defaultEditOperation (editor : ElementEditor) ]
-EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
-PropertiesEditingProvider provider = (PropertiesEditingProvider)adapterFactory.adapt(element, PropertiesEditingProvider.class);
-if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy != null) {
- policy.execute();
- [editor.name.toJavaIdentifier()/].refresh();
- }
-}
-[/template]
-
-[template public defaultRemoveOperation(editor : ElementEditor) ]
-propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
-[editor.name.toJavaIdentifier()/].refresh();
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextControl.mtl
deleted file mode 100755
index 9aee22718..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextControl.mtl
+++ /dev/null
@@ -1,59 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module richtextControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = RichText ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText') and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/])){
- if (msg.getNewValue() != null) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), msg.getNewValue()));
- } else {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]("");
- }
-}
-[/template]
-
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText') and not editionElement.canGeneratemodelNavigation())]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText'))]
-[comment no filters for RichText /]
-[/template]
-
-
-[comment ===== Case : model = Attribute(1) - view = RichText - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('RichText') and editionElement.canGeneratemodelNavigation())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.getValue() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [editionElement.name.toJavaIdentifier()/]Settings.getValue()));
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextFormImpl.mtl
deleted file mode 100755
index b4fd0a28a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextFormImpl.mtl
+++ /dev/null
@@ -1,152 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module richtextFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'RichText')]
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.IRichTextToolBar;
-import org.eclipse.epf.richtext.RichText;
-import org.eclipse.epf.richtext.RichTextToolBar;
-import org.eclipse.epf.richtext.actions.AddImageAction;
-import org.eclipse.epf.richtext.actions.AddLinkAction;
-import org.eclipse.epf.richtext.actions.AddOrderedListAction;
-import org.eclipse.epf.richtext.actions.AddTableAction;
-import org.eclipse.epf.richtext.actions.AddUnorderedListAction;
-import org.eclipse.epf.richtext.actions.BoldAction;
-import org.eclipse.epf.richtext.actions.ClearContentAction;
-import org.eclipse.epf.richtext.actions.CopyAction;
-import org.eclipse.epf.richtext.actions.CutAction;
-import org.eclipse.epf.richtext.actions.FindReplaceAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontNameAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontSizeAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontStyleAction;
-import org.eclipse.epf.richtext.actions.IndentAction;
-import org.eclipse.epf.richtext.actions.ItalicAction;
-import org.eclipse.epf.richtext.actions.JustifyCenterAction;
-import org.eclipse.epf.richtext.actions.JustifyLeftAction;
-import org.eclipse.epf.richtext.actions.JustifyRightAction;
-import org.eclipse.epf.richtext.actions.OutdentAction;
-import org.eclipse.epf.richtext.actions.PasteAction;
-import org.eclipse.epf.richtext.actions.SubscriptAction;
-import org.eclipse.epf.richtext.actions.SuperscriptAction;
-import org.eclipse.epf.richtext.actions.TidyActionGroup;
-import org.eclipse.epf.richtext.actions.UnderlineAction;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'RichText')]
-protected RichText [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'RichText')]
-create[editor.name.toJavaClassifier()/]RichText(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'RichText')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]RichText(FormToolkit widgetFactory, Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- Composite toolbarContainer = widgetFactory.createComposite(parent);
- toolbarContainer.setLayout(new GridLayout(2, false));
- GridData toolbarData = new GridData(GridData.FILL_HORIZONTAL);
- toolbarData.horizontalSpan = 3;
- toolbarContainer.setLayoutData(toolbarData);
- RichTextToolBar toolBar = new RichTextToolBar(toolbarContainer, SWT.NONE, [editor.name.toJavaIdentifier()/]);
- [editor.name.toJavaIdentifier()/] = new RichText(parent, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL); //$NON-NLS-1$
- [editor.name.toJavaIdentifier()/].setEditable(true);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 200;
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
-
- [editor.name.toJavaIdentifier()/].addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- propertiesEditionComponent.delayedFirePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editorID(editor)/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- });
-
- fillToolBar(toolBar, [editor.name.toJavaIdentifier()/]);
- return parent;
- }
-
- /**
- * Populate actions in the Toolbar to link with the RichText
- *
- * @param toolBar The IRichTextToolBar
- * @param richText The IRichText
- */
- private void fillToolBar(IRichTextToolBar toolBar, IRichText richText) {
- [editor.fillToolbar()/]
- }
-[/template]
-
-[template public fillToolbar (editor : ElementEditor) ]
- toolBar.addAction(new EEFFontStyleAction(richText));
- toolBar.addAction(new EEFFontNameAction(richText));
- toolBar.addAction(new EEFFontSizeAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new CutAction(richText));
- toolBar.addAction(new CopyAction(richText));
- toolBar.addAction(new PasteAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new ClearContentAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new BoldAction(richText));
- toolBar.addAction(new ItalicAction(richText));
- toolBar.addAction(new UnderlineAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new SubscriptAction(richText));
- toolBar.addAction(new SuperscriptAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new TidyActionGroup(richText));
- toolBar.addSeparator();
- toolBar.addAction(new AddOrderedListAction(richText));
- toolBar.addAction(new AddUnorderedListAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new OutdentAction(richText));
- toolBar.addAction(new IndentAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new JustifyLeftAction(richText));
- toolBar.addAction(new JustifyCenterAction(richText));
- toolBar.addAction(new JustifyRightAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new FindReplaceAction(richText) {
- /**
- * @see org.eclipse.epf.richtext.actions.FindReplaceAction#execute(org.eclipse.epf.richtext.IRichText)
- */
- public void execute(IRichText rText) {
- rText.getFindReplaceAction().execute(rText);
- }
- });
- toolBar.addSeparator();
- toolBar.addAction(new AddLinkAction(richText));
- toolBar.addAction(new AddImageAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new AddTableAction(richText));
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextGettersSetters.mtl
deleted file mode 100755
index 160a32db1..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextGettersSetters.mtl
+++ /dev/null
@@ -1,33 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module richtextGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('RichText'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getText();
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('RichText'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText(newValue);
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextSWTImpl.mtl
deleted file mode 100755
index 3386f2391..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/richtext/richtextSWTImpl.mtl
+++ /dev/null
@@ -1,152 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module richtextSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'RichText')]
-import org.eclipse.epf.richtext.IRichText;
-import org.eclipse.epf.richtext.IRichTextToolBar;
-import org.eclipse.epf.richtext.RichText;
-import org.eclipse.epf.richtext.RichTextToolBar;
-import org.eclipse.epf.richtext.actions.AddImageAction;
-import org.eclipse.epf.richtext.actions.AddLinkAction;
-import org.eclipse.epf.richtext.actions.AddOrderedListAction;
-import org.eclipse.epf.richtext.actions.AddTableAction;
-import org.eclipse.epf.richtext.actions.AddUnorderedListAction;
-import org.eclipse.epf.richtext.actions.BoldAction;
-import org.eclipse.epf.richtext.actions.ClearContentAction;
-import org.eclipse.epf.richtext.actions.CopyAction;
-import org.eclipse.epf.richtext.actions.CutAction;
-import org.eclipse.epf.richtext.actions.FindReplaceAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontNameAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontSizeAction;
-import org.eclipse.emf.eef.runtime.ui.widgets.richtext.actions.EEFFontStyleAction;
-import org.eclipse.epf.richtext.actions.IndentAction;
-import org.eclipse.epf.richtext.actions.ItalicAction;
-import org.eclipse.epf.richtext.actions.JustifyCenterAction;
-import org.eclipse.epf.richtext.actions.JustifyLeftAction;
-import org.eclipse.epf.richtext.actions.JustifyRightAction;
-import org.eclipse.epf.richtext.actions.OutdentAction;
-import org.eclipse.epf.richtext.actions.PasteAction;
-import org.eclipse.epf.richtext.actions.SubscriptAction;
-import org.eclipse.epf.richtext.actions.SuperscriptAction;
-import org.eclipse.epf.richtext.actions.TidyActionGroup;
-import org.eclipse.epf.richtext.actions.UnderlineAction;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'RichText')]
- protected RichText [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'RichText')]
-create[editor.name.toJavaClassifier()/]RichText(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'RichText')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]RichText(Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- Composite toolbarContainer = new Composite(parent, SWT.NONE);
- toolbarContainer.setLayout(new GridLayout(2, false));
- GridData toolbarData = new GridData(GridData.FILL_HORIZONTAL);
- toolbarData.horizontalSpan = 3;
- toolbarContainer.setLayoutData(toolbarData);
- RichTextToolBar toolBar = new RichTextToolBar(toolbarContainer, SWT.NONE, [editor.name.toJavaIdentifier()/]);
- [editor.name.toJavaIdentifier()/] = new RichText(parent, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL); //$NON-NLS-1$
- [editor.name.toJavaIdentifier()/].setEditable(true);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 200;
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
-
- [editor.name.toJavaIdentifier()/].addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- propertiesEditionComponent.delayedFirePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editorID(editor)/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- });
-
- fillToolBar(toolBar, [editor.name.toJavaIdentifier()/]);
- return parent;
- }
-
- /**
- * Populate actions in the Toolbar to link with the RichText
- *
- * @param toolBar The IRichTextToolBar
- * @param richText The IRichText
- */
- private void fillToolBar(IRichTextToolBar toolBar, IRichText richText) {
- [editor.fillToolBar()/]
- }
-[/template]
-
-[template public fillToolBar (editor : ElementEditor) ]
- toolBar.addAction(new EEFFontStyleAction(richText));
- toolBar.addAction(new EEFFontNameAction(richText));
- toolBar.addAction(new EEFFontSizeAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new CutAction(richText));
- toolBar.addAction(new CopyAction(richText));
- toolBar.addAction(new PasteAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new ClearContentAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new BoldAction(richText));
- toolBar.addAction(new ItalicAction(richText));
- toolBar.addAction(new UnderlineAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new SubscriptAction(richText));
- toolBar.addAction(new SuperscriptAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new TidyActionGroup(richText));
- toolBar.addSeparator();
- toolBar.addAction(new AddOrderedListAction(richText));
- toolBar.addAction(new AddUnorderedListAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new OutdentAction(richText));
- toolBar.addAction(new IndentAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new JustifyLeftAction(richText));
- toolBar.addAction(new JustifyCenterAction(richText));
- toolBar.addAction(new JustifyRightAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new FindReplaceAction(richText) {
- /**
- * @see org.eclipse.epf.richtext.actions.FindReplaceAction#execute(org.eclipse.epf.richtext.IRichText)
- */
- public void execute(IRichText rText) {
- rText.getFindReplaceAction().execute(rText);
- }
- });
- toolBar.addSeparator();
- toolBar.addAction(new AddLinkAction(richText));
- toolBar.addAction(new AddImageAction(richText));
- toolBar.addSeparator();
- toolBar.addAction(new AddTableAction(richText));
-
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogControl.mtl
deleted file mode 100755
index a8f121d76..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogControl.mtl
+++ /dev/null
@@ -1,63 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module selectionDialogControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog') and not editionElement.model.derived and not editionElement.canGeneratemodelNavigation())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((String)event.getNewValue());
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/])) {
- if (msg.getNewValue() != null) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.metamodelGetter()/].getEAttributeType(), msg.getNewValue()));
- } else {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]("");
- }
-}
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog') and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.metamodelGetter()/].getEAttributeType(), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-}
-[else]
- if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.metamodelGetter()/].getEAttributeType(), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
- }
-[/if]
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog') and not editionElement.model.derived and editionElement.canGeneratemodelNavigation())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue((String)event.getNewValue());
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.metamodelGetter()/].getEAttributeType(), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-}
-[else]
- if ([editionElement.name.toJavaIdentifier()/]Settings.getValue() != null && isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.metamodelGetter()/].getEAttributeType(), [editionElement.name.toJavaIdentifier()/]Settings.getValue()));
- }
-[/if]
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('SelectionDialog'))]
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogFormImpl.mtl
deleted file mode 100755
index b581df991..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogFormImpl.mtl
+++ /dev/null
@@ -1,94 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module selectionDialogFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'SelectionDialog')]
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.SelectionDialog;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('SelectionDialog'))]
-protected SelectionDialog [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('SelectionDialog'))]
-create[editor.name.toJavaClassifier()/]SelectionDialog(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('SelectionDialog'))]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]SelectionDialog(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = new SelectionDialog(parent, SWT.NONE, widgetFactory);
-
- GridData generatorData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData(generatorData);
-
- [editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- [editor.name.toJavaIdentifier()/]SelectionDialog();
- }
- });
-
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
- /**
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- });
- [editor.name.toJavaIdentifier()/].addKeyListener(new KeyAdapter() {
- /**
- * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
- });
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-
- protected void [editor.name.toJavaIdentifier()/]SelectionDialog() {
- //[protected ('browse button selection dialog')]
- if (PlatformUI.getWorkbench() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- Shell theShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- IFile['['/][']'/] file = WorkspaceResourceDialog.openFileSelection(theShell, "File Selection", "", false, null, null);
- if(file.length == 1) {
- [editor.name.toJavaIdentifier()/].setText(file['['/]0[']'/].getProject().getName() + "/" + file['['/]0[']'/].getProjectRelativePath().toString());
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
- //[/protected]
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogGettersSetters.mtl
deleted file mode 100755
index 4f92cf963..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogGettersSetters.mtl
+++ /dev/null
@@ -1,34 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module selectionDialogGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('SelectionDialog'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getText();
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('SelectionDialog'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText(newValue);
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogSWTImpl.mtl
deleted file mode 100755
index f2dc9efbf..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/selectionfile/selectionDialogSWTImpl.mtl
+++ /dev/null
@@ -1,93 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module selectionDialogSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'SelectionDialog')]
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.emf.eef.runtime.ui.widgets.SelectionDialog;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('SelectionDialog'))]
-protected SelectionDialog [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('SelectionDialog'))]
-create[editor.name.toJavaClassifier()/]SelectionDialog(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('SelectionDialog'))]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]SelectionDialog(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new SelectionDialog(parent, SWT.NONE);
-
- GridData generatorData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData(generatorData);
-
- [editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- [editor.name.toJavaIdentifier()/]SelectionDialog();
- }
- });
-
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
- /**
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- });
- [editor.name.toJavaIdentifier()/].addKeyListener(new KeyAdapter() {
- /**
- * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
- });
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-
- protected void [editor.name.toJavaIdentifier()/]SelectionDialog() {
- //[protected ('browse button selection dialog')]
- if (PlatformUI.getWorkbench() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
- Shell theShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- IFile['['/][']'/] file = WorkspaceResourceDialog.openFileSelection(theShell, "File Selection", "", false, null, null);
- if(file.length == 1) {
- [editor.name.toJavaIdentifier()/].setText(file['['/]0[']'/].getProject().getName() + "/" + file['['/]0[']'/].getProjectRelativePath().toString());
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
- //[/protected]
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerControl.mtl
deleted file mode 100755
index 129ae84a6..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerControl.mtl
+++ /dev/null
@@ -1,34 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module singlecompositionviewerControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Reference(1) - view = SingleCompositionViewer ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isContainmentSingle() and editionElement.representationName('SingleCompositionViewer'))]
-//FIXME: Sorry this widget is deprecated for this version.
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isContainmentSingle() and editionElement.representationName('SingleCompositionViewer'))]
-//FIXME: Sorry this widget is deprecated for this version.
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.representationName('SingleCompositionViewer'))]
-//FIXME: Sorry this widget is deprecated for this version.[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.representationName('SingleCompositionViewer'))]
-//FIXME: Sorry this widget is deprecated for this version.
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerFormImpl.mtl
deleted file mode 100755
index da474972b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerFormImpl.mtl
+++ /dev/null
@@ -1,89 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module singlecompositionviewerFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'SingleCompositionViewer')]
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.emf.eef.runtime.ui.widgets.SingleCompositionViewer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
-[for (pee : PropertiesEditionElement | view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name->includes('ReferencesTable')).involvedPropertiesEditionElement())]
-import [pee.model.eType.qualifiedName(basePackage)/];
-[/for]
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'SingleCompositionViewer')]
- protected SingleCompositionViewer<? extends EObject> [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'SingleCompositionViewer')]
-create[editor.name.toJavaClassifier()/]SingleCompositionViewer(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'SingleCompositionViewer')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]SingleCompositionViewer(FormToolkit widgetFactory, Composite parent) {
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/] = new SingleCompositionViewer<EObject>([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], parent, SWT.NONE, widgetFactory, [editor.owningViewsRepository().vrClass()/].FORM_KIND, propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- this.[editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [else]
- this.[editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewPackageGetter()/]()));
- }
- }
- });
-
- this.[editor.name.toJavaIdentifier()/].addCheckBoxSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if(![editor.name.toJavaIdentifier()/].getCheckBoxSelection()) {
- if (propertiesEditionComponent != null) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, null));
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
- });
- [/if]
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerGettersSetters.mtl
deleted file mode 100755
index 7f999c52a..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerGettersSetters.mtl
+++ /dev/null
@@ -1,126 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module singlecompositionviewerGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('SingleCompositionViewer'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.setterSignatureDocumentation()/]
-[elementEditor.setterSignature()/];
-
-[elementEditor.addControlListenerSignatureDocumentation()/]
-[elementEditor.addControlListenerSignature()/];
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('SingleCompositionViewer'))]
- public void init[elementEditor.viewPackageSignature()/](EObject current, EReference containingFeature, EReference feature, EditingDomain editingDomain)
-[/template]
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('SingleCompositionViewer'))]
- /**
- * Init the [elementEditor.name/]
- * @param current the current value
- * @param containingFeature the feature where to navigate if necessary
- * @param feature the feature to manage
- * @param editingDomain
- */
-[/template]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('SingleCompositionViewer'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getElement();
- }
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('SingleCompositionViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignatureImplementation()/]
-
-[addControlListenerSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addControlListenerSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('SingleCompositionViewer'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](current, containingFeature, feature, editingDomain);
- }
-
-[setterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.setterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.[elementEditor.viewPackageSetter()/](newValue);
- }
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('SingleCompositionViewer'))]
-[elementEditor.initSignature()/] {
- this.[elementEditor.name.toJavaIdentifier()/].setInput(current, feature, resourceSet);
- this.[elementEditor.name.toJavaIdentifier()/].init(editingDomain);
- if (current != null) {
- this.[elementEditor.name.toJavaIdentifier()/].setSelection(new StructuredSelection(current), feature);
- }
- [elementEditor.name.toJavaIdentifier()/].refresh();
-
- }
-[/template]
-
-[template public setterSignatureDocumentation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('SingleCompositionViewer'))]
-[elementEditor.setterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/].update(newValue);
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('SingleCompositionViewer'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](EObject current, EReference containingFeature, EReference feature, EditingDomain editingDomain)
- */
-[/template]
-
-
-
-
-[template public addControlListenerSignatureDocumentation(elementEditor : ElementEditor)]
- /**
- * Add a listener on [elementEditor.name/] widget control.
- * @param listener the Control Listener
- */
-[/template]
-
-[template public addControlListenerSignature(elementEditor : ElementEditor)]
- public void add[elementEditor.name.toJavaClassifier() /]ControlListener(ControlListener listener)
-[/template]
-
-[template public addControlListenerSignatureImplementation(elementEditor : ElementEditor)]
-[elementEditor.addControlListenerSignature() /] {
- [elementEditor.name.toJavaIdentifier()/].addControlListener(listener);
- }
-[/template]
-
-[template public addControlListenerSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String)]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](ControlListener listener)
- */
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerSWTImpl.mtl
deleted file mode 100755
index 1b3e71d90..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/singlecompositionviewer/singlecompositionviewerSWTImpl.mtl
+++ /dev/null
@@ -1,102 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module singlecompositionviewerSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'SingleCompositionViewer')]
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.emf.ecore.util.EcoreAdapterFactory;
-import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.emf.eef.runtime.ui.widgets.SingleCompositionViewer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-[for (pee : PropertiesEditionElement | view.eAllContents(views::ElementEditor).oclAsType(views::ElementEditor)->select(representation.name->includes('ReferencesTable')).involvedPropertiesEditionElement())]
-import [pee.model.eType.qualifiedName(basePackage)/];
-[/for]
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'SingleCompositionViewer')]
- protected SingleCompositionViewer<? extends EObject> [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'SingleCompositionViewer')]
-create[editor.name.toJavaClassifier()/]SingleCompositionViewer(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'SingleCompositionViewer')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]SingleCompositionViewer(Composite parent) {
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/] = new SingleCompositionViewer<EObject>([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], parent, SWT.NONE, null, [editor.owningViewsRepository().vrClass()/].SWT_KIND, propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- this.[editor.name.toJavaIdentifier()/].setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [else]
- this.[editor.name.toJavaIdentifier()/].addSelectionChangedListener(new ISelectionChangedListener() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
- public void selectionChanged(SelectionChangedEvent event) {
- if (propertiesEditionComponent != null) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.viewPackageGetter()/]()));
- [editor.name.toJavaIdentifier()/].update([editor.viewPackageGetter()/]());
- ScrolledComposite scrolledComposite = (ScrolledComposite)view.getParent().getParent();
- Composite c = (Composite) view.getParent();
- Rectangle clientArea = scrolledComposite.getClientArea();
-
- Point newSize = scrolledComposite.computeSize(FormUtil.getWidthHint(
- clientArea.width, c), FormUtil.getHeightHint(clientArea.height,
- c));
- scrolledComposite.setMinSize(newSize);
- }
- }
- });
-
- this.[editor.name.toJavaIdentifier()/].addCheckBoxSelectionListener(new SelectionListener() {
-
- public void widgetSelected(SelectionEvent e) {
- if(![editor.name.toJavaIdentifier()/].getCheckBoxSelection()) {
- if (propertiesEditionComponent != null) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, null));
- [editor.name.toJavaIdentifier()/].update(null);
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
-
- }
- });
- [/if]
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionControl.mtl
deleted file mode 100755
index 5b914e7f4..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionControl.mtl
+++ /dev/null
@@ -1,317 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module tablecompositionControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-[import filters /]
-
-[comment ===== Case : model = Containment(*) - view = TableComposition or AdvancedTableComposition===== /]
-[query public validCaseForSimpleReference(editionElement : PropertiesEditionElement) : Boolean =
- not editionElement.hasModelNavigation()
- and editionElement.model.isContainmentMany()
- and (editionElement.representationName('TableComposition') or editionElement.representationName('AdvancedTableComposition')) /]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForSimpleReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-protected ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForSimpleReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [else]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-} else if (event.getKind() == PropertiesEditionEvent.EDIT) {
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
- if (editionPolicy != null) {
- editionPolicy.execute();
- }
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForSimpleReference())]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForSimpleReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForSimpleReference())]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [if (editionElement.strictFilterType().oclIsUndefined())][editionElement.model.eType.name/][else][editionElement.strictFilterType().name/][/if]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Containment(*) in Simple Navigation - view = TableComposition or AdvancedTableComposition===== /]
-[query public validCaseForMultipleModelReference(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.hasModelNavigation()
- and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentSingle() and editionElement.model.isContainmentMany()
- and (editionElement.representationName('TableComposition') or editionElement.representationName('AdvancedTableComposition'))
- /]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForMultipleModelReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-protected ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForMultipleModelReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [else]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-} else if (event.getKind() == PropertiesEditionEvent.EDIT) {
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
- if (editionPolicy != null) {
- editionPolicy.execute();
- }
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForMultipleModelReference())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.isAffectingFeature((EStructuralFeature)msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForMultipleModelReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForMultipleModelReference())]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- [if (editionElement.model.lowerBound = 0)]if (element instanceof String)
- return element.equals(""); //$NON-NLS-1$
- [/if]
- if (element instanceof [editionElement.model.eType.name/])
- return true;
- return element instanceof Resource;
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[comment ===== Case : model = Containment(1) - view = TableComposition or AdvancedTableComposition===== /]
-[query public validCaseForSingleModelReference(editionElement : PropertiesEditionElement) : Boolean =
- editionElement.hasModelNavigation()
- and editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).feature.isContainmentMany() and editionElement.model.isContainmentSingle()
- and (editionElement.representationName('TableComposition') or editionElement.representationName('AdvancedTableComposition'))/]
-
-[template public additionalComponentField(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides additionalComponentField ? (editionElement.validCaseForSingleModelReference())]
-
-/**
- * Settings for [editionElement.name/] ReferencesTable
- */
-protected ReferencesTableSettings [editionElement.name.toJavaIdentifier()/]Settings;
-
-[/template]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForSingleModelReference())]
-if (event.getKind() == PropertiesEditionEvent.ADD) {
- [if (editionElement.model.eType.oclIsTypeOf(EClass))]
- [if (not editionElement.model.eType.oclAsType(EClass).abstract)]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [else]
- [if (editionElement.strictFilterType().oclIsUndefined())]
- EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, editingContext.getAdapterFactory());
- [else]
- EReferencePropertiesEditionContext context = new TypedEReferencePropertiesEditingContext(editingContext, this, [editionElement.name.toJavaIdentifier()/]Settings, [editionElement.strictFilterType().metamodelGetter()/], editingContext.getAdapterFactory());
- [/if]
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy policy = provider.getPolicy(context);
- if (policy instanceof CreateEditingPolicy) {
- policy.execute();
- }
- }
- [/if]
- [/if]
-} else if (event.getKind() == PropertiesEditionEvent.EDIT) {
- EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
- PropertiesEditingProvider provider = (PropertiesEditingProvider)editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
- if (provider != null) {
- PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
- if (editionPolicy != null) {
- editionPolicy.execute();
- }
- }
-} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.removeFromReference((EObject) event.getNewValue());
-} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
- [editionElement.name.toJavaIdentifier()/]Settings.move(event.getNewIndex(), ([editionElement.model.eType.name/]) event.getNewValue());
-}
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.validCaseForSingleModelReference())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.isAffectingFeature((EStructuralFeature)msg.getFeature()) && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].update[editionElement.views->first().viewPackageSignature()/]();
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.validCaseForSingleModelReference())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [editionElement.name.toJavaIdentifier()/]Settings = new ReferencesTableSettings([pec.model.name.toJavaIdentifier()/], [editionElement.navigation.oclAsType(navigation::SimpleModelNavigation).metamodelGetter()/], [editionElement.metamodelGetter()/]);
- [view.viewIdentifier(pec)/].init[editionElement.views->first().viewPackageSignature()/]([editionElement.name.toJavaIdentifier()/]Settings);
-}
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.validCaseForSingleModelReference())]
-[view.viewIdentifier(pec)/].addFilterTo[editionElement.views->first().viewPackageSignature()/](new ViewerFilter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return [if (editionElement.model.lowerBound = 0)](element instanceof String && element.equals("")) || [/if](element instanceof [if (editionElement.strictFilterType().oclIsUndefined())][editionElement.model.eType.name/][else][editionElement.strictFilterType().name/][/if]);[if (editionElement.model.lowerBound = 0)] //$NON-NLS-1$ [/if]
- }
-
-});
-[for (filter : BindingFilter | editionElement.bindingFilters)]
-[filter.filterBody(editionElement,view,pec)/]
-[/for]
-[if (not editionElement.element.eContainer(PropertiesEditionContext).oclAsType(PropertiesEditionContext).associatedGenModel().useJMergeForUserCode)]
-[additionalBusinessFilterProtectedArea(editionElement)/]
-[/if]
-[/template]
-
-[query public strictFilterType(editingElement : PropertiesEditionElement) : EClassifier =
- if (editingElement.bindingFilters->filter(StrictTypingFilter)->size() > 0)
- then editingElement.bindingFilters->filter(StrictTypingFilter)->first().type
- else null
- endif /]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionFormImpl.mtl
deleted file mode 100755
index 560110807..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionFormImpl.mtl
+++ /dev/null
@@ -1,325 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module tablecompositionFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[comment ===== Case Widget = TableComposition ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'TableComposition')]
-import java.util.Map;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.emf.eef.runtime.EEFRuntimePlugin;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'TableComposition')]
- protected TableViewer [editor.name.toJavaIdentifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'TableComposition')]
-create[editor.name.toJavaClassifier()/]TableComposition(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'TableComposition')]
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]TableComposition(FormToolkit widgetFactory, Composite container) {
- Composite tableContainer = widgetFactory.createComposite(container, SWT.NONE);
- GridLayout tableContainerLayout = new GridLayout();
- GridData tableContainerData = new GridData(GridData.FILL_BOTH);
- tableContainerData.horizontalSpan = 3;
- tableContainer.setLayoutData(tableContainerData);
- tableContainerLayout.numColumns = 2;
- tableContainer.setLayout(tableContainerLayout);
- org.eclipse.swt.widgets.Table table[editor.name.toJavaClassifier()/] = widgetFactory.createTable(tableContainer, SWT.FULL_SELECTION | SWT.BORDER);
- table[editor.name.toJavaClassifier()/].setHeaderVisible(true);
- [if (editor.readOnly)]
- table[editor.name.toJavaClassifier()/].setEnabled(false);
- table[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData gd[editor.name.toJavaClassifier()/] = new GridData();
- gd[editor.name.toJavaClassifier()/].grabExcessHorizontalSpace = true;
- gd[editor.name.toJavaClassifier()/].horizontalAlignment = GridData.FILL;
- gd[editor.name.toJavaClassifier()/].grabExcessVerticalSpace = true;
- gd[editor.name.toJavaClassifier()/].verticalAlignment = GridData.FILL;
- table[editor.name.toJavaClassifier()/].setLayoutData(gd[editor.name.toJavaClassifier()/]);
- table[editor.name.toJavaClassifier()/].setLinesVisible(true);
-
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultColumnInitialisation()/]
- [else]
- // [protected ('for columns definition for '.concat(editor.name.toJavaClassifier()))]
- [editor.defaultColumnInitialisation()/]
- // [/protected]
- [/if]
-
- [editor.name.toJavaIdentifier()/] = new TableViewer(table[editor.name.toJavaClassifier()/]);
- [editor.name.toJavaIdentifier()/].setContentProvider(new ArrayContentProvider());
- [editor.name.toJavaIdentifier()/].setLabelProvider(new ITableLabelProvider() {
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultLabelProviderInitialisation()/]
- [else]
- //[protected ('for label provider definition for '.concat(editor.name.toJavaClassifier()))]
- [editor.defaultLabelProviderInitialisation()/]
- //[/protected]
- [/if]
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- });
- [editor.name.toJavaIdentifier()/].getTable().addListener(SWT.MouseDoubleClick, new Listener(){
-
- public void handleEvent(Event event) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, selection.getFirstElement()));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.minimumHeight = 120;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 120;
- [editor.name.toJavaIdentifier()/].getTable().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- for (ViewerFilter filter : this.[editor.name.toJavaIdentifier()/]Filters) {
- [editor.name.toJavaIdentifier()/].addFilter(filter);
- }
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getTable(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getTable(), "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- create[editor.name.toJavaClassifier()/]Panel(widgetFactory, tableContainer);
- return container;
- }
-
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]Panel(FormToolkit widgetFactory, Composite container) {
- Composite [editor.name.toJavaIdentifier()/]Panel = widgetFactory.createComposite(container, SWT.NONE);
- GridLayout [editor.name.toJavaIdentifier()/]PanelLayout = new GridLayout();
- [editor.name.toJavaIdentifier()/]PanelLayout.numColumns = 1;
- [editor.name.toJavaIdentifier()/]Panel.setLayout([editor.name.toJavaIdentifier()/]PanelLayout);
- Button add[editor.name.toJavaClassifier()/] = widgetFactory.createButton([editor.name.toJavaIdentifier()/]Panel, [editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_AddTableViewerLabel, SWT.NONE);
- [if (editor.readOnly)]
- add[editor.name.toJavaClassifier()/].setEnabled(false);
- add[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData add[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- add[editor.name.toJavaClassifier()/].setLayoutData(add[editor.name.toJavaClassifier()/]Data);
- add[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- });
- EditingUtils.setID(add[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(add[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::addbutton"); //$NON-NLS-1$
- Button remove[editor.name.toJavaClassifier()/] = widgetFactory.createButton([editor.name.toJavaIdentifier()/]Panel, [editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_RemoveTableViewerLabel, SWT.NONE);
- [if (editor.readOnly)]
- remove[editor.name.toJavaClassifier()/].setEnabled(false);
- remove[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData remove[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- remove[editor.name.toJavaClassifier()/].setLayoutData(remove[editor.name.toJavaClassifier()/]Data);
- remove[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- EObject selectedElement = (EObject) selection.getFirstElement();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, selectedElement));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- EditingUtils.setID(remove[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(remove[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::removebutton"); //$NON-NLS-1$
- Button edit[editor.name.toJavaClassifier()/] = widgetFactory.createButton([editor.name.toJavaIdentifier()/]Panel, [editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_EditTableViewerLabel, SWT.NONE);
- [if (editor.readOnly)]
- edit[editor.name.toJavaClassifier()/].setEnabled(false);
- edit[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData edit[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- edit[editor.name.toJavaClassifier()/].setLayoutData(edit[editor.name.toJavaClassifier()/]Data);
- edit[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, selection.getFirstElement()));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- EditingUtils.setID(edit[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(edit[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::editbutton"); //$NON-NLS-1$
- return [editor.name.toJavaIdentifier()/]Panel;
- }
-[/template]
-
-[template private defaultLabelProviderInitialisation (editor : ElementEditor) ]
- public String getColumnText(Object object, int columnIndex) {
- AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(adapterFactory);
- if (object instanceof EObject) {
- switch (columnIndex) {
- case 0:
- return labelProvider.getText(object);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
-[/template]
-
-[template private defaultColumnInitialisation(editor : ElementEditor) ]
- TableColumn name = new TableColumn(table[editor.name.toJavaClassifier()/], SWT.NONE);
- name.setWidth(80);
- name.setText("Label"); //$NON-NLS-1$
-
-[/template]
-
-[comment ===== Case Widget = AdvancedTableComposition ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedTableComposition')]
-import java.util.Map;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedTableComposition')]
-protected ReferencesTable [editor.name.toJavaIdentifier()/];
-protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
-protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'TableComposition' or editor.representation.name = 'AdvancedTableComposition')]
-create[editor.name.toJavaClassifier()/]TableComposition(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedTableComposition')]
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]TableComposition(FormToolkit widgetFactory, Composite parent) {
- this.[editor.name.toJavaIdentifier()/] = new ReferencesTable([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], new ReferencesTableListener() {
- public void handleAdd() {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleEdit(EObject element) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleMove(EObject element, int oldIndex, int newIndex) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleRemove(EObject element) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void navigateTo(EObject element) { }
- });
- for (ViewerFilter filter : this.[editor.name.toJavaIdentifier()/]Filters) {
- this.[editor.name.toJavaIdentifier()/].addFilter(filter);
- }
- this.[editor.name.toJavaIdentifier()/].setHelpText(propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- this.[editor.name.toJavaIdentifier()/].createControls(parent, widgetFactory);
- this.[editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- if (e.item != null && e.item.getData() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
- }
- }
-
- });
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- this.[editor.name.toJavaIdentifier()/].setLowerBound([editor.involvedPropertiesEditionElement(pec).model.lowerBound/]);
- this.[editor.name.toJavaIdentifier()/].setUpperBound([editor.involvedPropertiesEditionElement(pec).model.upperBound/]);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- [editor.name.toJavaIdentifier()/].setEEFType("eef::[editor.representation.name/]"); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionGettersSetters.mtl
deleted file mode 100755
index a4a8ada3f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionGettersSetters.mtl
+++ /dev/null
@@ -1,143 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module tablecompositionGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-
-[comment ====== Widgets View getters for declaration ====== /]
-[template public getterDeclaration(elementEditor : ElementEditor) overrides getterDeclaration ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[/template]
-
-[template public getterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides getterImplementation ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[/template]
-
-[template public setterDeclaration(elementEditor : ElementEditor) overrides setterDeclaration ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[elementEditor.initSignatureDocumentation()/]
-[elementEditor.initSignature()/];
-
-[elementEditor.updateSignatureDocumentation()/]
-[elementEditor.updateSignature()/];
-
-[elementEditor.addFilterSignatureDocumentation()/]
-[elementEditor.addFilterSignature()/];
-
-[elementEditor.addBusinessFilterSignatureDocumentation()/]
-[elementEditor.addBusinessFilterSignature()/];
-
-[elementEditor.isContainedInTableSignatureDocumentation()/]
-[elementEditor.isContainedInTableSignature()/];
-[/template]
-
-[template public getterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides getterImplementationDelegate ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[/template]
-
-[template public initSignature(elementEditor : ElementEditor) overrides initSignature ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
- public void init[elementEditor.viewPackageSignature()/](ReferencesTableSettings settings)
-[/template]
-
-
-[template public initSignatureDocumentation(elementEditor : ElementEditor) overrides initSignatureDocumentation ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
- /**
- * Init the [elementEditor.name/]
- * @param current the current value
- * @param containgFeature the feature where to navigate if necessary
- * @param feature the feature to manage
- */
-[/template]
-
-[template public setterImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides setterImplementation ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignatureImplementation()/]
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignatureImplementation()/]
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignatureImplementation()/]
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignatureImplementation()/]
-
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignatureImplementation()/]
-[/template]
-
-[template public setterImplementationDelegate(elementEditor : ElementEditor, fullInterfacePath : String, referencedView : View) overrides setterImplementationDelegate ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[initSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.initSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.init[elementEditor.viewPackageSignature()/](settings);
- }
-
-[updateSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.updateSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.update[elementEditor.viewPackageSignature()/]();
- }
-
-[addFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[addBusinessFilterSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.addBusinessFilterSignature()/] {
- [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.addBusinessFilterTo[elementEditor.viewPackageSignature()/](filter);
- }
-
-[isContainedInTableSignatureDocumentationImplementation(elementEditor, fullInterfacePath)/]
-[elementEditor.isContainedInTableSignature()/] {
- return [referencedView.name.toJavaIdentifier()/]PropertiesEditionPart.isContainedIn[elementEditor.viewPackageSignature()/]Table(element);
- }
-[/template]
-
-[template public initSignatureDocumentationImplementation(elementEditor : ElementEditor, fullInterfacePath : String) overrides initSignatureDocumentationImplementation ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
- /**
- * {@inheritDoc}
- *
- * @see [fullInterfacePath/]#init[elementEditor.viewPackageSignature()/](EObject current, EReference containingFeature, EReference feature)
- */
-[/template]
-
-[template public initSignatureImplementation(elementEditor : ElementEditor) overrides initSignatureImplementation ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[elementEditor.initSignature()/] {
- if (current.eResource() != null && current.eResource().getResourceSet() != null)
- this.resourceSet = current.eResource().getResourceSet();
- ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider();
- [elementEditor.name.toJavaIdentifier()/].setContentProvider(contentProvider);
- [elementEditor.name.toJavaIdentifier()/].setInput(settings);
- }
-[/template]
-
-[template public addFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[elementEditor.addFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]Filters.add(filter);
- if (this.[elementEditor.name.toJavaIdentifier()/] != null) {
- this.[elementEditor.name.toJavaIdentifier()/].addFilter(filter);
- }
- }
-[/template]
-
-[template public addBusinessFilterSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[elementEditor.addBusinessFilterSignature()/] {
- [elementEditor.name.toJavaIdentifier()/]BusinessFilters.add(filter);
- }
-[/template]
-
-[template public isContainedInTableSignatureImplementation(elementEditor : ElementEditor) ? (elementEditor.representationName('TableComposition') or elementEditor.representationName('AdvancedTableComposition'))]
-[elementEditor.isContainedInTableSignature()/] {
- return ((ReferencesTableSettings)[elementEditor.name.toJavaIdentifier()/].getInput()).contains(element);
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionSWTImpl.mtl
deleted file mode 100755
index b3541239f..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/tablecomposition/tablecompositionSWTImpl.mtl
+++ /dev/null
@@ -1,327 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module tablecompositionSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[comment ===== Case Widget = TableComposition ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'TableComposition')]
-import java.util.Map;
-
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.TableColumn;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'TableComposition')]
- protected TableViewer [editor.name.toJavaIdentifier()/];
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
- protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'TableComposition')]
-create[editor.name.toJavaClassifier()/]TableComposition(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'TableComposition')]
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]TableComposition(Composite container) {
- Composite tableContainer = new Composite(container, SWT.NONE);
- GridLayout tableContainerLayout = new GridLayout();
- GridData tableContainerData = new GridData(GridData.FILL_BOTH);
- tableContainerData.horizontalSpan = 3;
- tableContainer.setLayoutData(tableContainerData);
- tableContainerLayout.numColumns = 2;
- tableContainer.setLayout(tableContainerLayout);
- org.eclipse.swt.widgets.Table table[editor.name.toJavaClassifier()/] = new org.eclipse.swt.widgets.Table(tableContainer, SWT.FULL_SELECTION);
- table[editor.name.toJavaClassifier()/].setHeaderVisible(true);
- [if (editor.readOnly)]
- table[editor.name.toJavaClassifier()/].setEnabled(false);
- table[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData gd[editor.name.toJavaClassifier()/] = new GridData();
- gd[editor.name.toJavaClassifier()/].grabExcessHorizontalSpace = true;
- gd[editor.name.toJavaClassifier()/].horizontalAlignment = GridData.FILL;
- gd[editor.name.toJavaClassifier()/].grabExcessVerticalSpace = true;
- gd[editor.name.toJavaClassifier()/].verticalAlignment = GridData.FILL;
- table[editor.name.toJavaClassifier()/].setLayoutData(gd[editor.name.toJavaClassifier()/]);
- table[editor.name.toJavaClassifier()/].setLinesVisible(true);
-
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultColumnInitialisation()/]
- [else]
- // [protected ('for columns definition for '.concat(editor.name.toJavaClassifier()))]
- [editor.defaultColumnInitialisation()/]
- // [/protected]
- [/if]
-
- [editor.name.toJavaIdentifier()/] = new TableViewer(table[editor.name.toJavaClassifier()/]);
- [editor.name.toJavaIdentifier()/].setContentProvider(new ArrayContentProvider());
- [editor.name.toJavaIdentifier()/].setLabelProvider(new ITableLabelProvider() {
- [if (editor.owningViewsRepository().associatedGenModel().useJMergeForUserCode)]
- [editor.defaultLabelProviderInitialisation()/]
- [else]
- //[protected ('for label provider definition for '.concat(editor.name.toJavaClassifier()))]
- [editor.defaultLabelProviderInitialisation()/]
- //[/protected]
- [/if]
-
- public void addListener(ILabelProviderListener listener) {
- }
-
- public void dispose() {
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- }
-
- });
- [editor.name.toJavaIdentifier()/].getTable().addListener(SWT.MouseDoubleClick, new Listener(){
-
- public void handleEvent(Event event) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, selection.getFirstElement()));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.minimumHeight = 120;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 120;
- [editor.name.toJavaIdentifier()/].getTable().setLayoutData([editor.name.toJavaIdentifier()/]Data);
- for (ViewerFilter filter : this.[editor.name.toJavaIdentifier()/]Filters) {
- [editor.name.toJavaIdentifier()/].addFilter(filter);
- }
- EditingUtils.setID([editor.name.toJavaIdentifier()/].getTable(), [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/].getTable(), "eef::[editor.representation.name/]::field"); //$NON-NLS-1$
- create[editor.name.toJavaClassifier()/]Panel(tableContainer);
- return container;
- }
-
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]Panel(Composite container) {
- Composite [editor.name.toJavaIdentifier()/]Panel = new Composite(container, SWT.NONE);
- GridLayout [editor.name.toJavaIdentifier()/]PanelLayout = new GridLayout();
- [editor.name.toJavaIdentifier()/]PanelLayout.numColumns = 1;
- [editor.name.toJavaIdentifier()/]Panel.setLayout([editor.name.toJavaIdentifier()/]PanelLayout);
- Button add[editor.name.toJavaClassifier()/] = new Button([editor.name.toJavaIdentifier()/]Panel, SWT.NONE);
- add[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_AddTableViewerLabel);
- [if (editor.readOnly)]
- add[editor.name.toJavaClassifier()/].setEnabled(false);
- add[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData add[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- add[editor.name.toJavaClassifier()/].setLayoutData(add[editor.name.toJavaClassifier()/]Data);
- add[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- });
- EditingUtils.setID(add[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(add[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::addbutton"); //$NON-NLS-1$
- Button remove[editor.name.toJavaClassifier()/] = new Button([editor.name.toJavaIdentifier()/]Panel, SWT.NONE);
- remove[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_RemoveTableViewerLabel);
- [if (editor.readOnly)]
- remove[editor.name.toJavaClassifier()/].setEnabled(false);
- remove[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData remove[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- remove[editor.name.toJavaClassifier()/].setLayoutData(remove[editor.name.toJavaClassifier()/]Data);
- remove[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- EObject selectedElement = (EObject) selection.getFirstElement();
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.REMOVE, null, selectedElement));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- EditingUtils.setID(remove[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(remove[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::removebutton"); //$NON-NLS-1$
- Button edit[editor.name.toJavaClassifier()/] = new Button([editor.name.toJavaIdentifier()/]Panel, SWT.NONE);
- edit[editor.name.toJavaClassifier()/].setText([editor.owningViewsRepository().messagesProvider()/].PropertiesEditionPart_EditTableViewerLabel);
- [if (editor.readOnly)]
- edit[editor.name.toJavaClassifier()/].setEnabled(false);
- edit[editor.name.toJavaClassifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData edit[editor.name.toJavaClassifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- edit[editor.name.toJavaClassifier()/].setLayoutData(edit[editor.name.toJavaClassifier()/]Data);
- edit[editor.name.toJavaClassifier()/].addSelectionListener(new SelectionAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void widgetSelected(SelectionEvent e) {
- if ([editor.name.toJavaIdentifier()/].getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) [editor.name.toJavaIdentifier()/].getSelection();
- if (selection.getFirstElement() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, selection.getFirstElement()));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- }
- }
-
- });
- EditingUtils.setID(edit[editor.name.toJavaClassifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype(edit[editor.name.toJavaClassifier()/], "eef::[editor.representation.name/]::editbutton"); //$NON-NLS-1$
- return [editor.name.toJavaIdentifier()/]Panel;
- }
-[/template]
-
-[template private defaultLabelProviderInitialisation(editor : ElementEditor) ]
- public String getColumnText(Object object, int columnIndex) {
- AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(adapterFactory);
- if (object instanceof EObject) {
- switch (columnIndex) {
- case 0:
- return labelProvider.getText(object);
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
-[/template]
-
-[template private defaultColumnInitialisation (editor : ElementEditor) ]
- TableColumn name = new TableColumn(table[editor.name.toJavaClassifier()/], SWT.NONE);
- name.setWidth(80);
- name.setText("Label"); //$NON-NLS-1$
-[/template]
-
-[comment ===== Case Widget = AdvancedTableComposition ===== /]
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'AdvancedTableComposition')]
-import java.util.Map;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable;
-import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
-import org.eclipse.jface.viewers.ViewerFilter;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'AdvancedTableComposition')]
-protected ReferencesTable [editor.name.toJavaIdentifier()/];
-protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]BusinessFilters = new ArrayList<ViewerFilter>();
-protected List<ViewerFilter> [editor.name.toJavaIdentifier()/]Filters = new ArrayList<ViewerFilter>();
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'AdvancedTableComposition')]
-create[editor.name.toJavaClassifier()/]AdvancedTableComposition(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'AdvancedTableComposition')]
- /**
- * @param container
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- protected Composite create[editor.name.toJavaClassifier()/]AdvancedTableComposition(Composite parent) {
- this.[editor.name.toJavaIdentifier()/] = new ReferencesTable([editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], new ReferencesTableListener() {
- public void handleAdd() {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleEdit(EObject element) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleMove(EObject element, int oldIndex, int newIndex) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void handleRemove(EObject element) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
- [editor.name.toJavaIdentifier()/].refresh();
- }
- public void navigateTo(EObject element) { }
- });
- for (ViewerFilter filter : this.[editor.name.toJavaIdentifier()/]Filters) {
- this.[editor.name.toJavaIdentifier()/].addFilter(filter);
- }
- this.[editor.name.toJavaIdentifier()/].setHelpText(propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- this.[editor.name.toJavaIdentifier()/].createControls(parent);
- this.[editor.name.toJavaIdentifier()/].addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- if (e.item != null && e.item.getData() instanceof EObject) {
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
- }
- }
-
- });
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 3;
- this.[editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- this.[editor.name.toJavaIdentifier()/].setLowerBound([editor.involvedPropertiesEditionElement(pec).model.lowerBound/]);
- this.[editor.name.toJavaIdentifier()/].setUpperBound([editor.involvedPropertiesEditionElement(pec).model.upperBound/]);
- [editor.name.toJavaIdentifier()/].setID([editor.editorID()/]);
- [editor.name.toJavaIdentifier()/].setEEFType("eef::[editor.representation.name/]"); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textControl.mtl
deleted file mode 100755
index 4047ad673..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textControl.mtl
+++ /dev/null
@@ -1,72 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = Text ===== /]
-[query public validCaseForDirectAttribute(editionElement : PropertiesEditionElement) : Boolean = editionElement.model.isAttributeSingle() and editionElement.representationName('Text') /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.validCaseForDirectAttribute() and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Text'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/])) {
- if (msg.getNewValue() != null) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), msg.getNewValue()));
- } else {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]("");
- }
-}
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Text') and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-}
-[else]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-[/if]
-[/template]
-
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Text'))]
-[comment no filters for text /]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = Text - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Text') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue(([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Text') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-if (isAccessible([editionElement.views->first().editorID()/])) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [editionElement.name.toJavaIdentifier()/]Settings.getValue()));
-}
-[else]
-if ([editionElement.name.toJavaIdentifier()/]Settings.getValue() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EEFConverterUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [editionElement.name.toJavaIdentifier()/]Settings.getValue()));
-[/if]
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textFormImpl.mtl
deleted file mode 100755
index 821cb4589..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textFormImpl.mtl
+++ /dev/null
@@ -1,74 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('Text'))]
-protected Text [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('Text'))]
- create[editor.name.toJavaClassifier()/]Text(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('Text'))]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Text(FormToolkit widgetFactory, Composite parent) {
- FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- [editor.name.toJavaIdentifier()/] = widgetFactory.createText(parent, ""); //$NON-NLS-1$
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- [editor.name.toJavaIdentifier()/].setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
- widgetFactory.paintBordersFor(parent);
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
- /**
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- });
- [editor.name.toJavaIdentifier()/].addKeyListener(new KeyAdapter() {
- /**
- * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
- });
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textGettersSetters.mtl
deleted file mode 100755
index 86add3a6b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textGettersSetters.mtl
+++ /dev/null
@@ -1,34 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters/]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('Text'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getText();
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('Text'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText(newValue);
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textSWTImpl.mtl
deleted file mode 100755
index 5b96a1f22..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/text/textSWTImpl.mtl
+++ /dev/null
@@ -1,86 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'Text')]
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-[/template]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representationName('Text'))]
- protected Text [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representationName('Text'))]
-create[editor.name.toJavaClassifier()/]Text(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representationName('Text'))]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Text(Composite parent) {
- SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- [editor.name.toJavaIdentifier()/] = new Text(parent, SWT.BORDER);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
-
- });
- [editor.name.toJavaIdentifier()/].addKeyListener(new KeyAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- @Override
- @SuppressWarnings("synthetic-access")
- public void keyPressed(KeyEvent e) {
- if (e.character == SWT.CR) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
- }
-
- });
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaControl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaControl.mtl
deleted file mode 100755
index 41bfcbb7b..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaControl.mtl
+++ /dev/null
@@ -1,58 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2010 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textareaControl('http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/2002/GenModel', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/mapping/1.0.0') extends widgetControl/]
-
-[import naming /]
-[import common /]
-[import typeUtils /]
-
-[comment ===== Case : model = Attribute(1) - view = Textarea ===== /]
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea') and not editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/](([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public liveUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides liveUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea'))]
-if ([editionElement.metamodelGetter()/].equals(msg.getFeature()) && [view.viewIdentifier(pec)/] != null && isAccessible([editionElement.views->first().editorID()/])){
- if (msg.getNewValue() != null) {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), msg.getNewValue()));
- } else {
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/]("");
- }
-}
-[/template]
-
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea') and not editionElement.canGeneratemodelNavigation())]
-if ([pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [pec.model.name.toJavaIdentifier()/].get[editionElement.model.name.toUpperFirst()/]()));
-[/template]
-
-[template public filterUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides filterUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea'))]
-[comment no filters for textarea /]
-[/template]
-
-[comment ===== Case : model = Attribute(1) - view = Textarea - ModelNavigation ===== /]
-
-[template public declareEObjectUpdater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides declareEObjectUpdater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea') and editionElement.canGeneratemodelNavigation())]
-[if (editionElement.model.isPrimitiveType())]
-[pec.model.name.toJavaIdentifier().disambiguation('event')/].set[editionElement.model.name.toUpperFirst()/]((EEFConverterUtil.create[editionElement.model.eType.instanceClassName.toUpperFirst()/]FromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue())));[else]
-[editionElement.name.toJavaIdentifier()/]Settings.setValue(([editionElement.model.eType.instanceClassName/])EEFConverterUtil.createFromString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), (String)event.getNewValue()));[/if]
-[/template]
-
-[template public updater(editionElement : PropertiesEditionElement, view : View, pec : PropertiesEditionComponent) overrides updater ? (editionElement.model.isAttributeSingle() and editionElement.representationName('Textarea') and editionElement.canGeneratemodelNavigation())]
-if ([editionElement.name.toJavaIdentifier()/]Settings.getValue() != null && isAccessible([editionElement.views->first().editorID()/]))
- [view.viewIdentifier(pec)/].[editionElement.views->first().viewPackageSetter()/](EcoreUtil.convertToString([editionElement.model.eType.metamodelPackage()/].eINSTANCE.get[editionElement.model.eType.name/](), [editionElement.name.toJavaIdentifier()/]Settings.getValue()));
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaFormImpl.mtl
deleted file mode 100755
index 9ed8471c9..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaFormImpl.mtl
+++ /dev/null
@@ -1,66 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textareaFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Textarea')]
-protected Text [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Textarea')]
-create[editor.name.toJavaClassifier()/]Textarea(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Textarea')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Textarea(FormToolkit widgetFactory, Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- [editor.name.toJavaIdentifier()/] = widgetFactory.createText(parent, "", SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL); //$NON-NLS-1$
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 80;
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
-
- });
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaGettersSetters.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaGettersSetters.mtl
deleted file mode 100755
index 6823ec3eb..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaGettersSetters.mtl
+++ /dev/null
@@ -1,33 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textareaGettersSetters('http://www.eclipse.org/emf/eef/views/1.0.0') extends widgetGettersSetters /]
-
-[import common/]
-[import naming/]
-[import widgetGettersSetters /]
-
-[template public getterSignatureImplementation(elementEditor : ElementEditor) overrides getterSignatureImplementation ? (elementEditor.representationName('Textarea'))]
-[elementEditor.getterSignature()/] {
- return [elementEditor.name.toJavaIdentifier()/].getText();
- }
-[/template]
-
-[template public setterSignatureImplementation(elementEditor : ElementEditor) overrides setterSignatureImplementation ? (elementEditor.representationName('Textarea'))]
-[elementEditor.setterSignature()/] {
- if (newValue != null) {
- [elementEditor.name.toJavaIdentifier()/].setText(newValue);
- } else {
- [elementEditor.name.toJavaIdentifier()/].setText(""); //$NON-NLS-1$
- }
- }
-[/template]
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaSWTImpl.mtl
deleted file mode 100755
index 1b18d9f6c..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/textarea/textareaSWTImpl.mtl
+++ /dev/null
@@ -1,66 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module textareaSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore', 'http://www.eclipse.org/emf/eef/generation/1.0.0') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public widgetDeclaration(editor : ElementEditor) overrides widgetDeclaration ? (editor.representation.name = 'Textarea')]
- protected Text [editor.name.toJavaIdentifier()/];
-[/template]
-
-[template public implementation(editor : ElementEditor) overrides implementation ? (editor.representation.name = 'Textarea')]
-create[editor.name.toJavaClassifier()/]Textarea(parent);
-[/template]
-
-[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Textarea')]
- [editor.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[editor.name.toJavaClassifier()/]Textarea(Composite parent) {
- Label [editor.name.toJavaIdentifier()/]Label = SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND));
- GridData [editor.name.toJavaIdentifier()/]LabelData = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]LabelData.horizontalSpan = 3;
- [editor.name.toJavaIdentifier()/]Label.setLayoutData([editor.name.toJavaIdentifier()/]LabelData);
- [editor.name.toJavaIdentifier()/] = new Text(parent, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL);
- [if (editor.readOnly)]
- [editor.name.toJavaIdentifier()/].setEnabled(false);
- [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly);
- [/if]
- GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL);
- [editor.name.toJavaIdentifier()/]Data.horizontalSpan = 2;
- [editor.name.toJavaIdentifier()/]Data.heightHint = 80;
- [editor.name.toJavaIdentifier()/]Data.widthHint = 200;
- [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data);
- [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() {
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
- * [editor.owningViewsRepository().associatedGenModel().generationMark()/]
- */
- public void focusLost(FocusEvent e) {
- if (propertiesEditionComponent != null)
- propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText()));
- }
-
- });
- EditingUtils.setID([editor.name.toJavaIdentifier()/], [editor.editorID()/]);
- EditingUtils.setEEFtype([editor.name.toJavaIdentifier()/], "eef::[editor.representation.name/]"); //$NON-NLS-1$
- SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$
- return parent;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxFormImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxFormImpl.mtl
deleted file mode 100755
index 436980dc3..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxFormImpl.mtl
+++ /dev/null
@@ -1,40 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module vboxFormImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetFormImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific form services for the moment /]
-[import widgetFormImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'VerticalBox')]
-import org.eclipse.emf.eef.runtime.ui.widgets.VerticalBox;
-[/template]
-
-[template public implementation(container : Container) overrides implementation ? (container.representation.name = 'VerticalBox')]
-create[container.name.toJavaClassifier()/]VBox(widgetFactory, parent);
-[/template]
-
-[template public additionalImplementation(container : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (container.representation.name = 'VerticalBox')]
- [container.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[container.name.toJavaClassifier()/]VBox(FormToolkit widgetFactory, Composite parent) {
- Composite container = widgetFactory.createComposite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- VerticalBox [container.name.toJavaIdentifier()/]VBox = new VerticalBox(container);
- return [container.name.toJavaIdentifier()/]VBox;
- }
-[/template]
-
diff --git a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxSWTImpl.mtl b/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxSWTImpl.mtl
deleted file mode 100755
index 91a6954e0..000000000
--- a/plugins/org.eclipse.emf.eef.codegen/.emtl/org/eclipse/emf/eef/codegen/widgets/impl/vbox/vboxSWTImpl.mtl
+++ /dev/null
@@ -1,39 +0,0 @@
-[comment
- *******************************************************************************
- * Copyright (c) 2008-2009 Obeo.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Obeo - initial API and implementation
- *******************************************************************************
- /]
-[module vboxSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends widgetSWTImpl/]
-
-[import common /]
-[import naming /]
-[import viewCommon /]
-[comment I don't see a better way to get specific swt services for the moment /]
-[import widgetSWTImpl /]
-
-[template public manageImports(widget : Widget, pec : PropertiesEditionComponent, view : View, basePackage : String) overrides manageImports ? (widget.name = 'VerticalBox')]
-import org.eclipse.emf.eef.runtime.ui.widgets.VerticalBox;
-[/template]
-
-[template public implementation(container : Container) overrides implementation ? (container.representation.name = 'VerticalBox')]
-create[container.name.toJavaClassifier()/]VBox(parent);
-[/template]
-
-[template public additionalImplementation(container : Container, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (container.representation.name = 'VerticalBox')]
- [container.owningViewsRepository().associatedGenModel().generationComment()/]
- protected Composite create[container.name.toJavaClassifier()/]VBox(Composite parent) {
- Composite container = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- VerticalBox [container.name.toJavaIdentifier()/]VBox = new VerticalBox(container);
- return [container.name.toJavaIdentifier()/]VBox;
- }
-[/template]
-

Back to the top