Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaadia Dhouib2014-02-04 05:19:50 -0500
committerSaadia Dhouib2014-02-04 05:19:50 -0500
commit2517e976f59d716abeb5f73df1ed0995ecc11eb6 (patch)
treefdc23a35f76286ffd542da6e503832b4f4585571 /extraplugins
parent6010ec0d49ac5157db40418daa1a524b98829bbc (diff)
parentfe77295c9b5615f45ee98d8e62c5425b1cc8a3c5 (diff)
downloadorg.eclipse.papyrus-2517e976f59d716abeb5f73df1ed0995ecc11eb6.tar.gz
org.eclipse.papyrus-2517e976f59d716abeb5f73df1ed0995ecc11eb6.tar.xz
org.eclipse.papyrus-2517e976f59d716abeb5f73df1ed0995ecc11eb6.zip
Merge branch 'streams/0.10-maintenance' of ssh://git.eclipse.org/gitroot/papyrus/org.eclipse.papyrus into streams/0.10-maintenance
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppClassHeader.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppAttribute.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppDocumentation.emtl220
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppEnumerations.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppPrimitiveTypes.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl450
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl5
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl796
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppParameter.emtl184
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/AssociationPreferencePage.java4
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/ClassPreferencePage.java10
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/DataTypePreferencePage.java10
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/EnumerationPreferencePage.java10
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/GeneralizationPreferencePage.java4
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/InstanceSpecificationPreferencePage.java10
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PackagePreferencePage.java10
-rw-r--r--extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PrimitiveTypePreferencePage.java10
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo2
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo2
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java6
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java8
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java8
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java21
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java84
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF2
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java21
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF4
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/importTablePapyrusWizban.pngbin0 -> 6414 bytes
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/import_wiz_16x16-papyrusColor.gifbin0 -> 541 bytes
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/warning.gifbin0 -> 331 bytes
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/plugin.xml38
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java24
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java13
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java63
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java21
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java97
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExcelExporter.java67
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExportBindings.java36
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/papyrusExcelExportHeader.txt53
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java4
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java47
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java51
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java367
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java62
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java70
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteInTableManager.java136
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java5
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java2
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java18
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java14
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java36
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java93
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties47
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVLexer.java281
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVParser.java219
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CellIterator.java32
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RewindableTextStream.java145
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RowIterator.java32
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/PasteSeparator.java101
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/TextDelimiter.java74
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/PapyrusTablePreferenceStore.java68
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/TablePreferencesConstantsHelper.java87
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java840
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java2
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java123
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CSVPasteHelper.java97
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CellHelper.java21
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtils.java50
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteEnablementStatus.java98
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelper.java154
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteModeEnumeration.java9
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java23
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java142
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportCSVConfigurationPage.java218
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java184
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportInvertedTableErrorPage.java66
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportTableErrorPage.java67
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.classpath7
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.project28
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/META-INF/MANIFEST.MF29
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/OSGI-INF/l10n/bundle.properties3
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/about.html28
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/build.properties8
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.pdoc4
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/Activator.java53
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractNatTableXTextCellEditor.java189
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/util/XTextEditorResultWrapper.java73
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java17
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierCellEditorWrapper.java426
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierDialogCellEditorWrapper.java104
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java8
-rw-r--r--extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java27
115 files changed, 6830 insertions, 688 deletions
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF
index 267653224a6..9be9ae5a80d 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.core/META-INF/MANIFEST.MF
@@ -40,7 +40,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.gmf.runtime.notation;bundle-version="[1.5.0,2.0.0)",
org.eclipse.equinox.security;bundle-version="[1.1.100,2.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
- com.google.guava;bundle-version="[11.0.2,12.0.0)"
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Bundle-Version: 0.10.1.qualifier
Bundle-ManifestVersion: 2
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF
index 03c5584f178..ab01135a133 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.edit.ui;bundle-version="2.8.0",
org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
org.eclipse.papyrus.cdo.ui;bundle-version="0.10.1",
- com.google.guava;bundle-version="[11.0.2,12.0.0)"
+ com.google.guava;bundle-version="11.0.0"
Export-Package: org.eclipse.papyrus.cdo.internal.ui.customization.properties;x-internal:=true,
org.eclipse.papyrus.cdo.internal.ui.customization.properties.messages;x-internal:=true,
org.eclipse.papyrus.cdo.internal.ui.customization.properties.storage;x-internal:=true,
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
index b6340fc3d61..8f55bf827d4 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.ui/META-INF/MANIFEST.MF
@@ -18,7 +18,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.cdo.validation.problems.edit;bundle-version="0.10.1",
org.eclipse.papyrus.editor;bundle-version="0.10.1",
org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="0.10.1",
- com.google.guava;bundle-version="[11.0.0,12.0.0)"
+ com.google.guava;bundle-version="11.0.0"
Export-Package: org.eclipse.papyrus.cdo.internal.ui;x-friends:="org.eclipse.papyrus.cdo.ui.tests,org.eclipse.papyrus.cdo.uml.ui",
org.eclipse.papyrus.cdo.internal.ui.actions;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
org.eclipse.papyrus.cdo.internal.ui.adapters;x-friends:="org.eclipse.papyrus.cdo.ui.tests",
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
index c4a6841ff9d..4171ebdf10d 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.cdo.core;bundle-version="0.10.1",
org.eclipse.papyrus.cdo.ui;bundle-version="0.10.1",
org.eclipse.papyrus.uml.diagram.wizards;bundle-version="0.10.1",
- com.google.guava;bundle-version="[11.0.2,12.0.0)"
+ com.google.guava;bundle-version="11.0.0"
Export-Package: org.eclipse.papyrus.cdo.uml.diagram.internal.ui;x-internal:=true,
org.eclipse.papyrus.cdo.uml.diagram.internal.ui.handlers;x-internal:=true,
org.eclipse.papyrus.cdo.uml.diagram.internal.ui.l10n;x-internal:=true,
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF
index 305ceee0f62..3e4e9d2de5e 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
org.eclipse.papyrus.cdo.ui;bundle-version="0.10.1",
org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
- com.google.guava;bundle-version="[11.0.2,12.0.0)"
+ com.google.guava;bundle-version="11.0.0"
Export-Package: org.eclipse.papyrus.cdo.uml.internal.ui;x-friends:="org.eclipse.papyrus.cdo.uml.ui.tests",
org.eclipse.papyrus.cdo.uml.internal.ui.importsources;x-friends:="org.eclipse.papyrus.cdo.uml.ui.tests",
org.eclipse.papyrus.cdo.uml.internal.ui.l10n;x-internal:=true
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppClassHeader.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppClassHeader.emtl
index 0615ac849e5..db5e223a90d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppClassHeader.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppClassHeader.emtl
@@ -796,6 +796,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//TemplateParameterSubstitution"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.emtl
index 0736992a685..05240c95a1c 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/CppPackageHeader.emtl
@@ -351,6 +351,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppAttribute.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppAttribute.emtl
index 2c6773ca159..91c98e9e3c8 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppAttribute.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppAttribute.emtl
@@ -594,6 +594,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//PrimitiveType"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppDocumentation.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppDocumentation.emtl
index d0a7dfdce63..ddb3f0d771b 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppDocumentation.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppDocumentation.emtl
@@ -66,11 +66,49 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</parameter>
</ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Template" name="CppBehaviorDoc" visibility="Public">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="/**&#xA; * "/>
+ <body xsi:type="ocl.ecore:OperationCallExp" referredOperation="/1/String_Class/replaceAll">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="mtl:QueryInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/getComments"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/22">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </source>
+ <argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; * ">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; * "/>
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:TemplateInvocation" definition="/0/CppParamDoc">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/25">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </argument>
+ </body>
+ <iterSet xsi:type="ocl.ecore:PropertyCallExp" eType="/12/OrderedSet(Parameter)">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/23">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior/ownedParameter"/>
+ </iterSet>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA; */"/>
+ <parameter name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </parameter>
+ </ownedModuleElement>
<ownedModuleElement xsi:type="mtl:Template" name="CppParamDoc" visibility="Public">
<body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="@param "/>
<body xsi:type="ocl.ecore:PropertyCallExp">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/22">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/32">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
</source>
<referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
@@ -81,7 +119,7 @@
<source xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/getComments"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/23">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/33">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
</argument>
</source>
@@ -147,6 +185,16 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorDoc">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/CppBehaviorDoc"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppParamDoc">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -200,6 +248,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
@@ -285,6 +338,36 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
</ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
@@ -423,60 +506,135 @@
<details key="end" value="295"/>
<details key="line" value="12"/>
</eAnnotations>
- <eAnnotations source="positions.24" references="/0/CppParamDoc">
+ <eAnnotations source="positions.24" references="/0/CppBehaviorDoc">
<details key="start" value="414"/>
- <details key="end" value="539"/>
+ <details key="end" value="581"/>
<details key="line" value="20"/>
</eAnnotations>
- <eAnnotations source="positions.25" references="/0/CppParamDoc/%">
- <details key="start" value="467"/>
- <details key="end" value="474"/>
+ <eAnnotations source="positions.25" references="/0/CppBehaviorDoc/%">
+ <details key="start" value="468"/>
+ <details key="end" value="475"/>
<details key="line" value="21"/>
</eAnnotations>
- <eAnnotations source="positions.26" references="/0/CppParamDoc/%.1">
- <details key="start" value="475"/>
- <details key="end" value="479"/>
+ <eAnnotations source="positions.26" references="/0/CppBehaviorDoc/%.1">
+ <details key="start" value="476"/>
+ <details key="end" value="515"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.27" references="/0/CppBehaviorDoc/%.1/%">
+ <details key="start" value="476"/>
+ <details key="end" value="489"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.27" references="/0/CppParamDoc/%.1/self">
+ <eAnnotations source="positions.28" references="/0/CppBehaviorDoc/%.1/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.28" references="/0/CppParamDoc/%.2">
- <details key="start" value="481"/>
- <details key="end" value="482"/>
- <details key="line" value="21"/>
+ <eAnnotations source="positions.29" references="/0/CppBehaviorDoc/%.1/%.1">
+ <details key="start" value="501"/>
+ <details key="end" value="505"/>
+ <details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.29" references="/0/CppParamDoc/%.3">
- <details key="start" value="483"/>
- <details key="end" value="525"/>
+ <eAnnotations source="positions.30" references="/0/CppBehaviorDoc/%.1/%.2">
+ <details key="start" value="507"/>
+ <details key="end" value="514"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.30" references="/0/CppParamDoc/%.3/%">
- <details key="start" value="483"/>
- <details key="end" value="496"/>
+ <eAnnotations source="positions.31" references="/0/CppBehaviorDoc/%.2">
+ <details key="start" value="517"/>
+ <details key="end" value="521"/>
+ <details key="line" value="23"/>
+ </eAnnotations>
+ <eAnnotations source="positions.32" references="/0/CppBehaviorDoc/%.3">
+ <details key="start" value="521"/>
+ <details key="end" value="565"/>
+ <details key="line" value="23"/>
+ </eAnnotations>
+ <eAnnotations source="positions.33" references="/0/CppBehaviorDoc/%.3/%">
+ <details key="start" value="544"/>
+ <details key="end" value="557"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.31" references="/0/CppParamDoc/%.3/%/self">
+ <eAnnotations source="positions.34" references="/0/CppBehaviorDoc/%.3/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.32" references="/0/CppParamDoc/%.3/%.1">
- <details key="start" value="508"/>
- <details key="end" value="512"/>
+ <eAnnotations source="positions.35" references="/0/CppBehaviorDoc/%.3/%.1">
+ <details key="start" value="527"/>
+ <details key="end" value="541"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.33" references="/0/CppParamDoc/%.3/%.2">
- <details key="start" value="514"/>
- <details key="end" value="524"/>
+ <eAnnotations source="positions.36" references="/0/CppBehaviorDoc/%.3/%.1/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.34" references="/0/CppParamDoc/parameter">
- <details key="start" value="443"/>
- <details key="end" value="464"/>
+ <eAnnotations source="positions.37" references="/0/CppBehaviorDoc/%.4">
+ <details key="start" value="565"/>
+ <details key="end" value="569"/>
+ <details key="line" value="24"/>
+ </eAnnotations>
+ <eAnnotations source="positions.38" references="/0/CppBehaviorDoc/behavior">
+ <details key="start" value="446"/>
+ <details key="end" value="465"/>
<details key="line" value="20"/>
</eAnnotations>
+ <eAnnotations source="positions.39" references="/0/CppParamDoc">
+ <details key="start" value="584"/>
+ <details key="end" value="709"/>
+ <details key="line" value="28"/>
+ </eAnnotations>
+ <eAnnotations source="positions.40" references="/0/CppParamDoc/%">
+ <details key="start" value="637"/>
+ <details key="end" value="644"/>
+ <details key="line" value="29"/>
+ </eAnnotations>
+ <eAnnotations source="positions.41" references="/0/CppParamDoc/%.1">
+ <details key="start" value="645"/>
+ <details key="end" value="649"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.42" references="/0/CppParamDoc/%.1/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.43" references="/0/CppParamDoc/%.2">
+ <details key="start" value="651"/>
+ <details key="end" value="652"/>
+ <details key="line" value="29"/>
+ </eAnnotations>
+ <eAnnotations source="positions.44" references="/0/CppParamDoc/%.3">
+ <details key="start" value="653"/>
+ <details key="end" value="695"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.45" references="/0/CppParamDoc/%.3/%">
+ <details key="start" value="653"/>
+ <details key="end" value="666"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.46" references="/0/CppParamDoc/%.3/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.47" references="/0/CppParamDoc/%.3/%.1">
+ <details key="start" value="678"/>
+ <details key="end" value="682"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.48" references="/0/CppParamDoc/%.3/%.2">
+ <details key="start" value="684"/>
+ <details key="end" value="694"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.49" references="/0/CppParamDoc/parameter">
+ <details key="start" value="613"/>
+ <details key="end" value="634"/>
+ <details key="line" value="28"/>
+ </eAnnotations>
</ecore:EAnnotation>
</xmi:XMI>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppEnumerations.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppEnumerations.emtl
index 5e200e98626..2f61cfd10a6 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppEnumerations.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppEnumerations.emtl
@@ -224,6 +224,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppPrimitiveTypes.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppPrimitiveTypes.emtl
index a245ad6a299..5723218ccb1 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppPrimitiveTypes.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/CppPrimitiveTypes.emtl
@@ -288,6 +288,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
index d5881c6a4cc..153d42a0092 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsDeclaration.emtl
@@ -42,6 +42,125 @@
</iterator>
</iterSet>
</body>
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;// copy opaque behavior in state machine to class level&#xA;"/>
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:IfBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;&#x9;&#x9;&#x9;"/>
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../operation/CppOperations.emtl#/0/CppBehaviorDeclaration"/>
+ <argument xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="transition" referredVariable="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/transition">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition/effect"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="transition" referredVariable="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/transition">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition/effect"/>
+ </source>
+ <argument xsi:type="ocl.ecore:NullLiteralExp">
+ <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/%3C%3E"/>
+ </ifExpr>
+ </body>
+ <loopVariable name="transition">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:PropertyCallExp" eType="/6/Set(Transition)">
+ <source xsi:type="ocl.ecore:VariableExp" name="region" referredVariable="/0/CppClassOperationsDeclaration/%.1/%/%.1/region">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region/transition"/>
+ </iterSet>
+ </body>
+ <loopVariable name="region">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:PropertyCallExp" eType="/6/Set(Region)">
+ <source xsi:type="ocl.ecore:VariableExp" name="sm" referredVariable="/0/CppClassOperationsDeclaration/%.1/%/sm">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine/region"/>
+ </iterSet>
+ </body>
+ <loopVariable name="sm">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:IteratorExp" name="select" eType="/6/Set(Behavior)">
+ <source xsi:type="ocl.ecore:PropertyCallExp" eType="/6/Set(Behavior)">
+ <source xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/14">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/12/Class">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/oclAsType"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </source>
+ <body xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppClassOperationsDeclaration/%.1/%/select/temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/12/StateMachine">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/oclIsKindOf"/>
+ </body>
+ <iterator xsi:type="ocl.ecore:Variable" name="temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </iterator>
+ </iterSet>
+ </body>
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#x9;&#x9;"/>
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../operation/CppOperations.emtl#/0/CppBehaviorDeclaration"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/30">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+ <loopVariable name="b">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </loopVariable>
+ <iterSet xsi:type="ocl.ecore:OperationCallExp" eType="/6/Sequence(OpaqueBehavior)" referredOperation="/1/EObject_Class/eAllContents">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/28">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/12/OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </argument>
+ </iterSet>
+ </body>
+ <ifExpr xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="class" referredVariable="/0/CppClassOperationsDeclaration/class">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </source>
+ <argument xsi:type="ocl.ecore:TypeExp" eType="/12/Class">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/oclIsKindOf"/>
+ </ifExpr>
+ </body>
<parameter name="class">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
</parameter>
@@ -70,6 +189,13 @@
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eAnnotations>
+ <eOperations name="eAllContents">
+ <eAnnotations source="MTL non-standard"/>
+ <eType xsi:type="ocl.ecore:SequenceType" href="http://www.eclipse.org/acceleo/mtl/3.0/mtlnonstdlib.ecore#//Sequence(OclAny)"/>
+ <eParameters name="filter">
+ <eType xsi:type="ocl.ecore:TypeType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclType"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppClassOperationsDeclaration">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -95,6 +221,18 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorDeclaration">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="../operation/CppOperations.emtl#/0/CppBehaviorDeclaration"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ </eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
@@ -131,6 +269,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
@@ -148,6 +291,21 @@
<eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Operation)" instanceClassName="java.util.Set">
<elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Behavior)" instanceClassName="java.util.Set">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Region)" instanceClassName="java.util.Set">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SetType" name="Set(Transition)" instanceClassName="java.util.Set">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OclAny)" instanceClassName="java.util.List">
+ <elementType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:SequenceType" name="Sequence(OpaqueBehavior)" instanceClassName="java.util.List">
+ <elementType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
@@ -164,13 +322,84 @@
<ocl.ecore:Variable name="i">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
</ocl.ecore:Variable>
+ <ecore:EPackage name="types">
+ <eClassifiers xsi:type="ocl.ecore:TypeType" name="Class">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:TypeType" name="StateMachine">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ocl.ecore:TypeType" name="OpaqueBehavior">
+ <referredType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//OpaqueBehavior"/>
+ </eClassifiers>
+ </ecore:EPackage>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Transition"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Region"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//StateMachine"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Classifier"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
<ecore:EAnnotation source="positions">
<eAnnotations source="positions.0" references="/0/CppClassOperationsDeclaration">
<details key="start" value="170"/>
- <details key="end" value="386"/>
+ <details key="end" value="1020"/>
<details key="line" value="5"/>
</eAnnotations>
<eAnnotations source="positions.1" references="/0/CppClassOperationsDeclaration/%">
@@ -238,12 +467,227 @@
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.14" references="/0/CppClassOperationsDeclaration/class">
+ <eAnnotations source="positions.14" references="/0/CppClassOperationsDeclaration/%.1">
+ <details key="start" value="375"/>
+ <details key="end" value="1008"/>
+ <details key="line" value="10"/>
+ </eAnnotations>
+ <eAnnotations source="positions.15" references="/0/CppClassOperationsDeclaration/%.1/%">
+ <details key="start" value="408"/>
+ <details key="end" value="911"/>
+ <details key="line" value="11"/>
+ </eAnnotations>
+ <eAnnotations source="positions.16" references="/0/CppClassOperationsDeclaration/%.1/%/%">
+ <details key="start" value="502"/>
+ <details key="end" value="560"/>
+ <details key="line" value="12"/>
+ </eAnnotations>
+ <eAnnotations source="positions.17" references="/0/CppClassOperationsDeclaration/%.1/%/%.1">
+ <details key="start" value="562"/>
+ <details key="end" value="903"/>
+ <details key="line" value="13"/>
+ </eAnnotations>
+ <eAnnotations source="positions.18" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%">
+ <details key="start" value="601"/>
+ <details key="end" value="894"/>
+ <details key="line" value="14"/>
+ </eAnnotations>
+ <eAnnotations source="positions.19" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%">
+ <details key="start" value="657"/>
+ <details key="end" value="750"/>
+ <details key="line" value="15"/>
+ </eAnnotations>
+ <eAnnotations source="positions.20" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%">
+ <details key="start" value="690"/>
+ <details key="end" value="695"/>
+ <details key="line" value="16"/>
+ </eAnnotations>
+ <eAnnotations source="positions.21" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.1">
+ <details key="start" value="696"/>
+ <details key="end" value="738"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.22" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.1/%">
+ <details key="start" value="696"/>
+ <details key="end" value="713"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.23" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.1/%/transition">
+ <details key="start" value="696"/>
+ <details key="end" value="706"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.24" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.2">
+ <details key="start" value="740"/>
+ <details key="end" value="741"/>
+ <details key="line" value="17"/>
+ </eAnnotations>
+ <eAnnotations source="positions.25" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.3">
+ <details key="start" value="661"/>
+ <details key="end" value="688"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.26" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.3/%">
+ <details key="start" value="662"/>
+ <details key="end" value="679"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.27" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.3/%/transition">
+ <details key="start" value="662"/>
+ <details key="end" value="672"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.28" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%/%.3/%.1">
+ <details key="start" value="683"/>
+ <details key="end" value="687"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.29" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/transition">
+ <details key="start" value="607"/>
+ <details key="end" value="630"/>
+ <details key="line" value="14"/>
+ </eAnnotations>
+ <eAnnotations source="positions.30" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%.1">
+ <details key="start" value="633"/>
+ <details key="end" value="650"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.31" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%/%.1/region">
+ <details key="start" value="633"/>
+ <details key="end" value="639"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.32" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/region">
+ <details key="start" value="568"/>
+ <details key="end" value="583"/>
+ <details key="line" value="13"/>
+ </eAnnotations>
+ <eAnnotations source="positions.33" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%.1">
+ <details key="start" value="586"/>
+ <details key="end" value="595"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.34" references="/0/CppClassOperationsDeclaration/%.1/%/%.1/%.1/sm">
+ <details key="start" value="586"/>
+ <details key="end" value="588"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.35" references="/0/CppClassOperationsDeclaration/%.1/%/sm">
+ <details key="start" value="414"/>
+ <details key="end" value="431"/>
+ <details key="line" value="11"/>
+ </eAnnotations>
+ <eAnnotations source="positions.36" references="/0/CppClassOperationsDeclaration/%.1/%/select">
+ <details key="start" value="434"/>
+ <details key="end" value="499"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.37" references="/0/CppClassOperationsDeclaration/%.1/%/select/%">
+ <details key="start" value="434"/>
+ <details key="end" value="464"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.38" references="/0/CppClassOperationsDeclaration/%.1/%/select/%/%">
+ <details key="start" value="434"/>
+ <details key="end" value="450"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.39" references="/0/CppClassOperationsDeclaration/%.1/%/select/%/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.40" references="/0/CppClassOperationsDeclaration/%.1/%/select/%/%/%">
+ <details key="start" value="444"/>
+ <details key="end" value="449"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.41" references="/0/CppClassOperationsDeclaration/%.1/%/select/%.1">
+ <details key="start" value="473"/>
+ <details key="end" value="498"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.42" references="/0/CppClassOperationsDeclaration/%.1/%/select/%.1/temp1">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.43" references="/0/CppClassOperationsDeclaration/%.1/%/select/%.1/%">
+ <details key="start" value="485"/>
+ <details key="end" value="497"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.44" references="/0/CppClassOperationsDeclaration/%.1/%/select/temp2">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.45" references="/0/CppClassOperationsDeclaration/%.1/%.1">
+ <details key="start" value="913"/>
+ <details key="end" value="1002"/>
+ <details key="line" value="24"/>
+ </eAnnotations>
+ <eAnnotations source="positions.46" references="/0/CppClassOperationsDeclaration/%.1/%.1/%">
+ <details key="start" value="965"/>
+ <details key="end" value="967"/>
+ <details key="line" value="25"/>
+ </eAnnotations>
+ <eAnnotations source="positions.47" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.1">
+ <details key="start" value="968"/>
+ <details key="end" value="992"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.48" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.1/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.49" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.2">
+ <details key="start" value="994"/>
+ <details key="end" value="995"/>
+ <details key="line" value="26"/>
+ </eAnnotations>
+ <eAnnotations source="positions.50" references="/0/CppClassOperationsDeclaration/%.1/%.1/b">
+ <details key="start" value="919"/>
+ <details key="end" value="931"/>
+ <details key="line" value="24"/>
+ </eAnnotations>
+ <eAnnotations source="positions.51" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.3">
+ <details key="start" value="934"/>
+ <details key="end" value="962"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.52" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.3/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.53" references="/0/CppClassOperationsDeclaration/%.1/%.1/%.3/%">
+ <details key="start" value="947"/>
+ <details key="end" value="961"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.54" references="/0/CppClassOperationsDeclaration/%.1/%.2">
+ <details key="start" value="379"/>
+ <details key="end" value="405"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.55" references="/0/CppClassOperationsDeclaration/%.1/%.2/class">
+ <details key="start" value="380"/>
+ <details key="end" value="385"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.56" references="/0/CppClassOperationsDeclaration/%.1/%.2/%">
+ <details key="start" value="398"/>
+ <details key="end" value="403"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.57" references="/0/CppClassOperationsDeclaration/class">
<details key="start" value="217"/>
<details key="end" value="235"/>
<details key="line" value="5"/>
</eAnnotations>
- <eAnnotations source="positions.15" references="/0/CppClassOperationsDeclaration/visibilityFilter">
+ <eAnnotations source="positions.58" references="/0/CppClassOperationsDeclaration/visibilityFilter">
<details key="start" value="237"/>
<details key="end" value="270"/>
<details key="line" value="5"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
index 1d807c845e8..7317dbc5a3d 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/clazz/CppClassOperationsImplementation.emtl
@@ -205,6 +205,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
</ecore:EPackage>
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl
index 3f9d7ada0eb..795e14133ab 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppOperations.emtl
@@ -366,6 +366,53 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</parameter>
</ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Template" name="CppBehaviorDeclaration" visibility="Public">
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../CppDocumentation.emtl#/0/CppBehaviorDoc"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/58">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;"/>
+ <body xsi:type="mtl:TemplateInvocation" definition="/0/InlineTxt">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/59">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="void "/>
+ <body xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="behavior" referredVariable="/0/CppBehaviorDeclaration/behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="("/>
+ <body xsi:type="mtl:TemplateInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="CppParameter.emtl#/0/CppBehaviorParameters"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/61">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:BooleanLiteralExp" booleanSymbol="true">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=")"/>
+ <body xsi:type="mtl:QueryInvocation">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <definition href="../../../utils/Modifier.emtl#/0/modConst"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/62">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </argument>
+ </body>
+ <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=";"/>
+ <parameter name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </parameter>
+ </ownedModuleElement>
<ownedModuleElement xsi:type="mtl:Template" name="CppConstInit" visibility="Public">
<body xsi:type="mtl:IfBlock">
<body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" : "/>
@@ -376,7 +423,7 @@
<source xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:AnyType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/getApplication"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/59">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/68">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:TypeExp" eType="/6/ConstInit">
@@ -395,7 +442,7 @@
<source xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/hasStereotype.1"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/58">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/67">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:TypeExp" eType="/6/ConstInit">
@@ -405,7 +452,7 @@
<argument xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/hasStereotype.1"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/58">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/67">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:TypeExp" eType="/6/Create">
@@ -420,7 +467,7 @@
</parameter>
</ownedModuleElement>
<ownedModuleElement xsi:type="mtl:Comment">
- <body startPosition="2074" endPosition="2144" value=" wrapper for native query (otherwise Acceleo does not indent properly)"/>
+ <body startPosition="2250" endPosition="2320" value=" wrapper for native query (otherwise Acceleo does not indent properly)"/>
</ownedModuleElement>
<ownedModuleElement xsi:type="mtl:Template" name="getBodyInTemplate" visibility="Public">
<body xsi:type="ocl.ecore:OperationCallExp" referredOperation="/1/String_Class/trim">
@@ -428,7 +475,7 @@
<source xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/getBody"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/64">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/73">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:VariableExp" name="language" referredVariable="/0/getBodyInTemplate/language">
@@ -449,13 +496,13 @@
<body xsi:type="mtl:ForBlock">
<body xsi:type="ocl.ecore:PropertyCallExp">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/73">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/82">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Type"/>
</source>
<referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
</body>
<iterSet xsi:type="ocl.ecore:PropertyCallExp" eType="/25/Set(Type)">
- <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/70">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/79">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</source>
<referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//BehavioralFeature/raisedException"/>
@@ -491,7 +538,7 @@
<body xsi:type="mtl:TemplateInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="../CppDocumentation.emtl#/0/CppOperationDoc"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/80">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/89">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
@@ -499,7 +546,7 @@
<body xsi:type="mtl:IfBlock">
<body xsi:type="mtl:TemplateInvocation" definition="/0/CppReturnSpec">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/82">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/91">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
@@ -514,7 +561,7 @@
<body xsi:type="mtl:TemplateInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="CppParameter.emtl#/0/CppOperationParameters"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/84">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/93">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:BooleanLiteralExp" booleanSymbol="false">
@@ -525,7 +572,7 @@
<body xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="platform:/plugin/org.eclipse.papyrus.acceleo/org/eclipse/papyrus/acceleo/GenUtils.emtl#/0/getBody"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/85">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/94">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="C/C++">
@@ -551,19 +598,19 @@
<body xsi:type="mtl:TemplateInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="../CppTemplates.emtl#/0/templateSignature.1"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/86">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/95">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="mtl:TemplateInvocation" definition="/0/InlineTxt">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/87">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/96">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="mtl:TemplateInvocation" definition="/0/CppReturnSpec">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/88">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/97">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
@@ -581,14 +628,14 @@
<body xsi:type="mtl:TemplateInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="../CppTemplates.emtl#/0/templateShortSignature.1"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/90">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/99">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="::"/>
<body xsi:type="mtl:QueryInvocation" definition="/0/destructor">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/91">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/100">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
@@ -603,7 +650,7 @@
<body xsi:type="mtl:TemplateInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="CppParameter.emtl#/0/CppOperationParameters"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/93">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/102">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:BooleanLiteralExp" booleanSymbol="false">
@@ -613,27 +660,27 @@
<body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=")"/>
<body xsi:type="mtl:TemplateInvocation" definition="/0/throws">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/94">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/103">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="mtl:QueryInvocation">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
<definition href="../../../utils/Modifier.emtl#/0/modConst"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/95">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/104">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="mtl:TemplateInvocation" definition="/0/CppConstInit">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/96">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/105">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
</body>
<body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" {&#xA;&#x9;"/>
<body xsi:type="mtl:TemplateInvocation" definition="/0/getBodyInTemplate">
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
- <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/97">
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/106">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</argument>
<argument xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="C/C++">
@@ -752,6 +799,16 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorDeclaration">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/CppBehaviorDeclaration"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppConstInit">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -900,6 +957,18 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorDoc">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="../CppDocumentation.emtl#/0/CppBehaviorDoc"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ </eOperations>
<eOperations name="CppOperationParameters">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -915,6 +984,21 @@
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorParameters">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL">
+ <references href="CppParameter.emtl#/0/CppBehaviorParameters"/>
+ </eAnnotations>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ <eParameters name="showDefault">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eParameters>
+ </eOperations>
<eOperations name="templateSignature">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -970,6 +1054,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
@@ -1193,6 +1282,33 @@
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</ocl.ecore:Variable>
<ocl.ecore:Variable name="self">
@@ -1925,490 +2041,580 @@
<details key="end" value="1666"/>
<details key="line" value="49"/>
</eAnnotations>
- <eAnnotations source="positions.120" references="/0/CppConstInit">
- <details key="start" value="1864"/>
- <details key="end" value="2063"/>
- <details key="line" value="55"/>
+ <eAnnotations source="positions.120" references="/0/CppBehaviorDeclaration">
+ <details key="start" value="1863"/>
+ <details key="end" value="2038"/>
+ <details key="line" value="54"/>
+ </eAnnotations>
+ <eAnnotations source="positions.121" references="/0/CppBehaviorDeclaration/%">
+ <details key="start" value="1926"/>
+ <details key="end" value="1942"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.122" references="/0/CppBehaviorDeclaration/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.123" references="/0/CppBehaviorDeclaration/%.1">
+ <details key="start" value="1944"/>
+ <details key="end" value="1945"/>
+ <details key="line" value="56"/>
+ </eAnnotations>
+ <eAnnotations source="positions.124" references="/0/CppBehaviorDeclaration/%.2">
+ <details key="start" value="1946"/>
+ <details key="end" value="1957"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.125" references="/0/CppBehaviorDeclaration/%.2/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.121" references="/0/CppConstInit/%">
- <details key="start" value="1918"/>
- <details key="end" value="2051"/>
+ <eAnnotations source="positions.126" references="/0/CppBehaviorDeclaration/%.3">
+ <details key="start" value="1959"/>
+ <details key="end" value="1964"/>
<details key="line" value="56"/>
</eAnnotations>
- <eAnnotations source="positions.122" references="/0/CppConstInit/%/%">
- <details key="start" value="1979"/>
- <details key="end" value="1982"/>
+ <eAnnotations source="positions.127" references="/0/CppBehaviorDeclaration/%.4">
+ <details key="start" value="1965"/>
+ <details key="end" value="1978"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.128" references="/0/CppBehaviorDeclaration/%.4/behavior">
+ <details key="start" value="1965"/>
+ <details key="end" value="1973"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.129" references="/0/CppBehaviorDeclaration/%.5">
+ <details key="start" value="1980"/>
+ <details key="end" value="1981"/>
<details key="line" value="56"/>
</eAnnotations>
- <eAnnotations source="positions.123" references="/0/CppConstInit/%/%.1">
- <details key="start" value="1983"/>
- <details key="end" value="2044"/>
+ <eAnnotations source="positions.130" references="/0/CppBehaviorDeclaration/%.6">
+ <details key="start" value="1982"/>
+ <details key="end" value="2009"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.124" references="/0/CppConstInit/%/%.1/%">
- <details key="start" value="1983"/>
- <details key="end" value="2029"/>
+ <eAnnotations source="positions.131" references="/0/CppBehaviorDeclaration/%.6/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.125" references="/0/CppConstInit/%/%.1/%/%">
- <details key="start" value="1983"/>
+ <eAnnotations source="positions.132" references="/0/CppBehaviorDeclaration/%.6/%">
+ <details key="start" value="2004"/>
<details key="end" value="2008"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.126" references="/0/CppConstInit/%/%.1/%/%/self">
+ <eAnnotations source="positions.133" references="/0/CppBehaviorDeclaration/%.7">
+ <details key="start" value="2011"/>
+ <details key="end" value="2012"/>
+ <details key="line" value="56"/>
+ </eAnnotations>
+ <eAnnotations source="positions.134" references="/0/CppBehaviorDeclaration/%.8">
+ <details key="start" value="2013"/>
+ <details key="end" value="2023"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.135" references="/0/CppBehaviorDeclaration/%.8/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.127" references="/0/CppConstInit/%/%.1/%/%/%">
- <details key="start" value="1998"/>
- <details key="end" value="2007"/>
+ <eAnnotations source="positions.136" references="/0/CppBehaviorDeclaration/%.9">
+ <details key="start" value="2025"/>
+ <details key="end" value="2026"/>
+ <details key="line" value="56"/>
+ </eAnnotations>
+ <eAnnotations source="positions.137" references="/0/CppBehaviorDeclaration/behavior">
+ <details key="start" value="1903"/>
+ <details key="end" value="1922"/>
+ <details key="line" value="54"/>
+ </eAnnotations>
+ <eAnnotations source="positions.138" references="/0/CppConstInit">
+ <details key="start" value="2040"/>
+ <details key="end" value="2239"/>
+ <details key="line" value="59"/>
+ </eAnnotations>
+ <eAnnotations source="positions.139" references="/0/CppConstInit/%">
+ <details key="start" value="2094"/>
+ <details key="end" value="2227"/>
+ <details key="line" value="60"/>
+ </eAnnotations>
+ <eAnnotations source="positions.140" references="/0/CppConstInit/%/%">
+ <details key="start" value="2155"/>
+ <details key="end" value="2158"/>
+ <details key="line" value="60"/>
+ </eAnnotations>
+ <eAnnotations source="positions.141" references="/0/CppConstInit/%/%.1">
+ <details key="start" value="2159"/>
+ <details key="end" value="2220"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.128" references="/0/CppConstInit/%/%.1/%/%.1">
- <details key="start" value="2019"/>
- <details key="end" value="2028"/>
+ <eAnnotations source="positions.142" references="/0/CppConstInit/%/%.1/%">
+ <details key="start" value="2159"/>
+ <details key="end" value="2205"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.129" references="/0/CppConstInit/%/%.2">
- <details key="start" value="1922"/>
- <details key="end" value="1978"/>
+ <eAnnotations source="positions.143" references="/0/CppConstInit/%/%.1/%/%">
+ <details key="start" value="2159"/>
+ <details key="end" value="2184"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.130" references="/0/CppConstInit/%/%.2/%">
- <details key="start" value="1923"/>
- <details key="end" value="1947"/>
+ <eAnnotations source="positions.144" references="/0/CppConstInit/%/%.1/%/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.131" references="/0/CppConstInit/%/%.2/%/self">
+ <eAnnotations source="positions.145" references="/0/CppConstInit/%/%.1/%/%/%">
+ <details key="start" value="2174"/>
+ <details key="end" value="2183"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.146" references="/0/CppConstInit/%/%.1/%/%.1">
+ <details key="start" value="2195"/>
+ <details key="end" value="2204"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.147" references="/0/CppConstInit/%/%.2">
+ <details key="start" value="2098"/>
+ <details key="end" value="2154"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.148" references="/0/CppConstInit/%/%.2/%">
+ <details key="start" value="2099"/>
+ <details key="end" value="2123"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.149" references="/0/CppConstInit/%/%.2/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.132" references="/0/CppConstInit/%/%.2/%/%">
- <details key="start" value="1937"/>
- <details key="end" value="1946"/>
+ <eAnnotations source="positions.150" references="/0/CppConstInit/%/%.2/%/%">
+ <details key="start" value="2113"/>
+ <details key="end" value="2122"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.133" references="/0/CppConstInit/%/%.2/%.1">
- <details key="start" value="1952"/>
- <details key="end" value="1977"/>
+ <eAnnotations source="positions.151" references="/0/CppConstInit/%/%.2/%.1">
+ <details key="start" value="2128"/>
+ <details key="end" value="2153"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.134" references="/0/CppConstInit/%/%.2/%.1/self">
+ <eAnnotations source="positions.152" references="/0/CppConstInit/%/%.2/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.135" references="/0/CppConstInit/%/%.2/%.1/%">
- <details key="start" value="1966"/>
- <details key="end" value="1976"/>
+ <eAnnotations source="positions.153" references="/0/CppConstInit/%/%.2/%.1/%">
+ <details key="start" value="2142"/>
+ <details key="end" value="2152"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.136" references="/0/CppConstInit/operation">
- <details key="start" value="1894"/>
- <details key="end" value="1915"/>
- <details key="line" value="55"/>
+ <eAnnotations source="positions.154" references="/0/CppConstInit/operation">
+ <details key="start" value="2070"/>
+ <details key="end" value="2091"/>
+ <details key="line" value="59"/>
</eAnnotations>
- <eAnnotations source="positions.137" references="/0/%">
- <details key="start" value="2066"/>
- <details key="end" value="2146"/>
+ <eAnnotations source="positions.155" references="/0/%">
+ <details key="start" value="2242"/>
+ <details key="end" value="2322"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.138" references="/0/getBodyInTemplate">
- <details key="start" value="2147"/>
- <details key="end" value="2264"/>
- <details key="line" value="61"/>
+ <eAnnotations source="positions.156" references="/0/getBodyInTemplate">
+ <details key="start" value="2323"/>
+ <details key="end" value="2440"/>
+ <details key="line" value="65"/>
</eAnnotations>
- <eAnnotations source="positions.139" references="/0/getBodyInTemplate/%">
- <details key="start" value="2226"/>
- <details key="end" value="2250"/>
+ <eAnnotations source="positions.157" references="/0/getBodyInTemplate/%">
+ <details key="start" value="2402"/>
+ <details key="end" value="2426"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.140" references="/0/getBodyInTemplate/%/%">
- <details key="start" value="2226"/>
- <details key="end" value="2243"/>
+ <eAnnotations source="positions.158" references="/0/getBodyInTemplate/%/%">
+ <details key="start" value="2402"/>
+ <details key="end" value="2419"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.141" references="/0/getBodyInTemplate/%/%/self">
+ <eAnnotations source="positions.159" references="/0/getBodyInTemplate/%/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.142" references="/0/getBodyInTemplate/%/%/language">
- <details key="start" value="2234"/>
- <details key="end" value="2242"/>
+ <eAnnotations source="positions.160" references="/0/getBodyInTemplate/%/%/language">
+ <details key="start" value="2410"/>
+ <details key="end" value="2418"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.143" references="/0/getBodyInTemplate/operation">
- <details key="start" value="2182"/>
- <details key="end" value="2203"/>
- <details key="line" value="61"/>
+ <eAnnotations source="positions.161" references="/0/getBodyInTemplate/operation">
+ <details key="start" value="2358"/>
+ <details key="end" value="2379"/>
+ <details key="line" value="65"/>
</eAnnotations>
- <eAnnotations source="positions.144" references="/0/getBodyInTemplate/language">
- <details key="start" value="2205"/>
- <details key="end" value="2222"/>
- <details key="line" value="61"/>
+ <eAnnotations source="positions.162" references="/0/getBodyInTemplate/language">
+ <details key="start" value="2381"/>
+ <details key="end" value="2398"/>
+ <details key="line" value="65"/>
</eAnnotations>
- <eAnnotations source="positions.145" references="/0/throws">
- <details key="start" value="2267"/>
- <details key="end" value="2435"/>
- <details key="line" value="66"/>
+ <eAnnotations source="positions.163" references="/0/throws">
+ <details key="start" value="2443"/>
+ <details key="end" value="2611"/>
+ <details key="line" value="70"/>
</eAnnotations>
- <eAnnotations source="positions.146" references="/0/throws/%">
- <details key="start" value="2314"/>
- <details key="end" value="2423"/>
- <details key="line" value="67"/>
+ <eAnnotations source="positions.164" references="/0/throws/%">
+ <details key="start" value="2490"/>
+ <details key="end" value="2599"/>
+ <details key="line" value="71"/>
</eAnnotations>
- <eAnnotations source="positions.147" references="/0/throws/%/%">
- <details key="start" value="2359"/>
- <details key="end" value="2366"/>
- <details key="line" value="68"/>
+ <eAnnotations source="positions.165" references="/0/throws/%/%">
+ <details key="start" value="2535"/>
+ <details key="end" value="2542"/>
+ <details key="line" value="72"/>
</eAnnotations>
- <eAnnotations source="positions.148" references="/0/throws/%/%.1">
- <details key="start" value="2366"/>
- <details key="end" value="2417"/>
- <details key="line" value="68"/>
+ <eAnnotations source="positions.166" references="/0/throws/%/%.1">
+ <details key="start" value="2542"/>
+ <details key="end" value="2593"/>
+ <details key="line" value="72"/>
</eAnnotations>
- <eAnnotations source="positions.149" references="/0/throws/%/%.1/%">
- <details key="start" value="2405"/>
- <details key="end" value="2409"/>
+ <eAnnotations source="positions.167" references="/0/throws/%/%.1/%">
+ <details key="start" value="2581"/>
+ <details key="end" value="2585"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.150" references="/0/throws/%/%.1/%/self">
+ <eAnnotations source="positions.168" references="/0/throws/%/%.1/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.151" references="/0/throws/%/%.1/%.1">
- <details key="start" value="2372"/>
- <details key="end" value="2387"/>
+ <eAnnotations source="positions.169" references="/0/throws/%/%.1/%.1">
+ <details key="start" value="2548"/>
+ <details key="end" value="2563"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.152" references="/0/throws/%/%.1/%.1/self">
+ <eAnnotations source="positions.170" references="/0/throws/%/%.1/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.153" references="/0/throws/%/%.1/%.2">
- <details key="start" value="2399"/>
- <details key="end" value="2402"/>
+ <eAnnotations source="positions.171" references="/0/throws/%/%.1/%.2">
+ <details key="start" value="2575"/>
+ <details key="end" value="2578"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.154" references="/0/throws/%/%.2">
- <details key="start" value="2417"/>
- <details key="end" value="2418"/>
- <details key="line" value="69"/>
+ <eAnnotations source="positions.172" references="/0/throws/%/%.2">
+ <details key="start" value="2593"/>
+ <details key="end" value="2594"/>
+ <details key="line" value="73"/>
</eAnnotations>
- <eAnnotations source="positions.155" references="/0/throws/%/%.3">
- <details key="start" value="2318"/>
- <details key="end" value="2357"/>
+ <eAnnotations source="positions.173" references="/0/throws/%/%.3">
+ <details key="start" value="2494"/>
+ <details key="end" value="2533"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.156" references="/0/throws/%/%.3/%">
- <details key="start" value="2319"/>
- <details key="end" value="2352"/>
+ <eAnnotations source="positions.174" references="/0/throws/%/%.3/%">
+ <details key="start" value="2495"/>
+ <details key="end" value="2528"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.157" references="/0/throws/%/%.3/%/%">
- <details key="start" value="2319"/>
- <details key="end" value="2344"/>
+ <eAnnotations source="positions.175" references="/0/throws/%/%.3/%/%">
+ <details key="start" value="2495"/>
+ <details key="end" value="2520"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.158" references="/0/throws/%/%.3/%/%/operation">
- <details key="start" value="2319"/>
- <details key="end" value="2328"/>
+ <eAnnotations source="positions.176" references="/0/throws/%/%.3/%/%/operation">
+ <details key="start" value="2495"/>
+ <details key="end" value="2504"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.159" references="/0/throws/%/%.3/%.1">
- <details key="start" value="2355"/>
- <details key="end" value="2356"/>
+ <eAnnotations source="positions.177" references="/0/throws/%/%.3/%.1">
+ <details key="start" value="2531"/>
+ <details key="end" value="2532"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.160" references="/0/throws/operation">
- <details key="start" value="2291"/>
- <details key="end" value="2311"/>
- <details key="line" value="66"/>
+ <eAnnotations source="positions.178" references="/0/throws/operation">
+ <details key="start" value="2467"/>
+ <details key="end" value="2487"/>
+ <details key="line" value="70"/>
</eAnnotations>
- <eAnnotations source="positions.161" references="/0/CppOperationImplementation">
- <details key="start" value="2438"/>
- <details key="end" value="2926"/>
- <details key="line" value="73"/>
+ <eAnnotations source="positions.179" references="/0/CppOperationImplementation">
+ <details key="start" value="2614"/>
+ <details key="end" value="3102"/>
+ <details key="line" value="77"/>
</eAnnotations>
- <eAnnotations source="positions.162" references="/0/CppOperationImplementation/%">
- <details key="start" value="2507"/>
- <details key="end" value="2524"/>
+ <eAnnotations source="positions.180" references="/0/CppOperationImplementation/%">
+ <details key="start" value="2683"/>
+ <details key="end" value="2700"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.163" references="/0/CppOperationImplementation/%/self">
+ <eAnnotations source="positions.181" references="/0/CppOperationImplementation/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.164" references="/0/CppOperationImplementation/%.1">
- <details key="start" value="2526"/>
- <details key="end" value="2527"/>
- <details key="line" value="75"/>
+ <eAnnotations source="positions.182" references="/0/CppOperationImplementation/%.1">
+ <details key="start" value="2702"/>
+ <details key="end" value="2703"/>
+ <details key="line" value="79"/>
</eAnnotations>
- <eAnnotations source="positions.165" references="/0/CppOperationImplementation/%.2">
- <details key="start" value="2527"/>
- <details key="end" value="2914"/>
- <details key="line" value="75"/>
+ <eAnnotations source="positions.183" references="/0/CppOperationImplementation/%.2">
+ <details key="start" value="2703"/>
+ <details key="end" value="3090"/>
+ <details key="line" value="79"/>
</eAnnotations>
- <eAnnotations source="positions.166" references="/0/CppOperationImplementation/%.2/%">
- <details key="start" value="2559"/>
- <details key="end" value="2574"/>
+ <eAnnotations source="positions.184" references="/0/CppOperationImplementation/%.2/%">
+ <details key="start" value="2735"/>
+ <details key="end" value="2750"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.167" references="/0/CppOperationImplementation/%.2/%/self">
+ <eAnnotations source="positions.185" references="/0/CppOperationImplementation/%.2/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.168" references="/0/CppOperationImplementation/%.2/%.1">
- <details key="start" value="2577"/>
- <details key="end" value="2591"/>
+ <eAnnotations source="positions.186" references="/0/CppOperationImplementation/%.2/%.1">
+ <details key="start" value="2753"/>
+ <details key="end" value="2767"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.169" references="/0/CppOperationImplementation/%.2/%.1/operation">
- <details key="start" value="2577"/>
- <details key="end" value="2586"/>
+ <eAnnotations source="positions.187" references="/0/CppOperationImplementation/%.2/%.1/operation">
+ <details key="start" value="2753"/>
+ <details key="end" value="2762"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.170" references="/0/CppOperationImplementation/%.2/%.2">
- <details key="start" value="2593"/>
- <details key="end" value="2594"/>
- <details key="line" value="76"/>
+ <eAnnotations source="positions.188" references="/0/CppOperationImplementation/%.2/%.2">
+ <details key="start" value="2769"/>
+ <details key="end" value="2770"/>
+ <details key="line" value="80"/>
</eAnnotations>
- <eAnnotations source="positions.171" references="/0/CppOperationImplementation/%.2/%.3">
- <details key="start" value="2595"/>
- <details key="end" value="2624"/>
+ <eAnnotations source="positions.189" references="/0/CppOperationImplementation/%.2/%.3">
+ <details key="start" value="2771"/>
+ <details key="end" value="2800"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.172" references="/0/CppOperationImplementation/%.2/%.3/self">
+ <eAnnotations source="positions.190" references="/0/CppOperationImplementation/%.2/%.3/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.173" references="/0/CppOperationImplementation/%.2/%.3/%">
- <details key="start" value="2618"/>
- <details key="end" value="2623"/>
+ <eAnnotations source="positions.191" references="/0/CppOperationImplementation/%.2/%.3/%">
+ <details key="start" value="2794"/>
+ <details key="end" value="2799"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.174" references="/0/CppOperationImplementation/%.2/%.4">
- <details key="start" value="2626"/>
- <details key="end" value="2631"/>
- <details key="line" value="76"/>
+ <eAnnotations source="positions.192" references="/0/CppOperationImplementation/%.2/%.4">
+ <details key="start" value="2802"/>
+ <details key="end" value="2807"/>
+ <details key="line" value="80"/>
</eAnnotations>
- <eAnnotations source="positions.175" references="/0/CppOperationImplementation/%.2/%.5">
- <details key="start" value="2632"/>
- <details key="end" value="2648"/>
+ <eAnnotations source="positions.193" references="/0/CppOperationImplementation/%.2/%.5">
+ <details key="start" value="2808"/>
+ <details key="end" value="2824"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.176" references="/0/CppOperationImplementation/%.2/%.5/self">
+ <eAnnotations source="positions.194" references="/0/CppOperationImplementation/%.2/%.5/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.177" references="/0/CppOperationImplementation/%.2/%.5/%">
- <details key="start" value="2640"/>
- <details key="end" value="2647"/>
+ <eAnnotations source="positions.195" references="/0/CppOperationImplementation/%.2/%.5/%">
+ <details key="start" value="2816"/>
+ <details key="end" value="2823"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.178" references="/0/CppOperationImplementation/%.2/%.6">
- <details key="start" value="2650"/>
- <details key="end" value="2653"/>
- <details key="line" value="78"/>
+ <eAnnotations source="positions.196" references="/0/CppOperationImplementation/%.2/%.6">
+ <details key="start" value="2826"/>
+ <details key="end" value="2829"/>
+ <details key="line" value="82"/>
</eAnnotations>
- <eAnnotations source="positions.179" references="/0/CppOperationImplementation/%.2/%.7">
- <details key="start" value="2531"/>
- <details key="end" value="2556"/>
+ <eAnnotations source="positions.197" references="/0/CppOperationImplementation/%.2/%.7">
+ <details key="start" value="2707"/>
+ <details key="end" value="2732"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.180" references="/0/CppOperationImplementation/%.2/%.7/%">
- <details key="start" value="2532"/>
- <details key="end" value="2546"/>
+ <eAnnotations source="positions.198" references="/0/CppOperationImplementation/%.2/%.7/%">
+ <details key="start" value="2708"/>
+ <details key="end" value="2722"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.181" references="/0/CppOperationImplementation/%.2/%.7/%/operation">
- <details key="start" value="2532"/>
- <details key="end" value="2541"/>
+ <eAnnotations source="positions.199" references="/0/CppOperationImplementation/%.2/%.7/%/operation">
+ <details key="start" value="2708"/>
+ <details key="end" value="2717"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.182" references="/0/CppOperationImplementation/%.2/%.7/%.1">
- <details key="start" value="2549"/>
- <details key="end" value="2555"/>
+ <eAnnotations source="positions.200" references="/0/CppOperationImplementation/%.2/%.7/%.1">
+ <details key="start" value="2725"/>
+ <details key="end" value="2731"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.183" references="/0/CppOperationImplementation/%.2/%.8">
- <details key="start" value="2653"/>
- <details key="end" value="2909"/>
- <details key="line" value="79"/>
+ <eAnnotations source="positions.201" references="/0/CppOperationImplementation/%.2/%.8">
+ <details key="start" value="2829"/>
+ <details key="end" value="3085"/>
+ <details key="line" value="83"/>
</eAnnotations>
- <eAnnotations source="positions.184" references="/0/CppOperationImplementation/%.2/%.8/%">
- <details key="start" value="2661"/>
- <details key="end" value="2680"/>
+ <eAnnotations source="positions.202" references="/0/CppOperationImplementation/%.2/%.8/%">
+ <details key="start" value="2837"/>
+ <details key="end" value="2856"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.185" references="/0/CppOperationImplementation/%.2/%.8/%/self">
+ <eAnnotations source="positions.203" references="/0/CppOperationImplementation/%.2/%.8/%/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.186" references="/0/CppOperationImplementation/%.2/%.8/%.1">
- <details key="start" value="2683"/>
- <details key="end" value="2694"/>
+ <eAnnotations source="positions.204" references="/0/CppOperationImplementation/%.2/%.8/%.1">
+ <details key="start" value="2859"/>
+ <details key="end" value="2870"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.187" references="/0/CppOperationImplementation/%.2/%.8/%.1/self">
+ <eAnnotations source="positions.205" references="/0/CppOperationImplementation/%.2/%.8/%.1/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.188" references="/0/CppOperationImplementation/%.2/%.8/%.2">
- <details key="start" value="2697"/>
- <details key="end" value="2712"/>
+ <eAnnotations source="positions.206" references="/0/CppOperationImplementation/%.2/%.8/%.2">
+ <details key="start" value="2873"/>
+ <details key="end" value="2888"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.189" references="/0/CppOperationImplementation/%.2/%.8/%.2/self">
+ <eAnnotations source="positions.207" references="/0/CppOperationImplementation/%.2/%.8/%.2/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.190" references="/0/CppOperationImplementation/%.2/%.8/%.3">
- <details key="start" value="2715"/>
- <details key="end" value="2735"/>
+ <eAnnotations source="positions.208" references="/0/CppOperationImplementation/%.2/%.8/%.3">
+ <details key="start" value="2891"/>
+ <details key="end" value="2911"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.191" references="/0/CppOperationImplementation/%.2/%.8/%.3/%">
- <details key="start" value="2715"/>
- <details key="end" value="2730"/>
+ <eAnnotations source="positions.209" references="/0/CppOperationImplementation/%.2/%.8/%.3/%">
+ <details key="start" value="2891"/>
+ <details key="end" value="2906"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.192" references="/0/CppOperationImplementation/%.2/%.8/%.3/%/operation">
- <details key="start" value="2715"/>
- <details key="end" value="2724"/>
+ <eAnnotations source="positions.210" references="/0/CppOperationImplementation/%.2/%.8/%.3/%/operation">
+ <details key="start" value="2891"/>
+ <details key="end" value="2900"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.193" references="/0/CppOperationImplementation/%.2/%.8/%.4">
- <details key="start" value="2738"/>
- <details key="end" value="2762"/>
+ <eAnnotations source="positions.211" references="/0/CppOperationImplementation/%.2/%.8/%.4">
+ <details key="start" value="2914"/>
+ <details key="end" value="2938"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.194" references="/0/CppOperationImplementation/%.2/%.8/%.4/self">
+ <eAnnotations source="positions.212" references="/0/CppOperationImplementation/%.2/%.8/%.4/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.195" references="/0/CppOperationImplementation/%.2/%.8/%.5">
- <details key="start" value="2764"/>
- <details key="end" value="2766"/>
- <details key="line" value="80"/>
+ <eAnnotations source="positions.213" references="/0/CppOperationImplementation/%.2/%.8/%.5">
+ <details key="start" value="2940"/>
+ <details key="end" value="2942"/>
+ <details key="line" value="84"/>
</eAnnotations>
- <eAnnotations source="positions.196" references="/0/CppOperationImplementation/%.2/%.8/%.6">
- <details key="start" value="2767"/>
- <details key="end" value="2779"/>
+ <eAnnotations source="positions.214" references="/0/CppOperationImplementation/%.2/%.8/%.6">
+ <details key="start" value="2943"/>
+ <details key="end" value="2955"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.197" references="/0/CppOperationImplementation/%.2/%.8/%.6/self">
+ <eAnnotations source="positions.215" references="/0/CppOperationImplementation/%.2/%.8/%.6/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.198" references="/0/CppOperationImplementation/%.2/%.8/%.7">
- <details key="start" value="2782"/>
- <details key="end" value="2796"/>
+ <eAnnotations source="positions.216" references="/0/CppOperationImplementation/%.2/%.8/%.7">
+ <details key="start" value="2958"/>
+ <details key="end" value="2972"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.199" references="/0/CppOperationImplementation/%.2/%.8/%.7/operation">
- <details key="start" value="2782"/>
- <details key="end" value="2791"/>
+ <eAnnotations source="positions.217" references="/0/CppOperationImplementation/%.2/%.8/%.7/operation">
+ <details key="start" value="2958"/>
+ <details key="end" value="2967"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.200" references="/0/CppOperationImplementation/%.2/%.8/%.8">
- <details key="start" value="2798"/>
- <details key="end" value="2799"/>
- <details key="line" value="80"/>
+ <eAnnotations source="positions.218" references="/0/CppOperationImplementation/%.2/%.8/%.8">
+ <details key="start" value="2974"/>
+ <details key="end" value="2975"/>
+ <details key="line" value="84"/>
</eAnnotations>
- <eAnnotations source="positions.201" references="/0/CppOperationImplementation/%.2/%.8/%.9">
- <details key="start" value="2800"/>
- <details key="end" value="2829"/>
+ <eAnnotations source="positions.219" references="/0/CppOperationImplementation/%.2/%.8/%.9">
+ <details key="start" value="2976"/>
+ <details key="end" value="3005"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.202" references="/0/CppOperationImplementation/%.2/%.8/%.9/self">
+ <eAnnotations source="positions.220" references="/0/CppOperationImplementation/%.2/%.8/%.9/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.203" references="/0/CppOperationImplementation/%.2/%.8/%.9/%">
- <details key="start" value="2823"/>
- <details key="end" value="2828"/>
+ <eAnnotations source="positions.221" references="/0/CppOperationImplementation/%.2/%.8/%.9/%">
+ <details key="start" value="2999"/>
+ <details key="end" value="3004"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.204" references="/0/CppOperationImplementation/%.2/%.8/%.10">
- <details key="start" value="2831"/>
- <details key="end" value="2832"/>
- <details key="line" value="80"/>
+ <eAnnotations source="positions.222" references="/0/CppOperationImplementation/%.2/%.8/%.10">
+ <details key="start" value="3007"/>
+ <details key="end" value="3008"/>
+ <details key="line" value="84"/>
</eAnnotations>
- <eAnnotations source="positions.205" references="/0/CppOperationImplementation/%.2/%.8/%.11">
- <details key="start" value="2833"/>
- <details key="end" value="2841"/>
+ <eAnnotations source="positions.223" references="/0/CppOperationImplementation/%.2/%.8/%.11">
+ <details key="start" value="3009"/>
+ <details key="end" value="3017"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.206" references="/0/CppOperationImplementation/%.2/%.8/%.11/self">
+ <eAnnotations source="positions.224" references="/0/CppOperationImplementation/%.2/%.8/%.11/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.207" references="/0/CppOperationImplementation/%.2/%.8/%.12">
- <details key="start" value="2844"/>
- <details key="end" value="2854"/>
+ <eAnnotations source="positions.225" references="/0/CppOperationImplementation/%.2/%.8/%.12">
+ <details key="start" value="3020"/>
+ <details key="end" value="3030"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.208" references="/0/CppOperationImplementation/%.2/%.8/%.12/self">
+ <eAnnotations source="positions.226" references="/0/CppOperationImplementation/%.2/%.8/%.12/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.209" references="/0/CppOperationImplementation/%.2/%.8/%.13">
- <details key="start" value="2857"/>
- <details key="end" value="2871"/>
+ <eAnnotations source="positions.227" references="/0/CppOperationImplementation/%.2/%.8/%.13">
+ <details key="start" value="3033"/>
+ <details key="end" value="3047"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.210" references="/0/CppOperationImplementation/%.2/%.8/%.13/self">
+ <eAnnotations source="positions.228" references="/0/CppOperationImplementation/%.2/%.8/%.13/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.211" references="/0/CppOperationImplementation/%.2/%.8/%.14">
- <details key="start" value="2873"/>
- <details key="end" value="2877"/>
- <details key="line" value="80"/>
+ <eAnnotations source="positions.229" references="/0/CppOperationImplementation/%.2/%.8/%.14">
+ <details key="start" value="3049"/>
+ <details key="end" value="3053"/>
+ <details key="line" value="84"/>
</eAnnotations>
- <eAnnotations source="positions.212" references="/0/CppOperationImplementation/%.2/%.8/%.15">
- <details key="start" value="2878"/>
- <details key="end" value="2904"/>
+ <eAnnotations source="positions.230" references="/0/CppOperationImplementation/%.2/%.8/%.15">
+ <details key="start" value="3054"/>
+ <details key="end" value="3080"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.213" references="/0/CppOperationImplementation/%.2/%.8/%.15/self">
+ <eAnnotations source="positions.231" references="/0/CppOperationImplementation/%.2/%.8/%.15/self">
<details key="start" value="-1"/>
<details key="end" value="-1"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.214" references="/0/CppOperationImplementation/%.2/%.8/%.15/%">
- <details key="start" value="2896"/>
- <details key="end" value="2903"/>
+ <eAnnotations source="positions.232" references="/0/CppOperationImplementation/%.2/%.8/%.15/%">
+ <details key="start" value="3072"/>
+ <details key="end" value="3079"/>
<details key="line" value="0"/>
</eAnnotations>
- <eAnnotations source="positions.215" references="/0/CppOperationImplementation/%.2/%.8/%.16">
- <details key="start" value="2906"/>
- <details key="end" value="2909"/>
- <details key="line" value="82"/>
+ <eAnnotations source="positions.233" references="/0/CppOperationImplementation/%.2/%.8/%.16">
+ <details key="start" value="3082"/>
+ <details key="end" value="3085"/>
+ <details key="line" value="86"/>
</eAnnotations>
- <eAnnotations source="positions.216" references="/0/CppOperationImplementation/operation">
- <details key="start" value="2482"/>
- <details key="end" value="2503"/>
- <details key="line" value="73"/>
+ <eAnnotations source="positions.234" references="/0/CppOperationImplementation/operation">
+ <details key="start" value="2658"/>
+ <details key="end" value="2679"/>
+ <details key="line" value="77"/>
</eAnnotations>
</ecore:EAnnotation>
</xmi:XMI>
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppParameter.emtl b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppParameter.emtl
index 4c00e45edcf..1a94c5d1f3a 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppParameter.emtl
+++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen/src/org/eclipse/papyrus/cpp/codegen/acceleo/util/operation/CppParameter.emtl
@@ -166,6 +166,57 @@
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
</parameter>
</ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Comment">
+ <body startPosition="1078" endPosition="1144" value=" signature for a given behavior (e.g. effect within state machine)"/>
+ </ownedModuleElement>
+ <ownedModuleElement xsi:type="mtl:Template" name="CppBehaviorParameters" visibility="Public">
+ <body xsi:type="mtl:ForBlock">
+ <body xsi:type="mtl:TemplateInvocation" definition="/0/CppParameter">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <argument xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/39">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </argument>
+ <argument xsi:type="ocl.ecore:VariableExp" name="showDefault" referredVariable="/0/CppBehaviorParameters/showDefault">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </argument>
+ </body>
+ <iterSet xsi:type="ocl.ecore:IteratorExp" name="select" eType="/25/OrderedSet(Parameter)">
+ <source xsi:type="ocl.ecore:PropertyCallExp" eType="/25/OrderedSet(Parameter)">
+ <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/36">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </source>
+ <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior/ownedParameter"/>
+ </source>
+ <body xsi:type="ocl.ecore:OperationCallExp">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ <source xsi:type="ocl.ecore:PropertyCallExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterDirectionKind"/>
+ <source xsi:type="ocl.ecore:VariableExp" name="temp1" referredVariable="/0/CppBehaviorParameters/%/select/temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </source>
+ <referredProperty xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter/direction"/>
+ </source>
+ <argument xsi:type="ocl.ecore:EnumLiteralExp">
+ <eType xsi:type="ecore:EEnum" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterDirectionKind"/>
+ <referredEnumLiteral xsi:type="ecore:EEnumLiteral" href="http://www.eclipse.org/uml2/4.0.0/UML#//ParameterDirectionKind/return"/>
+ </argument>
+ <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/%3C%3E"/>
+ </body>
+ <iterator xsi:type="ocl.ecore:Variable" name="temp2">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </iterator>
+ </iterSet>
+ <each xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=", ">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </each>
+ </body>
+ <parameter name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </parameter>
+ <parameter name="showDefault">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </parameter>
+ </ownedModuleElement>
</mtl:Module>
<ecore:EPackage name="additions">
<eClassifiers xsi:type="ecore:EClass" name="String_Class">
@@ -223,6 +274,19 @@
<eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
</eParameters>
</eOperations>
+ <eOperations name="CppBehaviorParameters">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <contents xsi:type="ocl.ecore:Constraint"/>
+ </eAnnotations>
+ <eAnnotations source="MTL" references="/0/CppBehaviorParameters"/>
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ <eParameters name="behavior">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eParameters>
+ <eParameters name="showDefault">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
+ </eParameters>
+ </eOperations>
<eOperations name="hasStereotype">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<contents xsi:type="ocl.ecore:Constraint"/>
@@ -344,6 +408,11 @@
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Operation"/>
</eAnnotations>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Behavior_Class">
+ <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
+ <references href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </eAnnotations>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Class_Class">
<eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
<references href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
@@ -477,6 +546,36 @@
<ocl.ecore:Variable name="self">
<eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Parameter"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Behavior"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="i">
+ <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
+ </ocl.ecore:Variable>
+ <ocl.ecore:Variable name="self">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </ocl.ecore:Variable>
<ecore:EAnnotation source="positions">
<eAnnotations source="positions.0" references="/0/defaultValue">
<details key="start" value="290"/>
@@ -733,5 +832,90 @@
<details key="end" value="927"/>
<details key="line" value="20"/>
</eAnnotations>
+ <eAnnotations source="positions.51" references="/0/%.1">
+ <details key="start" value="1070"/>
+ <details key="end" value="1146"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.52" references="/0/CppBehaviorParameters">
+ <details key="start" value="1147"/>
+ <details key="end" value="1368"/>
+ <details key="line" value="26"/>
+ </eAnnotations>
+ <eAnnotations source="positions.53" references="/0/CppBehaviorParameters/%">
+ <details key="start" value="1231"/>
+ <details key="end" value="1356"/>
+ <details key="line" value="27"/>
+ </eAnnotations>
+ <eAnnotations source="positions.54" references="/0/CppBehaviorParameters/%/%">
+ <details key="start" value="1323"/>
+ <details key="end" value="1348"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.55" references="/0/CppBehaviorParameters/%/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.56" references="/0/CppBehaviorParameters/%/%/showDefault">
+ <details key="start" value="1336"/>
+ <details key="end" value="1347"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.57" references="/0/CppBehaviorParameters/%/select">
+ <details key="start" value="1237"/>
+ <details key="end" value="1304"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.58" references="/0/CppBehaviorParameters/%/select/%">
+ <details key="start" value="1237"/>
+ <details key="end" value="1251"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.59" references="/0/CppBehaviorParameters/%/select/%/self">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.60" references="/0/CppBehaviorParameters/%/select/%.1">
+ <details key="start" value="1260"/>
+ <details key="end" value="1303"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.61" references="/0/CppBehaviorParameters/%/select/%.1/%">
+ <details key="start" value="1260"/>
+ <details key="end" value="1269"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.62" references="/0/CppBehaviorParameters/%/select/%.1/%/temp1">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.63" references="/0/CppBehaviorParameters/%/select/%.1/%.1">
+ <details key="start" value="1273"/>
+ <details key="end" value="1303"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.64" references="/0/CppBehaviorParameters/%/select/temp2">
+ <details key="start" value="-1"/>
+ <details key="end" value="-1"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.65" references="/0/CppBehaviorParameters/%/%.1">
+ <details key="start" value="1316"/>
+ <details key="end" value="1320"/>
+ <details key="line" value="0"/>
+ </eAnnotations>
+ <eAnnotations source="positions.66" references="/0/CppBehaviorParameters/behavior">
+ <details key="start" value="1186"/>
+ <details key="end" value="1205"/>
+ <details key="line" value="26"/>
+ </eAnnotations>
+ <eAnnotations source="positions.67" references="/0/CppBehaviorParameters/showDefault">
+ <details key="start" value="1207"/>
+ <details key="end" value="1228"/>
+ <details key="line" value="26"/>
+ </eAnnotations>
</ecore:EAnnotation>
</xmi:XMI>
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/AssociationPreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/AssociationPreferencePage.java
index 6d0036abbd9..cc2a4b1bd86 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/AssociationPreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/AssociationPreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class AssociationPreferencePage extends DomainDiagramLinkPreferencePage {
@@ -62,7 +62,7 @@ public class AssociationPreferencePage extends DomainDiagramLinkPreferencePage {
// End of user code
for(String labelName : labelDefaultVisibilityMap.keySet()) {
- String showLabelKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, labelName, PreferenceConstantHelper.LABEL_VISIBILITY);
+ String showLabelKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, labelName, PreferencesConstantsHelper.LABEL_VISIBILITY);
store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/ClassPreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/ClassPreferencePage.java
index ad3711dd9a3..ebe2aef31c3 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/ClassPreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/ClassPreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class ClassPreferencePage extends DomainDiagramNodePreferencePage {
@@ -68,17 +68,17 @@ public class ClassPreferencePage extends DomainDiagramNodePreferencePage {
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/DataTypePreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/DataTypePreferencePage.java
index 6bb644ead59..ee6be93e782 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/DataTypePreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/DataTypePreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class DataTypePreferencePage extends DomainDiagramNodePreferencePage {
@@ -66,17 +66,17 @@ public class DataTypePreferencePage extends DomainDiagramNodePreferencePage {
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/EnumerationPreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/EnumerationPreferencePage.java
index da0991ee98c..e657245d4d6 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/EnumerationPreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/EnumerationPreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class EnumerationPreferencePage extends DomainDiagramNodePreferencePage {
@@ -64,17 +64,17 @@ public class EnumerationPreferencePage extends DomainDiagramNodePreferencePage {
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/GeneralizationPreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/GeneralizationPreferencePage.java
index c71c7e14560..36297a055ff 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/GeneralizationPreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/GeneralizationPreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class GeneralizationPreferencePage extends DomainDiagramLinkPreferencePage {
@@ -57,7 +57,7 @@ public class GeneralizationPreferencePage extends DomainDiagramLinkPreferencePag
// End of user code
for(String labelName : labelDefaultVisibilityMap.keySet()) {
- String showLabelKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, labelName, PreferenceConstantHelper.LABEL_VISIBILITY);
+ String showLabelKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, labelName, PreferencesConstantsHelper.LABEL_VISIBILITY);
store.setDefault(showLabelKey, labelDefaultVisibilityMap.get(labelName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/InstanceSpecificationPreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/InstanceSpecificationPreferencePage.java
index 7fb5a04b3c6..ce68d99f86b 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/InstanceSpecificationPreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/InstanceSpecificationPreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class InstanceSpecificationPreferencePage extends DomainDiagramNodePreferencePage {
@@ -64,17 +64,17 @@ public class InstanceSpecificationPreferencePage extends DomainDiagramNodePrefer
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PackagePreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PackagePreferencePage.java
index e76ef6f5c42..54c9fef6987 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PackagePreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PackagePreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class PackagePreferencePage extends DomainDiagramNodePreferencePage {
@@ -64,17 +64,17 @@ public class PackagePreferencePage extends DomainDiagramNodePreferencePage {
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PrimitiveTypePreferencePage.java b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PrimitiveTypePreferencePage.java
index b52978cfa3d..5b75fd61378 100644
--- a/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PrimitiveTypePreferencePage.java
+++ b/extraplugins/domainmodel/org.eclipse.papyrus.uml.diagram.domain/src-gen/org/eclipse/papyrus/uml/diagram/domain/preferences/PrimitiveTypePreferencePage.java
@@ -18,7 +18,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.domain.provider.ElementTypes;
public class PrimitiveTypePreferencePage extends DomainDiagramNodePreferencePage {
@@ -66,17 +66,17 @@ public class PrimitiveTypePreferencePage extends DomainDiagramNodePreferencePage
// Start of user code custom default initializations
// End of user code
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 50);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 50);
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
index 677f9370be5..fc506484619 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.uml.diagram.common;${target.folder}/../../org.eclipse.papyrus.uml.tools;${target.folder}/../../org.eclipse.papyrus.infra.emf;${target.folder}/../../org.eclipse.papyrus.infra.services.labelprovider;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.uml.modelexplorer;${target.folder}/../../org.eclipse.papyrus.views.modelexplorer;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;"
+ dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.acceleo;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
index 22210ead9c4..fb14dcfe540 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.uml.diagram.common;${target.folder}/../../org.eclipse.papyrus.uml.tools.utils;${target.folder}/../../org.eclipse.papyrus.infra.emf;${target.folder}/../../org.eclipse.papyrus.editor;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.common;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.commands;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.navigation;${target.folder}/../../org.eclipse.papyrus.views.modelexplorer;${target.folder}/../../org.eclipse.papyrus.infra.services.decoration;${target.folder}/../../org.eclipse.papyrus.infra.services.markerlistener;${target.folder}/../../org.eclipse.papyrus.uml.diagram.navigation;${target.folder}/../../org.eclipse.papyrus.infra.services.resourceloading;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.uml.properties;${target.folder}/../../org.eclipse.papyrus.views.properties;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;"
+ dependencies=""
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
index 97fc11e5ffc..9a36a1e4525 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.uml.diagram.common;${target.folder}/../../org.eclipse.papyrus.uml.tools.utils;${target.folder}/../../org.eclipse.papyrus.infra.emf;${target.folder}/../../org.eclipse.papyrus.editor;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.common;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.commands;${target.folder}/../../org.eclipse.papyrus.uml.tools;${target.folder}/../../org.eclipse.papyrus.infra.services.validation;${target.folder}/../../org.eclipse.papyrus.infra.services.decoration;${target.folder}/../../org.eclipse.papyrus.infra.services.markerlistener;${target.folder}/../../org.eclipse.papyrus.infra.gmfdiag.navigation;${target.folder}/../../org.eclipse.papyrus.views.modelexplorer;${target.folder}/../../org.eclipse.papyrus.uml.diagram.navigation;${target.folder}/../../org.eclipse.papyrus.infra.services.resourceloading;${target.folder}/../../org.eclipse.papyrus.qompass.modellibs.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.uml.properties;${target.folder}/../../org.eclipse.papyrus.views.properties;${target.folder}/../../org.eclipse.papyrus.xwt;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.services.tracepoints;"
+ dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core;${target.folder}/../../org.eclipse.papyrus.qompass.modellibs.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.services.tracepoints;${target.folder}/../../org.eclipse.papyrus.infra.services.markerlistener;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java
index 1455bc22b1b..fd5f20c6e87 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/ComponentPreferencePage.java
@@ -17,7 +17,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
@@ -60,13 +60,13 @@ public class ComponentPreferencePage extends ArchitectureDiagramNodePreferencePa
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java
index 5eb0ed20981..05ea323b1a4 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PortPreferencePage.java
@@ -13,7 +13,7 @@
package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
public class PortPreferencePage extends ArchitectureDiagramNodePreferencePage {
@@ -27,8 +27,8 @@ public class PortPreferencePage extends ArchitectureDiagramNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 20);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java
index 2db78022737..90050e87235 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.architecture/src-gen/org/eclipse/papyrus/robotml/diagram/architecture/preferences/PropertyPreferencePage.java
@@ -13,7 +13,7 @@
package org.eclipse.papyrus.robotml.diagram.architecture.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.architecture.edit.part.ArchitectureDiagramEditPart;
public class PropertyPreferencePage extends ArchitectureDiagramNodePreferencePage {
@@ -33,7 +33,7 @@ public class PropertyPreferencePage extends ArchitectureDiagramNodePreferencePag
public static void initDefaults(IPreferenceStore store) {
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java
index 068bf2349a2..8971a69387a 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ClassPreferencePage.java
@@ -16,7 +16,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
public class ClassPreferencePage extends ComponentdefDiagramNodePreferencePage {
@@ -59,13 +59,13 @@ public class ClassPreferencePage extends ComponentdefDiagramNodePreferencePage {
// set the true value for the compartment visibility
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java
index 9f133047ced..ab4dac5b8ee 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/ComponentPreferencePage.java
@@ -16,7 +16,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
@@ -59,13 +59,13 @@ public class ComponentPreferencePage extends ComponentdefDiagramNodePreferencePa
// Initialize default visibility for compartments in preference page.
for(String compartmentName : compartmentDefaultVisibilityMap.keySet()) {
- String showCompartmentKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String showCompartmentKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(showCompartmentKey, compartmentDefaultVisibilityMap.get(compartmentName));
}
// Initialize default title visibility for compartments in preference page.
for(String compartmentName : compartmentTitleDefaultVisibilityMap.keySet()) {
- String showCompartmentTitleKey = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferenceConstantHelper.COMPARTMENT_NAME_VISIBILITY);
+ String showCompartmentTitleKey = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, compartmentName, PreferencesConstantsHelper.COMPARTMENT_NAME_VISIBILITY);
store.setDefault(showCompartmentTitleKey, compartmentTitleDefaultVisibilityMap.get(compartmentName));
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java
index 9bf364bed4b..cf7a560c739 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PackagePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
public class PackagePreferencePage extends ComponentdefDiagramNodePreferencePage {
@@ -30,11 +30,11 @@ public class PackagePreferencePage extends ComponentdefDiagramNodePreferencePage
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java
index 54e9c630c08..1b690d02dfe 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PortPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
public class PortPreferencePage extends ComponentdefDiagramNodePreferencePage {
@@ -26,8 +26,8 @@ public class PortPreferencePage extends ComponentdefDiagramNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 20);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java
index 007277ea548..2394468a886 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.componentdef/src-gen/org/eclipse/papyrus/robotml/diagram/componentdef/preferences/PropertyPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.componentdef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.componentdef.edit.part.ComponentdefDiagramEditPart;
public class PropertyPreferencePage extends ComponentdefDiagramNodePreferencePage {
@@ -32,7 +32,7 @@ public class PropertyPreferencePage extends ComponentdefDiagramNodePreferencePag
public static void initDefaults(IPreferenceStore store) {
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java
index d2a3402cf9b..c52d20a4966 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DataTypePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class DataTypePreferencePage extends DatatypeDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class DataTypePreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java
index 3603b07aed4..9f2781b2caf 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/DiagramPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class DiagramPreferencePage extends DatatypeDefNodePreferencePage {
@@ -26,8 +26,8 @@ public class DiagramPreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 20);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java
index a96e76aafdc..e1bd4d08e50 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/EnumerationPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class EnumerationPreferencePage extends DatatypeDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class EnumerationPreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java
index d05f4685127..8fd621a0b79 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PackagePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class PackagePreferencePage extends DatatypeDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class PackagePreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java
index 59639db2f83..144dbf82999 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/PrimitiveTypePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class PrimitiveTypePreferencePage extends DatatypeDefNodePreferencePage {
@@ -26,8 +26,8 @@ public class PrimitiveTypePreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 50);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 50);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java
index d4ae3502f51..7a3dc0e8a94 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.datatypedef/src-gen/org/eclipse/papyrus/robotml/diagram/datatypedef/preferences/SignalPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.datatypedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.datatypedef.edit.part.DatatypeDefEditPart;
public class SignalPreferencePage extends DatatypeDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class SignalPreferencePage extends DatatypeDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java
index a928721b41b..d5ff1b1b0de 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/DiagramPreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
public class DiagramPreferencePage extends InterfaceDefNodePreferencePage {
@@ -26,8 +26,8 @@ public class DiagramPreferencePage extends InterfaceDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 20);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 20);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 20);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java
index 6976094db28..418ace190c6 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/InterfacePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
public class InterfacePreferencePage extends InterfaceDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class InterfacePreferencePage extends InterfaceDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 100);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java
index 82759960cfa..36b92ad4487 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.interfacedef/src-gen/org/eclipse/papyrus/robotml/diagram/interfacedef/preferences/PackagePreferencePage.java
@@ -12,7 +12,7 @@
package org.eclipse.papyrus.robotml.diagram.interfacedef.preferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.PreferenceConstantHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.robotml.diagram.interfacedef.edit.part.InterfaceDefEditPart;
public class PackagePreferencePage extends InterfaceDefNodePreferencePage {
@@ -30,11 +30,11 @@ public class PackagePreferencePage extends InterfaceDefNodePreferencePage {
}
public static void initDefaults(IPreferenceStore store) {
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.WIDTH), 200);
- store.setDefault(PreferenceConstantHelper.getElementConstant(prefKey, PreferenceConstantHelper.HEIGHT), 100);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.WIDTH), 200);
+ store.setDefault(PreferencesConstantsHelper.getElementConstant(prefKey, PreferencesConstantsHelper.HEIGHT), 100);
// set the true value for the compartment visibility
for(String name : compartments) {
- String preferenceName = PreferenceConstantHelper.getCompartmentElementConstant(prefKey, name, PreferenceConstantHelper.COMPARTMENT_VISIBILITY);
+ String preferenceName = PreferencesConstantsHelper.getCompartmentElementConstant(prefKey, name, PreferencesConstantsHelper.COMPARTMENT_VISIBILITY);
store.setDefault(preferenceName, true);
}
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java b/extraplugins/table/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
index 297e2a3a5cf..7b627dcf198 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/cell/EMFFeatureValueCellManager.java
@@ -22,13 +22,11 @@ import java.util.Map;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.UnexecutableCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
@@ -41,8 +39,6 @@ import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFStringValueConverter;
import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
-import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
-import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
import org.eclipse.papyrus.infra.nattable.paste.ReferenceValueSetter;
@@ -183,6 +179,17 @@ public class EMFFeatureValueCellManager extends AbstractCellManager {
* the command to set the value
*/
protected Command getSetValueCommand(final TransactionalEditingDomain domain, final EObject elementToEdit, final EStructuralFeature featureToEdit, final Object newValue) {
+ //426731: [Table 2] Opening then closing cells editors without modifiyng values execute a command in the stack
+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=426731
+ //1. we verify that the new valu eis not the same thjan the current value
+ final Object currentValue = elementToEdit.eGet(featureToEdit);
+ if(newValue == null && currentValue == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if(newValue != null && newValue.equals(currentValue)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ //2. if not we do the job
final AbstractEditCommandRequest request = new SetRequest(domain, elementToEdit, featureToEdit, newValue);
final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(elementToEdit);
final ICommand cmd = provider.getEditCommand(request);
@@ -229,9 +236,9 @@ public class EMFFeatureValueCellManager extends AbstractCellManager {
}
return new GMFtoEMFCommandWrapper(returnedCommand);
}
-
-
- protected final ICommand getOpenConfirmChangeContainmentDialogCommand(final TransactionalEditingDomain domain, final ICommand defaultCommand, final boolean isMany){
+
+
+ protected final ICommand getOpenConfirmChangeContainmentDialogCommand(final TransactionalEditingDomain domain, final ICommand defaultCommand, final boolean isMany) {
final String messageDialog;
if(isMany) {
messageDialog = "Your are setting a value in a containment feature. This action will change the owner of the dropped element(s).\nContinue?";
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java
index 8f301af0ce2..c61647079cf 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java
@@ -14,11 +14,14 @@
package org.eclipse.papyrus.infra.nattable.common.editor;
+import java.io.IOException;
+
import org.eclipse.core.runtime.IProgressMonitor;
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.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
@@ -58,6 +61,13 @@ public abstract class AbstractEMFNattableEditor extends EditorPart {
private PartNameSynchronizer synchronizer;
/**
+ * the workspace preference store for this table editor
+ */
+ @SuppressWarnings("unused")
+ //not yet used in the table
+ private PreferenceStore workspacePreferenceStore;
+
+ /**
* @param servicesRegistry
* @param rawModel
*
@@ -66,8 +76,69 @@ public abstract class AbstractEMFNattableEditor extends EditorPart {
this.servicesRegistry = servicesRegistry;
this.tableManager = new NattableModelManager(rawModel);
this.synchronizer = new PartNameSynchronizer(rawModel);
+ this.workspacePreferenceStore = getWorkspaceViewerPreferenceStore();
+ }
+
+ /**
+ * Returns the workspace viewer <code>PreferenceStore</code>
+ *
+ * @return the workspace viewer <code>PreferenceStore</code>
+ */
+ public PreferenceStore getWorkspaceViewerPreferenceStore() {
+ //not yet used by tables
+ return null;
+
+ // if(this.workspacePreferenceStore != null) {
+ // return this.workspacePreferenceStore;
+ // } else {
+ // // Try to load it
+ // IPath path = Activator.getDefault().getStateLocation();
+ // String id = getIdStr(this.tableManager.getTable());
+ //
+ // String fileName = path.toString() + "/" + id;//$NON-NLS-1$
+ // java.io.File file = new File(fileName);
+ // this.workspacePreferenceStore = new PreferenceStore(fileName);
+ // if(file.exists()) {
+ // // Load it
+ // try {
+ // this.workspacePreferenceStore.load();
+ // } catch (Exception e) {
+ // // Create the default
+ // addDefaultPreferences();
+ // }
+ // } else {
+ // // Create it
+ // addDefaultPreferences();
+ // }
+ // return this.workspacePreferenceStore;
+ // }
}
+ // /**
+ // * returns the unique GUID of the view
+ // *
+ // * @param view
+ // * the view
+ // * @return String the GUID of a view (constant)
+ // */
+ // private static String getIdStr(Table table) {
+ // Resource resource = table.eResource();
+ // if(resource instanceof XMLResource) {
+ // String id = ((XMLResource)resource).getID(table);
+ // if(id != null) {
+ // return id;
+ // }
+ // }
+ //
+ // // Remain compatible with previous behavior.
+ // return StringStatics.BLANK;
+ // }
+
+ // not used : add a workspace preference to the table
+ // private void addDefaultPreferences() {
+ // final IPreferenceStore globalPreferenceStore = Activator.getDefault().getPreferenceStore();
+ // String tableKind = this.tableManager.getTable().getTableConfiguration().getType();
+ // }
/**
*
@@ -134,7 +205,7 @@ public abstract class AbstractEMFNattableEditor extends EditorPart {
}
@Override
- public Object getAdapter(final Class adapter) {
+ public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
if(adapter == INattableModelManager.class) {
return this.tableManager;
}
@@ -153,11 +224,22 @@ public abstract class AbstractEMFNattableEditor extends EditorPart {
@Override
public void dispose() {
+ saveLocalPreferenceStoreValues();
this.tableManager.dispose();
this.synchronizer.dispose();
super.dispose();
}
+ protected void saveLocalPreferenceStoreValues() {
+ // Write the settings, if necessary
+ try {
+ if(getWorkspaceViewerPreferenceStore() != null && getWorkspaceViewerPreferenceStore().needsSaving())
+ getWorkspaceViewerPreferenceStore().save();
+ } catch (IOException ioe) {
+ Activator.log.warn("Preferences can' be saved"); //$NON-NLS-1$
+ }
+ }
+
/**
* A class taking in charge the synchronization of the partName and the table name.
* When table name change, the other is automatically updated.
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF b/extraplugins/table/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
index b863cc6a267..eeba8fda0c3 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.1",
org.eclipse.uml2.uml,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.1",
- com.google.guava,
+ com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1",
org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
org.eclipse.papyrus.infra.nattable.common;bundle-version="0.10.1"
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF b/extraplugins/table/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
index c4995062622..b8a357bf616 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.1",
org.eclipse.gmf.runtime.emf.type.core,
org.eclipse.core.expressions,
- com.google.guava
+ com.google.guava;bundle-version="11.0.0"
Export-Package: org.eclipse.papyrus.infra.nattable.modelexplorer,
org.eclipse.papyrus.infra.nattable.modelexplorer.handlers,
org.eclipse.papyrus.infra.nattable.modelexplorer.messages,
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java
index e2ffd90c082..8e44156f8dc 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/manager/cell/ModelViewsCellManager.java
@@ -36,6 +36,7 @@ import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
/**
* The Cell manager for the ModelViews table
+ * TODO : should inherits from emf.nattable
*
* @author Vincent Lorenzo
*
@@ -160,9 +161,13 @@ public class ModelViewsCellManager extends AbstractCellManager {
final String featureName = ((String)objects.get(1)).replace(Utils.NATTABLE_EDITOR_PAGE_ID, ""); //$NON-NLS-1$
if(Utils.VIEW_NAME.equals(featureName)) {
final EStructuralFeature feature = editor.eClass().getEStructuralFeature(Utils.VIEW_NAME);
- final AbstractEditCommandRequest request = new SetRequest((TransactionalEditingDomain)domain, editor, feature, newValue);
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(editor);
- return new GMFtoEMFCommandWrapper(provider.getEditCommand(request));
+ if(!newValue.equals(editor.eClass().eGet(feature))) {
+ // 426731: [Table 2] Opening then closing cells editors without modifiyng values execute a command in the stack
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=426731
+ final AbstractEditCommandRequest request = new SetRequest((TransactionalEditingDomain)domain, editor, feature, newValue);
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(editor);
+ return new GMFtoEMFCommandWrapper(provider.getEditCommand(request));
+ }
}
return null;
}
@@ -218,12 +223,10 @@ public class ModelViewsCellManager extends AbstractCellManager {
*/
protected Object getEditorName(final Object editor) {
if(editor instanceof EObject) {
- if(editor instanceof EObject) {
- final EObject eobject = (EObject)editor;
- EStructuralFeature feature = eobject.eClass().getEStructuralFeature(Utils.VIEW_NAME);
- if(feature != null) {
- return eobject.eGet(feature);
- }
+ final EObject eobject = (EObject)editor;
+ EStructuralFeature feature = eobject.eClass().getEStructuralFeature(Utils.VIEW_NAME);
+ if(feature != null) {
+ return eobject.eGet(feature);
}
}
return NOT_AVALAIBLE;
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF b/extraplugins/table/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
index 6954329bf77..09ce06220bd 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/META-INF/MANIFEST.MF
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.1",
org.eclipse.papyrus.infra.widgets.toolbox,
org.apache.commons.lang,
- com.google.guava;bundle-version="11.0.2"
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.jface
Export-Package: org.eclipse.papyrus.infra.nattable,
org.eclipse.papyrus.infra.nattable.celleditor,
org.eclipse.papyrus.infra.nattable.celleditor.config,
@@ -37,6 +38,7 @@ Export-Package: org.eclipse.papyrus.infra.nattable,
org.eclipse.papyrus.infra.nattable.nattableconfiguration,
org.eclipse.papyrus.infra.nattable.painter,
org.eclipse.papyrus.infra.nattable.paste,
+ org.eclipse.papyrus.infra.nattable.preferences,
org.eclipse.papyrus.infra.nattable.provider,
org.eclipse.papyrus.infra.nattable.reorder,
org.eclipse.papyrus.infra.nattable.tester,
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/importTablePapyrusWizban.png b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/importTablePapyrusWizban.png
new file mode 100644
index 00000000000..2760811cabf
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/importTablePapyrusWizban.png
Binary files differ
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/import_wiz_16x16-papyrusColor.gif b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/import_wiz_16x16-papyrusColor.gif
new file mode 100644
index 00000000000..c7be463bcd2
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/import_wiz_16x16-papyrusColor.gif
Binary files differ
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/warning.gif b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/warning.gif
new file mode 100644
index 00000000000..2f1c5a8fa7b
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/icons/warning.gif
Binary files differ
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/plugin.xml b/extraplugins/table/org.eclipse.papyrus.infra.nattable/plugin.xml
index eede999b073..cc29f086118 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/plugin.xml
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/plugin.xml
@@ -13,6 +13,10 @@
allPopups="true"
locationURI="popup:org.eclipse.ui.popup.any">
<command
+ commandId="org.eclipse.papyrus.infra.nattable.import.command"
+ style="push">
+ </command>
+ <command
commandId="org.eclipse.papyrus.infra.nattable.invert.axis"
style="toggle">
<visibleWhen>
@@ -628,9 +632,9 @@
</category>
<command
categoryId="org.eclipse.papyrus.editor.category"
- description="Export Table to XLS"
+ description="Export Table to XLS Command"
id="org.eclipse.papyrus.infra.nattable.exporttoXLScommand"
- name="Export Table to XLS Command">
+ name="Export to XLS">
</command>
<command
@@ -1051,6 +1055,36 @@
commandId="org.eclipse.papyrus.infra.nattable.autoresize.rows"
icon="icons/auto_resize_row.png">
</image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.infra.nattable.category"
+ defaultHandler="org.eclipse.papyrus.infra.nattable.handler.ImportTableHandler"
+ description="Import a file into a table"
+ id="org.eclipse.papyrus.infra.nattable.import.command"
+ name="Import from file">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.infra.nattable.import.command"
+ icon="icons/import_wiz_16x16-papyrusColor.gif">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.importWizards">
+ <wizard
+ category="org.eclipse.papyrus.infra.core.importcategory"
+ class="org.eclipse.papyrus.infra.nattable.wizard.pages.ImportTableWizard"
+ icon="icons/import_wiz_16x16-papyrusColor.gif"
+ id="org.eclipse.papyrus.infra.nattable.import.category"
+ name="Import In Open Table">
+ <description>
+ This wizard allows to import a table.
+ </description>
+ </wizard>
</extension>
</plugin>
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java
index db654b72350..2117b5c6af2 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/Activator.java
@@ -13,7 +13,10 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.nattable.preferences.PapyrusTablePreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -31,6 +34,12 @@ public class Activator extends AbstractUIPlugin {
public static LogHelper log;
/**
+ * Storage for preferences.
+ */
+ protected IPreferenceStore papyrusPreferenceStore;
+
+
+ /**
* The constructor
*/
public Activator() {
@@ -66,4 +75,19 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
+ /**
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
+ *
+ * @return
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ // Create the preference store lazily.
+ if(this.papyrusPreferenceStore == null) {
+ this.papyrusPreferenceStore = new PapyrusTablePreferenceStore(new InstanceScope(), getBundle().getSymbolicName());
+ }
+ return this.papyrusPreferenceStore;
+ }
+
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
index 0f875521e60..ede16907a8f 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/AbstractStyledTextCellEditor.java
@@ -29,8 +29,10 @@ import org.eclipse.nebula.widgets.nattable.style.IStyle;
import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
@@ -240,6 +242,17 @@ public abstract class AbstractStyledTextCellEditor extends AbstractCellEditor {
//create the Text control based on the specified style
final StyledText textControl = createStyledText(parent, style);
+ //to avoid widget is disposed exception during the closing of the cell editor
+ textControl.addVerifyKeyListener(new VerifyKeyListener() {
+
+ @Override
+ public void verifyKey(VerifyEvent event) {
+ if(textControl.isDisposed()){
+ event.doit = false;
+ }
+ }
+ });
+
//set style information configured in the associated cell style
textControl.setBackground(this.cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR));
textControl.setForeground(this.cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR));
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java
new file mode 100644
index 00000000000..794cbf5f2e6
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusDefaultEditBindings.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.configuration;
+
+import org.eclipse.nebula.widgets.nattable.config.AbstractUiBindingConfiguration;
+import org.eclipse.nebula.widgets.nattable.edit.action.CellEditDragMode;
+import org.eclipse.nebula.widgets.nattable.edit.action.KeyEditAction;
+import org.eclipse.nebula.widgets.nattable.edit.action.MouseEditAction;
+import org.eclipse.nebula.widgets.nattable.edit.config.DefaultEditBindings;
+import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
+import org.eclipse.nebula.widgets.nattable.painter.cell.CheckBoxPainter;
+import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.CellEditorMouseEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.CellPainterMouseEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.LetterOrDigitKeyEventMatcher;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher;
+import org.eclipse.swt.SWT;
+
+/**
+ *
+ * @author VL222926
+ * Copy of {@link DefaultEditBindings} excepted for edition on double click replacing edition on single click
+ */
+public class PapyrusDefaultEditBindings extends AbstractUiBindingConfiguration {
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.config.IConfiguration#configureUiBindings(org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry)
+ *
+ * @param uiBindingRegistry
+ */
+ @Override
+ public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
+ //configure the space key to activate a cell editor via keyboard
+ //this is especially useful for changing the value for a checkbox
+ uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, 32), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.F2), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(), new KeyEditAction());
+ uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(SWT.SHIFT), new KeyEditAction());
+
+ uiBindingRegistry.registerDoubleClickBinding(new CellEditorMouseEventMatcher(GridRegion.BODY), new MouseEditAction());
+
+ uiBindingRegistry.registerMouseDragMode(new CellEditorMouseEventMatcher(GridRegion.BODY), new CellEditDragMode());
+
+ uiBindingRegistry.registerFirstSingleClickBinding(new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, CheckBoxPainter.class), new MouseEditAction());
+
+ uiBindingRegistry.registerFirstMouseDragMode(new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, CheckBoxPainter.class), new CellEditDragMode());
+
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
index b1ca4412e61..32c99976c25 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/configuration/PapyrusGridLayerConfiguration.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.infra.nattable.configuration;
import org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultGridLayerConfiguration;
import org.eclipse.nebula.widgets.nattable.layer.CompositeLayer;
+import org.eclipse.papyrus.infra.nattable.export.PapyrusExportBindings;
/**
* We change the edit configuration
@@ -43,4 +44,24 @@ public class PapyrusGridLayerConfiguration extends DefaultGridLayerConfiguration
protected void addEditingHandlerConfig() {
addConfiguration(new EditConfiguration());
}
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultGridLayerConfiguration#addEditingUIConfig()
+ *
+ */
+ @Override
+ protected void addEditingUIConfig() {
+ addConfiguration(new PapyrusDefaultEditBindings());
+ }
+
+ /**
+ *
+ * @see org.eclipse.nebula.widgets.nattable.grid.layer.config.DefaultGridLayerConfiguration#addExcelExportUIBindings()
+ *
+ */
+ @Override
+ protected void addExcelExportUIBindings() {
+ addConfiguration(new PapyrusExportBindings());
+ }
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java
new file mode 100644
index 00000000000..de2bec5c3d0
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/dialog/PasteImportStatusDialog.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.dialog;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+
+/**
+ *
+ * @author VL222926
+ * This dialog is used to display paste error status
+ */
+public class PasteImportStatusDialog extends MessageDialog {
+
+ /**
+ * Message displayed in the paste dialog
+ */
+ public static final String HOW_TO_PASTE_MESSAGE = Messages.PasteImportStatusDialog_PasteConfigurationMessage;
+
+ /**
+ * Title for all dialog used by this class
+ */
+ public static final String DIALOG_TITLE = Messages.PasteImportStatusDialog_ImportPasteDialogTitle;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parentShell
+ * the shell parent to use
+ * @param dialogMessage
+ * the message to display
+ */
+ public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage) {
+ super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, MessageDialog.ERROR, new String[]{ IDialogConstants.OK_LABEL }, 0);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parentShell
+ * the shell parent to use
+ * @param dialogMessage
+ * the message to display
+ * @param dialogImageType
+ */
+ public PasteImportStatusDialog(final Shell parentShell, final String dialogMessage, final int dialogImageType) {
+ super(parentShell, DIALOG_TITLE, getPapyrusIcon(), dialogMessage, dialogImageType, new String[]{ IDialogConstants.OK_LABEL }, 0);
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.dialogs.MessageDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ * @return
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ final Composite comp = (Composite)super.createDialogArea(parent);
+ final CLabel label = new CLabel(comp, SWT.NONE);
+ label.setText(HOW_TO_PASTE_MESSAGE);
+ label.setImage(getInfoImage());
+ return comp;
+ }
+
+
+ /**
+ *
+ * @return
+ * the papyrus icon
+ */
+ private static final Image getPapyrusIcon() {
+ return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage("icons/papyrus.png"); //$NON-NLS-1$
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExcelExporter.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExcelExporter.java
new file mode 100644
index 00000000000..8e272077bad
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExcelExporter.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.export;
+
+import static org.eclipse.nebula.widgets.nattable.util.ObjectUtils.isNotNull;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.eclipse.nebula.widgets.nattable.export.FileOutputStreamProvider;
+import org.eclipse.nebula.widgets.nattable.export.IOutputStreamProvider;
+import org.eclipse.nebula.widgets.nattable.export.excel.ExcelExporter;
+import org.eclipse.papyrus.infra.nattable.Activator;
+
+public class PapyrusExcelExporter extends ExcelExporter {
+
+ private static final String EXCEL_HEADER_FILE = "papyrusExcelExportHeader.txt"; //$NON-NLS-1$
+
+ public PapyrusExcelExporter() {
+ this(new FileOutputStreamProvider("table_export.xls", new String[]{ "Excel Workbok (*.xls)" }, new String[]{ "*.xls" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ public PapyrusExcelExporter(IOutputStreamProvider outputStreamProvider) {
+ super(outputStreamProvider);
+ }
+
+ @Override
+ public void exportLayerBegin(OutputStream outputStream, String layerName) throws IOException {
+ writeHeader(outputStream);//no super!
+ outputStream.write(asBytes("<body><table border='1'>")); //$NON-NLS-1$
+ }
+
+ //this method is private is NatTable...
+ private void writeHeader(OutputStream outputStream) throws IOException {
+ InputStream headerStream = null;
+ try {
+ headerStream = this.getClass().getResourceAsStream(EXCEL_HEADER_FILE);
+ int c;
+ while((c = headerStream.read()) != -1) {
+ outputStream.write(c);
+ }
+ } catch (Exception e) {
+ Activator.log.error(e);
+ } finally {
+ if(isNotNull(headerStream)) {
+ headerStream.close();
+ }
+ }
+ }
+
+ private byte[] asBytes(String string) {
+ return string.getBytes();
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExportBindings.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExportBindings.java
new file mode 100644
index 00000000000..553737e0f3a
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/PapyrusExportBindings.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.nattable.export;
+
+
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.config.IConfiguration;
+import org.eclipse.nebula.widgets.nattable.export.ILayerExporter;
+import org.eclipse.nebula.widgets.nattable.export.action.ExportAction;
+import org.eclipse.nebula.widgets.nattable.export.config.DefaultExportBindings;
+import org.eclipse.nebula.widgets.nattable.export.excel.ExcelExporter;
+import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
+import org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;
+import org.eclipse.swt.SWT;
+
+public class PapyrusExportBindings extends DefaultExportBindings {
+
+ public void configureRegistry(IConfigRegistry configRegistry) {
+ configRegistry.registerConfigAttribute(ILayerExporter.CONFIG_ATTRIBUTE, new PapyrusExcelExporter());
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/papyrusExcelExportHeader.txt b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/papyrusExcelExportHeader.txt
new file mode 100644
index 00000000000..4f7b65b9172
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/export/papyrusExcelExportHeader.txt
@@ -0,0 +1,53 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:x="urn:schemas-microsoft-com:office:excel"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Excel.Sheet>
+
+<!--[if gte mso 9]><xml>
+ <x:ExcelWorkbook>
+ <x:ExcelWorksheets>
+ <x:ExcelWorksheet>
+ <x:Name>Sheet1</x:Name>
+ <x:WorksheetOptions>
+ <x:Selected/>
+ <x:Panes>
+ <x:Pane>
+ <x:Number>0</x:Number>
+ <x:ActiveRow>0</x:ActiveRow>
+ <x:ActiveCol>0</x:ActiveCol>
+ </x:Pane>
+ </x:Panes>
+ <x:ProtectContents>False</x:ProtectContents>
+ <x:ProtectObjects>False</x:ProtectObjects>
+ <x:ProtectScenarios>False</x:ProtectScenarios>
+ </x:WorksheetOptions>
+ </x:ExcelWorksheet>
+ <x:ExcelWorksheet>
+ <x:Name>Sheet2</x:Name>
+ <x:WorksheetOptions>
+ <x:ProtectContents>False</x:ProtectContents>
+ <x:ProtectObjects>False</x:ProtectObjects>
+ <x:ProtectScenarios>False</x:ProtectScenarios>
+ </x:WorksheetOptions>
+ </x:ExcelWorksheet>
+ <x:ExcelWorksheet>
+ <x:Name>Sheet3</x:Name>
+ <x:WorksheetOptions>
+ <x:ProtectContents>False</x:ProtectContents>
+ <x:ProtectObjects>False</x:ProtectObjects>
+ <x:ProtectScenarios>False</x:ProtectScenarios>
+ </x:WorksheetOptions>
+ </x:ExcelWorksheet>
+ </x:ExcelWorksheets>
+ <x:WindowHeight>8895</x:WindowHeight>
+ <x:WindowWidth>13980</x:WindowWidth>
+ <x:WindowTopX>480</x:WindowTopX>
+ <x:WindowTopY>270</x:WindowTopY>
+ <x:ProtectStructure>False</x:ProtectStructure>
+ <x:ProtectWindows>False</x:ProtectWindows>
+ </x:ExcelWorkbook>
+</xml><![endif]-->
+</head>
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java
index e03aa979278..999546d41aa 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/AbstractTableHandler.java
@@ -28,13 +28,13 @@ import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
+import org.eclipse.papyrus.infra.tools.util.WorkbenchPartHelper;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -66,7 +66,7 @@ public abstract class AbstractTableHandler extends AbstractHandler {
* the current active part
*/
protected IWorkbenchPart getActivePart() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ return WorkbenchPartHelper.getCurrentActiveWorkbenchPart();
}
/**
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java
new file mode 100644
index 00000000000..a2079d3a91f
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/ImportTableHandler.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.handler;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.nattable.wizard.ImportTableWizard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ *
+ * This handler allows to import a table using the ImportWizard
+ *
+ */
+public class ImportTableHandler extends AbstractTableHandler {
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final ImportTableWizard wizard = new ImportTableWizard();
+ wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(getCurrentNattableModelManager()));
+ final WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
+ dialog.open();
+ return null;
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
index 57937edc797..1d4d040c3f7 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/PasteInTableHandler.java
@@ -15,9 +15,9 @@ package org.eclipse.papyrus.infra.nattable.handler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.papyrus.infra.nattable.manager.PasteInTableManager;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
+import org.eclipse.papyrus.infra.nattable.manager.PasteAxisInNattableManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
/**
* Paste Handler
@@ -28,11 +28,6 @@ import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
public class PasteInTableHandler extends AbstractTableHandler {
/**
- * the paste manager
- */
- private PasteInTableManager pasteManager;
-
- /**
* this field is used to determine if we want open a dialog to prevent the user that the command creation and the command execution can take a
* long time
*/
@@ -40,25 +35,6 @@ public class PasteInTableHandler extends AbstractTableHandler {
/**
- * the paste mode
- */
- private PasteModeEnumeration pasteMode;
-
- /**
- * the current table manager
- */
- private INattableModelManager manager;
-
- /**
- *
- * Constructor.
- *
- */
- public PasteInTableHandler() {
- this.pasteManager = new PasteInTableManager();
- }
-
- /**
*
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*
@@ -68,11 +44,12 @@ public class PasteInTableHandler extends AbstractTableHandler {
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- this.pasteManager.paste(getCurrentNattableModelManager(), pasteMode, useProgressMonitorDialog);
+ CSVPasteHelper pasteHelper = new CSVPasteHelper();
+ PasteAxisInNattableManager pasteManager = new PasteAxisInNattableManager(getCurrentNattableModelManager(), pasteHelper, useProgressMonitorDialog, TableClipboardUtils.getClipboardContentsAsString());
+ pasteManager.doPaste();
return null;
}
-
/**
* @Override
* @see org.eclipse.papyrus.infra.nattable.handler.AbstractTableHandler#setEnabled(java.lang.Object)
@@ -80,21 +57,7 @@ public class PasteInTableHandler extends AbstractTableHandler {
* @param evaluationContext
*/
public void setEnabled(Object evaluationContext) {
- pasteMode = null;
- this.manager = getCurrentNattableModelManager();
- boolean isEnabled = false;
- if(manager != null) {
- pasteMode = this.pasteManager.getPasteMode(evaluationContext, manager);
- switch(pasteMode) {
- case CANT_PASTE:
- isEnabled = false;
- break;
- default:
- isEnabled = true;
- }
-
- }
- setBaseEnabled(isEnabled);
+ setBaseEnabled(getCurrentNattableModelManager() != null);
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java
new file mode 100644
index 00000000000..13bfe2307be
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/AbstractPasteImportInNattableManager.java
@@ -0,0 +1,367 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.IOException;
+import java.io.Reader;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.dialog.PasteImportStatusDialog;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectAxisInNattableCommandProvider;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.CreatableEObjectAxisUtils;
+import org.eclipse.papyrus.infra.nattable.utils.PasteConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.PasteEnablementStatus;
+import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ *
+ * Abstract class for the copy/paste and import file in the table
+ *
+ */
+public abstract class AbstractPasteImportInNattableManager {
+
+ /**
+ * the helper used to do the paste (help for the split of the string)
+ */
+ protected final CSVPasteHelper pasteHelper;
+
+ /**
+ * the table manager
+ */
+ protected final INattableModelManager tableManager;
+
+ /**
+ * true if we must use progress monitor
+ */
+ private boolean useProgressMonitorDialog;
+
+ /**
+ * message in case of inverted table
+ */
+ private static final String INVERTED_MESSAGE = Messages.AbstractPasteImportInNattableManager_INVERTED_MESSAGE;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pasteHelper
+ * the helper used to do the paste (help for the split of the string)
+ */
+ public AbstractPasteImportInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog) {
+ this.pasteHelper = pasteHelper;
+ this.tableManager = tableManager;
+ this.useProgressMonitorDialog = useProgressMonitorDialog;
+ }
+
+
+
+ /**
+ * This method manages the paste and the possible error dialog before doing the paste
+ *
+ * @return
+ * <code>true</code> if the paste can be done (as it is done in a job, it will be after the return of this method)
+ */
+ public boolean doPaste() {
+ if(this.tableManager.getTable().isInvertAxis()) {
+ new PasteImportStatusDialog(Display.getDefault().getActiveShell(), INVERTED_MESSAGE).open();
+ return false;
+ }
+ final PasteEnablementStatus pasteStatus = findPasteModeFromTableConfiguration(this.tableManager);
+ if(pasteStatus.getPasteMode() == PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN) {
+ boolean value = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), PasteImportStatusDialog.DIALOG_TITLE, Messages.AbstractPasteImportInNattableManager_WhatAreYouPasting);
+ if(value) {
+ pasteStatus.getColumnStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_TheUserChosesToPasteRows));
+ } else {
+ pasteStatus.getRowStatus().add(new Status(IStatus.CANCEL, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns));
+ }
+ }
+ PasteModeEnumeration pasteMode = pasteStatus.getPasteMode();
+ switch(pasteMode) {
+ case PASTE_NO_CONFIGURATION:
+ return openPasteWithNoConfigurationDialog();
+ case CANT_PASTE:
+ return openCantPasteDialog(pasteStatus);
+ case PASTE_EOBJECT_ROW:
+ return pasteRow(this.tableManager, pasteStatus, pasteHelper);
+ case PASTE_EOBJECT_COLUMN:
+ return pasteColumn(this.tableManager, pasteStatus, pasteHelper);
+ case PASTE_EOBJECT_ROW_OR_COLUMN:
+ //nothing to do
+ break;
+ default:
+ break;
+ }
+
+ return false;
+ }
+
+
+ /**
+ *
+ * @param pasteStatus
+ * the paste status
+ * @return
+ */
+ private boolean openCantPasteDialog(final PasteEnablementStatus pasteStatus) {
+ final MultiStatus rowStatus = pasteStatus.getRowStatus();
+ final MultiStatus columnStatus = pasteStatus.getColumnStatus();
+ if(rowStatus == null && columnStatus != null) {
+ new PasteImportStatusDialog(Display.getCurrent().getActiveShell(), getFirstNonOKStatus(columnStatus).getMessage()).open();
+ } else if(columnStatus == null && rowStatus != null) {
+ new PasteImportStatusDialog(Display.getCurrent().getActiveShell(), getFirstNonOKStatus(rowStatus).getMessage()).open();
+ } else if(columnStatus != null && rowStatus != null) {
+ StringBuffer buffer = new StringBuffer(Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration);
+ buffer.append(Messages.AbstractPasteImportInNattableManager_PasteRowsError);
+ buffer.append(getFirstNonOKStatus(rowStatus).getMessage());
+ buffer.append(Messages.AbstractPasteImportInNattableManager_PasteColumnsError);
+ buffer.append(getFirstNonOKStatus(columnStatus).getMessage());
+ new PasteImportStatusDialog(Display.getDefault().getActiveShell(), buffer.toString()).open();
+ } else {
+ //never possible
+ openPasteWithNoConfigurationDialog();
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @param status
+ * a status
+ * @return
+ * the first non ok status
+ */
+ private IStatus getFirstNonOKStatus(final IStatus status) {
+ if(status != null && !status.isOK()) {
+ for(final IStatus current : status.getChildren()) {
+ if(!current.isOK()) {
+ if(current.isMultiStatus()) {
+ return getFirstNonOKStatus(current);
+ } else {
+ return current;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * open the dialog used when the table has no paste configuration
+ *
+ * @return
+ */
+ private boolean openPasteWithNoConfigurationDialog() {
+ new PasteImportStatusDialog(Display.getDefault().getActiveShell(), Messages.AbstractPasteImportInNattableManager_NoPasteConfiguration2, MessageDialog.INFORMATION).open();
+ return true;
+ }
+
+ /**
+ *
+ * @param manager
+ * the table manager
+ * @param pasteStatus
+ * the paste status
+ * @param pasteHelper
+ * the paste helper
+ * @return
+ * <code>true</code> if the paste can be done
+ */
+ private boolean pasteColumn(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ //TODO
+ return false;
+ }
+
+ /**
+ *
+ * @param manager
+ * the table manager
+ * @param pasteStatus
+ * the paste status
+ * @param pasteHelper
+ * the paste helper
+ * @return
+ * <code>true</code> if the paste can be done
+ */
+ private boolean pasteRow(final INattableModelManager manager, final PasteEnablementStatus pasteStatus, final CSVPasteHelper pasteHelper) {
+ final Reader reader = createReader();
+ final IStatus status = verifyColumnCountOnFirstLine(manager, reader);
+ try {
+ reader.close();
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ if(status.isOK()) {
+ paste(manager, pasteStatus, useProgressMonitorDialog, createReader(), getDataSize());
+ } else {
+ new PasteImportStatusDialog(Display.getDefault().getActiveShell(), status.getMessage()).open();
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ *
+ * @param tableManager
+ * the table manager
+ * @param reader
+ * the reader to use to do parsing
+ * @return
+ * a status indicating if the first line of the file allows to do the paste
+ */
+ private IStatus verifyColumnCountOnFirstLine(final INattableModelManager tableManager, final Reader reader) {
+ CSVParser parser = this.pasteHelper.createParser(reader);
+ //we verify the nb of columns
+ final RowIterator rowIter = parser.parse();
+ int nbCell = 0;
+ if(rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ while(cellIter.hasNext()) {
+ cellIter.next();
+ nbCell++;
+ }
+ }
+ final int axisCount = tableManager.getColumnCount();
+ if(axisCount == nbCell) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals);
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, NLS.bind(Messages.AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals, nbCell, axisCount));
+ }
+ }
+
+
+
+ /**
+ *
+ * @param manager
+ * the table manager
+ * @param status
+ * the status
+ * @param useProgressMonitorDialog
+ * if <code>true</code> a progress monitor will be used
+ * @param reader
+ * the reader used to import data in the table.
+ * @param totalSize
+ * the full size of the elements to import
+ */
+ private void paste(final INattableModelManager manager, final PasteEnablementStatus status, final boolean useProgressMonitorDialog, final Reader reader, final long totalSize) {
+ PasteEObjectAxisInNattableCommandProvider commandProvider = null;
+ switch(status.getPasteMode()) {
+ case PASTE_EOBJECT_ROW:
+ commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, false, reader, this.pasteHelper, totalSize);
+ break;
+ case PASTE_EOBJECT_COLUMN:
+ commandProvider = new PasteEObjectAxisInNattableCommandProvider(manager, true, reader, this.pasteHelper, totalSize);
+ break;
+ default:
+ break;
+ }
+ //TODO : ask for the element to paste (column or row)!
+ if(commandProvider != null) {
+ commandProvider.executePasteFromStringCommand(useProgressMonitorDialog);
+ }
+ }
+
+ /**
+ *
+ * @param tableManager
+ * the table manager used to calculate the enablement of the paste
+ * @return
+ * the status for the paste
+ */
+ private PasteEnablementStatus findPasteModeFromTableConfiguration(final INattableModelManager tableManager) {
+ final MultiStatus pasteRowsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, false);
+ final MultiStatus pasteColumnsStatus = canPasteAxis_verifyPasteConfiguration(tableManager, true);
+ final PasteEnablementStatus pasteStatus = new PasteEnablementStatus(pasteColumnsStatus, pasteRowsStatus);
+ return pasteStatus;
+ }
+
+ /**
+ *
+ * @param tableManager
+ * teh table manager
+ * @param columnAxis
+ * if <code>true</code> this method tests the paste configuration for the columns, if not, it tests the paste configuration for the rows
+ * @return
+ * a multi status with information on all verified point in the table configuration or <code>null</code> when there is no table
+ * configuration
+ */
+ private static MultiStatus canPasteAxis_verifyPasteConfiguration(final INattableModelManager tableManager, final boolean columnAxis) {
+ final IPasteConfiguration conf = (IPasteConfiguration)AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), columnAxis);
+ final String pluginId = Activator.PLUGIN_ID;
+ final String axisName = columnAxis ? Messages.AbstractPasteImportInNattableManager_column : Messages.AbstractPasteImportInNattableManager_row;
+ MultiStatus status = null;
+ if(conf instanceof PasteEObjectConfiguration) {
+ status = new MultiStatus(pluginId, IStatus.OK, NLS.bind(Messages.AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable, axisName), null);
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste, axisName)));
+ if(status.isOK()) {
+ final PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration)conf;
+ status.add(PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration));
+
+ //verify that the table context have the required feature
+ if(status.isOK()) {
+ final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
+ if(tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature)) {
+ status.add(new Status(IStatus.OK, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste));
+ } else {
+ status.add(new Status(IStatus.ERROR, pluginId, Messages.AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste));
+ }
+
+ //verify that the elements to create are supported by the axis manager
+ if(status.isOK()) {
+ final String elementId = pasteConfiguration.getPastedElementId();
+ if(CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, columnAxis).contains(elementId)) {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCanCreateElement, elementId, axisName)));
+ } else {
+ status.add(new Status(IStatus.OK, pluginId, NLS.bind(Messages.AbstractPasteImportInNattableManager_TheTableCantCreateElement, elementId, axisName)));
+ }
+ }
+ }
+ }
+ }
+ return status;
+ }
+
+ /**
+ *
+ * @return
+ * a new reader
+ */
+ protected abstract Reader createReader();
+
+ /**
+ *
+ * @return
+ * the size of the copied data
+ */
+ protected abstract long getDataSize();
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java
new file mode 100644
index 00000000000..aa65257b2a7
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/ImportAxisInNattableManager.java
@@ -0,0 +1,62 @@
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+
+
+public class ImportAxisInNattableManager extends AbstractPasteImportInNattableManager {
+
+ /**
+ * the file to import
+ */
+ private File file;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param tableManager
+ * @param pasteHelper
+ * @param fileToImport
+ * @param useProgressMonitorDialog
+ */
+ public ImportAxisInNattableManager(INattableModelManager tableManager, CSVPasteHelper pasteHelper, final File fileToImport, boolean useProgressMonitorDialog) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog);
+ this.file = fileToImport;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ *
+ * @return
+ */
+ @Override
+ protected Reader createReader() {
+ FileReader reader = null;
+ try {
+ reader = new FileReader(file);
+ } catch (FileNotFoundException e) {
+ Activator.log.error(e);
+ }
+ return reader;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ *
+ * @return
+ */
+ @Override
+ protected long getDataSize() {
+ return this.file.length();
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java
new file mode 100644
index 00000000000..1ceeb35bcbc
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteAxisInNattableManager.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.manager;
+
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+
+/**
+ *
+ * This class allows to paste axis from string
+ *
+ */
+public class PasteAxisInNattableManager extends AbstractPasteImportInNattableManager {
+
+ /**
+ * the text to paste
+ */
+ private final String pastedText;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param tableManager
+ * @param pasteHelper
+ * @param useProgressMonitorDialog
+ * @param pastedText
+ */
+ public PasteAxisInNattableManager(final INattableModelManager tableManager, final CSVPasteHelper pasteHelper, final boolean useProgressMonitorDialog, final String pastedText) {
+ super(tableManager, pasteHelper, useProgressMonitorDialog);
+ this.pastedText = pastedText;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#createReader()
+ *
+ * @return
+ */
+ @Override
+ protected Reader createReader() {
+ return new StringReader(this.pastedText);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.AbstractPasteImportInNattableManager#getDataSize()
+ *
+ * @return
+ */
+ @Override
+ protected long getDataSize() {
+ return this.pastedText.length();
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteInTableManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteInTableManager.java
deleted file mode 100644
index b063d60a3e8..00000000000
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/PasteInTableManager.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.manager;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IPasteConfiguration;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
-import org.eclipse.papyrus.infra.nattable.provider.PasteEObjectAxisInTableCommandProvider;
-import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.CreatableEObjectAxisUtils;
-import org.eclipse.papyrus.infra.nattable.utils.PasteConfigurationUtils;
-import org.eclipse.papyrus.infra.nattable.utils.PasteModeEnumeration;
-import org.eclipse.papyrus.infra.nattable.utils.TableClipboardUtils;
-
-/**
- *
- * This class manager the paste into the table
- *
- */
-public class PasteInTableManager {
-
- /**
- *
- * @param evaluationContext
- * the evaluation context
- * @param tableManager
- * the table manager
- * @return
- * the paste mode
- */
- public PasteModeEnumeration getPasteMode(final Object evaluationContext, final INattableModelManager tableManager) {
- return getPasteMode(tableManager);
- }
-
-
-
- /**
- *
- * @param tableManager
- * the table manager
- * @param pasteMode
- * the paste mode
- * @param useProgressMonitorDialog
- * if <code>true</code> we will use a progress monitor to do the paste
- */
- public void paste(final INattableModelManager tableManager, final PasteModeEnumeration pasteMode, boolean useProgressMonitorDialog) {
- switch(pasteMode) {
- case PASTE_EOBJECT_COLUMN:
- case PASTE_EOBJECT_ROW:
- case PASTE_EOBJECT_ROW_OR_COLUMN:
- PasteEObjectAxisInTableCommandProvider commandProvider = new PasteEObjectAxisInTableCommandProvider(tableManager, pasteMode);
- commandProvider.executePasteFromStringCommand(useProgressMonitorDialog);
- break;
- default:
- break;
- }
- }
-
- /**
- *
- * @param tableManager
- * the table manager
- * @return
- * a java enumeration literal indicating the way to do the paste
- */
- private static final PasteModeEnumeration getPasteMode(final INattableModelManager tableManager) {
- PasteModeEnumeration result = PasteModeEnumeration.CANT_PASTE;
- boolean canPasteColumns = canPasteAxis(tableManager, true);
- boolean canPasteRows = canPasteAxis(tableManager, false);
- if(canPasteColumns && canPasteRows) {
- result = PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN;
- } else if(canPasteColumns) {
- result = PasteModeEnumeration.PASTE_EOBJECT_COLUMN;
- } else if(canPasteRows) {
- result = PasteModeEnumeration.PASTE_EOBJECT_ROW;
- }
- return result;
- }
-
-
- /**
- *
- * @param tableManager
- * the table manager
- * @return
- * <code>true</code> if the contents of the clipboard contains the same number of columns than the table manager displays
- */
- private static boolean canPasteAxis(final INattableModelManager tableManager, boolean columnAxis) {
- final IPasteConfiguration conf = (IPasteConfiguration)AxisConfigurationUtils.getIAxisConfigurationUsedInTable(tableManager.getTable(), NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), columnAxis);
- boolean result = conf instanceof PasteEObjectConfiguration;
- PasteEObjectConfiguration pasteConfiguration = (PasteEObjectConfiguration)conf;
- result = result && PasteConfigurationUtils.hasConsistentPasteEObjectConfiguration(pasteConfiguration);
-
- //verify that the table context have the required feature
- if(result) {
- final EStructuralFeature containmentFeature = pasteConfiguration.getPasteElementContainementFeature();
- result = result && tableManager.getTable().getContext().eClass().getEAllStructuralFeatures().contains(containmentFeature);
- }
- //verify that the elements to create are supported by the axis manager
- if(result) {
- final String elementId = pasteConfiguration.getPastedElementId();
- result = result && CreatableEObjectAxisUtils.getCreatableElementIds(tableManager, columnAxis).contains(elementId);
- }
- if(result) {
- final String[] axis;
- final int axisCount;
- if(columnAxis) {
- axis = TableClipboardUtils.getColumnsFromClipboard();
- axisCount = tableManager.getRowCount();
- } else {
- axis = TableClipboardUtils.getRowsFromClipboard();
- axisCount = tableManager.getColumnCount();
- }
-
- if(axis != null && axis.length > 0) {
- int nbAxis = TableClipboardUtils.getCells(axis[0]).length;
- result = axisCount == nbAxis;
- }
- }
- return result;
- }
-
-}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java
index e24a9c648e4..a8c7c3fd4f1 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/AbstractCellManager.java
@@ -98,8 +98,9 @@ public abstract class AbstractCellManager implements ICellManager {
@Override
public void setValue(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager) {
final Command cmd = getSetValueCommand(domain, columnElement, rowElement, newValue, tableManager);
- assert cmd != null;
- domain.getCommandStack().execute(cmd);
+ if(cmd != null) {
+ domain.getCommandStack().execute(cmd);
+ }
}
/**
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
index f239a73bd7c..b4a83c67385 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/cell/ICellManager.java
@@ -99,7 +99,7 @@ public interface ICellManager {
* the new value to set to the intersection of these 2 objects
* @param tableManager
* @return
- * the command to set the value
+ * the command to set the value or <code>null</code>
*/
public Command getSetValueCommand(final TransactionalEditingDomain domain, final Object columnElement, final Object rowElement, final Object newValue, final INattableModelManager tableManager);
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
index 811fb97a7e0..b4bf438bb2b 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/AbstractNattableWidgetManager.java
@@ -23,7 +23,6 @@ import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration;
-import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes;
import org.eclipse.nebula.widgets.nattable.config.ConfigRegistry;
import org.eclipse.nebula.widgets.nattable.config.EditableRule;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
@@ -61,7 +60,6 @@ import org.eclipse.papyrus.infra.nattable.dataprovider.AbstractDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.BodyDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.ColumnHeaderDataProvider;
import org.eclipse.papyrus.infra.nattable.dataprovider.RowHeaderDataProvider;
-import org.eclipse.papyrus.infra.nattable.formatter.PapyrusExportFormatter;
import org.eclipse.papyrus.infra.nattable.layer.PapyrusGridLayer;
import org.eclipse.papyrus.infra.nattable.layerstack.BodyLayerStack;
import org.eclipse.papyrus.infra.nattable.layerstack.ColumnHeaderLayerStack;
@@ -207,7 +205,7 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
final Menu menu = menuMgr.createContextMenu(this.natTable);
this.natTable.setMenu(menu);
- this.selectionProvider = new TableSelectionProvider(this.bodyLayerStack.getSelectionLayer());
+ this.selectionProvider = new TableSelectionProvider(this, this.bodyLayerStack.getSelectionLayer());
site.registerContextMenu(menuMgr, this.selectionProvider);
site.setSelectionProvider(this.selectionProvider);
}
@@ -222,8 +220,6 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
configRegistry.registerConfigAttribute(NattableConfigAttributes.LABEL_PROVIDER_SERVICE_CONFIG_ATTRIBUTE, getLabelProviderService(), DisplayMode.NORMAL, NattableConfigAttributes.LABEL_PROVIDER_SERVICE_ID);
//commented because seems generate several bugs with edition
//newRegistry.registerConfigAttribute( CellConfigAttributes.DISPLAY_CONVERTER, new GenericDisplayConverter(), DisplayMode.NORMAL, GridRegion.BODY);
- configRegistry.registerConfigAttribute(CellConfigAttributes.EXPORT_FORMATTER, new PapyrusExportFormatter());
-
this.natTable.setConfigRegistry(configRegistry);
this.natTable.setUiBindingRegistry(new UiBindingRegistry(this.natTable));
this.natTable.configure();
@@ -425,9 +421,15 @@ public abstract class AbstractNattableWidgetManager implements INattableModelMan
@Override
public void dispose() {
- this.bodyDataProvider.dispose();
- this.rowHeaderDataProvider.dispose();
- this.columnHeaderDataProvider.dispose();
+ if(this.bodyDataProvider != null) {
+ this.bodyDataProvider.dispose();
+ }
+ if(this.rowHeaderDataProvider != null) {
+ this.rowHeaderDataProvider.dispose();
+ }
+ if(this.columnHeaderDataProvider != null) {
+ this.columnHeaderDataProvider.dispose();
+ }
this.tableContext = null;
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
index 1245111f82f..7bb978e574f 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/INattableModelManager.java
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.infra.nattable.manager.table;
import java.util.Collection;
import org.eclipse.emf.common.command.Command;
+import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.nebula.widgets.nattable.data.IDataProvider;
import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
@@ -179,4 +180,17 @@ public interface INattableModelManager extends ITableAxisElementProvider, IDispo
*/
public IAxisManager getRowAxisManager();
+ /**
+ *
+ * @return
+ * the local preference store for the table instance or <code>null</code>
+ */
+ public PreferenceStore getTablePreferenceStore();
+
+ /**
+ *
+ * @param store
+ * the table preference store
+ */
+ public void setWorkspacePreferenceStore(final PreferenceStore store);
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
index 7fd56632a9f..b3166a86baa 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
@@ -42,6 +42,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.PreferenceStore;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.window.Window;
@@ -151,6 +152,11 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
private BiMap<CellMapKey, Cell> cellsMap;
/**
+ * the local preference store for the table
+ */
+ private PreferenceStore localPreferenceStore;
+
+ /**
*
* Constructor.
*
@@ -502,8 +508,12 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
@Override
public void dispose() {
if(this.tableEditingDomain != null && this.contextEditingDomain != null) {
- this.tableEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
- this.contextEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ if(this.tableEditingDomain.getCommandStack() != null) {
+ this.tableEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ }
+ if(this.contextEditingDomain.getCommandStack() != null) {
+ this.contextEditingDomain.getCommandStack().removeCommandStackListener(this.refreshListener);
+ }
this.columnManager.dispose();
this.rowManager.dispose();
Table table = getTable();
@@ -1329,4 +1339,26 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
return new CellMapKey(cell.getColumnWrapper().getElement(), cell.getRowWrapper().getElement());
}
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager#getTablePreferenceStore()
+ *
+ * @return
+ */
+ @Override
+ public PreferenceStore getTablePreferenceStore() {
+ return this.localPreferenceStore;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager#setWorkspacePreferenceStore(org.eclipse.jface.preference.PreferenceStore)
+ *
+ * @param store
+ */
+ @Override
+ public void setWorkspacePreferenceStore(final PreferenceStore store) {
+ this.localPreferenceStore = store;
+ }
+
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
index d532d8149ad..2ee63196322 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/Messages.java
@@ -31,6 +31,42 @@ public class Messages extends NLS {
public static String AbstractCreateNattableEditorHandler_PapyrusTableCreation;
+ public static String AbstractPasteImportInNattableManager_column;
+
+ public static String AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable;
+
+ public static String AbstractPasteImportInNattableManager_INVERTED_MESSAGE;
+
+ public static String AbstractPasteImportInNattableManager_NoPasteConfiguration;
+
+ public static String AbstractPasteImportInNattableManager_NoPasteConfiguration2;
+
+ public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals;
+
+ public static String AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals;
+
+ public static String AbstractPasteImportInNattableManager_PasteColumnsError;
+
+ public static String AbstractPasteImportInNattableManager_PasteRowsError;
+
+ public static String AbstractPasteImportInNattableManager_row;
+
+ public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste;
+
+ public static String AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste;
+
+ public static String AbstractPasteImportInNattableManager_TheTableCanCreateElement;
+
+ public static String AbstractPasteImportInNattableManager_TheTableCantCreateElement;
+
+ public static String AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste;
+
+ public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns;
+
+ public static String AbstractPasteImportInNattableManager_TheUserChosesToPasteRows;
+
+ public static String AbstractPasteImportInNattableManager_WhatAreYouPasting;
+
public static String AbstractSaveCurrentAxisProvidersHandler_0;
public static String AbstractSaveCurrentAxisProvidersHandler_1;
@@ -131,8 +167,38 @@ public class Messages extends NLS {
public static String TableTesterRegistry_TheClassCantBeLoaded;
+ public static String TextDelimiter_DoubleQuote;
+
+ public static String TextDelimiter_Quote;
+
public static String ICellManager_NotAvailable;
+ public static String ImportCSVConfigurationPage_SelectTheTextDelimiter;
+
+ public static String ImportCSVConfigurationPage_Separators;
+
+ public static String ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined;
+
+ public static String ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar;
+
+ public static String ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns;
+
+ public static String ImportFilePage_SelectTheFileToImport;
+
+ public static String ImportFilePage_TheImportedElementWillBeAddedTo;
+
+ public static String ImportFilePage_YourFileWillBeImported;
+
+ public static String ImportTableErrorPage_PleaseOpenAPapyrusEditor;
+
+ public static String ImportTableWizard_ConfigureImport;
+
+ public static String ImportTableWizard_ImportTable;
+
+ public static String ImportTableWizard_ImportTableError;
+
+ public static String ImportTableWizard_ImportTableFromFileInPapyrusModel;
+
public static String AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage;
public static String ColumnsToShowDialog_AdditionalFeatures;
@@ -169,6 +235,20 @@ public class Messages extends NLS {
public static String LoadCurrentAxisProvidersDialog_3;
+ public static String PasteConfigurationUtils_ContainementFeatureIsNotAReference;
+
+ public static String PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment;
+
+ public static String PasteConfigurationUtils_ContainmentFeatureIsNull;
+
+ public static String PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature;
+
+ public static String PasteConfigurationUtils_ElementIdNotDefined;
+
+ public static String PasteConfigurationUtils_ElementTypeCantBeFound;
+
+ public static String PasteConfigurationUtils_PasteConfigurationIsConsistent;
+
public static String PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable;
public static String PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
@@ -189,6 +269,10 @@ public class Messages extends NLS {
public static String PasteEObjectAxisInTableCommandProvider_PasteRows;
+ public static String PasteImportStatusDialog_ImportPasteDialogTitle;
+
+ public static String PasteImportStatusDialog_PasteConfigurationMessage;
+
public static String PasteInPapyrusTableCommandProvider_0;
public static String PasteInPapyrusTableCommandProvider_1;
@@ -224,6 +308,15 @@ public class Messages extends NLS {
public static String PasteInTableHandler_PasteCreation;
public static String PasteInTableHandler_ThePasteCommandCantBeExecuted;
+ public static String PasteSeparator_Comma;
+
+ public static String PasteSeparator_Other;
+
+ public static String PasteSeparator_Semicolon;
+
+ public static String PasteSeparator_Space;
+
+ public static String PasteSeparator_Tabulation;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
index 44cadf7b763..4c646b3cda0 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/messages/messages.properties
@@ -2,6 +2,24 @@ AbstractAxisManager_InputDialogMessage=The real name for the header is: \n\t %s
AbstractAxisManager_InputDialogTitle=Edit Header Alias Dialog
AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable=Enter the name for the new table
AbstractCreateNattableEditorHandler_PapyrusTableCreation=Papyrus Table Creation
+AbstractPasteImportInNattableManager_column=column
+AbstractPasteImportInNattableManager_EnablementStatusForPasteInTheTable=Enablement status for paste {0} in the table
+AbstractPasteImportInNattableManager_INVERTED_MESSAGE=The axis of your table are inverted. This case is not yet managed. You must have elements as rows and features as columns.
+AbstractPasteImportInNattableManager_NoPasteConfiguration=Neither of the row paste configuration and column paste configuration allows to create elements in the table\n.
+AbstractPasteImportInNattableManager_NoPasteConfiguration2=Your table has no paste configuration
+AbstractPasteImportInNattableManager_NumberOfColumnsAreEquals=The number of columns by rows is the same as the number of columns in the table
+AbstractPasteImportInNattableManager_NumberOfColumnsAreNotEquals=The number of columns by rows is not the same as the number of columns in the table.\n You are trying to paste {0} columns in a table which has {1} columns
+AbstractPasteImportInNattableManager_PasteColumnsError=\n Paste column error:\n\t
+AbstractPasteImportInNattableManager_PasteRowsError=\n Paste row error:\n\t
+AbstractPasteImportInNattableManager_row=row
+AbstractPasteImportInNattableManager_TheContextOfTheTableHasNotTheContainmentFeatureDefinedForThePaste=The context of the table doesn't have the containment feature defined for the paste
+AbstractPasteImportInNattableManager_TheContextOfTheTableHasTheContainmentFeatureDefinedForThePaste=The context of the table has the containment feature defined for the paste
+AbstractPasteImportInNattableManager_TheTableCanCreateElement=The table can create {0} as {1}
+AbstractPasteImportInNattableManager_TheTableCantCreateElement=The table can't create {0} as {1}
+AbstractPasteImportInNattableManager_TheTableHasAConfigurationToPaste=The table has a configuration to paste {0}.
+AbstractPasteImportInNattableManager_TheUserChosesToPasteColumns=The user has chosen to paste columns.
+AbstractPasteImportInNattableManager_TheUserChosesToPasteRows=The user has chosen to paste rows.
+AbstractPasteImportInNattableManager_WhatAreYouPasting=I can't find if you are pasting rows elements or columns elements.\n Press "Yes" to paste rows and "No" to paste columns.
AbstractSaveCurrentAxisProvidersHandler_0=Enter name and description
AbstractSaveCurrentAxisProvidersHandler_1=Name:
AbstractSaveCurrentAxisProvidersHandler_2=Description:
@@ -54,7 +72,22 @@ ProblemLabelProvider_StringsValuesCanBeResolved={0} string(s) values can't be re
TableLabelProvider_ErrorGettingIconForTable=Error getting icon image for tables:
TableTesterRegistry_SeveralTesterAreRegisteredWithTheSameId=Several classes are registered for the id {0}
TableTesterRegistry_TheClassCantBeLoaded=Class registrered with id {0} can't be loaded
+TextDelimiter_DoubleQuote=double quote
+TextDelimiter_Quote=quote
ICellManager_NotAvailable=N/A
+ImportCSVConfigurationPage_SelectTheTextDelimiter=Select the text delimiter used in your file.
+ImportCSVConfigurationPage_Separators=Separators
+ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined=The cell separator is not defined.
+ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar=The cell separator must be exactly 1 character.
+ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns=Be sure that your imported file has the same number of columns than the current table
+ImportFilePage_SelectTheFileToImport=Select the file to import
+ImportFilePage_TheImportedElementWillBeAddedTo=The imported element will be added to:
+ImportFilePage_YourFileWillBeImported=Your import will be done in the table:
+ImportTableErrorPage_PleaseOpenAPapyrusEditor=Please open a Papyrus table editor before to do the import.
+ImportTableWizard_ConfigureImport=Configure Import
+ImportTableWizard_ImportTable=Import Table
+ImportTableWizard_ImportTableError=Import Table Error
+ImportTableWizard_ImportTableFromFileInPapyrusModel=Import Table From File In Papyrus Model
AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage=A UML Table can't be created with a non-UML element as context ({0})
ColumnsToShowDialog_AdditionalFeatures=Additional Features
ColumnsToShowDialog_AdvancedMode=Advanced Mode
@@ -73,6 +106,13 @@ LoadCurrentAxisProvidersDialog_0=Name
LoadCurrentAxisProvidersDialog_1=Description
LoadCurrentAxisProvidersDialog_2=Columns
LoadCurrentAxisProvidersDialog_3=\ (current)
+PasteConfigurationUtils_ContainementFeatureIsNotAReference=The containment feature for the pasted elements is not a reference.
+PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment=The containement feature is not a reference in containment.
+PasteConfigurationUtils_ContainmentFeatureIsNull=The containment feature for the pasted elements is null.
+PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature=The created elements ({0}) are not compatible with the containmment feature {1}.
+PasteConfigurationUtils_ElementIdNotDefined=The element id describing the kind of pasted element is not defined.
+PasteConfigurationUtils_ElementTypeCantBeFound=The element type for {0} can be found.
+PasteConfigurationUtils_PasteConfigurationIsConsistent=The paste configuration is consistent.
PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable=Adding Elements To The table
PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled=Command creation has been cancelled
PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY=\ Creating {0} number {1}/{2}
@@ -83,6 +123,8 @@ PasteEObjectAxisInTableCommandProvider_PasteAction=Paste Action
PasteEObjectAxisInTableCommandProvider_PasteColumns=Paste Columns
PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand=Paste from String Command
PasteEObjectAxisInTableCommandProvider_PasteRows=Paste Rows
+PasteImportStatusDialog_ImportPasteDialogTitle=Import/Paste In Table
+PasteImportStatusDialog_PasteConfigurationMessage=You can configure the Paste/Import using the Property View of the table.
PasteInPapyrusTableCommandProvider_0=The String {0} is not valid to create a {1}.
PasteInPapyrusTableCommandProvider_1=Paste Command In FlowPort Table
PasteInPapyrusTableCommandProvider_2=Create Paste Action
@@ -101,3 +143,8 @@ PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement=The te
PasteInTableHandler_PasteCancelled=Paste Action Canceled
PasteInTableHandler_PasteCreation=Paste creation...
PasteInTableHandler_ThePasteCommandCantBeExecuted=The paste command can't be executed
+PasteSeparator_Comma=Comma
+PasteSeparator_Other=Other
+PasteSeparator_Semicolon=Semicolon
+PasteSeparator_Space=Space
+PasteSeparator_Tabulation=Tabulation
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVLexer.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVLexer.java
new file mode 100644
index 00000000000..77a12273808
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVLexer.java
@@ -0,0 +1,281 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.nattable.parsers;
+
+import java.io.Reader;
+
+/**
+ * Represents a lexer for a CSV document
+ *
+ * Lexing rules are:
+ * LineEnding -> '\n' | '\r' | '\r\n'
+ * Separator -> what is given in parameter
+ * TextMarker -> what is given in parameter
+ * Whitespace -> (Unicode IsWhitespace character class) - (Separator | TextMarker | '\n' | '\r')
+ * Cell -> (. - Whitespace)*
+ * Cell -> TextMarker ( (.-TextMarker) | (TextMarker TextMarker)* ) TextMarker
+ *
+ * In these rules . represents any character and - represents the language difference operator.
+ * The last rule means that inside a quoted cell value the content can be anything except the quote character, in which case it must be doubled.
+ *
+ * @author Laurent Wouters
+ */
+public class CSVLexer {
+ /**
+ * Represents an error in this lexer
+ */
+ public static final int TOKEN_ERROR = -1;
+ /**
+ * Token type of cells' value in a CSV
+ */
+ public static final int TOKEN_VALUE = 0;
+ /**
+ * Token type of cells' separator
+ */
+ public static final int TOKEN_SEPARATOR = 1;
+ /**
+ * Token type of new line markers
+ */
+ public static final int TOKEN_NEW_ROW = 2;
+ /**
+ * Token type for the end of input marker
+ */
+ public static final int TOKEN_EOF = 3;
+
+ /**
+ * Size of the buffer used to build the tokens
+ */
+ private static final int BUFFER_SIZE = 1024;
+
+ private RewindableTextStream input; // the input stream
+ private char separator; // The cell separator character
+ private char textMarker; // The raw text beginning and end character
+ private char[] builder; // The buffer used to build the tokens
+ private int lastTokenType; // The type of the last matched token
+ private String lastTokenValue; // The value of the last matched token
+
+ /**
+ * Initializes this lexer
+ *
+ * @param input
+ * The input text reader
+ * @param valueSeparator
+ * The character that separates values in rows
+ * @param textMarker
+ * The character that marks the beginning and end of raw text
+ */
+ public CSVLexer(Reader input, char valueSeparator, char textMarker) {
+ this.input = new RewindableTextStream(input);
+ this.separator = valueSeparator;
+ this.textMarker = textMarker;
+ this.builder = new char[BUFFER_SIZE];
+ this.lastTokenType = TOKEN_ERROR;
+ this.lastTokenValue = null;
+ }
+
+ /**
+ * Gets the type of the last matched token
+ *
+ * @return The type of the last matched token
+ */
+ public int getTokenType() {
+ return lastTokenType;
+ }
+
+ /**
+ * Gets the value of the last matched token
+ *
+ * @return The value of the last matched token
+ */
+ public String getTokenValue() {
+ return lastTokenValue;
+ }
+
+ /**
+ * Gets the next token in the input
+ *
+ * @return The next token
+ */
+ public String next() {
+ // ignore all whitespaces
+ char c = input.read();
+ if (input.isAtEnd())
+ return getTokenEOF();
+ while (isWhitespace(c)) {
+ c = input.read();
+ if (input.isAtEnd())
+ return getTokenEOF();
+ }
+
+ // Here c is not whitespace and we are not at the end
+ if (c == separator)
+ return getTokenSeparator();
+ if (c == textMarker)
+ return onTextMarkerChar();
+ if (c == '\r' || c == '\n')
+ return onLineEndingChar(c);
+
+ // Here we are on normal data
+ int length = 1;
+ builder[0] = c;
+ while (true) {
+ c = input.read();
+ if (input.isAtEnd())
+ break;
+ if (c == separator || c == '\r' || c == '\n') {
+ input.rewind(1);
+ break;
+ }
+ builder[length] = c;
+ length++;
+ }
+
+ // we matched the data
+ // Now, trim the trailing white spaces
+ while (length > 0 && isWhitespace(builder[length - 1])) {
+ length--;
+ }
+
+ return getTokenValue(length);
+ }
+
+ /**
+ * Determines whether the given character is a white space that can be skipped
+ *
+ * @param c
+ * The character
+ * @return <code>true</code> if the character can be skipped
+ */
+ private boolean isWhitespace(char c) {
+ if (c == separator || c == textMarker || c == '\n' || c == '\r')
+ return false;
+ return Character.isWhitespace(c);
+ }
+
+ /**
+ * Lexes the line ending token beginning with the given character
+ *
+ * @param c
+ * The beginning character
+ * @return The matched token
+ */
+ private String onLineEndingChar(char c) {
+ if (c == '\n')
+ return getTokenNewRow();
+ // This was a '\r' character
+ // Check for windows line ending style
+ char n = input.read();
+ if (input.isAtEnd())
+ return getTokenNewRow();
+ if (n != '\n')
+ input.rewind(1);
+ return getTokenNewRow();
+ }
+
+ /**
+ * Lexes the raw text between marks
+ *
+ * @return The matched token
+ */
+ private String onTextMarkerChar() {
+ int length = 0;
+ while (true) {
+ char c = input.read();
+ if (input.isAtEnd())
+ return getTokenError();
+ if (c != textMarker) {
+ builder[length] = c;
+ length++;
+ } else {
+ // get the following char
+ c = input.read();
+ if (c == textMarker) {
+ // This is a double marker
+ builder[length] = c;
+ length++;
+ } else {
+ // This was the end of the quoted text
+ if (!input.isAtEnd())
+ input.rewind(1);
+ return getTokenValue(length);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets an error token
+ *
+ * @return An error token
+ */
+ private String getTokenError() {
+ lastTokenType = TOKEN_ERROR;
+ lastTokenValue = null;
+ return null;
+ }
+
+ /**
+ * Gets an end of input marker token
+ *
+ * @return An end of input marker token
+ */
+ private String getTokenEOF() {
+ lastTokenType = TOKEN_EOF;
+ lastTokenValue = null;
+ return null;
+ }
+
+ /**
+ * Gets a cell separator token
+ *
+ * @return A cell separator token
+ */
+ private String getTokenSeparator() {
+ lastTokenType = TOKEN_SEPARATOR;
+ lastTokenValue = null;
+ return null;
+ }
+
+ /**
+ * Gets a new row token
+ *
+ * @return A new row token
+ */
+ private String getTokenNewRow() {
+ lastTokenType = TOKEN_NEW_ROW;
+ lastTokenValue = null;
+ return null;
+ }
+
+ /**
+ * Gets a token representing a cell's value
+ *
+ * @param length
+ * Length of the value
+ * @return A token
+ */
+ private String getTokenValue(int length) {
+ lastTokenType = TOKEN_VALUE;
+ lastTokenValue = new String(builder, 0, length);
+ return lastTokenValue;
+ }
+
+ /**
+ *
+ * @return
+ * the number of read characters
+ */
+ public long getReadCharacters() {
+ return this.input.getReadCharacters();
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVParser.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVParser.java
new file mode 100644
index 00000000000..80ac5876d9e
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CSVParser.java
@@ -0,0 +1,219 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.nattable.parsers;
+
+import java.io.Reader;
+
+/**
+ * Represents a parser of CSV document
+ * This parser implements the following grammar:
+ * Document -> Row (LineEnding Row)* EOF
+ * Row -> ( Cell (Separator Cell)* )?
+ *
+ * An empty document is matched as having a single row with no cell.
+ * A line ending just before the EOF also represents an empty row.
+ *
+ * @author Laurent Wouters
+ */
+public class CSVParser {
+ private CSVLexer lexer; // the input lexer
+ private RowIterator output; // the ouput iterators
+
+ /**
+ * Initializes this parser
+ *
+ * @param input
+ * The input to parse
+ * @param valueSeparator
+ * The character that separates values in rows
+ * @param textMarker
+ * The character that marks the beginning and end of raw text
+ */
+ public CSVParser(Reader input, char valueSeparator, char textMarker) {
+ this.lexer = new CSVLexer(input, valueSeparator, textMarker);
+ this.output = new Document();
+ }
+
+ /**
+ * Parses the input and gets an iterator over the rows
+ *
+ * @return An iterator over the document's rows
+ */
+ public RowIterator parse() {
+ return output;
+ }
+
+ /**
+ *
+ * @return
+ * the number of read characters
+ */
+ public long getReadCharacters() {
+ return this.lexer.getReadCharacters();
+ }
+
+ /**
+ * Represents a row in a CSV document as an iterator over the value of its cells
+ * This class uses a small state machine to matches the tokens against the following regular expression:
+ * Row -> (Cell (Separator Cell)* )? End
+ * Cell is a cell's value token in the lexer
+ * Separator is a separator token in the lexer
+ * End can be either the Error, EOF, or Line ending tokens
+ *
+ * @author Laurent Wouters
+ */
+ private class Row extends CellIterator {
+ private static final int STATE_INIT = 0;
+ private static final int STATE_CELL = 1;
+ private static final int STATE_SEPARATOR = 2;
+ private static final int STATE_END = 3;
+
+ private String next; // value of the next cell in this row
+ private int state; // current state in the state machine
+
+ /**
+ * Initializes this row
+ */
+ public Row() {
+ state = 0;
+ findNext();
+ }
+
+ /**
+ * Executes the transitions on the initial state
+ */
+ public void onStateInit() {
+ next = lexer.next();
+ int type = lexer.getTokenType();
+ if (type == CSVLexer.TOKEN_VALUE) {
+ state = STATE_CELL;
+ } else if (type == CSVLexer.TOKEN_SEPARATOR) {
+ next = ""; //$NON-NLS-1$
+ state = STATE_SEPARATOR;
+ } else {
+ next = null;
+ state = STATE_END;
+ }
+ }
+
+ /**
+ * Executes the transitions on the OnCell state
+ */
+ private void onStateCell() {
+ next = lexer.next();
+ int type = lexer.getTokenType();
+ if (type == CSVLexer.TOKEN_SEPARATOR) {
+ onStateSeparator();
+ } else {
+ next = null;
+ state = STATE_END;
+ }
+ }
+
+ /**
+ * Executes the transitions on the OnSeparator state
+ */
+ private void onStateSeparator() {
+ next = lexer.next();
+ int type = lexer.getTokenType();
+ if (type == CSVLexer.TOKEN_VALUE) {
+ state = STATE_CELL;
+ } else if (type == CSVLexer.TOKEN_SEPARATOR) {
+ next = ""; //$NON-NLS-1$
+ state = STATE_SEPARATOR;
+ } else {
+ next = ""; //$NON-NLS-1$
+ state = STATE_END;
+ }
+ }
+
+ /**
+ * Executes the transitions on the final state
+ */
+ private void onStateEnd() {
+ next = null;
+ }
+
+ /**
+ * Executes the state machine
+ */
+ private void findNext() {
+ switch (state) {
+ case STATE_INIT:
+ onStateInit();
+ break;
+ case STATE_CELL:
+ onStateCell();
+ break;
+ case STATE_SEPARATOR:
+ onStateSeparator();
+ break;
+ default:
+ onStateEnd();
+ break;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#hasNext()
+ */
+ @Override
+ public boolean hasNext() {
+ return (next != null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#next()
+ */
+ @Override
+ public String next() {
+ String value = next;
+ findNext();
+ return value;
+ }
+ }
+
+ /**
+ * Represents a CSV document as an iterator over its rows
+ *
+ * @author Laurent Wouters
+ *
+ */
+ private class Document extends RowIterator {
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#hasNext()
+ */
+ @Override
+ public boolean hasNext() {
+ return (lexer.getTokenType() != CSVLexer.TOKEN_EOF);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#next()
+ */
+ @Override
+ public CellIterator next() {
+ return new Row();
+ }
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CellIterator.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CellIterator.java
new file mode 100644
index 00000000000..ac3c920c24d
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/CellIterator.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.nattable.parsers;
+
+import java.util.Iterator;
+
+/**
+ * Represents an iterator over cells in a single row in a CSV document
+ *
+ * @author Laurent Wouters
+ */
+public abstract class CellIterator implements Iterator<String> {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#remove()
+ */
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RewindableTextStream.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RewindableTextStream.java
new file mode 100644
index 00000000000..defc90eb9fd
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RewindableTextStream.java
@@ -0,0 +1,145 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.nattable.parsers;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * Represents a stream of characters that can be rewound
+ *
+ * @author Laurent Wouters
+ */
+public class RewindableTextStream {
+
+ private static final int BUFFER_SIZE = 1024; // Size of the buffer used to read from the input
+
+ private static final int RING_SIZE = 1024; // Size of the ring storing read characters that can be rewound
+
+ private Reader reader; // Encapsulated text reader
+
+ private char[] buffer; // First stage buffer for batch reading of the stream
+
+ private int bufferStart; // Index where the next character shall be read in the buffer
+
+ private int bufferLength; // Current length of the buffer
+
+ private boolean atEnd; // Marker of the end of input
+
+ private char[] ring; // Ring memory of this reader storing the already read characters
+
+ private int ringStart; // Start index of the ring where to read characters
+
+ private int ringNextEntry; // Index for inserting new characters in the ring
+
+ private long counter;
+
+ /**
+ * Initializes this stream
+ *
+ * @param reader
+ * The underlying text reader
+ */
+ public RewindableTextStream(Reader reader) {
+ this.reader = reader;
+ this.buffer = new char[BUFFER_SIZE];
+ this.bufferStart = 0;
+ this.bufferLength = 0;
+ this.ring = new char[RING_SIZE];
+ this.ringStart = 0;
+ this.ringNextEntry = 0;
+ this.counter = 0;
+ }
+
+ /**
+ * Determines whether the end of the input has been reached
+ *
+ * @return <code>true</code> if the end of the input has been reached
+ */
+ public boolean isAtEnd() {
+ return atEnd;
+ }
+
+ /**
+ * Goes back into the stream of the given number of characters
+ *
+ * @param count
+ * The number of characters to rewind
+ */
+ public void rewind(int count) {
+ ringStart -= count;
+ counter -= count;
+ if(ringStart < 0) {
+ ringStart += RING_SIZE;
+ }
+ }
+
+ /**
+ * Reads the next character in the stream
+ *
+ * @return The next character
+ */
+ public char read() {
+ if(atEnd) {
+ return 0;
+ }
+ counter++;
+ if(ringStart != ringNextEntry) {
+ atEnd = false;
+ char value = ring[ringStart++];
+ if(ringStart == RING_SIZE) {
+ ringStart = 0;
+ }
+ return value;
+ }
+ return readBuffer();
+ }
+
+ /**
+ * Reads the next character from the input
+ *
+ * @return The next character in the stream
+ */
+ private char readBuffer() {
+ if(bufferStart == bufferLength) {
+ bufferLength = -1;
+ try {
+ bufferLength = reader.read(buffer, 0, BUFFER_SIZE);
+ } catch (IOException e) {
+ //nothing to report
+ }
+ bufferStart = 0;
+ if(bufferLength <= 0) {
+ atEnd = true;
+ return 0;
+ }
+ }
+ atEnd = false;
+ char c = buffer[bufferStart++];
+ ring[ringNextEntry++] = c;
+ if(ringNextEntry == RING_SIZE) {
+ ringNextEntry = 0;
+ }
+ ringStart = ringNextEntry;
+ return c;
+ }
+
+ /**
+ *
+ * @return
+ * the number of read characters
+ */
+ public long getReadCharacters() {
+ return this.counter;
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RowIterator.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RowIterator.java
new file mode 100644
index 00000000000..13f4e24c591
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/parsers/RowIterator.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.infra.nattable.parsers;
+
+import java.util.Iterator;
+
+/**
+ * Represents an iterator over rows in a CSV document
+ *
+ * @author Laurent Wouters
+ */
+public abstract class RowIterator implements Iterator<CellIterator> {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#remove()
+ */
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/PasteSeparator.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/PasteSeparator.java
new file mode 100644
index 00000000000..ccae0c0bbae
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/PasteSeparator.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.paste;
+
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+
+
+/**
+ *
+ * Enumeration for cell delimiters in CSV files
+ *
+ */
+public enum PasteSeparator {
+ /**
+ * tabulation value
+ */
+ TABULATION('\t', Messages.PasteSeparator_Tabulation),
+
+ /**
+ * semicolon value
+ */
+ SEMICOLON(';', Messages.PasteSeparator_Semicolon),
+
+ /**
+ * Comma value
+ */
+ COMMA(',', Messages.PasteSeparator_Comma),
+ /**
+ * space value
+ */
+ SPACE(' ', Messages.PasteSeparator_Space),
+
+ /**
+ * other value
+ */
+ OTHER(Messages.PasteSeparator_Other);
+
+ /**
+ * the separator itself
+ */
+ private final char separator;
+
+ /**
+ * the name of the separator
+ */
+ private final String name;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param name
+ */
+ private PasteSeparator(final String name) {
+ this(Character.MIN_VALUE, name);//MIN_VALUE is a value as other one!
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param separator
+ * @param name
+ */
+ private PasteSeparator(char separator, String name) {
+ this.separator = separator;
+ this.name = name;
+ }
+
+ /**
+ *
+ * @return
+ * the separator to use
+ */
+ public char getSeparator() {
+ if(this == OTHER) {
+ throw new UnsupportedOperationException();
+ }
+ return separator;
+ }
+
+ /**
+ *
+ * @return
+ * the name of the separator
+ */
+ public String getName() {
+ return name;
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/TextDelimiter.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/TextDelimiter.java
new file mode 100644
index 00000000000..f284171fbc0
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/paste/TextDelimiter.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.paste;
+
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+
+/**
+ *
+ * Enumeration for text delimiters
+ *
+ */
+public enum TextDelimiter {
+
+ /**
+ * the single quote
+ */
+ SINGLE_QUOTE('\'', Messages.TextDelimiter_Quote),
+
+ /**
+ * the double quote
+ */
+ DOUBLE_QUOTE('"', Messages.TextDelimiter_DoubleQuote);
+
+ /**
+ * the delimiter itself
+ */
+ private final char delimiter;
+
+ /**
+ * the name of the delimiter
+ */
+ private final String name;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param delimiter
+ * @param name
+ */
+ private TextDelimiter(char delimiter, String name) {
+ this.delimiter = delimiter;
+ this.name = name;
+ }
+
+ /**
+ *
+ * @return
+ * the separator to use
+ */
+ public char getDelimiter() {
+ return delimiter;
+ }
+
+ /**
+ *
+ * @return
+ * the name of the separator
+ */
+ public String getName() {
+ return name;
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/PapyrusTablePreferenceStore.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/PapyrusTablePreferenceStore.java
new file mode 100644
index 00000000000..867d19b639f
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/PapyrusTablePreferenceStore.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.preferences;
+
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.papyrus.infra.tools.preferences.AbstractPapyrusPreferenceStore;
+import org.eclipse.papyrus.infra.tools.preferences.ui.dialog.AbstractApplyValueOnPreferenceKeyDialog;
+
+/**
+ * this class is a specific store that is used to look for value of element
+ * by taking account the structure of preferences : papyrus editor-> Diagram -> Elements of Diagram
+ *
+ */
+public class PapyrusTablePreferenceStore extends AbstractPapyrusPreferenceStore {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param context
+ * @param qualifier
+ * @param defaultQualifierPath
+ */
+ public PapyrusTablePreferenceStore(IScopeContext context, String qualifier, String defaultQualifierPath) {
+ super(context, qualifier, defaultQualifierPath, TablePreferencesConstantsHelper.PAPYRUS_TABLE_EDITOR_PREFERENCE_PREFIX, TablePreferencesConstantsHelper.TABLE_PREFERENCE_PREFIX, TablePreferencesConstantsHelper.TABLE_ELEMENT);
+ }
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param context
+ * @param qualifier
+ */
+ public PapyrusTablePreferenceStore(IScopeContext context, String qualifier) {
+ super(context, qualifier, TablePreferencesConstantsHelper.PAPYRUS_TABLE_EDITOR_PREFERENCE_PREFIX, TablePreferencesConstantsHelper.TABLE_PREFERENCE_PREFIX, TablePreferencesConstantsHelper.TABLE_ELEMENT);
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.tools.preferences.AbstractPapyrusPreferenceStore#createPreferenceKeyDialog(java.lang.String[])
+ *
+ * @param keys
+ * @return
+ */
+ @Override
+ protected AbstractApplyValueOnPreferenceKeyDialog createPreferenceKeyDialog(String[] keys) {
+ throw new UnsupportedOperationException("not yet implemented"); //$NON-NLS-1$
+ }
+
+
+
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/TablePreferencesConstantsHelper.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/TablePreferencesConstantsHelper.java
new file mode 100644
index 00000000000..18d18a94ae2
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/preferences/TablePreferencesConstantsHelper.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.preferences;
+
+
+/**
+ *
+ * @author VL222926
+ *
+ */
+public class TablePreferencesConstantsHelper {
+
+ private TablePreferencesConstantsHelper() {
+ //to prevent instanciation
+ }
+
+ /**
+ * Prefix for preference for Papyrus nattable Level editor
+ */
+ public final static String PAPYRUS_TABLE_EDITOR_PREFERENCE_PREFIX = "PAPYRUS_TABLE_EDITOR"; //$NON-NLS-1$
+
+ /**
+ * Prefix for preference for Diagram Level
+ */
+ public final static String TABLE_PREFERENCE_PREFIX = "NATTABLE_"; //$NON-NLS-1$
+
+ /**
+ * Prefix for preference for element Level
+ */
+ public final static String TABLE_ELEMENT = "TABLE_ELEMENT_"; //$NON-NLS-1$
+
+
+ /**
+ * Get the preference constant used to store the preference of an element.
+ *
+ * @param elementName
+ * the name of the element
+ * @param preferenceType
+ * the type of preference to store. It must be a value defined in {@link TablePreferencesConstantsHelper}
+ * @return the constant used.
+ */
+ public static String getConstant(String elementName, int preferenceType) {
+ throw new UnsupportedOperationException("Not yet implemented");//$NON-NLS-1$
+ // StringBuffer sb = new StringBuffer();
+ // sb.append(elementName);
+ // sb.append("."); //$NON-NLS-1$
+ // switch(preferenceType) {
+ //
+ // default:
+ // break;
+ // }
+ // return sb.toString();
+ }
+
+ /**
+ *
+ * @param preferenceType
+ * the type of preference to store. It must be a value defined in {@link TablePreferencesConstantsHelper}
+ * @return get the preference key at the papyrus editor level
+ */
+ public static String getPapyrusEditorConstant(int preferenceType) {
+ return getConstant(PAPYRUS_TABLE_EDITOR_PREFERENCE_PREFIX, preferenceType);
+ }
+
+ /**
+ *
+ * @param diagramKind
+ * the kind of diagram.
+ * @param preferenceType
+ * the type of preference to store. It must be a value defined in {@link PreferenceConstantHelper}
+ * @return the preference key at the diagram level
+ */
+ public static String getNatTableConstant(String tableKind, int preferenceType) {
+ return TABLE_PREFERENCE_PREFIX + getConstant(tableKind, preferenceType);
+ }
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java
new file mode 100644
index 00000000000..6dc82b8469e
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInNattableCommandProvider.java
@@ -0,0 +1,840 @@
+package org.eclipse.papyrus.infra.nattable.provider;
+
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+import java.io.IOException;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.commands.CheckedOperationHistory;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.cell.CellManagerFactory;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.NattableaxisconfigurationPackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.Cell;
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.parsers.CellIterator;
+import org.eclipse.papyrus.infra.nattable.parsers.RowIterator;
+import org.eclipse.papyrus.infra.nattable.paste.IValueSetter;
+import org.eclipse.papyrus.infra.nattable.paste.PastePostActionRegistry;
+import org.eclipse.papyrus.infra.nattable.utils.AxisConfigurationUtils;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.utils.Constants;
+import org.eclipse.papyrus.infra.nattable.utils.TableEditingDomainUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
+
+/**
+ * Paste command manager for the paste in the table
+ *
+ * @author VL222926
+ *
+ */
+
+public class PasteEObjectAxisInNattableCommandProvider {
+
+ private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
+
+ /**
+ * the containment feature to use
+ */
+ private EStructuralFeature containmentFeature;
+
+ /**
+ * the type to create
+ */
+ private IElementType typeToCreate;
+
+ /**
+ * the table manager
+ */
+ private INattableModelManager tableManager;
+
+ /**
+ * the paste mode
+ */
+ // private PasteEnablementStatus pasteMode;
+
+ /**
+ * if true, we are pasting in detached mode
+ */
+ private boolean detachedMode;
+
+ /**
+ * the list of the post actions do do
+ */
+ private List<String> postActions;
+
+ /**
+ * the list of the axis to paste
+ */
+ // private final String[] axisToPaste;
+
+ /**
+ * the paste helper
+ */
+ private final CSVPasteHelper pasteHelper;
+
+ /**
+ * the converter map
+ */
+ private Map<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter> existingConverters;
+
+ private static final String PASTE_ACTION_TASK_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteAction;
+
+ private static final String PASTE_ROWS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteRows;
+
+ private static final String PASTE_COLUMNS_JOB_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteColumns;
+
+ private static final String PASTE_COMMAND_HAS_BEEN_CANCELLED = Messages.PasteEObjectAxisInTableCommandProvider_CommandCreationHasBeenCancelled;
+
+ private static final String PASTE_COMMAND_CANT_BE_EXECUTED = "The Paste command can't be executed"; //$NON-NLS-1$
+
+ private static final String PASTE_COMMAND_NAME = Messages.PasteEObjectAxisInTableCommandProvider_PasteFromStringCommand;
+
+ private static final String CREATING_ELEMENT_A_NUMBER_X_Y = Messages.PasteEObjectAxisInTableCommandProvider_CreatingAnumberXonY;
+
+ protected final boolean pasteColumn;
+
+ private final int nbOperationsToDo;
+
+
+ //we refresh the dialog each X read char
+ private int refreshEachReadChar = 1000;
+
+ /**
+ * if <code>true</code> the command can't be created and executed
+ */
+ private boolean isDisposed = false;
+
+ /**
+ * the reader to parse
+ */
+ private final Reader reader;
+
+ /**
+ * the parser to use
+ */
+ private CSVParser parser;
+
+ int factor;
+
+ private Table table;
+
+ final TransactionalEditingDomain tableEditingDomain;
+
+ final TransactionalEditingDomain contextEditingDomain;
+
+ final EObject tableContext;
+
+ List<Object> secondAxis;
+
+ public PasteEObjectAxisInNattableCommandProvider(INattableModelManager tableManager, boolean pasteColumn, Reader reader, CSVPasteHelper pasteHelper2, long totalSize) {
+ this.tableManager = tableManager;
+ // this.pasteMode = status;
+ this.existingConverters = new HashMap<Class<? extends AbstractStringValueConverter>, AbstractStringValueConverter>();
+ this.pasteHelper = pasteHelper2;
+ this.reader = reader;
+ this.pasteColumn = pasteColumn;
+ this.table = tableManager.getTable();
+ this.tableContext = table.getContext();
+ tableEditingDomain = TableEditingDomainUtils.getTableEditingDomain(table);
+ contextEditingDomain = TableEditingDomainUtils.getTableContextEditingDomain(table);
+ //TODO improve refresh and progress monitor...
+ long div = -1;
+ if(totalSize > Integer.MAX_VALUE) {
+ div = totalSize / Integer.MAX_VALUE;
+ if(div > Integer.MAX_VALUE) {
+ div = 2 * div;
+ }
+ this.factor = (int)div;
+ this.nbOperationsToDo = (int)(totalSize / div);
+ } else {
+ this.factor = 1;
+ this.nbOperationsToDo = (int)totalSize;
+ }
+ parser = this.pasteHelper.createParser(reader);
+ init();
+ }
+
+ /**
+ * inits the field of this class
+ */
+ private void init() {
+ PasteEObjectConfiguration configuration = null;
+ if(this.pasteColumn) {
+ configuration = (PasteEObjectConfiguration)AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), true);
+ this.secondAxis = tableManager.getRowElementsList();
+ } else {
+
+ configuration = (PasteEObjectConfiguration)AxisConfigurationUtils.getIAxisConfigurationUsedInTable(this.table, NattableaxisconfigurationPackage.eINSTANCE.getPasteEObjectConfiguration(), false);
+ this.secondAxis = tableManager.getColumnElementsList();
+ }
+ if(configuration != null) {
+ this.containmentFeature = configuration.getPasteElementContainementFeature();
+ this.typeToCreate = ElementTypeRegistry.getInstance().getType(configuration.getPastedElementId());
+ this.postActions = configuration.getPostActions();
+ this.detachedMode = configuration.isDetachedMode();
+ }
+ }
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ * TODO : post actions are not yet supported in the in the detached mode
+ */
+ public void executePasteFromStringCommand(final boolean useProgressMonitor) {
+ if(this.pasteColumn) {//not yet supported
+ return;
+ }
+ if(this.isDisposed) {
+ throw new RuntimeException("The command provider is disposed");
+ }
+ final String pasteJobName;
+ if(this.pasteColumn) {
+ pasteJobName = PASTE_COLUMNS_JOB_NAME;
+ } else {
+ pasteJobName = PASTE_ROWS_JOB_NAME;
+ }
+ if(this.detachedMode) {
+ executePasteFromStringCommandInDetachedMode(useProgressMonitor, pasteJobName);
+ } else {
+ executePasteFromStringCommandInAttachedMode(useProgressMonitor, pasteJobName);
+ }
+ }
+
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ private void executePasteFromStringCommandInDetachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ //the map used to share objects between the paste action and the cell value managers
+ final Map<Object, Object> sharedMap = new HashMap<Object, Object>();
+ //the map used to store useful information for the paste
+ sharedMap.put(Constants.PASTED_ELEMENT_CONTAINER_KEY, tableContext);
+ sharedMap.put(Constants.REFERENCES_TO_SET_KEY, new ArrayList<IValueSetter>());
+ sharedMap.put(Constants.CELLS_TO_ADD_KEY, new ArrayList<Cell>());
+
+ if(!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor(), sharedMap);
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e);
+ }
+ sharedMap.clear();
+ } else {
+ //we create a job in order to don't freeze the UI
+ final Job job = new Job(pasteJobName) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, monitor, sharedMap);
+ if(pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ //we execute the paste command
+ if(pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ } finally {
+ sharedMap.clear();
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ sharedMap.clear();
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ /**
+ *
+ * @param useProgressMonitor
+ * boolean indicating that we must do the paste with a progress monitor
+ */
+ private void executePasteFromStringCommandInAttachedMode(final boolean useProgressMonitor, final String pasteJobName) {
+ if(!useProgressMonitor) {
+ final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, new NullProgressMonitor());
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e);
+ }
+ } else {
+ //we create a job in order to don't freeze the UI
+ final Job job = new Job(pasteJobName) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ final ICommand pasteCommand = getPasteFromStringCommandInAttachedMode(contextEditingDomain, tableEditingDomain, monitor);
+ if(pasteCommand == null) {
+ return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, PASTE_COMMAND_HAS_BEEN_CANCELLED);
+ }
+ //we execute the paste command
+ if(pasteCommand.canExecute()) {
+ try {
+ CheckedOperationHistory.getInstance().execute(pasteCommand, monitor, null);
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "An exception occured during the paste", e); //$NON-NLS-1$
+ }
+ monitor.done();
+ return Status.OK_STATUS;
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PASTE_COMMAND_CANT_BE_EXECUTED);
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+ }
+
+ private ICommand getPasteRowFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
+ if(progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);//+1 to add the created elements to the table
+ }
+ //the list of the created elements
+ final List<Object> createdElements = new ArrayList<Object>();
+
+ //2.2 create the creation request and find the command provider
+ final EClass eClassToCreate = this.typeToCreate.getEClass();
+ final EFactory eFactory = eClassToCreate.getEPackage().getEFactoryInstance();
+
+ //2.3 create the axis
+ int nbCreatedElements = 0;
+
+ //we refresh the dialog each X read char
+ long readChar = 0;
+ long previousreadChar = 0;
+ final RowIterator rowIter = this.parser.parse();
+ while(rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if(!cellIter.hasNext()) {
+ continue;//to avoid blank line
+ }
+ if((progressMonitor != null) && progressMonitor.isCanceled()) {
+ //the user click on the cancel button
+ return null;
+ }
+
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+
+
+ if(progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[]{ nbCreatedElements, typeToCreate.getEClass().getName() }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+
+ //2.3.3 we create the element itself
+ final EObject createdElement = eFactory.create(eClassToCreate);
+
+ createdElements.add(createdElement);
+ nbCreatedElements++;
+ for(final String currentPostActions : this.postActions) {
+ PastePostActionRegistry.INSTANCE.doPostAction(this.tableManager, currentPostActions, tableContext, createdElement, sharedMap, null);//TODO : remove this parameter
+ }
+
+ //2.3.4 we set these properties values
+ final Iterator<Object> secondAxisIterator = secondAxis.iterator();
+ while(secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if(this.pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject, sharedMap);
+ if(isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, this.pasteHelper.getMultiValueSeparator());
+ CellManagerFactory.INSTANCE.setStringValue(columnObject, rowObject, valueAsString, converter, tableManager, sharedMap);
+ }
+ }
+
+ //TODO : do something to say that the number of cell is not correct!
+ while(cellIter.hasNext()) {
+ cellIter.next();//required!
+ }
+ }
+
+ //2.4 we add the created elements to the table
+ final AbstractTransactionalCommand pasteCommand = new AbstractTransactionalCommand(tableEditingDomain, PASTE_COMMAND_NAME, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ //initialize lists
+ final Collection<String> postActions = getPostActions();
+ @SuppressWarnings("unchecked")
+ final List<Cell> cells = (List<Cell>)sharedMap.get(Constants.CELLS_TO_ADD_KEY);
+ @SuppressWarnings("unchecked")
+ final List<IValueSetter> valueToSet = (List<IValueSetter>)sharedMap.get(Constants.REFERENCES_TO_SET_KEY);
+
+ int nbTasks = 1; //to add created elements to the model
+ nbTasks = nbTasks + 1; //to add createds elements to the table
+ nbTasks = nbTasks + postActions.size();//to do post actions after the attachment to the model
+ nbTasks = nbTasks + 1; //to attach the cells to the model
+ nbTasks = nbTasks + valueToSet.size(); //to set the references values
+
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.beginTask(Messages.PasteEObjectAxisInTableCommandProvider_FinishingThePaste, nbTasks);
+ }
+
+ //1. Add the elements to the context
+ AddCommand.create(contextEditingDomain, tableContext, containmentFeature, createdElements).execute();
+
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_AddingElementToTheTable);
+ }
+
+ Command cmd = null;
+ if(pasteColumn) {
+ cmd = tableManager.getAddColumnElementCommand(createdElements); //TODO remove one of these 2 lines
+ } else {
+ cmd = tableManager.getAddRowElementCommand(createdElements);
+ }
+ if(cmd != null) {//could be null
+ cmd.execute();
+ }
+
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_DoingAdditionalActions);
+ }
+
+
+ for(final String currentPostActions : postActions) {
+ PastePostActionRegistry.INSTANCE.concludePostAction(tableManager, currentPostActions, sharedMap);
+ progressMonitor.worked(1);
+ }
+
+
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ progressMonitor.subTask(Messages.PasteEObjectAxisInTableCommandProvider_LinkingReferencesToTheModel);
+ }
+
+ //we set the references
+
+ if(valueToSet.size() > 0) {
+ for(final IValueSetter current : valueToSet) {
+ current.doSetValue(contextEditingDomain);
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+ }
+ }
+
+ //the cells must be attached at the end (in order to update properly the cell map in the table manager
+ if(progressMonitor != null) {
+ if(progressMonitor.isCanceled()) {
+ return CommandResult.newCancelledCommandResult();
+ }
+ progressMonitor.worked(1);
+ }
+
+ //add the created cells to the table
+ AddCommand.create(tableEditingDomain, table, NattablePackage.eINSTANCE.getTable_Cells(), cells).execute();
+
+ if(progressMonitor != null) {
+ progressMonitor.done();
+ }
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ return pasteCommand;
+ }
+
+
+ /**
+ *
+ *
+ * @param sharedMap
+ * a map used to share objects and informations during the paste between this class and the cell value manager
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ * the command to use to finish the paste (the main part of the paste is directly done here)
+ */
+ private ICommand getPasteFromStringCommandInDetachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor, final Map<Object, Object> sharedMap) {
+ if(!this.pasteColumn) {
+ return getPasteRowFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
+ } else {
+ // return getPasteColumnFromStringCommandInDetachedMode(contextEditingDomain, tableEditingDomain, progressMonitor, sharedMap);
+ }
+ return null;
+ }
+
+
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteColumnFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ //initialize the progress monitor
+ if(progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ //2.2 create the creation request and find the command provider
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference)this.containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
+
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
+ * org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ final RowIterator rowIter = parser.parse();
+ int nbCreatedElements = 0;
+ while(rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if(!cellIter.hasNext()) {
+ continue;//to avoid blank line
+ }
+ if(progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+ if(progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[]{ typeToCreate.getEClass().getName(), nbCreatedElements }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if(commandCreation.canExecute()) {
+ //1. we create the element
+ commandCreation.execute(monitor, info);
+ //we execute the creation command
+
+ //2. we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ final Object createdElement = (EObject)res.getReturnValue();
+ final Command addCommand;
+ if(pasteColumn) {
+ addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
+ } else {
+ addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
+ }
+ if(addCommand != null) {//can be null
+ addCommand.execute();
+ addCommand.dispose();
+ }
+
+ //3. we set the values
+ final Iterator<?> secondAxisIterator = secondAxis.iterator();
+ while(secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if(pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
+
+ if(isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+ final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
+ if(setValueCommand != null && setValueCommand.canExecute()) {
+ setValueCommand.execute();
+ setValueCommand.dispose();
+ }
+ }
+ }
+ //TODO inform the user
+ while(cellIter.hasNext()) {
+ cellIter.next();//required
+ }
+ }
+ }
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return pasteAllCommand;
+ }
+
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteRowFromStringInAttachedModeCommand(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ //initialize the progress monitor
+ if(progressMonitor != null) {
+ progressMonitor.beginTask(PASTE_ACTION_TASK_NAME, this.nbOperationsToDo);
+ }
+
+ //2.2 create the creation request and find the command provider
+ final CreateElementRequest createRequest = new CreateElementRequest(contextEditingDomain, this.tableContext, this.typeToCreate, (EReference)this.containmentFeature);
+ final IElementEditService tableContextCommandProvider = ElementEditServiceUtils.getCommandProvider(tableContext);
+
+ final ICommand pasteAllCommand = new AbstractTransactionalCommand(contextEditingDomain, PASTE_COMMAND_NAME, null) {
+
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
+ * org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ long readChar = 0;
+ long previousreadChar = 0;
+
+ final RowIterator rowIter = parser.parse();
+ int nbCreatedElements = 0;
+ while(rowIter.hasNext()) {
+ final CellIterator cellIter = rowIter.next();
+ if(!cellIter.hasNext()) {
+ continue;//to avoid blank line
+ }
+ if(progressMonitor != null && progressMonitor.isCanceled()) {
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newCancelledCommandResult();
+ }
+ readChar = readChar + (parser.getReadCharacters() - previousreadChar);
+ previousreadChar = parser.getReadCharacters();
+ if(progressMonitor != null && readChar > refreshEachReadChar) {
+ readChar = 0;
+ progressMonitor.subTask(NLS.bind("{0} {1} have been created.", new Object[]{ typeToCreate.getEClass().getName(), nbCreatedElements }));
+ progressMonitor.worked(refreshEachReadChar);
+ }
+ nbCreatedElements++;
+ final ICommand commandCreation = tableContextCommandProvider.getEditCommand(createRequest);
+ if(commandCreation.canExecute()) {
+ //1. we create the element
+ commandCreation.execute(monitor, info);
+ //we execute the creation command
+
+ //2. we add it to the table
+ final CommandResult res = commandCreation.getCommandResult();
+ commandCreation.dispose();
+
+ final Object createdElement = (EObject)res.getReturnValue();
+ final Command addCommand;
+ if(pasteColumn) {
+ addCommand = tableManager.getAddColumnElementCommand(Collections.singleton(createdElement));
+ } else {
+ addCommand = tableManager.getAddRowElementCommand(Collections.singleton(createdElement));
+ }
+ if(addCommand != null) {//can be null
+ addCommand.execute();
+ addCommand.dispose();
+ }
+
+ //3. we set the values
+ final Iterator<?> secondAxisIterator = secondAxis.iterator();
+ while(secondAxisIterator.hasNext() && cellIter.hasNext()) {
+ final Object currentAxis = secondAxisIterator.next();
+ final String valueAsString = cellIter.next();
+ final Object columnObject;
+ final Object rowObject;
+ if(pasteColumn) {
+ columnObject = createdElement;
+ rowObject = currentAxis;
+ } else {
+ columnObject = currentAxis;
+ rowObject = createdElement;
+ }
+
+
+ boolean isEditable = CellManagerFactory.INSTANCE.isCellEditable(columnObject, rowObject);
+
+ if(isEditable) {
+ final AbstractStringValueConverter converter = CellManagerFactory.INSTANCE.getOrCreateStringValueConverterClass(columnObject, rowObject, tableManager, existingConverters, pasteHelper.getMultiValueSeparator());
+ final Command setValueCommand = CellManagerFactory.INSTANCE.getSetStringValueCommand(contextEditingDomain, columnObject, rowObject, valueAsString, converter, tableManager);
+ if(setValueCommand != null && setValueCommand.canExecute()) {
+ setValueCommand.execute();
+ setValueCommand.dispose();
+ }
+ }
+ }
+ //TODO inform the user
+ while(cellIter.hasNext()) {
+ cellIter.next();//required
+ }
+ }
+ }
+ progressMonitor.done();
+ localDispose();
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return pasteAllCommand;
+ }
+
+ /**
+ *
+ * @param commandCreationCancelProvider
+ * the creation command progress monitor
+ * @param commandExecutionProgressMonitor
+ * the command execution progress monitor
+ * @return
+ */
+ private ICommand getPasteFromStringCommandInAttachedMode(final TransactionalEditingDomain contextEditingDomain, final TransactionalEditingDomain tableEditingDomain, final IProgressMonitor progressMonitor) {
+ if(this.pasteColumn) {
+ // return getPasteCFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
+ } else {
+ return getPasteRowFromStringInAttachedModeCommand(contextEditingDomain, tableEditingDomain, progressMonitor);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the list of the post actions to do
+ */
+ private Collection<String> getPostActions() {
+ return this.postActions;
+ }
+
+ /**
+ * dispose fields of the class
+ */
+ private void localDispose() {
+ this.isDisposed = true;
+ this.tableManager = null;
+ this.typeToCreate = null;
+ this.containmentFeature = null;
+ for(final AbstractStringValueConverter current : existingConverters.values()) {
+ current.dispose();
+ }
+ this.existingConverters.clear();
+ try {
+ this.reader.close();
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
index 1b0f206265f..468704320ed 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteEObjectAxisInTableCommandProvider.java
@@ -72,7 +72,7 @@ import org.eclipse.papyrus.infra.tools.converter.AbstractStringValueConverter;
* @author VL222926
*
*/
-
+//use PasteEObjectAxisInNattableCommandProvider, will be removed when the new paste api will allows to paste columns
public class PasteEObjectAxisInTableCommandProvider {
private static final int MIN_AXIS_FOR_PROGRESS_MONITOR = 5;
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
index 87f00f096ff..1b7aef2f42d 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
@@ -30,22 +30,56 @@ import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
import org.eclipse.nebula.widgets.nattable.layer.event.ILayerEvent;
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
import org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent;
+import org.eclipse.nebula.widgets.nattable.selection.event.ColumnSelectionEvent;
import org.eclipse.nebula.widgets.nattable.selection.event.ISelectionEvent;
+import org.eclipse.nebula.widgets.nattable.selection.event.RowSelectionEvent;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
import org.eclipse.papyrus.infra.nattable.utils.TableSelectionWrapper;
import org.eclipse.ui.services.IDisposable;
-
+/**
+ *
+ * The selection provider used by the table. The returned selection is used to display property views or to do the synchronization in the
+ * ModelExplorer
+ *
+ */
public class TableSelectionProvider implements ISelectionProvider, IDisposable {
+ /**
+ * the selection layer used in the table
+ */
private SelectionLayer selectionLayer;
+ /**
+ * the selection listener
+ */
private final ILayerListener selectionListener;
+ /**
+ * the current selection in the table
+ */
private ISelection currentSelection;
+ /**
+ * the list of listener on the selections
+ */
private final List<ISelectionChangedListener> listeners;
- public TableSelectionProvider(final SelectionLayer selectionLayer) {
+ /**
+ * the table model manager to use to find selected elements
+ */
+ private INattableModelManager manager;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param manager
+ * the table model manager to use to find selected elements
+ * @param selectionLayer
+ */
+ public TableSelectionProvider(final INattableModelManager manager, final SelectionLayer selectionLayer) {
this.selectionLayer = selectionLayer;
this.selectionListener = new ILayerListener() {
@@ -56,22 +90,45 @@ public class TableSelectionProvider implements ISelectionProvider, IDisposable {
this.selectionLayer.addLayerListener(this.selectionListener);
this.currentSelection = new StructuredSelection();
this.listeners = new ArrayList<ISelectionChangedListener>();
+ this.manager = manager;
}
-
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ *
+ * @param listener
+ */
public void addSelectionChangedListener(final ISelectionChangedListener listener) {
this.listeners.add(listener);
-
}
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+ *
+ * @return
+ */
public synchronized ISelection getSelection() {
return this.currentSelection;
}
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+ *
+ * @param listener
+ */
public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
this.listeners.remove(listener);
}
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
+ *
+ * @param selection
+ */
public synchronized void setSelection(final ISelection selection) {
if(this.currentSelection.equals(selection)) {
return;
@@ -91,29 +148,48 @@ public class TableSelectionProvider implements ISelectionProvider, IDisposable {
//add the cell selection
final Collection<PositionCoordinate> selectedCells = Arrays.asList(this.selectionLayer.getSelectedCellPositions());
final TableSelectionWrapper wrapper = new TableSelectionWrapper(selectedCells);
- // selection.add(0, wrapper);
//we returns the contents of the last selected cell
//we could returns the contents of all selected cells if its required
if(event instanceof CellSelectionEvent) {
- final CellSelectionEvent e = (CellSelectionEvent)event;
- final int colPos = e.getColumnPosition();
- final int rowPos = e.getRowPosition();
- final ILayerCell cell = this.selectionLayer.getCellByPosition(colPos, rowPos);
- if(cell != null) {
- final Object value = cell.getDataValue();
-
- if(value != null) {
- if(value instanceof Collection<?>) {
- final Iterator<?> iter = ((Collection<?>)value).iterator();
- while(iter.hasNext()) {
- final Object current = iter.next();
- selection.add(current);
+ for(final PositionCoordinate current1 : this.selectionLayer.getSelectedCellPositions()) {
+ final int colPos = current1.getColumnPosition();
+ final int rowPos = current1.getRowPosition();
+ final ILayerCell cell = this.selectionLayer.getCellByPosition(colPos, rowPos);
+ if(cell != null) {
+ final Object value = cell.getDataValue();
+ if(value != null) {
+ if(value instanceof Collection<?>) {
+ final Iterator<?> iter = ((Collection<?>)value).iterator();
+ while(iter.hasNext()) {
+ final Object current = iter.next();
+ selection.add(current);
+ }
+ } else {
+ selection.add(value);
}
- } else {
- selection.add(value);
}
+ }
+ }
+ } else if(event instanceof RowSelectionEvent) {
+ this.selectionLayer.getFullySelectedRowPositions();
+ int[] rows = this.selectionLayer.getFullySelectedRowPositions();
+ for(int i : rows) {
+ Object el = this.manager.getRowElement(i);
+ if(el != null) {
+ el = AxisUtils.getRepresentedElement(el);
+ selection.add(el);
+ }
+ }
+
+ } else if(event instanceof ColumnSelectionEvent) {
+ int[] selectedColumn = this.selectionLayer.getFullySelectedColumnPositions();
+ for(int i : selectedColumn) {
+ Object el = this.manager.getColumnElement(i);
+ if(el != null) {
+ el = AxisUtils.getRepresentedElement(el);
+ selection.add(el);
}
}
}
@@ -124,6 +200,13 @@ public class TableSelectionProvider implements ISelectionProvider, IDisposable {
setSelection(newSelection);
}
+
+
+ /**
+ *
+ * @see org.eclipse.ui.services.IDisposable#dispose()
+ *
+ */
public void dispose() {
this.selectionLayer.removeLayerListener(this.selectionListener);
this.selectionLayer = null;
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CSVPasteHelper.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CSVPasteHelper.java
new file mode 100644
index 00000000000..94c18dc8408
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CSVPasteHelper.java
@@ -0,0 +1,97 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import java.io.Reader;
+
+import org.eclipse.papyrus.infra.nattable.parsers.CSVParser;
+import org.eclipse.papyrus.infra.nattable.paste.PasteSeparator;
+import org.eclipse.papyrus.infra.nattable.paste.TextDelimiter;
+
+/**
+ *
+ * This class provides utils method to split a string to do a paste in the table
+ *
+ */
+public class CSVPasteHelper {
+
+ /**
+ * the default separator used for columns
+ */
+ public static final char DEFAULT_CLIPBOARD_COLUMN_SEPARATOR = PasteSeparator.TABULATION.getSeparator();
+
+ /**
+ * the default separator used for multivalue
+ */
+ public static final String DEFAULT_MULTI_VALUE_SEPARATOR = ","; //$NON-NLS-1$
+
+ public static final char DEFAULT_TEXT_MARKER = TextDelimiter.DOUBLE_QUOTE.getDelimiter();
+
+ private final char textMarker;
+
+ private final char cellSeparator;
+
+ private final String multiValueSeparator;
+
+
+ /**
+ *
+ * Constructor.
+ * The default constructor initialize the class with {@value #DEFAULT_CLIPBOARD_COLUMN_SEPARATOR}, {@value #DEFAULT_TEXT_MARKER},
+ * {@value #DEFAULT_MULTI_VALUE_SEPARATOR}
+ */
+ public CSVPasteHelper() {
+ this(DEFAULT_CLIPBOARD_COLUMN_SEPARATOR, DEFAULT_TEXT_MARKER, DEFAULT_MULTI_VALUE_SEPARATOR);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param cellSeparator
+ * the column separator to use
+ * @param textMarked
+ * the row separator to use
+ * @param textMarker
+ * the multi value separator to use
+ */
+ public CSVPasteHelper(final char cellSeparator, final char textMarker, final String multiValueSeparator) {
+ this.cellSeparator = cellSeparator;
+ this.textMarker = textMarker;
+ this.multiValueSeparator = multiValueSeparator;
+ }
+
+ /**
+ *
+ * @param reader
+ * a reader
+ * @return
+ * create a parser from the reader
+ */
+ public CSVParser createParser(final Reader reader) {
+ return new CSVParser(reader, this.cellSeparator, textMarker);
+ }
+
+
+ /**
+ *
+ * @return
+ * the separator used for multivalue
+ */
+ public String getMultiValueSeparator() {
+ return multiValueSeparator;
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CellHelper.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CellHelper.java
index 92f4533e536..0e94f8de916 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CellHelper.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/CellHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.utils;
import java.util.Collections;
@@ -39,14 +52,20 @@ public class CellHelper {
}
/**
- * Create the string problems if required
+ * Create the string problems if required.
*
* @param tableManager
+ * the table manager
* @param columnElement
+ * the column element
* @param rowElement
+ * the row element
* @param pastedText
+ * the pasted text
* @param valueContainer
+ * the value container
* @param sharedMap
+ * the shared map
*/
public static final void createStringResolutionProblem(final INattableModelManager tableManager, final Object columnElement, final Object rowElement, final String pastedText, final ConvertedValueContainer<?> valueContainer, final Map<?, ?> sharedMap) {
final IStatus status = valueContainer.getStatus();
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtils.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtils.java
index bbd3d6aeae1..1b7a086cf0f 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtils.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteConfigurationUtils.java
@@ -13,11 +13,17 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.nattable.utils;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.PasteEObjectConfiguration;
@@ -39,26 +45,38 @@ public class PasteConfigurationUtils {
* @param pasteConfiguration
* a paste configuration
* @return
- * <code>true</code> if the paste configuration is consistent
+ * a status describing the consistence of the paste configuration
*/
- public static boolean hasConsistentPasteEObjectConfiguration(final PasteEObjectConfiguration pasteConfiguration) {
- boolean result = false;
- if(pasteConfiguration != null) {
- final EStructuralFeature feature = pasteConfiguration.getPasteElementContainementFeature();
- if(feature instanceof EReference) {
- final String elementId = pasteConfiguration.getPastedElementId();
- if(elementId != null && !elementId.equals("")) { //$NON-NLS-1$
- final IElementType elementType = ElementTypeRegistry.getInstance().getType(elementId);
- if(elementType != null) {
- final EClass elementTypeMetaclass = elementType.getEClass();
- final EClass containmentFeatureEClass = (EClass)feature.getEType();
- result = elementTypeMetaclass == containmentFeatureEClass || containmentFeatureEClass.isSuperTypeOf(elementTypeMetaclass);
+ public static IStatus hasConsistentPasteEObjectConfiguration(final PasteEObjectConfiguration pasteConfiguration) {
+ Assert.isNotNull(pasteConfiguration);
+ final String pluginId = Activator.PLUGIN_ID;
+ final EStructuralFeature feature = pasteConfiguration.getPasteElementContainementFeature();
+ if(feature == null) {
+ return new Status(IStatus.ERROR, pluginId, Messages.PasteConfigurationUtils_ContainmentFeatureIsNull);
+ } else if(feature instanceof EReference) {
+ if(!((EReference)feature).isContainment()) {
+ return new Status(IStatus.ERROR, pluginId, Messages.PasteConfigurationUtils_ContainmentFeatureIsNotAReferenceContainment);
+ }
+ final String elementId = pasteConfiguration.getPastedElementId();
+ if(elementId != null && !elementId.equals("")) { //$NON-NLS-1$
+ final IElementType elementType = ElementTypeRegistry.getInstance().getType(elementId);
+ if(elementType != null) {
+ final EClass elementTypeMetaclass = elementType.getEClass();
+ final EClass containmentFeatureEClass = (EClass)feature.getEType();
+ boolean knownFeature = elementTypeMetaclass == containmentFeatureEClass || containmentFeatureEClass.isSuperTypeOf(elementTypeMetaclass);
+ if(knownFeature) {
+ return new Status(IStatus.OK, pluginId, Messages.PasteConfigurationUtils_PasteConfigurationIsConsistent);
+ } else {
+ return new Status(IStatus.ERROR, pluginId, NLS.bind(Messages.PasteConfigurationUtils_CreatesElementsAreNotCompatibleWithContainmentFeature, elementId, containmentFeatureEClass.getName()));
}
+ } else {
+ return new Status(IStatus.ERROR, pluginId, NLS.bind(Messages.PasteConfigurationUtils_ElementTypeCantBeFound, elementId));
}
+ } else {
+ return new Status(IStatus.ERROR, pluginId, Messages.PasteConfigurationUtils_ElementIdNotDefined);
}
+ } else {
+ return new Status(IStatus.ERROR, pluginId, Messages.PasteConfigurationUtils_ContainementFeatureIsNotAReference);
}
- return result;
}
-
-
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteEnablementStatus.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteEnablementStatus.java
new file mode 100644
index 00000000000..e3cd487c2cd
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteEnablementStatus.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.utils;
+
+import org.eclipse.core.runtime.MultiStatus;
+
+/**
+ *
+ * This class is used to store the tests about the paste capability of the table
+ *
+ */
+public class PasteEnablementStatus {
+
+ /**
+ * the result of the tests to paste rows in the table
+ */
+ private MultiStatus rowStatus;
+
+ /**
+ * the result of the test to paste columns in the table
+ */
+ private MultiStatus columnStatus;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param columnStatus
+ * the paste column status
+ * @param rowStatus
+ * the paste row status
+ */
+ public PasteEnablementStatus(final MultiStatus columnStatus, final MultiStatus rowStatus) {
+ this.rowStatus = rowStatus;
+ this.columnStatus = columnStatus;
+ }
+
+ /**
+ *
+ * @return
+ * the paste mode according to the row and column status
+ */
+ public PasteModeEnumeration getPasteMode() {
+ if(this.rowStatus == null && this.columnStatus == null) {
+ return PasteModeEnumeration.PASTE_NO_CONFIGURATION;
+ }
+ if(this.rowStatus != null && this.columnStatus != null) {
+ if(this.columnStatus.isOK() && this.rowStatus.isOK()) {
+ return PasteModeEnumeration.PASTE_EOBJECT_ROW_OR_COLUMN;
+ }
+ if(this.columnStatus.isOK() && !this.rowStatus.isOK()) {
+ return PasteModeEnumeration.PASTE_EOBJECT_COLUMN;
+ }
+ if(!this.columnStatus.isOK() && this.rowStatus.isOK()) {
+ return PasteModeEnumeration.PASTE_EOBJECT_ROW;
+ }
+ }
+ if(this.rowStatus != null && this.rowStatus.isOK() && this.columnStatus == null) {
+ return PasteModeEnumeration.PASTE_EOBJECT_ROW;
+ }
+ if(this.columnStatus != null && this.rowStatus == null && this.columnStatus.isOK()) {
+ return PasteModeEnumeration.PASTE_EOBJECT_COLUMN;
+ }
+ return PasteModeEnumeration.CANT_PASTE;
+ }
+
+ /**
+ *
+ * @return
+ * the column status
+ */
+ public MultiStatus getColumnStatus() {
+ return this.columnStatus;
+ }
+
+ /**
+ *
+ * @return
+ * the row status
+ */
+ public MultiStatus getRowStatus() {
+ return this.rowStatus;
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelper.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelper.java
new file mode 100644
index 00000000000..7b817be03e4
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteHelper.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.utils;
+
+/**
+ *
+ * This class provides utils method to split a string to do a paste in the table
+ *
+ */
+public class PasteHelper {
+
+ /**
+ * the default separator used for row
+ */
+ public static final String DEFAULT_ROW_SEPARATOR = "\n"; //$NON-NLS-1"
+
+ /**
+ * the default separator used for columns
+ */
+ public static final String DEFAULT_COLUMN_SEPARATOR = "\t";//$NON-NLS-1"
+
+ /**
+ * the default separator used for multivalue
+ */
+ public static final String DEFAULT_MULTI_VALUE_SEPARATOR = ","; //$NON-NLS-1$
+
+
+ private final String rowSeparator;
+
+ private final String columnSeparator;
+
+ private final String multiValueSeparator;
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public PasteHelper() {
+ this(DEFAULT_COLUMN_SEPARATOR, DEFAULT_ROW_SEPARATOR, DEFAULT_MULTI_VALUE_SEPARATOR);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param columnSeparator
+ * the column separator to use
+ * @param rowSeparator
+ * the row separator to use
+ * @param multiValueSeparator
+ * the multi value separator to use
+ */
+ public PasteHelper(final String columnSeparator, final String rowSeparator, final String multiValueSeparator) {
+ this.columnSeparator = columnSeparator;
+ this.rowSeparator = rowSeparator;
+ this.multiValueSeparator = multiValueSeparator;
+ }
+
+ /**
+ *
+ * @param axisAsString
+ * an full axis represented by a String
+ *
+ *
+ * @return
+ * the cells using the specified cell separator
+ */
+
+ public String[] getCellsAsStringFromAxis(final String axisAsString) {
+ return axisAsString.split(this.columnSeparator);
+ }
+
+ /**
+ *
+ * @param fullContents
+ * the string to split
+ *
+ * @return
+ * the rows
+ */
+ public final String[] getRows(final String fullContents) {
+ final String[] rows = fullContents.split(this.rowSeparator);
+ return rows;
+ }
+
+ /**
+ *
+ * @param fullContents
+ * @param rowSeparator
+ * @param columnSeparator
+ * @return
+ * an array of the pasted columns
+ */
+ //TODO refactor me the paste in column should be the same as the paste in row!
+ public final String[] getColumns(final String fullContents) {
+ final String[] rows = fullContents.split(rowSeparator);
+ if(rows.length > 0) {
+ int nbColumn = rows[0].split(columnSeparator).length;
+ String[] columns = new String[nbColumn];
+ for(int columnIndex = 0; columnIndex < nbColumn; columnIndex++) {
+ columns[columnIndex] = "";
+ }
+
+ for(int rowIndex = 0; rowIndex < rows.length; rowIndex++) {
+ String row = rows[rowIndex];
+ String[] currentColumns = row.split(columnSeparator);
+ for(int columnIndex = 0; columnIndex < nbColumn; columnIndex++) {
+ if(currentColumns.length != 0) {
+ columns[columnIndex] += currentColumns[columnIndex];
+ } else {
+ columns[columnIndex] += ""; //$NON-NLS-1$
+ }
+ if(rowIndex < rows.length + 1) {
+ columns[columnIndex] += columnSeparator;
+ } else {
+ columns[columnIndex] += rowSeparator;
+ }
+ }
+ }
+ return columns;
+
+ }
+ return null;
+ }
+
+
+ public String getRowSeparator() {
+ return rowSeparator;
+ }
+
+
+ public String getColumnSeparator() {
+ return columnSeparator;
+ }
+
+
+ public String getMultiValueSeparator() {
+ return multiValueSeparator;
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteModeEnumeration.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteModeEnumeration.java
index 9e125d6f200..0de03bab0e8 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteModeEnumeration.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/PasteModeEnumeration.java
@@ -34,10 +34,13 @@ public enum PasteModeEnumeration {
*/
PASTE_EOBJECT_ROW_OR_COLUMN,
/**
- * paste is not possible
+ * configuration exist but the configuration is not valid
*/
- CANT_PASTE;
-
+ CANT_PASTE,
+ /**
+ * the table have any configuration for paste
+ */
+ PASTE_NO_CONFIGURATION;
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java
index ab07cdb6f56..9405967efa9 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/TableClipboardUtils.java
@@ -33,16 +33,22 @@ public class TableClipboardUtils {
/**
* row separator in the clipboard contents
*/
+ @Deprecated
+ //use the value defined in PasteHelpers
public static final String AXIS_SEPARATOR = "\n"; //$NON-NLS-1$
/**
* column separator in the clipboard contents
*/
+ @Deprecated
+ //use the value defined into PasteHelper
public static final String CELL_SEPARATOR = "\t"; //$NON-NLS-1$
/**
* the separator used for multivalue
*/
+ @Deprecated
+ //use the value defined into PasteHelper
public static final String MULTI_VALUE_SEPARATOR = ","; //$NON-NLS-1$
private TableClipboardUtils() {
@@ -55,6 +61,8 @@ public class TableClipboardUtils {
* a table represented by a String
* @return the rows for this table
*/
+ @Deprecated
+ //use PasteHelper
public static final String[] getRows(final String fullContents) {
final String[] rows = fullContents.split(AXIS_SEPARATOR);
return rows;
@@ -65,6 +73,8 @@ public class TableClipboardUtils {
* @return
* the rows as string extractzed from the clipboad
*/
+ @Deprecated
+ //use PasteHelper
public static final String[] getRowsFromClipboard() {
final String clipboardContent = getClipboardContents();
if(clipboardContent != null && !clipboardContent.isEmpty()) {
@@ -78,6 +88,8 @@ public class TableClipboardUtils {
* @return
* the columns as string extractzed from the clipboad
*/
+ @Deprecated
+ //use PasteHelper
public static final String[] getColumnsFromClipboard() {
final String clipboardContent = getClipboardContents();
if(clipboardContent != null && !clipboardContent.isEmpty()) {
@@ -123,10 +135,21 @@ public class TableClipboardUtils {
/**
*
+ * @return
+ * the contents of the clipboard
+ */
+ public static final String getClipboardContentsAsString() {
+ return getClipboardContents();
+ }
+
+ /**
+ *
* @param row
* a row represented by a String
* @return the cells for this row
*/
+ @Deprecated
+ //Use PasteHelpers#getCellsAsStringFromAxis
public static final String[] getCells(final String row) {
return row.split(CELL_SEPARATOR);
}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java
new file mode 100644
index 00000000000..d84a8e4a7b1
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/ImportTableWizard.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard;
+
+import java.io.File;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.ImportAxisInNattableManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.paste.PasteSeparator;
+import org.eclipse.papyrus.infra.nattable.paste.TextDelimiter;
+import org.eclipse.papyrus.infra.nattable.utils.CSVPasteHelper;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportCSVConfigurationPage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportFilePage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportInvertedTableErrorPage;
+import org.eclipse.papyrus.infra.nattable.wizard.pages.ImportTableErrorPage;
+import org.eclipse.papyrus.infra.widgets.util.FileUtil;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IImportWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ *
+ * This wizard allows to import a table in the Papyrus nattable editor
+ *
+ */
+public class ImportTableWizard extends Wizard implements IImportWizard {
+
+ /**
+ * the import page
+ */
+ private ImportFilePage importPage;
+
+ /**
+ * the page used to configure the CSV import
+ */
+ private ImportCSVConfigurationPage csvConfigurationPage;
+
+ /**
+ * the nattable model manager to use for the import
+ */
+ private INattableModelManager manager;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public ImportTableWizard() {
+ setWindowTitle(Messages.ImportTableWizard_ImportTableFromFileInPapyrusModel);
+ String pluginId = Activator.PLUGIN_ID;
+ String path = "icons/importTablePapyrusWizban.png"; //$NON-NLS-1$
+ ImageDescriptor desc = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImageDescriptor(pluginId, path);
+ setDefaultPageImageDescriptor(desc);
+ }
+
+ /**
+ *
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ *
+ * @param workbench
+ * @param selection
+ */
+ @Override
+ public void init(final IWorkbench workbench, final IStructuredSelection selection) {
+ this.manager = getNattableModelManager(workbench, selection);
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ *
+ */
+ @Override
+ public void addPages() {
+ final String pageTitle = Messages.ImportTableWizard_ImportTable;
+ final ImageDescriptor desc = null;
+ if(manager != null) {
+ if(manager.getTable().isInvertAxis()) {
+ addPage(new ImportInvertedTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
+ } else {
+ this.importPage = new ImportFilePage(pageTitle, pageTitle, desc, this.manager);
+ addPage(this.importPage);
+ this.csvConfigurationPage = new ImportCSVConfigurationPage(pageTitle, Messages.ImportTableWizard_ConfigureImport, desc, PasteSeparator.SEMICOLON, TextDelimiter.DOUBLE_QUOTE);
+ addPage(this.csvConfigurationPage);
+ }
+ } else {
+ addPage(new ImportTableErrorPage(Messages.ImportTableWizard_ImportTableError, pageTitle, desc));
+ }
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ *
+ * @return
+ */
+ @Override
+ public boolean performFinish() {
+ //the import file
+ final File file = FileUtil.getFile(this.importPage.getFilePath());
+ final CSVPasteHelper pasteHelper = new CSVPasteHelper(this.csvConfigurationPage.getSeparator(), this.csvConfigurationPage.getTextDelimiter(), ","); //$NON-NLS-1$
+ final ImportAxisInNattableManager pasteManager = new ImportAxisInNattableManager(this.manager, pasteHelper, file, true);
+ return pasteManager.doPaste();
+ }
+
+ /**
+ *
+ * @param workbench
+ * the current workbench
+ * @param selection
+ * the current selection
+ * @return
+ * the nattable manager to use to do the import
+ */
+ private INattableModelManager getNattableModelManager(final IWorkbench workbench, final IStructuredSelection selection) {
+ final IEditorPart editorPart = workbench.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editorPart != null) {
+ return (INattableModelManager)editorPart.getAdapter(INattableModelManager.class);
+ }
+ return null;
+ }
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportCSVConfigurationPage.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportCSVConfigurationPage.java
new file mode 100644
index 00000000000..67edaefecd7
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportCSVConfigurationPage.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.nattable.paste.PasteSeparator;
+import org.eclipse.papyrus.infra.nattable.paste.TextDelimiter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * The page to configure the separator used in the CSV file
+ *
+ * @author VL222926
+ *
+ */
+public class ImportCSVConfigurationPage extends WizardPage {
+
+ /**
+ * the paste separator
+ */
+ private PasteSeparator separator;
+
+ /**
+ * the text delimiter
+ */
+ private TextDelimiter textDelimiter;
+
+ /**
+ * the specific seaprator
+ */
+ private char[] textChar = null;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageName
+ * the name of the import page
+ * @param title
+ * the title of the page
+ * @param titleImage
+ * the image for this page
+ * @param tableManager
+ * the table manager where the import will be done
+ */
+ public ImportCSVConfigurationPage(final String pageName, final String title, final ImageDescriptor titleImage, final PasteSeparator defaultSeparator, final TextDelimiter defaultDelimiter) {
+ super(pageName, title, titleImage);
+ setDescription(Messages.ImportFilePage_SelectTheFileToImport);
+ this.separator = defaultSeparator;
+ this.textDelimiter = defaultDelimiter;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ public void createControl(final Composite parent1) {
+ final Composite pageComposite = new Composite(parent1, SWT.NONE);
+ setControl(pageComposite);
+ pageComposite.setLayout(new GridLayout(2, true));
+ final Group separatorGroup = new Group(pageComposite, SWT.NONE);
+ separatorGroup.setText(Messages.ImportCSVConfigurationPage_Separators);
+ separatorGroup.setLayout(new GridLayout(2, false));
+
+ for(final PasteSeparator current : PasteSeparator.values()) {
+ final Button button = new Button(separatorGroup, SWT.RADIO);
+ button.setText(current.getName());
+ button.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if(button.isEnabled()) {
+ separator = current;
+ }
+ setPageComplete(validate());
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ //nothing to do
+ }
+ });
+ button.setSelection(current == separator);
+ final GridData data = new GridData();
+ if(current == PasteSeparator.OTHER) {
+ final Text text = new Text(separatorGroup, SWT.BORDER);
+ text.addKeyListener(new org.eclipse.swt.events.KeyListener() {
+
+ @Override
+ public void keyReleased(KeyEvent e) {
+ textChar = text.getTextChars();
+ setPageComplete(validate());
+ }
+
+ @Override
+ public void keyPressed(KeyEvent e) {
+ //nothing to do
+ }
+ });
+ button.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ text.setEnabled(button.getSelection());
+ setPageComplete(validate());
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ text.setEnabled(this.separator == PasteSeparator.OTHER);
+ } else {
+ data.horizontalSpan = 2;
+ }
+ button.setLayoutData(data);
+ }
+
+ final Composite textDelimiterComp = new Composite(pageComposite, SWT.NONE);
+ textDelimiterComp.setLayout(new GridLayout(2, false));
+ textDelimiterComp.setLayoutData(new GridData());
+ final Label label2 = new Label(textDelimiterComp, SWT.NONE);
+ label2.setText(Messages.ImportCSVConfigurationPage_SelectTheTextDelimiter);
+ final Combo combo = new Combo(textDelimiterComp, SWT.DROP_DOWN | SWT.READ_ONLY);
+
+ for(int i = 0; i < TextDelimiter.values().length; i++) {
+ final TextDelimiter current = TextDelimiter.values()[i];
+ combo.add(String.valueOf(current.getDelimiter()), i);
+ if(this.textDelimiter == current) {
+ combo.select(i);
+ }
+ }
+ combo.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ textDelimiter = TextDelimiter.values()[combo.getSelectionIndex()];
+ setPageComplete(validate());
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ //nothing to do
+ }
+ });
+
+ setPageComplete(validate());
+ }
+
+ /**
+ *
+ * @return
+ */
+ private boolean validate() {
+ if(this.separator == PasteSeparator.OTHER) {
+ if(this.textChar == null || this.textChar.length == 0) {
+ setErrorMessage(Messages.ImportCSVConfigurationPage_TheCellSeparatorIsNotDefined);
+ return false;
+ } else if(this.textChar.length > 1) {
+ setErrorMessage(Messages.ImportCSVConfigurationPage_TheCellSeparatorMustBeExcatlyOneChar);
+ return false;
+ }
+ }
+ setErrorMessage(null);
+ return true;
+ }
+
+ /**
+ *
+ * @return
+ * the selected separator
+ */
+ public char getSeparator() {
+ if(this.separator == PasteSeparator.OTHER) {
+ return textChar[0];
+ }
+ return this.separator.getSeparator();
+ }
+
+ /**
+ *
+ * @return
+ * the selected text delimiter
+ */
+ public char getTextDelimiter() {
+ return this.textDelimiter.getDelimiter();
+ }
+
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java
new file mode 100644
index 00000000000..a4fe02f4c67
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportFilePage.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.infra.widgets.editors.StringFileSelector;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ *
+ * Import page
+ *
+ */
+public class ImportFilePage extends WizardPage {
+
+ /**
+ * allowed file to import table
+ */
+ private static final String[] allowedFiles = new String[]{ "*.csv" }; //$NON-NLS-1$
+
+ /**
+ * the selected file path
+ */
+ private String selectedFilePath;
+
+ /**
+ * the table manager where the import will be done
+ */
+ private final INattableModelManager tableManager;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageName
+ * the name of the import page
+ * @param title
+ * the title of the page
+ * @param titleImage
+ * the image for this page
+ * @param tableManager
+ * the table manager where the import will be done
+ */
+ public ImportFilePage(final String pageName, final String title, final ImageDescriptor titleImage, final INattableModelManager tableManager) {
+ super(pageName, title, titleImage);
+ setDescription(Messages.ImportFilePage_SelectTheFileToImport);
+ this.tableManager = tableManager;
+ this.selectedFilePath = null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ */
+ @Override
+ public void createControl(final Composite parent) {
+ final Composite localComposite = new Composite(parent, SWT.NONE);
+ setControl(localComposite);
+ final ILabelProvider labelProvider = getLabelProvider();
+ Composite localParent = new Composite(localComposite, SWT.NONE);
+ final Label label = new Label(localParent, SWT.NONE);
+ label.setText(Messages.ImportFilePage_YourFileWillBeImported);
+ final CLabel cLabel = new CLabel(localParent, SWT.NONE);
+ cLabel.setText(tableManager.getTableName());
+
+ final Label label2 = new Label(localParent, SWT.NONE);
+ label2.setText(Messages.ImportFilePage_TheImportedElementWillBeAddedTo);
+ final CLabel cLabel2 = new CLabel(localParent, SWT.NONE);
+ cLabel2.setText(labelProvider.getText(tableManager.getTable().getContext()));
+ cLabel2.setImage(labelProvider.getImage(tableManager.getTable().getContext()));
+
+
+ cLabel.setImage(labelProvider.getImage(this.tableManager.getTable()));
+
+ localParent.setLayout(new GridLayout(2, true));
+ final StringFileSelector selector = new StringFileSelector(localComposite, SWT.NONE);
+ selector.setAllowFileSystem(true);
+ selector.setAllowWorkspace(true);
+ selector.setFilterExtensions(allowedFiles);
+
+ localComposite.setLayout(new GridLayout(1, true));
+ selector.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ selector.getText().setEditable(false);
+ selector.addCommitListener(new ICommitListener() {
+
+ @Override
+ public void commit(final AbstractEditor editor) {
+ final Object value = selector.getValue();
+ if(value instanceof String && ((String)value).length() > 0) {
+ setFilePath((String)value);
+ setPageComplete(isPageComplete());
+ }
+ }
+ });
+
+ final CLabel warningLabel = new CLabel(localComposite, SWT.NONE);
+ warningLabel.setText(Messages.ImportFilePage_BeSureThatYourImportFileHasTheSameNumberOfColumns);
+ warningLabel.setImage(org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, "/icons/warning.gif")); //$NON-NLS-1$
+ }
+
+ /**
+ *
+ * @return
+ * the label provider to use or <code>null</code> if not found
+ */
+ protected ILabelProvider getLabelProvider() {
+ LabelProviderService labelService = null;
+ try {
+ labelService = ServiceUtilsForEObject.getInstance().getService(LabelProviderService.class, tableManager.getTable());
+
+ } catch (ServiceException e) {
+ Activator.log.error("Label Provider Service Not Found", e); //$NON-NLS-1$
+ }
+ if(labelService != null) {
+ return labelService.getLabelProvider();
+ }
+ return null;
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ *
+ * @return
+ */
+ @Override
+ public boolean isPageComplete() {
+ return getFilePath() != null;
+ }
+
+
+ /**
+ *
+ * @return
+ * the selected file
+ */
+ public String getFilePath() {
+ return this.selectedFilePath;
+ }
+
+ /**
+ *
+ * @param filePath
+ * find the file from the filePath and set it
+ */
+ protected void setFilePath(final String filePath) {
+ if(filePath == null || filePath.length() == 0) {
+ this.selectedFilePath = null;
+ } else {
+ this.selectedFilePath = filePath;
+ }
+
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportInvertedTableErrorPage.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportInvertedTableErrorPage.java
new file mode 100644
index 00000000000..94b5c759cf3
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportInvertedTableErrorPage.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ *
+ * @author VL222926
+ *
+ */
+public class ImportInvertedTableErrorPage extends WizardPage {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageName
+ * the page name
+ * @param title
+ * the title of the page
+ * @param titleImage
+ * the image of the page
+ */
+ public ImportInvertedTableErrorPage(final String pageName, final String title, final ImageDescriptor titleImage) {
+ super(pageName, title, titleImage);
+ }
+
+ /**
+ * Create contents of the wizard.
+ *
+ * @param parent
+ */
+ public void createControl(final Composite parent) {
+ Label label = new Label(parent, SWT.NONE);
+ label.setText("Inverted Table are not yet managed"); //$NON-NLS-1$
+ setControl(label);
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ *
+ * @return
+ */
+ @Override
+ public boolean isPageComplete() {
+ return false;
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportTableErrorPage.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportTableErrorPage.java
new file mode 100644
index 00000000000..ca968688449
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/wizard/pages/ImportTableErrorPage.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.nattable.wizard.pages;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.nattable.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ *
+ * @author VL222926
+ *
+ */
+public class ImportTableErrorPage extends WizardPage {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param pageName
+ * the page name
+ * @param title
+ * the title of the page
+ * @param titleImage
+ * the image of the page
+ */
+ public ImportTableErrorPage(final String pageName, final String title, final ImageDescriptor titleImage) {
+ super(pageName, title, titleImage);
+ }
+
+ /**
+ * Create contents of the wizard.
+ *
+ * @param parent
+ */
+ public void createControl(final Composite parent) {
+ Label label = new Label(parent, SWT.NONE);
+ label.setText(Messages.ImportTableErrorPage_PleaseOpenAPapyrusEditor);
+ setControl(label);
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+ *
+ * @return
+ */
+ @Override
+ public boolean isPageComplete() {
+ return super.isPageComplete();
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.classpath b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.project b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.project
new file mode 100644
index 00000000000..77452aaf98e
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.nattable.xtext.integration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.settings/org.eclipse.jdt.core.prefs b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f287d53cf45
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/META-INF/MANIFEST.MF b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e9e4a14e90e
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="0.10.1",
+ org.eclipse.emf.ecore,
+ org.eclipse.papyrus.infra.nattable;bundle-version="0.10.1",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.1",
+ org.eclipse.papyrus.uml.xtext.integration.ui;bundle-version="0.10.1",
+ org.eclipse.emf.mwe.core,
+ com.google.inject,
+ org.eclipse.xtext;bundle-version="2.4.2",
+ org.eclipse.nebula.widgets.nattable.core;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.gmf.runtime.common.ui.services
+Export-Package: org.eclipse.papyrus.uml.nattable.xtext.integration,
+ org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor,
+ org.eclipse.papyrus.uml.nattable.xtext.integration.util
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 0.10.1.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.nattable.xtext.integration.A
+ ctivator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.nattable.xtext.integratio
+ n
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/OSGI-INF/l10n/bundle.properties b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..f34bb2889da
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.infra.nattable.xtext.integration
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = UML XText Integration for NatTable (Incubation) \ No newline at end of file
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/about.html b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/about.html
new file mode 100644
index 00000000000..598b3684879
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/build.properties b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/build.properties
new file mode 100644
index 00000000000..efe5828f95a
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html,\
+ plugin.pdoc
+src.includes = about.html
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.pdoc b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.pdoc
new file mode 100644
index 00000000000..a289d22c016
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides the required classes to open XText Editor as CellEditor in Papyrus Table">
+ <referent firstName="Vincent" lastName="LORENZO" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA LIST"/>
+</doc:Documentation>
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/Activator.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/Activator.java
new file mode 100644
index 00000000000..65877a33d92
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/Activator.java
@@ -0,0 +1,53 @@
+package org.eclipse.papyrus.uml.nattable.xtext.integration;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.nattable.xtext.integration"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractNatTableXTextCellEditor.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractNatTableXTextCellEditor.java
new file mode 100644
index 00000000000..09f319b9023
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/celleditor/AbstractNatTableXTextCellEditor.java
@@ -0,0 +1,189 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.xtext.integration.celleditor;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.infra.nattable.celleditor.AbstractPapyrusStyledTextCellEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.StringResolutionProblem;
+import org.eclipse.papyrus.uml.nattable.xtext.integration.util.XTextEditorResultWrapper;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.papyrus.uml.xtext.integration.XtextFakeResourceContext;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter;
+import org.eclipse.papyrus.uml.xtext.integration.core.ContextElementAdapter.IContextElementProvider;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ *
+ * @author vl222926
+ *
+ */
+public abstract class AbstractNatTableXTextCellEditor extends AbstractPapyrusStyledTextCellEditor {
+
+ protected DefaultXtextDirectEditorConfiguration xTextConfiguration;
+
+ /**
+ * the JFace cellEditor
+ */
+ protected CellEditor jfaceCellEditor;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @param commitOnUpDown
+ * @param moveSelectionOnEnter
+ */
+ public AbstractNatTableXTextCellEditor(final Table table, final Object axisElement, final ITableAxisElementProvider elementProvider, final boolean commitOnUpDown, final boolean moveSelectionOnEnter) {
+ super(table, axisElement, elementProvider, commitOnUpDown, moveSelectionOnEnter);
+ this.commitOnEnter = false;
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ * @param commitOnUpDown
+ */
+ public AbstractNatTableXTextCellEditor(final Table table, final Object axisElement, final ITableAxisElementProvider elementProvider, boolean commitOnUpDown) {
+ this(table, axisElement, elementProvider, commitOnUpDown, false);
+ }
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param table
+ * @param axisElement
+ * @param elementProvider
+ */
+ public AbstractNatTableXTextCellEditor(final Table table, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ this(table, axisElement, elementProvider, false);
+ }
+
+ /**
+ *
+ * @return
+ * the XText DirectEditor Configuration
+ */
+ protected abstract DefaultXtextDirectEditorConfiguration createXTextEditorConfiguration();
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#activateCell(org.eclipse.swt.widgets.Composite,
+ * java.lang.Object)
+ *
+ * @param parent
+ * @param originalCanonicalValue
+ * @return
+ */
+ protected Control activateCell(final Composite parent, final Object originalCanonicalValue) {
+ //we display the full string which have a problem to display it in the Xtext Editor
+ Object value = originalCanonicalValue;
+ if(originalCanonicalValue instanceof List<?>) {
+ if(((List<?>)originalCanonicalValue).size() > 0) {
+ final Object firstValue = ((List<?>)originalCanonicalValue).get(0);
+ if(firstValue instanceof StringResolutionProblem) {
+ value = ((StringResolutionProblem)firstValue).getValueAsString();
+ }
+ }
+ }
+ return super.activateCell(parent, value);
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#createStyledText(org.eclipse.swt.widgets.Composite, int)
+ *
+ * @param parent
+ * @param style
+ * @return
+ */
+ @Override
+ protected StyledText createStyledText(Composite parent, int style) {
+ //add me as parameter!
+ this.xTextConfiguration = createXTextEditorConfiguration();
+
+ final EObject editedObject = getEditedEObject();
+
+ //must be done here!
+ XtextFakeResourceContext context = new XtextFakeResourceContext(xTextConfiguration.getInjector());
+ IContextElementProvider provider = new IContextElementProvider() {
+
+ public EObject getContextObject() {
+ return editedObject;
+ }
+ };
+ context.getFakeResource().eAdapters().add(new ContextElementAdapter(provider));
+ jfaceCellEditor = xTextConfiguration.createCellEditor(parent, editedObject);
+ return (StyledText)jfaceCellEditor.getControl();
+ }
+
+ /**
+ * Creates the editor control that is wrapped by this ICellEditor.
+ * Will use the style configurations in ConfigRegistry for styling the control.
+ *
+ * @param parent
+ * The Composite that will be the parent of the new editor control.
+ * Can not be <code>null</code>
+ * @param style
+ * The SWT style of the text control to create.
+ * @return The created editor control that is wrapped by this ICellEditor.
+ */
+ protected StyledText createEditorControl(final Composite parent, int style) {
+ final StyledText textControl = super.createEditorControl(parent, style);
+ textControl.setVisible(true);
+ return textControl;
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.AbstractStyledTextCellEditor#getEditorValue()
+ *
+ * @return
+ */
+ @Override
+ public Object getEditorValue() {
+ final IParser parser = ((ICustomDirectEditorConfiguration)xTextConfiguration).createParser(getEditedEObject());
+ final StyledText styledText = ((StyledText)jfaceCellEditor.getControl());
+ ICommand parseCommand = null;
+ String typedString = "";
+ if(styledText != null) {
+ typedString = styledText.getText();
+ final IParserEditStatus result = parser.isValidEditString(null, typedString);
+ if(result!=null && result.isOK()) {
+ parseCommand = parser.getParseCommand(null, typedString, 0);
+ }
+ }
+ return new XTextEditorResultWrapper(typedString, parseCommand);
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/util/XTextEditorResultWrapper.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/util/XTextEditorResultWrapper.java
new file mode 100644
index 00000000000..4854a6115ef
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable.xtext.integration/src/org/eclipse/papyrus/uml/nattable/xtext/integration/util/XTextEditorResultWrapper.java
@@ -0,0 +1,73 @@
+package org.eclipse.papyrus.uml.nattable.xtext.integration.util;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+
+/**
+ *
+ * This class is used to wrap the result of the XText editor and the set value command
+ *
+ */
+public class XTextEditorResultWrapper implements IAdaptable {
+
+ /**
+ * the text typed by the user in the Xtext editor
+ */
+ private final String text;
+
+ /**
+ * the command to use to do the set value
+ */
+ private final ICommand parseCommand;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param text
+ * the text typed by the user
+ * @param parseCommand
+ * the command to do the set value according to the typed text. Could be <code>null</code> if the text can't be parsed
+ */
+ public XTextEditorResultWrapper(String text, ICommand parseCommand) {
+ this.text = text.trim();//to remove invalid /r/n at the end of the string, see bug 420495
+ this.parseCommand = parseCommand;
+ }
+
+ /**
+ *
+ * @return
+ * the text typed by the user
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ *
+ * @return
+ * the command to set the value in the model according to the text. The command can be <code>null</code> if the text can't be parsed
+ */
+ public ICommand getParseCommand() {
+ return parseCommand;
+ }
+
+ /**
+ *
+ * @param adapter
+ * @return
+ */
+ @Override
+ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ if(adapter == ICommand.class) {
+ return this.parseCommand;
+ }
+ if(adapter == String.class) {
+ return text;
+ }
+ return null;
+ }
+
+
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
index 5c9201287ce..a70adb0d6b9 100644
--- a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/config/UMLFeatureCellEditorConfig.java
@@ -7,6 +7,7 @@ import org.eclipse.emf.ecore.impl.DynamicEObjectImpl;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
import org.eclipse.nebula.widgets.nattable.data.convert.DefaultDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.data.convert.DefaultDoubleDisplayConverter;
import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
import org.eclipse.nebula.widgets.nattable.data.convert.IDisplayConverter;
import org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator;
@@ -14,12 +15,12 @@ import org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor;
import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
import org.eclipse.nebula.widgets.nattable.edit.editor.IComboBoxDataProvider;
import org.eclipse.nebula.widgets.nattable.edit.editor.TextCellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor;
import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
import org.eclipse.nebula.widgets.nattable.painter.cell.ICellPainter;
import org.eclipse.nebula.widgets.nattable.painter.cell.TextPainter;
import org.eclipse.papyrus.infra.emf.nattable.celleditor.config.EStructuralFeatureEditorConfig;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
@@ -34,6 +35,8 @@ import org.eclipse.papyrus.uml.nattable.editor.MultiReferenceCellEditor;
import org.eclipse.papyrus.uml.nattable.editor.MultiStringCellEditor;
import org.eclipse.papyrus.uml.nattable.editor.MultiUnlimitedNaturalCellEditor;
import org.eclipse.papyrus.uml.nattable.editor.SingleReferenceValueCellEditor;
+import org.eclipse.papyrus.uml.nattable.editor.StereotypeApplierCellEditorWrapper;
+import org.eclipse.papyrus.uml.nattable.editor.StereotypeApplierDialogCellEditorWrapper;
import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
import org.eclipse.papyrus.uml.nattable.validator.RealDataValidator;
import org.eclipse.papyrus.uml.nattable.validator.UnlimitedNaturalDataValidator;
@@ -132,7 +135,6 @@ public class UMLFeatureCellEditorConfig extends EStructuralFeatureEditorConfig {
// conf.setAction(action);
// conf.setTooltipText("Open a dialog to select the value");
// editor = new ComboBoxWithButtonCellEditor(dataProvider, conf);
- INattableModelManager manager = (INattableModelManager)elementProvider;
editor = new SingleReferenceValueCellEditor(axisElement, elementProvider);
break;
case SINGLE_UML_ENUMERATION:
@@ -166,6 +168,14 @@ public class UMLFeatureCellEditorConfig extends EStructuralFeatureEditorConfig {
editor = super.getICellEditor(table, axisElement, elementProvider);
break;
}
+ // to apply required stereotype before edition
+ // see bug 426709: [Table 2][Stereotype] Papyrus Table must allows to edit stereotype properties even if the required stereotypes is not yet applied
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=426709
+ if(editor instanceof AbstractDialogCellEditor) {
+ editor = new StereotypeApplierDialogCellEditorWrapper((AbstractDialogCellEditor)editor, axisElement, elementProvider);
+ } else if(editor instanceof ICellEditor) {
+ editor = new StereotypeApplierCellEditorWrapper(editor, axisElement, elementProvider);
+ }
return editor;
}
@@ -410,6 +420,9 @@ public class UMLFeatureCellEditorConfig extends EStructuralFeatureEditorConfig {
int editorKind = getFeatureIdentifier(table, axisElement);
IDisplayConverter converter = null;
switch(editorKind) {
+ case SINGLE_REAL:
+ converter = new DefaultDoubleDisplayConverter();
+ break;
case SINGLE_UML_REFERENCE:
converter = new DisplayConverter() {
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierCellEditorWrapper.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierCellEditorWrapper.java
new file mode 100644
index 00000000000..c7871b0a79a
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierCellEditorWrapper.java
@@ -0,0 +1,426 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.editor;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.edit.ICellEditHandler;
+import org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler;
+import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
+import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum;
+import org.eclipse.nebula.widgets.nattable.widget.EditModeEnum;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.nattable.Activator;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.uml.nattable.utils.UMLTableUtils;
+import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * Wrapper to apply stereotypes if required before to do the edition
+ * see bug 426709: [Table 2][Stereotype] Papyrus Table must allows to edit stereotype properties even if the required stereotypes is not yet applied
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=426709
+ *
+ * elementProvider
+ */
+public class StereotypeApplierCellEditorWrapper implements ICellEditor {
+
+ /** the wrapped celleditor. */
+ protected final ICellEditor wrappedCellEditor;
+
+ /**
+ * the edited axis
+ */
+ protected final Object axisElement;
+
+ /**
+ * the table element provider
+ */
+ protected final ITableAxisElementProvider elementProvider;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param wrappedCellEditor
+ * the wrapped cell editor
+ * @param axisElement
+ * the edited axis
+ * @param elementProvider
+ * the axis element provider
+ */
+ public StereotypeApplierCellEditorWrapper(final ICellEditor wrappedCellEditor, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ this.wrappedCellEditor = wrappedCellEditor;
+ this.axisElement = axisElement;
+ this.elementProvider = elementProvider;
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#activateCell(org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.eclipse.nebula.widgets.nattable.widget.EditModeEnum, org.eclipse.nebula.widgets.nattable.edit.ICellEditHandler,
+ * org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell, org.eclipse.nebula.widgets.nattable.config.IConfigRegistry)
+ *
+ * @param parent
+ * @param originalCanonicalValue
+ * @param editMode
+ * @param editHandler
+ * @param cell
+ * @param configRegistry
+ * @return
+ */
+
+ @Override
+ public Control activateCell(Composite parent, Object originalCanonicalValue, EditModeEnum editMode, ICellEditHandler editHandler, ILayerCell cell, IConfigRegistry configRegistry) {
+ int columnIndex = cell.getColumnIndex();
+ int rowIndex = cell.getRowIndex();
+ Object row = this.elementProvider.getRowElement(rowIndex);
+ Object column = this.elementProvider.getColumnElement(columnIndex);
+ row = AxisUtils.getRepresentedElement(row);
+ column = AxisUtils.getRepresentedElement(column);
+ Element editedElement = null;
+ Object feature = null;
+ if(row instanceof EObject && column == this.axisElement) {
+ editedElement = (Element)row;
+ feature = column;
+ } else {
+ editedElement = (Element)column;
+ feature = row;
+ }
+
+ if(!(feature instanceof EStructuralFeature)) {
+ final String id = AxisUtils.getPropertyId(this.axisElement);
+ applyRequiredStereotype(editedElement, id);
+ }
+ return this.wrappedCellEditor.activateCell(parent, originalCanonicalValue, editMode, editHandler, cell, configRegistry);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getColumnIndex()
+ *
+ * @return
+ */
+
+ @Override
+ public int getColumnIndex() {
+ return this.wrappedCellEditor.getColumnIndex();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getRowIndex()
+ *
+ * @return
+ */
+
+ @Override
+ public int getRowIndex() {
+ return this.wrappedCellEditor.getRowIndex();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getColumnPosition()
+ *
+ * @return
+ */
+
+ @Override
+ public int getColumnPosition() {
+ return this.wrappedCellEditor.getColumnPosition();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getRowPosition()
+ *
+ * @return
+ */
+
+ @Override
+ public int getRowPosition() {
+ return this.wrappedCellEditor.getRowPosition();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getEditorValue()
+ *
+ * @return
+ */
+
+ @Override
+ public Object getEditorValue() {
+ return this.wrappedCellEditor.getEditorValue();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#setEditorValue(java.lang.Object)
+ *
+ * @param value
+ */
+
+ @Override
+ public void setEditorValue(Object value) {
+ this.wrappedCellEditor.setEditorValue(value);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getCanonicalValue()
+ *
+ * @return
+ */
+
+ @Override
+ public Object getCanonicalValue() {
+ return this.wrappedCellEditor.getCanonicalValue();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getCanonicalValue(org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler)
+ *
+ * @param conversionErrorHandler
+ * @return
+ */
+
+ @Override
+ public Object getCanonicalValue(IEditErrorHandler conversionErrorHandler) {
+ return this.wrappedCellEditor.getCanonicalValue(conversionErrorHandler);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#setCanonicalValue(java.lang.Object)
+ *
+ * @param canonicalValue
+ */
+
+ @Override
+ public void setCanonicalValue(Object canonicalValue) {
+ this.wrappedCellEditor.setCanonicalValue(canonicalValue);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#validateCanonicalValue(java.lang.Object)
+ *
+ * @param canonicalValue
+ * @return
+ */
+
+ @Override
+ public boolean validateCanonicalValue(Object canonicalValue) {
+ return this.wrappedCellEditor.validateCanonicalValue(canonicalValue);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#validateCanonicalValue(java.lang.Object,
+ * org.eclipse.nebula.widgets.nattable.edit.editor.IEditErrorHandler)
+ *
+ * @param canonicalValue
+ * @param validationErrorHandler
+ * @return
+ */
+
+ @Override
+ public boolean validateCanonicalValue(Object canonicalValue, IEditErrorHandler validationErrorHandler) {
+ return this.wrappedCellEditor.validateCanonicalValue(canonicalValue, validationErrorHandler);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#commit(org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum)
+ *
+ * @param direction
+ * @return
+ */
+
+ @Override
+ public boolean commit(MoveDirectionEnum direction) {
+ return this.wrappedCellEditor.commit(direction);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#commit(org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum,
+ * boolean)
+ *
+ * @param direction
+ * @param closeAfterCommit
+ * @return
+ */
+
+ @Override
+ public boolean commit(MoveDirectionEnum direction, boolean closeAfterCommit) {
+ return this.wrappedCellEditor.commit(direction, closeAfterCommit);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#commit(org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.MoveDirectionEnum,
+ * boolean, boolean)
+ *
+ * @param direction
+ * @param closeAfterCommit
+ * @param skipValidation
+ * @return
+ */
+
+ @Override
+ public boolean commit(MoveDirectionEnum direction, boolean closeAfterCommit, boolean skipValidation) {
+ return this.wrappedCellEditor.commit(direction, closeAfterCommit, skipValidation);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#close()
+ *
+ */
+
+ @Override
+ public void close() {
+ this.wrappedCellEditor.close();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#isClosed()
+ *
+ * @return
+ */
+
+ @Override
+ public boolean isClosed() {
+ return this.wrappedCellEditor.isClosed();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#getEditorControl()
+ *
+ * @return
+ */
+
+ @Override
+ public Control getEditorControl() {
+ return this.wrappedCellEditor.getEditorControl();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#createEditorControl(org.eclipse.swt.widgets.Composite)
+ *
+ * @param parent
+ * @return
+ */
+
+ @Override
+ public Control createEditorControl(Composite parent) {
+ return this.wrappedCellEditor.createEditorControl(parent);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#openInline(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry,
+ * java.util.List)
+ *
+ * @param configRegistry
+ * @param configLabels
+ * @return
+ */
+
+ @Override
+ public boolean openInline(IConfigRegistry configRegistry, List<String> configLabels) {
+ return this.wrappedCellEditor.openInline(configRegistry, configLabels);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#supportMultiEdit(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry,
+ * java.util.List)
+ *
+ * @param configRegistry
+ * @param configLabels
+ * @return
+ */
+
+ @Override
+ public boolean supportMultiEdit(IConfigRegistry configRegistry, List<String> configLabels) {
+ return this.wrappedCellEditor.supportMultiEdit(configRegistry, configLabels);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#openAdjacentEditor()
+ *
+ * @return
+ */
+
+ @Override
+ public boolean openAdjacentEditor() {
+ return this.wrappedCellEditor.openAdjacentEditor();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#activateAtAnyPosition()
+ *
+ * @return
+ */
+
+ @Override
+ public boolean activateAtAnyPosition() {
+ return this.wrappedCellEditor.activateAtAnyPosition();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#addEditorControlListeners()
+ *
+ */
+
+ @Override
+ public void addEditorControlListeners() {
+ this.wrappedCellEditor.addEditorControlListeners();
+ }
+
+ /**
+ * Removes the editor control listeners.
+ *
+ * @see org.eclipse.nebula.widgets.nattable.edit.editor.ICellEditor#removeEditorControlListeners()
+ */
+
+ @Override
+ public void removeEditorControlListeners() {
+ this.wrappedCellEditor.removeEditorControlListeners();
+ }
+
+ /**
+ *
+ * @param el
+ * an element of the model
+ * @param propertyId
+ * the id of the edited property
+ * @return <code>true</code> if a stereotype has been applied
+ */
+ private static final boolean applyRequiredStereotype(final Element el, final String propertyId) {
+ if(UMLTableUtils.getAppliedStereotypesWithThisProperty(el, propertyId).size() == 0) {
+ final List<Stereotype> stereotypesList = UMLTableUtils.getApplicableStereotypesWithThisProperty(el, propertyId);
+ if(stereotypesList.size() == 1) {
+ TransactionalEditingDomain domain = null;
+ try {
+ domain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(el);
+ final ApplyStereotypeCommand applyCommand = new ApplyStereotypeCommand(el, stereotypesList.get(0), domain);
+ domain.getCommandStack().execute(applyCommand);
+ return true;
+ } catch (ServiceException e) {
+ Activator.log.error("EditingDomain not found", e); //$NON-NLS-1$
+ }
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierDialogCellEditorWrapper.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierDialogCellEditorWrapper.java
new file mode 100644
index 00000000000..ae176b4a7c7
--- /dev/null
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/editor/StereotypeApplierDialogCellEditorWrapper.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.nattable.editor;
+
+import java.util.Map;
+
+import org.eclipse.nebula.widgets.nattable.edit.EditTypeEnum;
+import org.eclipse.nebula.widgets.nattable.edit.gui.AbstractDialogCellEditor;
+import org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog;
+import org.eclipse.papyrus.infra.nattable.manager.table.ITableAxisElementProvider;
+
+
+/**
+ * Wrapper for cell editor dialogs
+ * see bug 426709: [Table 2][Stereotype] Papyrus Table must allows to edit stereotype properties even if the required stereotypes is not yet applied
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=426709
+ */
+public class StereotypeApplierDialogCellEditorWrapper extends StereotypeApplierCellEditorWrapper implements ICellEditDialog {
+
+ /**
+ * Instantiates a new stereotyped element dialog cell editor wrapper.
+ *
+ * @param wrappedCellEditor
+ * the wrapped cell editor
+ * @param axisElement
+ * the edited axis
+ * @param elementProvider
+ * the axis element provider
+ */
+ public StereotypeApplierDialogCellEditorWrapper(final AbstractDialogCellEditor wrappedCellEditor, final Object axisElement, final ITableAxisElementProvider elementProvider) {
+ super(wrappedCellEditor, axisElement, elementProvider);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog#getCommittedValue()
+ *
+ * @return
+ */
+
+ @Override
+ public Object getCommittedValue() {
+ return ((AbstractDialogCellEditor)this.wrappedCellEditor).getCommittedValue();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog#getEditType()
+ *
+ * @return
+ */
+
+ @Override
+ public EditTypeEnum getEditType() {
+ return ((AbstractDialogCellEditor)this.wrappedCellEditor).getEditType();
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog#calculateValue(java.lang.Object, java.lang.Object)
+ *
+ * @param currentValue
+ * @param processValue
+ * @return
+ */
+
+ @Override
+ public Object calculateValue(Object currentValue, Object processValue) {
+ return ((AbstractDialogCellEditor)this.wrappedCellEditor).calculateValue(currentValue, processValue);
+ }
+
+ /**
+ * @see org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog#open()
+ *
+ * @return
+ */
+
+ @Override
+ public int open() {
+ return ((AbstractDialogCellEditor)this.wrappedCellEditor).open();
+ }
+
+ /**
+ * Sets the dialog settings.
+ *
+ * @param editDialogSettings
+ * the edit dialog settings
+ * @see org.eclipse.nebula.widgets.nattable.edit.gui.ICellEditDialog#setDialogSettings(java.util.Map)
+ */
+
+ @Override
+ public void setDialogSettings(Map<String, Object> editDialogSettings) {
+ ((AbstractDialogCellEditor)this.wrappedCellEditor).setDialogSettings(editDialogSettings);
+ }
+
+}
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java
index 090ef4431d7..df1a74c8e4d 100644
--- a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/StereotypePropertyCellManager.java
@@ -141,9 +141,15 @@ public class StereotypePropertyCellManager extends UMLFeatureCellManager {
final List<Object> umlObjects = organizeAndResolvedObjects(columnElement, rowElement, null);
final Element el = (Element)umlObjects.get(0);
final String id = (String)umlObjects.get(1);
+ final Property prop = UMLTableUtils.getRealStereotypeProperty(el, id);
switch(UMLTableUtils.getAppliedStereotypesWithThisProperty(el, id).size()) {
+ case 0:
+ // to apply required stereotype before edition
+ // see bug 426709: [Table 2][Stereotype] Papyrus Table must allows to edit stereotype properties even if the required stereotypes is not yet applied
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=426709
+ final int nbApplicablesSte = UMLTableUtils.getApplicableStereotypesWithThisProperty(el, id).size();
+ return nbApplicablesSte == 1 && !prop.isDerived() && !prop.isReadOnly();
case 1:
- final Property prop = UMLTableUtils.getRealStereotypeProperty(el, id);
return !prop.isDerived() && !prop.isReadOnly();
default:
return false;
diff --git a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
index 61526ace9c2..cefd7a205f1 100644
--- a/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
+++ b/extraplugins/table/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/utils/UMLTableUtils.java
@@ -143,6 +143,33 @@ public class UMLTableUtils {
* the UML::Element on which we are looking for applied Stereotype with the property identified by its id
* @param id
* the id used to identify the property of the stereotype
+ *
+ * @return
+ * the list of UML::Stereotype which have the property identified by this id and which are applied on the Element or <code>null</code> if
+ * we can't resolve it (the required profile is not applied)
+ */
+ public static final List<Stereotype> getApplicableStereotypesWithThisProperty(final Element element, final String id) {
+ assert id.startsWith(PROPERTY_OF_STEREOTYPE_PREFIX);
+ final List<Stereotype> stereotypes = new ArrayList<Stereotype>();
+ if(element.eResource() != null) {
+ final Object prop = getRealStereotypeProperty(element, id);
+ if(prop instanceof Property) {
+ for(final Stereotype current : element.getApplicableStereotypes()) {
+ if(current.getAllAttributes().contains(prop)) {
+ stereotypes.add(current);
+ }
+ }
+ }
+ }
+ return stereotypes;
+ }
+
+ /**
+ *
+ * @param element
+ * the UML::Element on which we are looking for applied Stereotype with the property identified by its id
+ * @param id
+ * the id used to identify the property of the stereotype
* @param sharedMap
* a map owning interesting information, like {@link StereotypeApplicationStructure} which can be used to find stereotype, stereotype
* application and so on

Back to the top