Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-11-24 07:49:41 -0500
committervincent lorenzo2016-11-29 06:01:26 -0500
commit3ed639ecef256da3eeff86d3b428720561f362df (patch)
treeea5d0d552c2e0b62cd9ee3cafd907ee69c0ad2e8
parentb3141df23ca644573f8b2813ad8859722d418bd9 (diff)
downloadorg.eclipse.papyrus-3ed639ecef256da3eeff86d3b428720561f362df.tar.gz
org.eclipse.papyrus-3ed639ecef256da3eeff86d3b428720561f362df.tar.xz
org.eclipse.papyrus-3ed639ecef256da3eeff86d3b428720561f362df.zip
Bug 496905: [Diagram][ModelExplorer][Table][Dialog] Papyrus must integrate
the internationalization feature provided by UML. https://bugs.eclipse.org/bugs/show_bug.cgi?id=496905 Commit of UML for internationalization. Change-Id: Ia61e5ef4d537f9e9b192bcfe073f921542fe4876 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml10
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/.project35
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/build.properties7
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/epl-v10.html304
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.properties132
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.xml42
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/license.html107
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/pom.xml12
-rw-r--r--features/papyrus-main-features/pom.xml1
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmf.editpartview/META-INF/MANIFEST.MF3
-rw-r--r--plugins/developer/org.eclipse.papyrus.gmf.editpartview/src/org/eclipse/papyrus/gmf/editpartview/view/EditPartLabelProvider.java190
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTreeTable.xwt9
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java13
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java7
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java9
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java13
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java9
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java23
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java19
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java9
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java13
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java9
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java271
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java8
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java6
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java4
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java174
-rw-r--r--plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java4
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java865
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java7
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java6
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF123
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallBehaviorActionPinUpdater.java187
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallOperationActionPinUpdater.java267
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/SendSignalActionPinUpdater.java338
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/handlers/SynchronizePinsParametersHandler.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java282
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptTimeEventActionParser.java284
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java381
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityParameterNodeParser.java350
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AssociatedBehaviorParser.java390
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallBehaviorActionParser.java300
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallOperationActionParser.java338
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java381
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ExceptionHandlerTypeParser.java292
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ObjectNodeParser.java350
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ParameterParser.java300
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinParser.java344
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java496
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PostConditionConstraintLabelParser.java302
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PreConditionConstraintLabelParser.java302
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/parsers/MessageFormatParser.java48
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java208
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/ClassifierTemplateParameterParser.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/SlotParser.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InformationFlowCustomLabelEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java5
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/parsers/MessageFormatParser.java458
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups/src/org/eclipse/papyrus/uml/diagram/common/groups/core/ui/utils/CreatorUtils.java243
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/plugin.xml3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/Activator.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/dialogs/SelectModelElementsForDiagramDialog.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ExtendedDirectEditPolicy.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/ShortCutPreviewEditPolicy.java40
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/ActivityParameterNodeLabelHelper.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/DurationObservationHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/EnumerationLiteralLabelHelper.java198
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/FloatingLabelHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/MultiplicityElementLabelParser.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/ShortcutDiagramParser.java22
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/TagsAdderParser.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/custom/AssociationEndParser.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/custom/OnlyStereotypesNamesParser.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/parser/stereotype/AppliedStereotypeParser.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/part/UmlGmfDiagramEditor.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/AlternativeUMLItemProviderAdapterFactory.java1908
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/BasicEditPartProvider.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/providers/UMLComposedAdapterFactory.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/DisplayAppliedStereotypePropertiesInCompartmentPostAction.java7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/service/palette/PropertyRepresentation.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/strategy/paste/InternationalizationPasteStrategy.java130
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/ui/dialogs/PropertyEditors.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/ParameterLabelUtil.java271
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/UmlCommunicationDiagramForMultiEditor.java320
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parser/LifelineCustomParsers.java447
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/custom-src/org/eclipse/papyrus/uml/diagram/communication/custom/parser/MessageParser.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src-gen/org/eclipse/papyrus/uml/diagram/communication/parsers/MessageFormatParser.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/custom-src/org/eclipse/papyrus/uml/diagram/component/UmlComponentDiagramForMultiEditor.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/parsers/MessageFormatParser.java470
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/UmlCompositeDiagramForMultiEditor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/InformationFlowCustomLabelEditPolicy.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/ConnectorLabelParser.java194
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/NamedElementLabelParser.java304
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/parsers/RoleBindingRoleNameParser.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/src-gen/org/eclipse/papyrus/uml/diagram/composite/parsers/MessageFormatParser.java456
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/META-INF/MANIFEST.MF142
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/custom-src/org/eclipse/papyrus/uml/diagram/deployment/UmlDeploymentDiagramForMultiEditor.java322
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment/src-gen/org/eclipse/papyrus/uml/diagram/deployment/parsers/MessageFormatParser.java472
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src-gen/org/eclipse/papyrus/uml/diagram/interactionoverview/InteractionOverviewDiagramForMultiEditor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/edit/commands/AddHyperlinkDiagram.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview/src/org/eclipse/papyrus/uml/diagram/interactionoverview/parser/CustomCallBehaviorActionParser.java180
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/UmlProfileDiagramForMultiEditor.java328
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/PropertyCommandForAssociation.java182
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/ExtensionCustomNameEditPolicy.java10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src-gen/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java50
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF134
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/RestoreExecutionEndAdvice.java479
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/UmlSequenceDiagramForMultiEditor.java356
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/MessageLabelHelper.java320
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomCombinedFragmentEditPart.java24
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomConsiderIgnoreFragmentEditPart.java408
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomInteractionUseEditPart.java846
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/GateNameEditPart.java760
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/MessageEndEditPart.java9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/InteractionUseCustomParsers.java288
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/LifelineCustomParsers.java390
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/MessageCustomParser.java216
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeConstraintParser.java559
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/parser/custom/TimeObservationParser.java251
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/GateHelper.java1120
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/LifelineLabelHelper.java372
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/MessageConnectionHelper.java496
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OccurrenceSpecificationHelper.java329
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/OperationUtil.java558
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/util/SignalUtil.java324
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/navigator/UMLNavigatorLabelProvider.java1706
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src-gen/org/eclipse/papyrus/uml/diagram/sequence/parsers/MessageFormatParser.java474
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/UmlStateMachineDiagramForMultiEditor.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomConnectionPointReferenceNameEditPart.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomRegionCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateCompartmentEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateMachineCompartmentEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/edit/part/CustomStateNameEditPartTN.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/parsers/AbstractStateBehaviorsParser.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/parsers/InternalTransitionParser.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/parsers/TransitionPropertiesParser.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src-gen/org/eclipse/papyrus/uml/diagram/statemachine/parsers/MessageFormatParser.java48
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/META-INF/MANIFEST.MF7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpart/AppliedStereotypeCompartmentEditPart.java4
-rwxr-xr-xplugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/provider/DisplayedProfileElementLabelProvider.java1148
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/UmlTimingDiagramForMultiEditor.java250
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/parsers/OccurrenceSpecificationNameParser.java224
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/custom-src/org/eclipse/papyrus/uml/diagram/timing/custom/parsers/StateDefinitionParser.java195
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing/src-gen/org/eclipse/papyrus/uml/diagram/timing/parsers/MessageFormatParser.java48
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/UmlUseCaseDiagramForMultiEditor.java270
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/custom-src/org/eclipse/papyrus/uml/diagram/usecase/helper/ExtensionPointLabelHelper.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/src-gen/org/eclipse/papyrus/uml/diagram/usecase/parsers/MessageFormatParser.java48
-rw-r--r--plugins/uml/internationalization/.project17
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/.classpath7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/.project52
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/META-INF/MANIFEST.MF22
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/about.html28
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/build.properties11
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/plugin.properties4
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/plugin.xml22
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/pom.xml12
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/src/org/eclipse/papyrus/uml/internationalization/edit/Activator.java77
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/src/org/eclipse/papyrus/uml/internationalization/edit/providers/InternationalizationUMLItemProviderAdapterFactory.java3492
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.edit/src/org/eclipse/papyrus/uml/internationalization/edit/utils/InternationalizationElementItemProviderUtils.java130
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/.classpath7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/.project52
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/META-INF/MANIFEST.MF20
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/about.html28
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/build.properties11
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/plugin.properties4
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/plugin.xml9
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/pom.xml12
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/src/org/eclipse/papyrus/uml/internationalization/utils/Activator.java77
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization.utils/src/org/eclipse/papyrus/uml/internationalization/utils/utils/UMLLabelInternationalization.java227
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/.classpath7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/.project52
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/META-INF/MANIFEST.MF23
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/about.html28
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/build.properties11
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/plugin.properties4
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/plugin.xml21
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/pom.xml12
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/src/org/eclipse/papyrus/uml/internationalization/Activator.java77
-rw-r--r--plugins/uml/internationalization/org.eclipse.papyrus.uml.internationalization/src/org/eclipse/papyrus/uml/internationalization/modelresource/UMLInternationalizationModelResource.java223
-rw-r--r--plugins/uml/internationalization/pom.xml21
-rw-r--r--plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets/src/org/eclipse/papyrus/uml/modelexplorer/widgets/NamedElementComparator.java83
-rw-r--r--plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets/src/org/eclipse/papyrus/uml/modelexplorer/widgets/StereotypeMetaclassLabelProvider.java66
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/label/provider/StereotypeDisplayPropertyHeaderLabelProvider.java3
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/plugin.xml5
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/manager/cell/UMLOperationValueCellManager.java57
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/StereotypePropertyHeaderLabelProvider.java6
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable/src/org/eclipse/papyrus/uml/nattable/provider/UMLTypedElementCellLabelProvider.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.commands/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.commands/src/org/eclipse/papyrus/uml/commands/handler/RenameNamedElementHandler.java75
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.extensionpoints/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.extensionpoints/src/org/eclipse/papyrus/uml/extensionpoints/library/RegisteredLibrarySelectionDialog.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.extensionpoints/src/org/eclipse/papyrus/uml/extensionpoints/library/RegisteredProfileAsLibrarySelectionDialog.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.extensionpoints/src/org/eclipse/papyrus/uml/extensionpoints/metamodel/RegisteredMetamodelSelectionDialog.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.navigation/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.navigation/src/org/eclipse/papyrus/uml/navigation/navigableElement/CBANavigableElement.java5
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.navigation/src/org/eclipse/papyrus/uml/navigation/navigableElement/GenericNavigableElement.java6
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.oclconstraintevaluation/src/org/eclipse/papyrus/uml/oclconstraintevaluation/OCLEvaluationView.java223
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/tree/DisplayedProfileElementLabelProvider.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/ui/dialogs/ElementImportTreeSelectionDialog.java1424
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/ui/items/EnumerationItems.java4
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/utils/Util.java4
-rw-r--r--plugins/uml/pom.xml1
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ProfileFunctions.java188
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/contentassist/StereotypeContentProvider.java174
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/dialog/PropertiesEditorWidget.java18
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/dialog/TaggedValuesEditorWidget.java18
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/ui/providers/TypeLabelProvider.java78
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/Metaclass.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAbstraction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAcceptCallAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAcceptEventAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionExecutionSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivity.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivityEdge.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivityFinalNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivityNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivityParameterNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActivityPartition.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActor.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAddStructuralFeatureValueAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAddVariableValueAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAnyReceiveEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleArtifact.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAssociation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleAssociationClass.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleBehavior.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleBehaviorExecutionSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleBehavioralFeature.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleBehavioredClassifier.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleBroadcastSignalAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCallAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCallBehaviorAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCallEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCallOperationAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCentralBufferNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleChangeEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleClass.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleClassifier.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleClearAssociationAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleClearStructuralFeatureAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleClearVariableAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCollaboration.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCollaborationUse.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCombinedFragment.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCommunicationPath.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleComponent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleComponentRealization.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConditionalNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectableElement.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectionPointReference.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnector.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConsiderIgnoreFragment.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConstraint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleContinuation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleControlFlow.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleControlNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCreateLinkAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCreateLinkObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCreateObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleCreationEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDataStoreNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDataType.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDecisionNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDependency.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDeployedArtifact.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDeployment.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDeploymentSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDeploymentTarget.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDestroyLinkAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDestroyObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDevice.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDuration.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDurationConstraint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDurationInterval.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleDurationObservation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleEncapsulatedClassifier.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleEnumeration.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleEnumerationLiteral.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExecutableNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExecutionEnvironment.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExecutionOccurrenceSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExecutionSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExpansionNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExpansionRegion.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExpression.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExtend.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExtension.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExtensionEnd.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleExtensionPoint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleFeature.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleFinalNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleFinalState.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleFlowFinalNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleForkNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleFunctionBehavior.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleGate.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleGeneralOrdering.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleGeneralizationSet.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInclude.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInformationFlow.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInformationItem.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInitialNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInstanceSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInstanceValue.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteraction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionConstraint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionFragment.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionOperand.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInteractionUse.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInterface.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInterfaceRealization.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInterval.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleIntervalConstraint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInvocationAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleJoinNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLifeline.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLinkAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralBoolean.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralInteger.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralNull.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralString.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLiteralUnlimitedNatural.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleLoopNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleManifestation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMergeNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMessage.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMessageEnd.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMessageEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMessageOccurrenceSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleModel.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleNamedElement.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleNamespace.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleObjectFlow.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleObjectNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleObservation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOccurrenceSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOpaqueAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOpaqueBehavior.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOpaqueExpression.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOperation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePackage.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePackageableElement.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameterSet.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePartDecomposition.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePrimitiveType.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProfile.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProtocolStateMachine.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProtocolTransition.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePseudostate.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRaiseExceptionAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadExtentAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadIsClassifiedObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadLinkAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadLinkObjectEndAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadLinkObjectEndQualifierAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadSelfAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadStructuralFeatureAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReadVariableAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealLiteral.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRealization.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReception.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReclassifyObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRedefinableElement.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRedefinableTemplateSignature.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReduceAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRegion.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRemoveStructuralFeatureValueAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleRemoveVariableValueAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleReplyAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSendObjectAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSendSignalAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSequenceNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSignal.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSignalEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStartClassifierBehaviorAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStartObjectBehaviorAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleState.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStateInvariant.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStateMachine.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStereotype.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStringExpression.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeatureAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuredActivityNode.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuredClassifier.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleSubstitution.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTestIdentityAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTimeConstraint.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTimeEvent.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTimeExpression.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTimeInterval.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTimeObservation.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTransition.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTrigger.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleType.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleTypedElement.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleUnmarshallAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleUsage.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleUseCase.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValueSpecification.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValueSpecificationAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariableAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVertex.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleWriteLinkAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleWriteStructuralFeatureAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleWriteVariableAction.xwt1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/KeywordObservableValue.java148
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/UMLLabelObservableValue.java220
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/UMLModelElement.java104
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/profile/ui/compositesformodel/PropertyComposite.java4
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/profile/ui/dialogs/ChooseSetStereotypeDialog.java460
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/profile/ui/dialogs/StereotypeLabelProvider.java158
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui/src/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/ui/contributions/CollaborationUseEditor.java437
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui/src/org/eclipse/papyrus/uml/textedit/collaborationuse/xtext/ui/contributions/UMLCollaborationUseEditorUtil.java234
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui/src/org/eclipse/papyrus/uml/textedit/message/xtext/ui/contributions/MessagePopupEditor.java283
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui/src/org/eclipse/papyrus/uml/textedit/parameter/xtext/ui/contributions/ParameterXtextDirectEditorConfiguration.java749
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui/src/org/eclipse/papyrus/uml/textedit/parameter/xtext/ui/contributions/UMLParameterEditorUtil.java366
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui/src/org/eclipse/papyrus/uml/textedit/port/xtext/ui/contribution/PortXtextDirectEditorConfiguration.java16
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui/src/org/eclipse/papyrus/uml/textedit/property/xtext/ui/contributions/PropertyXtextDirectEditorConfiguration.java16
-rwxr-xr-xplugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui/META-INF/MANIFEST.MF4
-rwxr-xr-xplugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui/src/org/eclipse/papyrus/uml/textedit/state/xtext/ui/contributions/StateEditorConfigurationContribution.java787
-rwxr-xr-xplugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/META-INF/MANIFEST.MF4
-rwxr-xr-xplugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext/src/org/eclipse/papyrus/uml/textedit/state/xtext/validation/UmlStateJavaValidator.java5
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/META-INF/MANIFEST.MF5
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java55
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/META-INF/MANIFEST.MF3
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java176
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ExtensionPointUtil.java82
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/InstanceSpecificationUtil.java8
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/MultiplicityElementUtil.java3
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/OperationUtil.java474
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PackageUtil.java6
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ParameterUtil.java430
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PortUtil.java208
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/PropertyUtil.java722
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/SignalUtil.java160
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/TypeUtil.java144
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/TypedElementUtil.java54
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ValueSpecificationUtil.java32
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/Activator.java6
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/namereferences/NameReferencesHelper.java464
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLLabelProvider.java29
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLMetaclassContentProvider.java6
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/providers/UMLMetaclassLabelProvider.java158
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/GMFUnsafeTest.java441
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java238
524 files changed, 27247 insertions, 17596 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
index 59fd99edd00..60ec26a3b6b 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
@@ -117,9 +117,13 @@ http://www.eclipse.org/legal/epl-v10.html
<includes
id="org.eclipse.papyrus.uml.xtext.integration.feature"
version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.infra.internationalization.feature"
+
+ <includes
+ id="org.eclipse.papyrus.infra.internationalization.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.uml.internationalization.feature"
version="0.0.0"/>
<includes
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/.project b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/.project
new file mode 100644
index 00000000000..c3ec75f9c45
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/.project
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.internationalization.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.oomph.version.VersionBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>check.maven.pom</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>ignore.lower.bound.dependency.ranges</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>release.path</key>
+ <value>/org.eclipse.papyrus.releng.main.release/release.xml</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ <nature>org.eclipse.oomph.version.VersionNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/build.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/build.properties
new file mode 100644
index 00000000000..b9ce3341aac
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/build.properties
@@ -0,0 +1,7 @@
+bin.includes = feature.xml,\
+ build.properties,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/epl-v10.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/epl-v10.html
new file mode 100644
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.properties
new file mode 100644
index 00000000000..11ac9ede269
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.properties
@@ -0,0 +1,132 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.xml
new file mode 100644
index 00000000000..b831504d0f7
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/feature.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.uml.internationalization.feature"
+ label="Papyrus UML Internationalization"
+ version="1.0.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2016 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.internationalization"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.internationalization.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.internationalization.utils"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/license.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/license.html
new file mode 100644
index 00000000000..c3d34c3c21e
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/pom.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/pom.xml
new file mode 100644
index 00000000000..da1dddbc366
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.internationalization.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.internationalization.feature</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/features/papyrus-main-features/pom.xml b/features/papyrus-main-features/pom.xml
index bd910ac2859..03dc9ca140f 100644
--- a/features/papyrus-main-features/pom.xml
+++ b/features/papyrus-main-features/pom.xml
@@ -37,6 +37,7 @@
<module>org.eclipse.papyrus.uml.diagram.feature</module>
<module>org.eclipse.papyrus.uml.feature</module>
<module>org.eclipse.papyrus.uml.modelexplorer.feature</module>
+ <module>org.eclipse.papyrus.uml.internationalization.feature</module>
<module>org.eclipse.papyrus.uml.nattable.feature</module>
<module>org.eclipse.papyrus.uml.properties.feature</module>
<module>org.eclipse.papyrus.uml.search.feature</module>
diff --git a/plugins/developer/org.eclipse.papyrus.gmf.editpartview/META-INF/MANIFEST.MF b/plugins/developer/org.eclipse.papyrus.gmf.editpartview/META-INF/MANIFEST.MF
index 8330ade9420..b4c413d72d0 100644
--- a/plugins/developer/org.eclipse.papyrus.gmf.editpartview/META-INF/MANIFEST.MF
+++ b/plugins/developer/org.eclipse.papyrus.gmf.editpartview/META-INF/MANIFEST.MF
@@ -4,7 +4,8 @@ Export-Package: org.eclipse.papyrus.gmf.editpartview,
Require-Bundle: org.eclipse.gmf.runtime.diagram.ui;bundle-version="[1.8.0,2.0.0)",
org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)"
+ org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/developer/org.eclipse.papyrus.gmf.editpartview/src/org/eclipse/papyrus/gmf/editpartview/view/EditPartLabelProvider.java b/plugins/developer/org.eclipse.papyrus.gmf.editpartview/src/org/eclipse/papyrus/gmf/editpartview/view/EditPartLabelProvider.java
index ff1506d108e..a87338e7953 100644
--- a/plugins/developer/org.eclipse.papyrus.gmf.editpartview/src/org/eclipse/papyrus/gmf/editpartview/view/EditPartLabelProvider.java
+++ b/plugins/developer/org.eclipse.papyrus.gmf.editpartview/src/org/eclipse/papyrus/gmf/editpartview/view/EditPartLabelProvider.java
@@ -1,94 +1,96 @@
-/*****************************************************************************
- * 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:
- * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
- * Based on edit policy view from patrick.tessier@cea.fr
- */
-package org.eclipse.papyrus.gmf.editpartview.view;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableColorProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.NamedElement;
-
-
-/**
- * This is the label provider to display edit parts
- *
- */
-public class EditPartLabelProvider implements ITableLabelProvider, ITableColorProvider {
-
- protected Color papyrusColor = new Color(Display.getDefault(), 0, 127, 14);
-
- protected Color customizableDropEditPolicyColor = new Color(Display.getDefault(), 0, 38, 255);
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof GraphicalEditPart) {
- GraphicalEditPart editPart = (GraphicalEditPart) element;
- IFigure figure = editPart.getContentPane();
- Object model = editPart.getAdapter(EObject.class);
- switch (columnIndex) {
- case 0:
- return editPart.getClass().getSimpleName();
- case 1:
- if (model instanceof NamedElement) {
- return ((NamedElement) model).getName();
- }
- return "not a named element";
- case 2:
- return figure.getClass().getSimpleName();
- case 3:
- return figure.getBounds().toString();
- }
- }
- return "cannot display it: " + element;
- }
-
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- @Override
- public Color getForeground(Object element, int columnIndex) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Color getBackground(Object element, int columnIndex) {
- // TODO Auto-generated method stub
- return null;
- }
-};
+/*****************************************************************************
+ * 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:
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - Initial API and implementation
+ * Based on edit policy view from patrick.tessier@cea.fr
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ */
+package org.eclipse.papyrus.gmf.editpartview.view;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableColorProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.NamedElement;
+
+
+/**
+ * This is the label provider to display edit parts
+ *
+ */
+public class EditPartLabelProvider implements ITableLabelProvider, ITableColorProvider {
+
+ protected Color papyrusColor = new Color(Display.getDefault(), 0, 127, 14);
+
+ protected Color customizableDropEditPolicyColor = new Color(Display.getDefault(), 0, 38, 255);
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof GraphicalEditPart) {
+ GraphicalEditPart editPart = (GraphicalEditPart) element;
+ IFigure figure = editPart.getContentPane();
+ Object model = editPart.getAdapter(EObject.class);
+ switch (columnIndex) {
+ case 0:
+ return editPart.getClass().getSimpleName();
+ case 1:
+ if (model instanceof NamedElement) {
+ return UMLLabelInternationalization.getInstance().getLabel((NamedElement) model);
+ }
+ return "not a named element";
+ case 2:
+ return figure.getClass().getSimpleName();
+ case 3:
+ return figure.getBounds().toString();
+ }
+ }
+ return "cannot display it: " + element;
+ }
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ @Override
+ public Color getForeground(Object element, int columnIndex) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Color getBackground(Object element, int columnIndex) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+};
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTreeTable.xwt b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTreeTable.xwt
index 42cdd7da6bb..a2e58450cb6 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTreeTable.xwt
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties/model/ui/SingleTreeTable.xwt
@@ -8,10 +8,17 @@
</Composite.layout>
<Composite>
<Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
</Composite.layout>
<ppe:StringEditor input="{Binding}"
property="nattable:nattableconfiguration:TableNamedElement:name"></ppe:StringEditor>
+ <ppe:StringEditor input="{Binding}"
+ property="nattable:nattableconfiguration:TableNamedElement:label"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
<ppe:ReferenceLabel input="{Binding}"
property="nattable:Table:prototype" readOnly="true" customLabel="View Type"></ppe:ReferenceLabel>
<ppe:ReferenceDialog input="{Binding}" property="nattable:Table:owner"
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
index 033455f8e12..cfcdd23cfde 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0
org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)"
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java
index 103bd30d935..a5c21be0d38 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/src-gen/org/eclipse/papyrus/sysml/diagram/blockdefinition/BlockDefinitionDiagramForMultiEditor.java
@@ -10,6 +10,7 @@
*
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.blockdefinition;
@@ -23,6 +24,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.sysml.diagram.blockdefinition.part.BlockDefinitionDiagramEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -70,7 +72,7 @@ public class BlockDefinitionDiagramForMultiEditor extends BlockDefinitionDiagram
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
index 1783a3e4258..20ca98c4fc9 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
@@ -33,7 +33,9 @@ Require-Bundle: org.eclipse.emf;bundle-version="[2.6.0,3.0.0)",
org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.modelexplorer.widgets;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.uml.diagram.composite;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 2.0.0.qualifier
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java
index 4fef645ef06..f332eb80329 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/FlowPortLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.parser;
@@ -32,6 +32,7 @@ import org.eclipse.papyrus.sysml.portandflows.FlowPort;
import org.eclipse.papyrus.sysml.portandflows.FlowSpecification;
import org.eclipse.papyrus.sysml.portandflows.PortandflowsPackage;
import org.eclipse.papyrus.uml.diagram.common.parser.PropertyLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.InstanceValue;
@@ -129,7 +130,7 @@ public class FlowPortLabelParser extends PropertyLabelParser {
// manage name
if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (property.isSetName())) {
- String name = property.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
result = String.format(NAME_FORMAT, result, name);
}
@@ -138,7 +139,7 @@ public class FlowPortLabelParser extends PropertyLabelParser {
String type = "<Undefined>";
if (property.getType() != null) {
- type = property.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
@@ -164,7 +165,7 @@ public class FlowPortLabelParser extends PropertyLabelParser {
if ((maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) && ((property.getDefaultValue() != null))) {
ValueSpecification valueSpecification = property.getDefaultValue();
if (valueSpecification instanceof InstanceValue) {
- result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
}
}
@@ -186,7 +187,7 @@ public class FlowPortLabelParser extends PropertyLabelParser {
EList<Property> redefinedProperties = property.getRedefinedProperties();
if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
for (Property p : redefinedProperties) {
- sb.append(sb.length() == 0 ? p.getName() : ", redefines " + p.getName());
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
}
}
if (sb.length() != 0) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java
index 548984a5c1f..c7984cb850b 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/RequirementLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.parser;
@@ -26,6 +26,7 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.sysml.requirements.Requirement;
import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.util.UMLUtil;
@@ -63,7 +64,7 @@ public class RequirementLabelParser extends NamedElementLabelParser {
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
- String name = clazz.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(clazz);
result = String.format(NAME_FORMAT, name);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java
index 041a725ad39..10242f87699 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/parser/UnitLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.parser;
@@ -30,6 +30,7 @@ import org.eclipse.papyrus.sysml.blocks.Dimension;
import org.eclipse.papyrus.sysml.blocks.Unit;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.util.UMLUtil;
@@ -68,7 +69,7 @@ public class UnitLabelParser extends NamedElementLabelParser {
// manage name
if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (iSpec.isSetName())) {
- String name = iSpec.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(iSpec);
result = String.format(NAME_FORMAT, name);
}
@@ -78,7 +79,7 @@ public class UnitLabelParser extends NamedElementLabelParser {
if ((unit != null) && (unit.getDimension() != null)) {
Dimension dim = unit.getDimension();
if ((dim.getBase_InstanceSpecification() != null) && (dim.getBase_InstanceSpecification().isSetName())) {
- dimensionName = dim.getBase_InstanceSpecification().getName();
+ dimensionName = UMLLabelInternationalization.getInstance().getLabel(dim.getBase_InstanceSpecification());
}
}
result = String.format(DIMENSION_FORMAT, result, dimensionName);
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java
index ac2699f927b..9cb1c33b8fd 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/AssociationEndLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -24,6 +24,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.Association;
@@ -87,7 +88,7 @@ public class AssociationEndLabelParser extends PropertyLabelParser {
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME) && property.isSetName()) {
- String name = property.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
// If property is owned by Association (non navigable) only show the name when explicitly asked.
@@ -101,7 +102,7 @@ public class AssociationEndLabelParser extends PropertyLabelParser {
if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
String type = "<Undefined>";
if (property.getType() != null) {
- type = property.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
@@ -124,7 +125,7 @@ public class AssociationEndLabelParser extends PropertyLabelParser {
// manage default value
if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
ValueSpecification valueSpecification = property.getDefaultValue();
- result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
}
// manage modifier
@@ -145,7 +146,7 @@ public class AssociationEndLabelParser extends PropertyLabelParser {
EList<Property> redefinedProperties = property.getRedefinedProperties();
if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
for (Property p : redefinedProperties) {
- sb.append(sb.length() == 0 ? p.getName() : ", redefines " + p.getName());
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
}
}
if (sb.length() != 0) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java
index d8b67756741..dba310651f9 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConnectorLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.UMLPackage;
@@ -62,7 +63,7 @@ public class ConnectorLabelParser extends NamedElementLabelParser {
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME) && (connector.isSetName())) {
- String name = connector.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(connector);
result = String.format(NAME_FORMAT, name);
}
@@ -70,7 +71,7 @@ public class ConnectorLabelParser extends NamedElementLabelParser {
if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
String type = "<Undefined>";
if (connector.getType() != null) {
- type = connector.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(connector.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
index b6193fd946d..1dbfdd09dd4 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ConstraintLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -28,11 +28,15 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.Constraint;
@@ -71,7 +75,7 @@ public class ConstraintLabelParser extends NamedElementLabelParser {
// edit name
if ((maskValues.contains(ICustomAppearance.DISP_NAME))) {
if (semElement.isSetName()) {
- editString = semElement.getName();
+ editString = UMLLabelInternationalization.getInstance().getLabel(semElement);
}
// (try to) edit constraint specification
@@ -107,7 +111,7 @@ public class ConstraintLabelParser extends NamedElementLabelParser {
// manage name
if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (semElement.isSetName())) {
- String name = semElement.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(semElement);
result = String.format(NAME_FORMAT, name);
}
@@ -115,7 +119,7 @@ public class ConstraintLabelParser extends NamedElementLabelParser {
if ((maskValues.contains(ILabelPreferenceConstants.DISP_SPECIFICATION))) {
String spec = "<Undefined>";
if (semElement.getSpecification() != null) {
- spec = ValueSpecificationUtil.getSpecificationValue(semElement.getSpecification());
+ spec = ValueSpecificationUtil.getSpecificationValue(semElement.getSpecification(), true);
if (spec == null || "".equals(spec)) {
spec = "<Undefined>";
}
@@ -144,8 +148,13 @@ public class ConstraintLabelParser extends NamedElementLabelParser {
// prepare set name request
if ((maskValues.contains(ICustomAppearance.DISP_NAME))) {
- updateRequest = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
- updateRequest.setLabel("Update Constraint Label");
+ if(InternationalizationPreferencesUtils.getInternationalizationPreference(constraint) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(constraint)){
+ final ModelSet modelSet = (ModelSet)constraint.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), constraint, newString, null));
+ }else{
+ updateRequest = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
+ updateRequest.setLabel("Update Constraint Label");
+ }
// prepare set specification request
} else if ((maskValues.contains(ILabelPreferenceConstants.DISP_SPECIFICATION))) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
index f35c93eef23..dd5db038963 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/NamedElementLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -31,11 +31,15 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.MaskLabelHelper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.UMLPackage;
@@ -55,7 +59,7 @@ public class NamedElementLabelParser implements IMaskManagedSemanticParser {
if ((eObject != null) && (eObject instanceof NamedElement)) {
NamedElement semElement = (NamedElement) eObject;
if (semElement.isSetName()) {
- editString = semElement.getName();
+ editString = UMLLabelInternationalization.getInstance().getLabel(semElement);
}
}
return editString;
@@ -83,7 +87,12 @@ public class NamedElementLabelParser implements IMaskManagedSemanticParser {
}
try {
- command = ElementEditServiceUtils.getEditServiceProvider().getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ if(InternationalizationPreferencesUtils.getInternationalizationPreference(objectToEdit) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement)objectToEdit)){
+ final ModelSet modelSet = (ModelSet)objectToEdit.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement)objectToEdit, newString, null));
+ }else{
+ command = ElementEditServiceUtils.getEditServiceProvider().getEditService(objectToEdit).getEditCommand(new SetRequest(objectToEdit, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ }
} catch (ServiceException e) {
Activator.log.error(e);
}
@@ -100,7 +109,7 @@ public class NamedElementLabelParser implements IMaskManagedSemanticParser {
EObject eObject = EMFHelper.getEObject(element);
if (eObject instanceof NamedElement) {
- return ((NamedElement) eObject).getName();
+ return UMLLabelInternationalization.getInstance().getLabel((NamedElement) eObject);
}
return result;
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java
index 1c8aa32e973..81ef14ccf77 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/OperationLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -30,6 +30,7 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.tools.util.StringHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.uml.diagram.common.utils.ParameterLabelUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Parameter;
@@ -101,7 +102,7 @@ public class OperationLabelParser extends NamedElementLabelParser {
// manage name and parameters
if ((maskValues.contains(ICustomAppearance.DISP_NAME)) && (operation.isSetName())) {
- String name = operation.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(operation);
StringBuffer params = new StringBuffer();
for (Parameter parameter : operation.getOwnedParameters()) {
@@ -118,7 +119,7 @@ public class OperationLabelParser extends NamedElementLabelParser {
if ((maskValues.contains(ICustomAppearance.DISP_TYPE))) {
String type = "<Undefined>";
if (operation.getType() != null) {
- type = operation.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(operation.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
index 0fd37969d94..89ea3a8e1d7 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/PropertyLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -28,6 +28,7 @@ import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
import org.eclipse.uml2.uml.Property;
@@ -113,7 +114,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME) && (property.isSetName())) {
- String name = property.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(property);
result = String.format(NAME_FORMAT, result, name);
}
@@ -121,7 +122,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
String type = "<Undefined>";
if (property.getType() != null) {
- type = property.getType().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(property.getType());
}
// If type is undefined only show "<Undefined>" when explicitly asked.
@@ -143,7 +144,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
// manage default value
if (maskValues.contains(ICustomAppearance.DISP_DEFAULT_VALUE) && property.getDefaultValue() != null) {
ValueSpecification valueSpecification = property.getDefaultValue();
- result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
}
// manage modifier
@@ -164,7 +165,7 @@ public class PropertyLabelParser extends NamedElementLabelParser {
EList<Property> redefinedProperties = property.getRedefinedProperties();
if (redefinedProperties != null && !redefinedProperties.isEmpty()) {
for (Property p : redefinedProperties) {
- sb.append(sb.length() == 0 ? p.getName() : ", redefines " + p.getName());
+ sb.append(sb.length() == 0 ? UMLLabelInternationalization.getInstance().getLabel(p) : ", redefines " + UMLLabelInternationalization.getInstance().getLabel(p));
}
}
if (sb.length() != 0) {
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java
index 7c7fe85686c..a5fbfaef55c 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/parser/ReceptionLabelParser.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.common.parser;
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.uml2.uml.Reception;
import org.eclipse.uml2.uml.UMLPackage;
@@ -65,7 +66,7 @@ public class ReceptionLabelParser extends NamedElementLabelParser implements IMa
// manage name
if (maskValues.contains(ICustomAppearance.DISP_NAME) && reception.isSetName()) {
- String name = reception.getName();
+ String name = UMLLabelInternationalization.getInstance().getLabel(reception);
result = String.format(NAME_FORMAT, result, name);
}
@@ -73,7 +74,7 @@ public class ReceptionLabelParser extends NamedElementLabelParser implements IMa
if (maskValues.contains(ILabelPreferenceConstants.DISP_SIGNAL)) {
String type = "<Undefined>";
if (reception.getSignal() != null) {
- type = reception.getSignal().getName();
+ type = UMLLabelInternationalization.getInstance().getLabel(reception.getSignal());
}
result = String.format(TYPE_FORMAT, result, type);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java
index ca346d9aecf..edb3268fffb 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/utils/ParameterLabelUtil.java
@@ -1,135 +1,136 @@
-/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.common.utils;
-
-import java.util.Collection;
-
-import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
-import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
-import org.eclipse.papyrus.uml.diagram.common.parser.IMaskManagedSemanticParser;
-import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-
-public class ParameterLabelUtil {
-
- /** The String format for displaying a {@link Parameter} with direction */
- protected static final String DIRECTION_FORMAT = "%s %s";
-
- /** The String format for displaying a {@link Parameter} label with its name */
- protected static final String NAME_FORMAT = "%s%s";
-
- /** The String format for displaying a {@link Parameter} label with its type */
- protected static final String TYPE_FORMAT = "%s: %s";
-
- /** The String format for displaying a {@link Parameter} label with its multiplicity */
- protected static final String MULTIPLICITY_FORMAT = "%s [%s..%s]";
-
- /** The String format for displaying a {@link Parameter} label with its default value */
- protected static final String DEFAULT_VALUE_FORMAT = "%s= %s";
-
- /** The String format for displaying a {@link Parameter} label with its modifiers */
- protected static final String MODIFIER_FORMAT = "%s{%s}";
-
- public static String getPrintString(Parameter parameter, Collection<String> displayValue) {
- if (displayValue.isEmpty()) {
- return IMaskManagedSemanticParser.MaskedLabel;
- }
-
- String result = "";
-
- if (parameter != null) {
-
- // manage direction
- if (displayValue.contains(ICustomAppearance.DISP_DIRECTION) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_DIRECTION)) {
- String direction;
- switch (parameter.getDirection().getValue()) {
- case ParameterDirectionKind.IN:
- direction = "in";
- break;
- case ParameterDirectionKind.OUT:
- direction = "out";
- break;
- case ParameterDirectionKind.INOUT:
- direction = "inout";
- break;
- case ParameterDirectionKind.RETURN:
- direction = "return";
- break;
- default:
- direction = "in";
- break;
- }
- result = String.format(DIRECTION_FORMAT, direction, result);
- }
-
- // manage name
- if ((displayValue.contains(ICustomAppearance.DISP_NAME) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) && (parameter.isSetName())) {
- String name = parameter.getName();
- result = String.format(NAME_FORMAT, result, name);
- }
-
- // manage type
- if (displayValue.contains(ICustomAppearance.DISP_TYPE) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
- String type = "<Undefined>";
- if (parameter.getType() != null) {
- type = parameter.getType().getName();
- }
-
- // If type is undefined only show "<Undefined>" when explicitly asked.
- if (displayValue.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || (!"<Undefined>".equals(type))) {
- result = String.format(TYPE_FORMAT, result, type);
- }
- }
-
- // manage multiplicity
- String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(parameter, displayValue);
- if (multiplicity != null && !multiplicity.isEmpty()) {
- result += " " + multiplicity;
- }
-
- // manage default value
- if ((displayValue.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT) || displayValue.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) && ((parameter.getDefaultValue() != null))) {
- ValueSpecification valueSpecification = parameter.getDefaultValue();
- result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification));
- }
-
- // manage modifier
- if (displayValue.contains(ICustomAppearance.DISP_PARAMETER_MODIFIERS) || displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
- StringBuffer sb = new StringBuffer();
- if (parameter.isOrdered()) {
- sb.append(sb.length() == 0 ? "ordered" : ", ordered");
- }
- if (parameter.isUnique()) {
- sb.append(sb.length() == 0 ? "unique" : ", unique");
- }
- if (parameter.isStream()) {
- sb.append(sb.length() == 0 ? "stream" : ", stream");
- }
- if (parameter.isException()) {
- sb.append(sb.length() == 0 ? "exception" : ", exception");
- }
- if (sb.length() != 0) {
- result = String.format(MODIFIER_FORMAT, result, sb.toString());
- }
- }
-
- }
- return result;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.utils;
+
+import java.util.Collection;
+
+import org.eclipse.papyrus.sysml.diagram.common.preferences.ILabelPreferenceConstants;
+import org.eclipse.papyrus.sysml.diagram.common.utils.SysMLMultiplicityElementUtil;
+import org.eclipse.papyrus.uml.diagram.common.parser.IMaskManagedSemanticParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+
+public class ParameterLabelUtil {
+
+ /** The String format for displaying a {@link Parameter} with direction */
+ protected static final String DIRECTION_FORMAT = "%s %s";
+
+ /** The String format for displaying a {@link Parameter} label with its name */
+ protected static final String NAME_FORMAT = "%s%s";
+
+ /** The String format for displaying a {@link Parameter} label with its type */
+ protected static final String TYPE_FORMAT = "%s: %s";
+
+ /** The String format for displaying a {@link Parameter} label with its multiplicity */
+ protected static final String MULTIPLICITY_FORMAT = "%s [%s..%s]";
+
+ /** The String format for displaying a {@link Parameter} label with its default value */
+ protected static final String DEFAULT_VALUE_FORMAT = "%s= %s";
+
+ /** The String format for displaying a {@link Parameter} label with its modifiers */
+ protected static final String MODIFIER_FORMAT = "%s{%s}";
+
+ public static String getPrintString(Parameter parameter, Collection<String> displayValue) {
+ if (displayValue.isEmpty()) {
+ return IMaskManagedSemanticParser.MaskedLabel;
+ }
+
+ String result = "";
+
+ if (parameter != null) {
+
+ // manage direction
+ if (displayValue.contains(ICustomAppearance.DISP_DIRECTION) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_DIRECTION)) {
+ String direction;
+ switch (parameter.getDirection().getValue()) {
+ case ParameterDirectionKind.IN:
+ direction = "in";
+ break;
+ case ParameterDirectionKind.OUT:
+ direction = "out";
+ break;
+ case ParameterDirectionKind.INOUT:
+ direction = "inout";
+ break;
+ case ParameterDirectionKind.RETURN:
+ direction = "return";
+ break;
+ default:
+ direction = "in";
+ break;
+ }
+ result = String.format(DIRECTION_FORMAT, direction, result);
+ }
+
+ // manage name
+ if ((displayValue.contains(ICustomAppearance.DISP_NAME) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_NAME)) && (parameter.isSetName())) {
+ String name = UMLLabelInternationalization.getInstance().getLabel(parameter);
+ result = String.format(NAME_FORMAT, result, name);
+ }
+
+ // manage type
+ if (displayValue.contains(ICustomAppearance.DISP_TYPE) || displayValue.contains(ICustomAppearance.DISP_PARAMETER_TYPE)) {
+ String type = "<Undefined>";
+ if (parameter.getType() != null) {
+ type = UMLLabelInternationalization.getInstance().getLabel(parameter.getType());
+ }
+
+ // If type is undefined only show "<Undefined>" when explicitly asked.
+ if (displayValue.contains(ILabelPreferenceConstants.DISP_UNDEFINED_TYPE) || (!"<Undefined>".equals(type))) {
+ result = String.format(TYPE_FORMAT, result, type);
+ }
+ }
+
+ // manage multiplicity
+ String multiplicity = SysMLMultiplicityElementUtil.formatMultiplicity(parameter, displayValue);
+ if (multiplicity != null && !multiplicity.isEmpty()) {
+ result += " " + multiplicity;
+ }
+
+ // manage default value
+ if ((displayValue.contains(ICustomAppearance.DISP_PARAMETER_DEFAULT) || displayValue.contains(ICustomAppearance.DISP_DEFAULT_VALUE)) && ((parameter.getDefaultValue() != null))) {
+ ValueSpecification valueSpecification = parameter.getDefaultValue();
+ result = String.format(DEFAULT_VALUE_FORMAT, result, ValueSpecificationUtil.getSpecificationValue(valueSpecification, true));
+ }
+
+ // manage modifier
+ if (displayValue.contains(ICustomAppearance.DISP_PARAMETER_MODIFIERS) || displayValue.contains(ICustomAppearance.DISP_MODIFIERS)) {
+ StringBuffer sb = new StringBuffer();
+ if (parameter.isOrdered()) {
+ sb.append(sb.length() == 0 ? "ordered" : ", ordered");
+ }
+ if (parameter.isUnique()) {
+ sb.append(sb.length() == 0 ? "unique" : ", unique");
+ }
+ if (parameter.isStream()) {
+ sb.append(sb.length() == 0 ? "stream" : ", stream");
+ }
+ if (parameter.isException()) {
+ sb.append(sb.length() == 0 ? "exception" : ", exception");
+ }
+ if (sb.length() != 0) {
+ result = String.format(MODIFIER_FORMAT, result, sb.toString());
+ }
+ }
+
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java
index 957f7ddf5d5..4437e9f5e9c 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src/org/eclipse/papyrus/sysml/diagram/common/Activator.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common;
@@ -33,10 +33,10 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.papyrus.sysml.portandflows.FlowDirection;
import org.eclipse.papyrus.sysml.portandflows.FlowPort;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
import org.osgi.framework.BundleContext;
//import org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory;
//import org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory;
@@ -285,7 +285,7 @@ public class Activator extends AbstractUIPlugin {
// factories.add(new PortandflowsItemProviderAdapterFactory());
// factories.add(new RequirementsItemProviderAdapterFactory());
// Add UML adapter
- factories.add(new UMLItemProviderAdapterFactory());
+ factories.add(new InternationalizationUMLItemProviderAdapterFactory());
// Other adapters
factories.add(new EcoreItemProviderAdapterFactory());
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
index 8f438356c57..0892dd3cc43 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Export-Package: org.eclipse.papyrus.sysml.diagram.internalblock,
Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)"
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java
index 8155867ca48..b50f917caf6 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src-gen/org/eclipse/papyrus/sysml/diagram/internalblock/InternalBlockDiagramForMultiEditor.java
@@ -10,6 +10,7 @@
*
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.internalblock;
@@ -23,6 +24,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.sysml.diagram.internalblock.part.InternalBlockDiagramEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -70,7 +72,7 @@ public class InternalBlockDiagramForMultiEditor extends InternalBlockDiagramEdit
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
index 61654370816..26bfc574664 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/META-INF/MANIFEST.MF
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.uml.diagram.clazz;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)"
+ org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-Version: 2.0.0.qualifier
Bundle-ManifestVersion: 2
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java
index ee096dc9e71..725e124586f 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src-gen/org/eclipse/papyrus/sysml/diagram/parametric/ParametricDiagramForMultiEditor.java
@@ -10,6 +10,7 @@
* R�gis CHEVREL: chevrel.regis <at> gmail.com
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.parametric;
@@ -23,6 +24,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.sysml.diagram.parametric.part.ParametricDiagramEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -70,7 +72,7 @@ public class ParametricDiagramForMultiEditor extends ParametricDiagramEditor {
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java
index 5709767d37d..f53b3b6be81 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric/src/org/eclipse/papyrus/sysml/diagram/parametric/edit/part/CustomBlockLabelNameEditPart.java
@@ -7,13 +7,15 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Régis CHEVREL: chevrel.regis <at> gmail.com
+ * R�gis CHEVREL: chevrel.regis <at> gmail.com
* CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.parametric.edit.part;
import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.sysml.diagram.common.edit.part.BlockLabelNameEditPart;
public class CustomBlockLabelNameEditPart extends BlockLabelNameEditPart {
@@ -27,7 +29,7 @@ public class CustomBlockLabelNameEditPart extends BlockLabelNameEditPart {
*/
@Override
protected String getLabelText() {
- String diagramName = getDiagramView().getName();
+ String diagramName = LabelInternationalization.getInstance().getDiagramLabel(getDiagramView());
return super.getLabelText() + " [" + diagramName + "]";
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
index d1191935063..ae52be451e6 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/META-INF/MANIFEST.MF
@@ -13,7 +13,9 @@ Require-Bundle: org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.
org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="[1.7.0,2.0.0)",
org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
- org.eclipse.papyrus.uml.appearance;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.papyrus.uml.appearance;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
index 0fe44cb82cc..ad4bba4a0bb 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src-gen/org/eclipse/papyrus/sysml/diagram/requirement/RequirementDiagramForMultiEditor.java
@@ -11,6 +11,7 @@
* CEA LIST- Initial API and implementation
* Nizar GUEDIDI (CEA LIST)- modification
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.requirement;
@@ -24,6 +25,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.sysml.diagram.requirement.part.RequirementDiagramEditor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -71,7 +73,7 @@ public class RequirementDiagramForMultiEditor extends RequirementDiagramEditor {
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java
index 0ee257a59dc..fc917caf9bb 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/src/org/eclipse/papyrus/sysml/diagram/requirement/edit/part/CustomRequirementEditPart.java
@@ -1,86 +1,88 @@
-/*****************************************************************************
- * Copyright (c) 2012 ATOS.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Olivier Mélois (ATOS) - Initial API and implementation
- *
- ******************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.sysml.diagram.requirement.figure.CustomRequirementFigure;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
-import org.eclipse.papyrus.uml.diagram.common.commands.ShowHideCompartmentRequest;
-import org.eclipse.uml2.uml.NamedElement;
-
-public class CustomRequirementEditPart extends ClassEditPart {
-
- //protected static final String ICONS_PATH = "/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif"; //$NON-NLS-1$
-
- public CustomRequirementEditPart(View view) {
- super(view);
- }
-
-
- @Override
- protected IFigure createNodeShape() {
- // Showing the information compartment.
- View notationView = getNotationView();
- Request request = new ShowHideCompartmentRequest(ShowHideCompartmentRequest.SHOW, notationView);
- request.setType(ShowHideCompartmentRequest.SHOW_HIDE_COMPARTMENT);
- Command showCompartmentCommand = this.getCommand(request);
- getEditDomain().getCommandStack().execute(showCompartmentCommand);
-
- primaryShape = new CustomRequirementFigure();
- // ((CustomRequirementFigure)primaryShape).setTagIcon(Activator.getPluginIconImage(Activator.ID, ICONS_PATH));
- return primaryShape;
- }
-
- public void refreshTitle() {
- NamedElement clazz = (NamedElement) ((View) this.getModel()).getElement();
- String requirementName = clazz.getName();
- ((CustomRequirementFigure) this.getFigure()).setName(requirementName);
- }
-
- @Override
- protected boolean addFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
- IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
- setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
- pane.add(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return super.addFixedChild(childEditPart);
- }
-
- @Override
- protected boolean removeFixedChild(EditPart childEditPart) {
- if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
- IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
- setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
- pane.remove(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
- return true;
- }
- return super.removeFixedChild(childEditPart);
- }
-
- @Override
- public IFigure getContentPaneFor(IGraphicalEditPart editPart) {
- if (editPart instanceof CustomRequirementInformationCompartmentEditPart) {
- return ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
- }
- return super.getContentPaneFor(editPart);
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2012 ATOS.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Olivier Mélois (ATOS) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ ******************************************************************************/
+package org.eclipse.papyrus.sysml.diagram.requirement.edit.part;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.sysml.diagram.requirement.figure.CustomRequirementFigure;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.common.commands.ShowHideCompartmentRequest;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.NamedElement;
+
+public class CustomRequirementEditPart extends ClassEditPart {
+
+ //protected static final String ICONS_PATH = "/org.eclipse.papyrus.sysml/icons/requirements/Requirement.gif"; //$NON-NLS-1$
+
+ public CustomRequirementEditPart(View view) {
+ super(view);
+ }
+
+
+ @Override
+ protected IFigure createNodeShape() {
+ // Showing the information compartment.
+ View notationView = getNotationView();
+ Request request = new ShowHideCompartmentRequest(ShowHideCompartmentRequest.SHOW, notationView);
+ request.setType(ShowHideCompartmentRequest.SHOW_HIDE_COMPARTMENT);
+ Command showCompartmentCommand = this.getCommand(request);
+ getEditDomain().getCommandStack().execute(showCompartmentCommand);
+
+ primaryShape = new CustomRequirementFigure();
+ // ((CustomRequirementFigure)primaryShape).setTagIcon(Activator.getPluginIconImage(Activator.ID, ICONS_PATH));
+ return primaryShape;
+ }
+
+ public void refreshTitle() {
+ NamedElement clazz = (NamedElement) ((View) this.getModel()).getElement();
+ String requirementName = UMLLabelInternationalization.getInstance().getLabel(clazz);
+ ((CustomRequirementFigure) this.getFigure()).setName(requirementName);
+ }
+
+ @Override
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
+ pane.add(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return super.addFixedChild(childEditPart);
+ }
+
+ @Override
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if (childEditPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ IFigure pane = ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ setupContentPane(pane); // FIXME each compartment should handle his content pane in his own way
+ pane.remove(((CustomRequirementInformationCompartmentEditPart) childEditPart).getFigure());
+ return true;
+ }
+ return super.removeFixedChild(childEditPart);
+ }
+
+ @Override
+ public IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if (editPart instanceof CustomRequirementInformationCompartmentEditPart) {
+ return ((CustomRequirementFigure) getPrimaryShape()).getRequirementIdInformationCompartmentFigure();
+ }
+ return super.getContentPaneFor(editPart);
+ }
+
+}
diff --git a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF
index 69bf9a21e0f..e44ff1953c2 100644
--- a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/META-INF/MANIFEST.MF
@@ -3,7 +3,8 @@ Require-Bundle: org.eclipse.papyrus.sysml.service.types;bundle-version="[2.0.0,3
org.eclipse.papyrus.sysml.diagram.common;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.uml.modelexplorer;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.infra.newchild;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.sysml.modelexplorer
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java
index 20295188017..0eb523de87b 100644
--- a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java
+++ b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src/org/eclipse/papyrus/sysml/modelexplorer/query/GetLabelQuery.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Patrick Tessier (CEA LIST) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
/*****************************************************************************/
package org.eclipse.papyrus.sysml.modelexplorer.query;
@@ -18,6 +19,7 @@ import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementEx
import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterValue;
import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.NamedElement;
/** Create a basic label based on element name */
@@ -35,7 +37,7 @@ public class GetLabelQuery implements IJavaQuery2<NamedElement, String> {
String label = UNNAMED;
if (source.isSetName() && (!"".equals(source.getName().trim()))) {
- label = source.getName();
+ label = UMLLabelInternationalization.getInstance().getLabel(source);
}
return label;
}
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF b/plugins/sysml/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF
index 2e0caf3fe0b..d9510f3a65b 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.edit/META-INF/MANIFEST.MF
@@ -7,7 +7,8 @@ Require-Bundle: org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)";visibil
org.eclipse.uml2.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)";visibility:=reexport,
org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)",
- org.eclipse.uml2.common.edit;bundle-version="[2.1.0,3.0.0)";visibility:=reexport
+ org.eclipse.uml2.common.edit;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.sysml.activities.provider,
org.eclipse.papyrus.sysml.allocations.provider,
org.eclipse.papyrus.sysml.blocks.provider,
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java b/plugins/sysml/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java
index a7d7846267b..28655ca7abd 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.edit/src/org/eclipse/papyrus/sysml/registry/SysmlRegistryAdapterFactoryRegistry.java
@@ -1,432 +1,433 @@
-/*****************************************************************************
- * Copyright (c) 2011 Atos.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.registry;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.blocks.provider.BlocksItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.constraints.provider.ConstraintsItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.edit.provider.IComposableAdapterFactory;
-import org.eclipse.papyrus.sysml.edit.provider.IRootAdapterFactory;
-import org.eclipse.papyrus.sysml.modelelements.provider.ModelelementsItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.portandflows.provider.PortandflowsItemProviderAdapterFactory;
-import org.eclipse.papyrus.sysml.requirements.provider.RequirementsItemProviderAdapterFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.edit.providers.AbstractionItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ActivityEdgeItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ActivityPartitionItemProvider;
-import org.eclipse.uml2.uml.edit.providers.BehaviorItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ClassItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ClassifierItemProvider;
-import org.eclipse.uml2.uml.edit.providers.CommentItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ConnectorEndItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ConnectorItemProvider;
-import org.eclipse.uml2.uml.edit.providers.DataTypeItemProvider;
-import org.eclipse.uml2.uml.edit.providers.DependencyItemProvider;
-import org.eclipse.uml2.uml.edit.providers.InformationFlowItemProvider;
-import org.eclipse.uml2.uml.edit.providers.InstanceSpecificationItemProvider;
-import org.eclipse.uml2.uml.edit.providers.InterfaceItemProvider;
-import org.eclipse.uml2.uml.edit.providers.NamedElementItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ObjectNodeItemProvider;
-import org.eclipse.uml2.uml.edit.providers.OperationItemProvider;
-import org.eclipse.uml2.uml.edit.providers.PackageItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ParameterItemProvider;
-import org.eclipse.uml2.uml.edit.providers.ParameterSetItemProvider;
-import org.eclipse.uml2.uml.edit.providers.PortItemProvider;
-import org.eclipse.uml2.uml.edit.providers.PropertyItemProvider;
-import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
-
-/**
- * Get a registry of all SysML Adapter Factory classified by the UML class their
- * correspond.
- *
- * Example:
- *
- * <Class.class> ->[ModelelementsItemProviderAdapterFactory,
- * BlocksAdapterItemProviderFactory, RequirementsAdapterItemProviderFactory]
- *
- * @generated
- */
-public class SysmlRegistryAdapterFactoryRegistry {
-
- /**
- * Keep track of the item provider of type ModelelementsItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected ModelelementsItemProviderAdapterFactory modelelementsAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type BlocksItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected BlocksItemProviderAdapterFactory blocksAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type PortandflowsItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected PortandflowsItemProviderAdapterFactory portandflowsAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type ConstraintsItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected ConstraintsItemProviderAdapterFactory constraintsAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type ActivitiesItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected ActivitiesItemProviderAdapterFactory activitiesAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type AllocationsItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected AllocationsItemProviderAdapterFactory allocationsAdapterFactoryItemProvider;
-
- /**
- * Keep track of the item provider of type RequirementsItemProviderAdapterFactory
- *
- * @generated
- */
-
- protected RequirementsItemProviderAdapterFactory requirementsAdapterFactoryItemProvider;
-
- /**
- * Registry for all SysML AdapterFactory
- *
- * @generated
- */
- private List<AdapterFactory> adapterFactoryRegistry = new ArrayList<AdapterFactory>(7);
-
- /**
- * Registry of all {@link AdapterFactory} classified by corresponding UML element
- *
- * @generated
- */
- private HashMap<EClass, ArrayList<AdapterFactory>> adapterFactoryRegistryMap = new HashMap<EClass, ArrayList<AdapterFactory>>();
-
- /**
- * Default adapterFactory
- *
- * @generated
- */
- private UMLItemProviderAdapterFactory defaultAdapterFactory = new UMLItemProviderAdapterFactory();
-
- /**
- * Constructor + initialize
- *
- * @generated
- */
- private SysmlRegistryAdapterFactoryRegistry() {
- /**
- * Initialize all AdapterFactories
- */
-
- modelelementsAdapterFactoryItemProvider = new ModelelementsItemProviderAdapterFactory();
- adapterFactoryRegistry.add(modelelementsAdapterFactoryItemProvider);
-
- blocksAdapterFactoryItemProvider = new BlocksItemProviderAdapterFactory();
- adapterFactoryRegistry.add(blocksAdapterFactoryItemProvider);
-
- portandflowsAdapterFactoryItemProvider = new PortandflowsItemProviderAdapterFactory();
- adapterFactoryRegistry.add(portandflowsAdapterFactoryItemProvider);
-
- constraintsAdapterFactoryItemProvider = new ConstraintsItemProviderAdapterFactory();
- adapterFactoryRegistry.add(constraintsAdapterFactoryItemProvider);
-
- activitiesAdapterFactoryItemProvider = new ActivitiesItemProviderAdapterFactory();
- adapterFactoryRegistry.add(activitiesAdapterFactoryItemProvider);
-
- allocationsAdapterFactoryItemProvider = new AllocationsItemProviderAdapterFactory();
- adapterFactoryRegistry.add(allocationsAdapterFactoryItemProvider);
-
- requirementsAdapterFactoryItemProvider = new RequirementsItemProviderAdapterFactory();
- adapterFactoryRegistry.add(requirementsAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the ABSTRACTION elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.ABSTRACTION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.ABSTRACTION).add(allocationsAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the ACTIVITY_EDGE elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_EDGE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the ACTIVITY_PARTITION elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ArrayList<AdapterFactory>(Collections.singletonList(allocationsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the BEHAVIOR elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.BEHAVIOR, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.BEHAVIOR).add(activitiesAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the CLASS elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASS, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(modelelementsAdapterFactoryItemProvider);
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(constraintsAdapterFactoryItemProvider);
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(blocksAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the CLASSIFIER elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASSIFIER, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the COMMENT elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.COMMENT, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the CONNECTOR elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the CONNECTOR_END elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR_END, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the DATA_TYPE elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.DATA_TYPE, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the DEPENDENCY elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.DEPENDENCY, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the INFORMATION_FLOW elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.INFORMATION_FLOW, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the INSTANCE_SPECIFICATION elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the INTERFACE elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.INTERFACE, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the NAMED_ELEMENT elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.NAMED_ELEMENT, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.NAMED_ELEMENT).add(allocationsAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the OBJECT_NODE elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.OBJECT_NODE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the OPERATION elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.OPERATION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.OPERATION).add(activitiesAdapterFactoryItemProvider);
-
- /**
- * AdapterFactories for the PACKAGE elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.PACKAGE, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the PARAMETER elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the PARAMETER_SET elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER_SET, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the PORT elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.PORT, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
-
- /**
- * AdapterFactories for the PROPERTY elements
- */
- adapterFactoryRegistryMap.put(UMLPackage.Literals.PROPERTY, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(constraintsAdapterFactoryItemProvider);
-
- adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(blocksAdapterFactoryItemProvider);
-
- }
-
- /**
- * Singleton holder
- *
- * @generated
- */
- private static class SingletonHolder {
-
- protected static SysmlRegistryAdapterFactoryRegistry instance = null;
- static {
- instance = new SysmlRegistryAdapterFactoryRegistry();
- }
- }
-
- /**
- * @generated
- */
- public static SysmlRegistryAdapterFactoryRegistry getSingleton() {
- return SingletonHolder.instance;
- }
-
- /**
- * Get the default AdapterFactory
- *
- * @return List<AdapterFactory> return the default adapter factory (UML)
- * @generated
- */
- public AdapterFactory getDefaultAdapterFactory() {
- return defaultAdapterFactory;
- }
-
- /**
- * Get the list of all AdapterFactory for this type
- *
- * @param Object
- * element
- * @return List<AdapterFactory> List of all the adapter factories which can handle the object element
- * @generated
- */
- public List<AdapterFactory> getAdapterFactoriesForType(Object element) {
- if (element instanceof EObject) {
- EObject eObject = (EObject) element;
- ArrayList<AdapterFactory> result = adapterFactoryRegistryMap.get(eObject.eClass());
- if (result != null) {
- return result;
- } else {
- return Collections.singletonList(getDefaultAdapterFactory());
- }
- } else {
- throw new RuntimeException("org.eclipse.papyrus.sysml.edit.utils.SysmlRegistryAdapterFactoryRegistery : This factory only works with EOBjects");
- }
- }
-
- /**
- * Set the the root AdapterFactory for all registered adapter factory
- *
- * @param AdapterFactory
- * The adapter factory which will be the root
- * @generated
- */
- public void setRootAdapterFactory(IRootAdapterFactory adapter) {
- for (AdapterFactory adap : adapterFactoryRegistry) {
- if (adap instanceof IComposableAdapterFactory) {
- ((IComposableAdapterFactory) adap).setRootAdapterFactory(adapter);
- }
- }
- }
-
- /**
- * Get a map of all UML ItemProvider needed
- *
- * @generated
- */
- public HashMap<EClass, ItemProviderAdapter> getUMLItemProviderClassifedByUMLElement(AdapterFactory rootAdapterFactory) {
- HashMap<EClass, ItemProviderAdapter> result = new HashMap<EClass, ItemProviderAdapter>();
-
- result.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new InstanceSpecificationItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.CONNECTOR_END, new ConnectorEndItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.OPERATION, new OperationItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.DEPENDENCY, new DependencyItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.OBJECT_NODE, new ObjectNodeItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.DATA_TYPE, new DataTypeItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.PROPERTY, new PropertyItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.BEHAVIOR, new BehaviorItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.COMMENT, new CommentItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.INTERFACE, new InterfaceItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.ABSTRACTION, new AbstractionItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ActivityPartitionItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.CONNECTOR, new ConnectorItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.PARAMETER_SET, new ParameterSetItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.ACTIVITY_EDGE, new ActivityEdgeItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.CLASSIFIER, new ClassifierItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.NAMED_ELEMENT, new NamedElementItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.PARAMETER, new ParameterItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.PORT, new PortItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.INFORMATION_FLOW, new InformationFlowItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.CLASS, new ClassItemProvider(rootAdapterFactory));
-
- result.put(UMLPackage.Literals.PACKAGE, new PackageItemProvider(rootAdapterFactory));
-
- return result;
- }
-
-} // org.eclipse.papyrus.sysml.registry;
-
+/*****************************************************************************
+ * Copyright (c) 2011 Atos.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.registry;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.papyrus.sysml.activities.provider.ActivitiesItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.allocations.provider.AllocationsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.blocks.provider.BlocksItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.constraints.provider.ConstraintsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.edit.provider.IComposableAdapterFactory;
+import org.eclipse.papyrus.sysml.edit.provider.IRootAdapterFactory;
+import org.eclipse.papyrus.sysml.modelelements.provider.ModelelementsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.portandflows.provider.PortandflowsItemProviderAdapterFactory;
+import org.eclipse.papyrus.sysml.requirements.provider.RequirementsItemProviderAdapterFactory;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.edit.providers.AbstractionItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ActivityEdgeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ActivityPartitionItemProvider;
+import org.eclipse.uml2.uml.edit.providers.BehaviorItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ClassItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ClassifierItemProvider;
+import org.eclipse.uml2.uml.edit.providers.CommentItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ConnectorEndItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ConnectorItemProvider;
+import org.eclipse.uml2.uml.edit.providers.DataTypeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.DependencyItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InformationFlowItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InstanceSpecificationItemProvider;
+import org.eclipse.uml2.uml.edit.providers.InterfaceItemProvider;
+import org.eclipse.uml2.uml.edit.providers.NamedElementItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ObjectNodeItemProvider;
+import org.eclipse.uml2.uml.edit.providers.OperationItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PackageItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ParameterItemProvider;
+import org.eclipse.uml2.uml.edit.providers.ParameterSetItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PortItemProvider;
+import org.eclipse.uml2.uml.edit.providers.PropertyItemProvider;
+
+/**
+ * Get a registry of all SysML Adapter Factory classified by the UML class their
+ * correspond.
+ *
+ * Example:
+ *
+ * <Class.class> ->[ModelelementsItemProviderAdapterFactory,
+ * BlocksAdapterItemProviderFactory, RequirementsAdapterItemProviderFactory]
+ *
+ * @generated
+ */
+public class SysmlRegistryAdapterFactoryRegistry {
+
+ /**
+ * Keep track of the item provider of type ModelelementsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ModelelementsItemProviderAdapterFactory modelelementsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type BlocksItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected BlocksItemProviderAdapterFactory blocksAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type PortandflowsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected PortandflowsItemProviderAdapterFactory portandflowsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type ConstraintsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ConstraintsItemProviderAdapterFactory constraintsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type ActivitiesItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected ActivitiesItemProviderAdapterFactory activitiesAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type AllocationsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected AllocationsItemProviderAdapterFactory allocationsAdapterFactoryItemProvider;
+
+ /**
+ * Keep track of the item provider of type RequirementsItemProviderAdapterFactory
+ *
+ * @generated
+ */
+
+ protected RequirementsItemProviderAdapterFactory requirementsAdapterFactoryItemProvider;
+
+ /**
+ * Registry for all SysML AdapterFactory
+ *
+ * @generated
+ */
+ private List<AdapterFactory> adapterFactoryRegistry = new ArrayList<AdapterFactory>(7);
+
+ /**
+ * Registry of all {@link AdapterFactory} classified by corresponding UML element
+ *
+ * @generated
+ */
+ private HashMap<EClass, ArrayList<AdapterFactory>> adapterFactoryRegistryMap = new HashMap<EClass, ArrayList<AdapterFactory>>();
+
+ /**
+ * Default adapterFactory
+ *
+ * @generated
+ */
+ private InternationalizationUMLItemProviderAdapterFactory defaultAdapterFactory = new InternationalizationUMLItemProviderAdapterFactory();
+
+ /**
+ * Constructor + initialize
+ *
+ * @generated
+ */
+ private SysmlRegistryAdapterFactoryRegistry() {
+ /**
+ * Initialize all AdapterFactories
+ */
+
+ modelelementsAdapterFactoryItemProvider = new ModelelementsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(modelelementsAdapterFactoryItemProvider);
+
+ blocksAdapterFactoryItemProvider = new BlocksItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(blocksAdapterFactoryItemProvider);
+
+ portandflowsAdapterFactoryItemProvider = new PortandflowsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(portandflowsAdapterFactoryItemProvider);
+
+ constraintsAdapterFactoryItemProvider = new ConstraintsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(constraintsAdapterFactoryItemProvider);
+
+ activitiesAdapterFactoryItemProvider = new ActivitiesItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(activitiesAdapterFactoryItemProvider);
+
+ allocationsAdapterFactoryItemProvider = new AllocationsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(allocationsAdapterFactoryItemProvider);
+
+ requirementsAdapterFactoryItemProvider = new RequirementsItemProviderAdapterFactory();
+ adapterFactoryRegistry.add(requirementsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the ABSTRACTION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ABSTRACTION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.ABSTRACTION).add(allocationsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the ACTIVITY_EDGE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_EDGE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the ACTIVITY_PARTITION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ArrayList<AdapterFactory>(Collections.singletonList(allocationsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the BEHAVIOR elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.BEHAVIOR, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.BEHAVIOR).add(activitiesAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the CLASS elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASS, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(modelelementsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(constraintsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.CLASS).add(blocksAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the CLASSIFIER elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CLASSIFIER, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the COMMENT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.COMMENT, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the CONNECTOR elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the CONNECTOR_END elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.CONNECTOR_END, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the DATA_TYPE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.DATA_TYPE, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the DEPENDENCY elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.DEPENDENCY, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INFORMATION_FLOW elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INFORMATION_FLOW, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INSTANCE_SPECIFICATION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new ArrayList<AdapterFactory>(Collections.singletonList(blocksAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the INTERFACE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.INTERFACE, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the NAMED_ELEMENT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.NAMED_ELEMENT, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.NAMED_ELEMENT).add(allocationsAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the OBJECT_NODE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.OBJECT_NODE, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the OPERATION elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.OPERATION, new ArrayList<AdapterFactory>(Collections.singletonList(requirementsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.OPERATION).add(activitiesAdapterFactoryItemProvider);
+
+ /**
+ * AdapterFactories for the PACKAGE elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PACKAGE, new ArrayList<AdapterFactory>(Collections.singletonList(modelelementsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PARAMETER elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PARAMETER_SET elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PARAMETER_SET, new ArrayList<AdapterFactory>(Collections.singletonList(activitiesAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PORT elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PORT, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ /**
+ * AdapterFactories for the PROPERTY elements
+ */
+ adapterFactoryRegistryMap.put(UMLPackage.Literals.PROPERTY, new ArrayList<AdapterFactory>(Collections.singletonList(portandflowsAdapterFactoryItemProvider)));
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(constraintsAdapterFactoryItemProvider);
+
+ adapterFactoryRegistryMap.get(UMLPackage.Literals.PROPERTY).add(blocksAdapterFactoryItemProvider);
+
+ }
+
+ /**
+ * Singleton holder
+ *
+ * @generated
+ */
+ private static class SingletonHolder {
+
+ protected static SysmlRegistryAdapterFactoryRegistry instance = null;
+ static {
+ instance = new SysmlRegistryAdapterFactoryRegistry();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public static SysmlRegistryAdapterFactoryRegistry getSingleton() {
+ return SingletonHolder.instance;
+ }
+
+ /**
+ * Get the default AdapterFactory
+ *
+ * @return List<AdapterFactory> return the default adapter factory (UML)
+ * @generated
+ */
+ public AdapterFactory getDefaultAdapterFactory() {
+ return defaultAdapterFactory;
+ }
+
+ /**
+ * Get the list of all AdapterFactory for this type
+ *
+ * @param Object
+ * element
+ * @return List<AdapterFactory> List of all the adapter factories which can handle the object element
+ * @generated
+ */
+ public List<AdapterFactory> getAdapterFactoriesForType(Object element) {
+ if (element instanceof EObject) {
+ EObject eObject = (EObject) element;
+ ArrayList<AdapterFactory> result = adapterFactoryRegistryMap.get(eObject.eClass());
+ if (result != null) {
+ return result;
+ } else {
+ return Collections.singletonList(getDefaultAdapterFactory());
+ }
+ } else {
+ throw new RuntimeException("org.eclipse.papyrus.sysml.edit.utils.SysmlRegistryAdapterFactoryRegistery : This factory only works with EOBjects");
+ }
+ }
+
+ /**
+ * Set the the root AdapterFactory for all registered adapter factory
+ *
+ * @param AdapterFactory
+ * The adapter factory which will be the root
+ * @generated
+ */
+ public void setRootAdapterFactory(IRootAdapterFactory adapter) {
+ for (AdapterFactory adap : adapterFactoryRegistry) {
+ if (adap instanceof IComposableAdapterFactory) {
+ ((IComposableAdapterFactory) adap).setRootAdapterFactory(adapter);
+ }
+ }
+ }
+
+ /**
+ * Get a map of all UML ItemProvider needed
+ *
+ * @generated
+ */
+ public HashMap<EClass, ItemProviderAdapter> getUMLItemProviderClassifedByUMLElement(AdapterFactory rootAdapterFactory) {
+ HashMap<EClass, ItemProviderAdapter> result = new HashMap<EClass, ItemProviderAdapter>();
+
+ result.put(UMLPackage.Literals.INSTANCE_SPECIFICATION, new InstanceSpecificationItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CONNECTOR_END, new ConnectorEndItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.OPERATION, new OperationItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.DEPENDENCY, new DependencyItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.OBJECT_NODE, new ObjectNodeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.DATA_TYPE, new DataTypeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PROPERTY, new PropertyItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.BEHAVIOR, new BehaviorItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.COMMENT, new CommentItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.INTERFACE, new InterfaceItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ABSTRACTION, new AbstractionItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ACTIVITY_PARTITION, new ActivityPartitionItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CONNECTOR, new ConnectorItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PARAMETER_SET, new ParameterSetItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.ACTIVITY_EDGE, new ActivityEdgeItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CLASSIFIER, new ClassifierItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.NAMED_ELEMENT, new NamedElementItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PARAMETER, new ParameterItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PORT, new PortItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.INFORMATION_FLOW, new InformationFlowItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.CLASS, new ClassItemProvider(rootAdapterFactory));
+
+ result.put(UMLPackage.Literals.PACKAGE, new PackageItemProvider(rootAdapterFactory));
+
+ return result;
+ }
+
+} // org.eclipse.papyrus.sysml.registry;
+
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
index 561ef56a893..afeb0065e87 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Export-Package: org.eclipse.papyrus.sysml.service.types,
org.eclipse.papyrus.sysml.service.types.menu,
org.eclipse.papyrus.sysml.service.types.utils
Require-Bundle: org.eclipse.papyrus.sysml;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.uml.service.types.ui;bundle-version="[2.0.0,3.0.0)";visibility:=reexport
+ org.eclipse.papyrus.uml.service.types.ui;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 2.0.0.qualifier
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
index 667ac1570ec..3d91efa7de2 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
@@ -7,8 +7,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
- * CEA LIST - Initial API and implementation
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.service.types.utils;
@@ -28,6 +28,7 @@ import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.ConnectableElement;
import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.ConnectorEnd;
@@ -257,7 +258,7 @@ public class ConnectorUtils extends org.eclipse.papyrus.uml.service.types.utils.
* the property name with name delimiter if it is required
*/
public static final String getNameWithQuotes(final NamedElement property) {
- final String partName = property.getName();
+ final String partName = UMLLabelInternationalization.getInstance().getLabel(property);
final StringBuffer partNameBuffer = new StringBuffer();
final Pattern pattern = Pattern.compile(ConnectorUtils.HAS_NO_WORD_CHAR_REGEX);
final Matcher matcher = pattern.matcher(partName);
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
index 3189e070045..925fc3d55bf 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
@@ -2,7 +2,8 @@ Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.properties.ui;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.papyrus.uml.decoratormodel.ui;bundle-version="[2.0.0,3.0.0)"
+ org.eclipse.papyrus.uml.decoratormodel.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.properties.constraints;x-internal:=true,
org.eclipse.papyrus.uml.decoratormodel.properties,
org.eclipse.papyrus.uml.decoratormodel.properties.elements,
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java
index af66845c7dd..46dbfc74282 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
@@ -28,6 +29,7 @@ import org.eclipse.papyrus.uml.decoratormodel.internal.properties.messages.Messa
import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.ExternalizeProfileApplicationsWizard;
import org.eclipse.papyrus.uml.decoratormodel.properties.Activator;
import org.eclipse.papyrus.uml.decoratormodel.ui.providers.DeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationEditor;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
@@ -191,7 +193,7 @@ public class ProfileApplicationPropertyEditor extends org.eclipse.papyrus.uml.pr
if ((application != null) && (application.eResource() != getInputPackage().eResource())) {
Package rootPackage = (Package) EcoreUtil.getRootContainer(application);
- String modelName = rootPackage.getName();
+ String modelName = UMLLabelInternationalization.getInstance().getLabel(rootPackage);
if (Strings.isNullOrEmpty(modelName)) {
modelName = rootPackage.eResource().getURI().trimFileExtension().lastSegment();
}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF
index 655f2b7c0ed..2be8dab1308 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility
org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
org.eclipse.ui.navigator;bundle-version="[3.6.0,4.0.0)",
org.eclipse.papyrus.infra.onefile;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.uml.profile;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.uml.profile;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.ui,
org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;x-friends:="org.eclipse.papyrus.uml.decoratormodel.properties",
org.eclipse.papyrus.uml.decoratormodel.internal.ui.expressions;x-internal:=true,
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java
index 3b1c91c837f..8124e53843d 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
@@ -31,6 +32,7 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.ide.IDE;
import org.eclipse.uml2.uml.Package;
@@ -163,7 +165,7 @@ public class DecoratorModelLabelDecorator extends BaseLabelProvider implements I
suffix.append(", "); //$NON-NLS-1$
}
- String modelName = next.getName();
+ String modelName = UMLLabelInternationalization.getInstance().getLabel(next);
if (modelName == null) {
modelName = next.eResource().getURI().trimFileExtension().lastSegment();
}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java
index 3944aefdee3..d915cd48128 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
@@ -30,6 +31,7 @@ import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIn
import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndexEvent;
import org.eclipse.papyrus.uml.decoratormodel.internal.resource.IDecoratorModelIndexListener;
import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.uml2.uml.Package;
@@ -98,7 +100,7 @@ public class DecoratorModelLabelProvider extends DelegatingStyledLabelProvider i
if (model == null) {
modelName = getModelNames().get(resource.getURI());
} else {
- modelName = model.getName();
+ modelName = UMLLabelInternationalization.getInstance().getLabel(model);
}
return getStyledText(modelName, resource.getURI());
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java
index 7edcfcd371c..e78a15b6c07 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
@@ -26,6 +27,7 @@ import org.eclipse.papyrus.infra.widgets.providers.DelegatingStyledLabelProvider
import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
import org.eclipse.papyrus.uml.extensionpoints.Registry;
import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.uml2.uml.Package;
@@ -81,12 +83,12 @@ public class ProfileResourceLabelProvider extends DelegatingStyledLabelProvider
result = getStyledText(uri);
} else if (uri.isPlatformResource()) {
result = new StyledString();
- result.append(model.getName());
+ result.append(UMLLabelInternationalization.getInstance().getLabel(model));
String qualifier = uri.isPlatformResource() ? uri.toPlatformString(true) : uri.toString();
result.append(" - " + qualifier, StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
} else {
- result = getStyledText(model.getName(), resource.getURI());
+ result = getStyledText(UMLLabelInternationalization.getInstance().getLabel(model), resource.getURI());
}
return result;
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF
index 5186903bf8a..c3ec91337e3 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="[2.12.0,3.0.0)";visibility
org.eclipse.papyrus.infra.emf;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.tools.utils;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.uml.tools;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Export-Package: org.eclipse.papyrus.uml.decoratormodel,
org.eclipse.papyrus.uml.decoratormodel.helper,
org.eclipse.papyrus.uml.decoratormodel.internal.commands;x-internal:=true,
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java
index 9f145902ca2..0bc55a13bf9 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java
@@ -15,6 +15,7 @@
* Christian W. Damus - 444588, 399859, 451557
* Christian W. Damus - bug 458197
* Christian W. Damus - bug 481302
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
@@ -42,6 +43,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.osgi.util.NLS;
import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
@@ -157,7 +159,7 @@ public class ExternalizedProfileApplicationDelegate implements IProfileApplicati
Profile profile = ExternalizedProfileApplicationDelegate.this.getAppliedProfile(profileApplication);
EPackage definition = profile.getDefinition();
- monitor = SubMonitor.convert(monitor, NLS.bind("Re-applying profile \"{0}\" to package \"{1}\"", profile.getName(), package_.getName()), IProgressMonitor.UNKNOWN);
+ monitor = SubMonitor.convert(monitor, NLS.bind("Re-applying profile \"{0}\" to package \"{1}\"", UMLLabelInternationalization.getInstance().getLabel(profile), UMLLabelInternationalization.getInstance().getLabel(package_)), IProgressMonitor.UNKNOWN);
Collection<EObject> originals = Lists.newArrayList();
StereotypeApplicationCopier copier = new PrivateStereotypeCopier(profile);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
index 6338ab1f07d..89f0de39384 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/META-INF/MANIFEST.MF
@@ -1,60 +1,63 @@
-Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.activity,
- org.eclipse.papyrus.uml.diagram.activity.commands,
- org.eclipse.papyrus.uml.diagram.activity.draw2d,
- org.eclipse.papyrus.uml.diagram.activity.edit.actions,
- org.eclipse.papyrus.uml.diagram.activity.edit.advices,
- org.eclipse.papyrus.uml.diagram.activity.edit.commands,
- org.eclipse.papyrus.uml.diagram.activity.edit.dialogs,
- org.eclipse.papyrus.uml.diagram.activity.edit.helpers,
- org.eclipse.papyrus.uml.diagram.activity.edit.part,
- org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup;x-friends:=org.eclipse.papyrus.uml.diagram.activity.tests,
- org.eclipse.papyrus.uml.diagram.activity.edit.parts,
- org.eclipse.papyrus.uml.diagram.activity.edit.policies,
- org.eclipse.papyrus.uml.diagram.activity.expressions,
- org.eclipse.papyrus.uml.diagram.activity.figures,
- org.eclipse.papyrus.uml.diagram.activity.handlers,
- org.eclipse.papyrus.uml.diagram.activity.helper,
- org.eclipse.papyrus.uml.diagram.activity.listeners,
- org.eclipse.papyrus.uml.diagram.activity.locator,
- org.eclipse.papyrus.uml.diagram.activity.migration,
- org.eclipse.papyrus.uml.diagram.activity.navigator,
- org.eclipse.papyrus.uml.diagram.activity.parser.custom,
- org.eclipse.papyrus.uml.diagram.activity.parsers,
- org.eclipse.papyrus.uml.diagram.activity.part,
- org.eclipse.papyrus.uml.diagram.activity.preferences,
- org.eclipse.papyrus.uml.diagram.activity.providers,
- org.eclipse.papyrus.uml.diagram.activity.sheet,
- org.eclipse.papyrus.uml.diagram.activity.tabbedproperties.appearance,
- org.eclipse.papyrus.uml.diagram.activity.testers
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.ui.navigator;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
- org.eclipse.ui.navigator.resources;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.ocl.ecore;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.gmf.runtime.diagram.ui.providers.ide;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="[1.7.0,2.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.uml.appearance;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.emf.validation.ocl;bundle-version="[1.4.0,2.0.0)";visibility:=reexport,
- org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
- org.eclipse.papyrus.infra.hyperlink;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
- org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)";visibility:=reexport,
- org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)"
-Bundle-Vendor: %providerName
-Eclipse-LazyStart: true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity; singleton:=true
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.diagram.activity,
+ org.eclipse.papyrus.uml.diagram.activity.commands,
+ org.eclipse.papyrus.uml.diagram.activity.draw2d,
+ org.eclipse.papyrus.uml.diagram.activity.edit.actions,
+ org.eclipse.papyrus.uml.diagram.activity.edit.advices,
+ org.eclipse.papyrus.uml.diagram.activity.edit.commands,
+ org.eclipse.papyrus.uml.diagram.activity.edit.dialogs,
+ org.eclipse.papyrus.uml.diagram.activity.edit.helpers,
+ org.eclipse.papyrus.uml.diagram.activity.edit.part,
+ org.eclipse.papyrus.uml.diagram.activity.edit.part.ActivityGroup;x-friends:=org.eclipse.papyrus.uml.diagram.activity.tests,
+ org.eclipse.papyrus.uml.diagram.activity.edit.parts,
+ org.eclipse.papyrus.uml.diagram.activity.edit.policies,
+ org.eclipse.papyrus.uml.diagram.activity.expressions,
+ org.eclipse.papyrus.uml.diagram.activity.figures,
+ org.eclipse.papyrus.uml.diagram.activity.handlers,
+ org.eclipse.papyrus.uml.diagram.activity.helper,
+ org.eclipse.papyrus.uml.diagram.activity.listeners,
+ org.eclipse.papyrus.uml.diagram.activity.locator,
+ org.eclipse.papyrus.uml.diagram.activity.migration,
+ org.eclipse.papyrus.uml.diagram.activity.navigator,
+ org.eclipse.papyrus.uml.diagram.activity.parser.custom,
+ org.eclipse.papyrus.uml.diagram.activity.parsers,
+ org.eclipse.papyrus.uml.diagram.activity.part,
+ org.eclipse.papyrus.uml.diagram.activity.preferences,
+ org.eclipse.papyrus.uml.diagram.activity.providers,
+ org.eclipse.papyrus.uml.diagram.activity.sheet,
+ org.eclipse.papyrus.uml.diagram.activity.tabbedproperties.appearance,
+ org.eclipse.papyrus.uml.diagram.activity.testers
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Require-Bundle: org.eclipse.ui.navigator;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui.navigator.resources;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.preferences;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ocl.ecore;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.providers.ide;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.gmf.runtime.diagram.ui.render;bundle-version="[1.7.0,2.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.dnd;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.appearance;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.uml.service.types;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.editor;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.papyrus.infra.gmfdiag.navigation;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.emf.validation.ocl;bundle-version="[1.4.0,2.0.0)";visibility:=reexport,
+ org.eclipse.e4.ui.css.core;bundle-version="[0.11.0,1.0.0)",
+ org.eclipse.papyrus.infra.hyperlink;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
+ org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.infra.gmfdiag.css;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.uml2.uml;bundle-version="[5.2.0,6.0.0)",
+ org.eclipse.papyrus.uml.internationalization.edit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
+Bundle-Vendor: %providerName
+Eclipse-LazyStart: true
+Bundle-Version: 3.0.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.activity; singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
index 77447b27327..ea4bf393c1d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/UmlActivityDiagramForMultiEditor.java
@@ -10,6 +10,7 @@
* Contributors:
* Atos Origin - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity;
@@ -30,6 +31,7 @@ import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditor;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLElementTypes;
@@ -85,7 +87,7 @@ public class UmlActivityDiagramForMultiEditor extends UMLDiagramEditor {
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallBehaviorActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallBehaviorActionPinUpdater.java
index 616d142be1c..5d8730951c5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallBehaviorActionPinUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallBehaviorActionPinUpdater.java
@@ -1,86 +1,101 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jérémie TATIBOUET (CEA LIST) - Initial API and implementation
- * Sébastien REVOL (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.uml2.uml.CallBehaviorAction;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.OutputPin;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.UMLFactory;
-
-public class CallBehaviorActionPinUpdater extends AbstractCallActionPinUpdater<CallBehaviorAction> {
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#deriveResults()
- *
- * @return
- */
- @Override
- public List<OutputPin> deriveResults(CallBehaviorAction node) {
- List<OutputPin> derivedOutputPins = new ArrayList<OutputPin>();
- if (node.getBehavior() != null) {
- for (Parameter parameter : node.getBehavior().getOwnedParameters()) {
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) {
- OutputPin derivedPin = UMLFactory.eINSTANCE.createOutputPin();
- derivedPin.setType(parameter.getType());
- derivedPin.setLower(parameter.getLower());
- derivedPin.setUpper(parameter.getUpper());
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
- derivedPin.setName("[out] " + parameter.getName());
- } else {
- derivedPin.setName(parameter.getName());
- }
- derivedOutputPins.add(derivedPin);
- }
- }
- }
- return derivedOutputPins;
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments()
- *
- * @return
- */
- @Override
- public List<InputPin> deriveArguments(CallBehaviorAction node) {
- List<InputPin> derivedInputPins = new ArrayList<InputPin>();
- if (node.getBehavior() != null) {
- for (Parameter parameter : node.getBehavior().getOwnedParameters()) {
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) {
- InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
- derivedPin.setType(parameter.getType());
- derivedPin.setLower(parameter.getLower());
- derivedPin.setUpper(parameter.getUpper());
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
- derivedPin.setName("[in] " + parameter.getName());
- } else {
- derivedPin.setName(parameter.getName());
- }
- derivedInputPins.add(derivedPin);
- }
- }
- }
- return derivedInputPins;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * J�r�mie TATIBOUET (CEA LIST) - Initial API and implementation
+ * S�bastien REVOL (CEA LIST) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.UMLFactory;
+
+public class CallBehaviorActionPinUpdater extends AbstractCallActionPinUpdater<CallBehaviorAction> {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#deriveResults()
+ *
+ * @return
+ */
+ @Override
+ public List<OutputPin> deriveResults(CallBehaviorAction node) {
+ List<OutputPin> derivedOutputPins = new ArrayList<OutputPin>();
+ if (node.getBehavior() != null) {
+ for (Parameter parameter : node.getBehavior().getOwnedParameters()) {
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) {
+ OutputPin derivedPin = UMLFactory.eINSTANCE.createOutputPin();
+ derivedOutputPins.add(derivedPin);
+ derivedPin.setType(parameter.getType());
+ derivedPin.setLower(parameter.getLower());
+ derivedPin.setUpper(parameter.getUpper());
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ derivedPin.setName("[out] " + parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, "[out] " + UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ } else {
+ derivedPin.setName(parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ }
+ }
+ }
+ }
+ return derivedOutputPins;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments()
+ *
+ * @return
+ */
+ @Override
+ public List<InputPin> deriveArguments(CallBehaviorAction node) {
+ List<InputPin> derivedInputPins = new ArrayList<InputPin>();
+ if (node.getBehavior() != null) {
+ for (Parameter parameter : node.getBehavior().getOwnedParameters()) {
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) {
+ InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
+ derivedInputPins.add(derivedPin);
+ derivedPin.setType(parameter.getType());
+ derivedPin.setLower(parameter.getLower());
+ derivedPin.setUpper(parameter.getUpper());
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ derivedPin.setName("[in] " + parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, "[in] " + UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ } else {
+ derivedPin.setName(parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ }
+ }
+ }
+ }
+ return derivedInputPins;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallOperationActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallOperationActionPinUpdater.java
index 740970dd592..29404da2dee 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallOperationActionPinUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/CallOperationActionPinUpdater.java
@@ -1,126 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jérémie TATIBOUET (CEA LIST) - Initial API and implementation
- * Sébastien REVOL (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.uml2.uml.CallOperationAction;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.OutputPin;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.UMLFactory;
-
-public class CallOperationActionPinUpdater extends AbstractCallActionPinUpdater<CallOperationAction> {
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#updatePins(org.eclipse.uml2.uml.CallAction)
- *
- * @param node
- */
- @Override
- public void updatePins(CallOperationAction node) {
- // Update both arguments and results
- super.updatePins(node);
- // Ensure a target is set for this operation call
- InputPin targetPin = this.deriveTarget(node);
- if (node.getTarget() == null) {
- node.setTarget(targetPin);
- } else {
- update(node.getTarget(), targetPin);
- }
- }
-
- /**
- *
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveTarget(org.eclipse.uml2.uml.InvocationAction)
- *
- * @param node
- * @return
- */
- @Override
- public InputPin deriveTarget(CallOperationAction node) {
- InputPin pinTarget = UMLFactory.eINSTANCE.createInputPin();
- pinTarget.setLower(1);
- pinTarget.setUpper(1);
- pinTarget.setName(TARGET_NAME);
- if (node.getOperation() != null) {
- pinTarget.setType(node.getOperation().getClass_());
- }
- return pinTarget;
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments(org.eclipse.uml2.uml.InvocationAction)
- *
- * @param node
- * @return
- */
- @Override
- public List<InputPin> deriveArguments(CallOperationAction node) {
- List<InputPin> derivedInputPins = new ArrayList<InputPin>();
- if (node.getOperation() != null) {
- for (Parameter parameter : node.getOperation().getOwnedParameters()) {
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) {
- InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
- derivedPin.setType(parameter.getType());
- derivedPin.setLower(parameter.getLower());
- derivedPin.setUpper(parameter.getUpper());
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
- derivedPin.setName("[in] " + parameter.getName());
- } else {
- derivedPin.setName(parameter.getName());
- }
- derivedInputPins.add(derivedPin);
- }
- }
- }
- return derivedInputPins;
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#deriveResults(org.eclipse.uml2.uml.CallAction)
- *
- * @param node
- * @return
- */
- @Override
- public List<OutputPin> deriveResults(CallOperationAction node) {
- List<OutputPin> derivedOutputPins = new ArrayList<OutputPin>();
- if (node.getOperation() != null) {
- for (Parameter parameter : node.getOperation().getOwnedParameters()) {
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL
- || parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) {
- OutputPin derivedPin = UMLFactory.eINSTANCE.createOutputPin();
- derivedPin.setType(parameter.getType());
- derivedPin.setLower(parameter.getLower());
- derivedPin.setUpper(parameter.getUpper());
- if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
- derivedPin.setName("[out] " + parameter.getName());
- } else {
- derivedPin.setName(parameter.getName());
- }
- derivedOutputPins.add(derivedPin);
- }
- }
- }
- return derivedOutputPins;
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * J�r�mie TATIBOUET (CEA LIST) - Initial API and implementation
+ * S�bastien REVOL (CEA LIST) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.CallOperationAction;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+import org.eclipse.uml2.uml.UMLFactory;
+
+public class CallOperationActionPinUpdater extends AbstractCallActionPinUpdater<CallOperationAction> {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#updatePins(org.eclipse.uml2.uml.CallAction)
+ *
+ * @param node
+ */
+ @Override
+ public void updatePins(CallOperationAction node) {
+ // Update both arguments and results
+ super.updatePins(node);
+ // Ensure a target is set for this operation call
+ InputPin targetPin = this.deriveTarget(node);
+ if (node.getTarget() == null) {
+ node.setTarget(targetPin);
+ } else {
+ update(node.getTarget(), targetPin);
+ }
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveTarget(org.eclipse.uml2.uml.InvocationAction)
+ *
+ * @param node
+ * @return
+ */
+ @Override
+ public InputPin deriveTarget(CallOperationAction node) {
+ InputPin pinTarget = UMLFactory.eINSTANCE.createInputPin();
+ pinTarget.setLower(1);
+ pinTarget.setUpper(1);
+ pinTarget.setName(TARGET_NAME);
+ if (node.getOperation() != null) {
+ pinTarget.setType(node.getOperation().getClass_());
+ }
+ return pinTarget;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments(org.eclipse.uml2.uml.InvocationAction)
+ *
+ * @param node
+ * @return
+ */
+ @Override
+ public List<InputPin> deriveArguments(CallOperationAction node) {
+ List<InputPin> derivedInputPins = new ArrayList<InputPin>();
+ if (node.getOperation() != null) {
+ for (Parameter parameter : node.getOperation().getOwnedParameters()) {
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.IN_LITERAL) {
+ InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
+ derivedInputPins.add(derivedPin);
+ derivedPin.setType(parameter.getType());
+ derivedPin.setLower(parameter.getLower());
+ derivedPin.setUpper(parameter.getUpper());
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ derivedPin.setName("[in] " + parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, "[in] " + UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ } else {
+ derivedPin.setName(parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ }
+ }
+ }
+ }
+ return derivedInputPins;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractCallActionPinUpdater#deriveResults(org.eclipse.uml2.uml.CallAction)
+ *
+ * @param node
+ * @return
+ */
+ @Override
+ public List<OutputPin> deriveResults(CallOperationAction node) {
+ List<OutputPin> derivedOutputPins = new ArrayList<OutputPin>();
+ if (node.getOperation() != null) {
+ for (Parameter parameter : node.getOperation().getOwnedParameters()) {
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.RETURN_LITERAL
+ || parameter.getDirection() == ParameterDirectionKind.OUT_LITERAL) {
+ OutputPin derivedPin = UMLFactory.eINSTANCE.createOutputPin();
+ derivedOutputPins.add(derivedPin);
+ derivedPin.setType(parameter.getType());
+ derivedPin.setLower(parameter.getLower());
+ derivedPin.setUpper(parameter.getUpper());
+ if (parameter.getDirection() == ParameterDirectionKind.INOUT_LITERAL) {
+ derivedPin.setName("[out] " + parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, "[out] " + UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ } else {
+ derivedPin.setName(parameter.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(parameter) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, UMLLabelInternationalization.getInstance().getLabelWithoutUML(parameter), null);
+ }
+ }
+ }
+ }
+ }
+ return derivedOutputPins;
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/SendSignalActionPinUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/SendSignalActionPinUpdater.java
index 890f4b7933a..2ffb0b58e16 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/SendSignalActionPinUpdater.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/edit/utils/updater/SendSignalActionPinUpdater.java
@@ -1,166 +1,172 @@
-/*****************************************************************************
- * Copyright (c) 2016 CEA LIST and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Jérémie TATIBOUET (CEA LIST) - Initial API and implementation
- * Sébastien REVOL (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
-import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
-import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.InputPin;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Reception;
-import org.eclipse.uml2.uml.SendSignalAction;
-import org.eclipse.uml2.uml.Signal;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-public class SendSignalActionPinUpdater extends AbstractInvocationActionPinUpdater<SendSignalAction> {
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#updatePins(org.eclipse.uml2.uml.InvocationAction)
- *
- * @param node
- */
- @Override
- public void updatePins(SendSignalAction node) {
- // Update arguments
- super.updatePins(node);
- // Update target
- InputPin targetPin = this.deriveTarget(node);
- if (node.getTarget() == null) {
- node.setTarget(targetPin);
- } else {
- update(node.getTarget(), targetPin);
- }
- }
-
- private static boolean canReceive(Class clazz, Signal signal) {
- Reception matchingReception = null;
- Iterator<Reception> receptionsIterator = clazz.getOwnedReceptions().iterator();
- while (matchingReception == null && receptionsIterator.hasNext()) {
- Reception currentReception = receptionsIterator.next();
- if (currentReception.getSignal() != null) {
- matchingReception = currentReception.getSignal().conformsTo(signal) ? currentReception : null;
- }
- }
- return matchingReception != null;
- }
-
- /**
- * Derive the type of the target in the context of a SendSignalAction. Three cases are supported:
- *
- * 1] A port is specified to send the signal. In the theory, this port must be owned the class realizing the sending. Hence
- * the type chosen for the target is the class owning the port.
- *
- * 2] The node already has a typed target pin. Make sure this type is still correct. This is evaluated by checking if
- * the type has a reception for chosen signal. If it is the case the type is reused, otherwise the only remaining solution
- * is to propose to the user all classes having a reception on the signal referenced by the action.
- *
- * @param node
- * the send signal action for which the target type is derived
- *
- * @return the derived type or null
- */
- private Type deriveTargetType(SendSignalAction node) {
- Type targetPinType = null;
- if (node.getOnPort() != null) {
- // If a port is specified it is possible to propose a type for the target pin. The type
- // is the type of class owning the port. This proposal might not be always right however it
- // if the signal is sent through a port it reasonable to think that the target used for the
- // send is of the type of the port owner.
- targetPinType = node.getOnPort().getClass_();
- } else {
- if (node.getTarget() != null) {
- Type currentTargetPinType = node.getTarget().getType();
- if (currentTargetPinType instanceof Class && canReceive((Class) currentTargetPinType, node.getSignal())) {
- targetPinType = currentTargetPinType;
- }
- }
- if (targetPinType == null && Display.getCurrent() !=null) {
- // In this case there is no automated derivation possible. Indeed at most we can only propose
- // to the user to choose among a list of type being able to accept the arrival of the signal
- // specified for the given action.
- //
- // Note: This can only be realized if this code is called from UI thread
- InputPin currentTargetPin = node.getTarget();
- if (currentTargetPin == null) {
- node.setTarget(UMLFactory.eINSTANCE.createInputPin());
- }
- UMLContentProvider provider = new UMLContentProvider(node.getTarget(), UMLPackage.eINSTANCE.getTypedElement_Type());
- TreeSelectorDialog dialog = new TreeSelectorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell());
- dialog.setTitle("Select type");
- dialog.setDescription("Select type for target input pin");
- dialog.setContentProvider(provider);
- dialog.setLabelProvider(new UMLLabelProvider());
- int userResponse = dialog.open();
- if (userResponse == Window.OK) {
- Object[] result = dialog.getResult();
- if (result != null && result.length > 0 && result[0] instanceof Type) {
- targetPinType = (Type) result[0];
- }
- }
- node.setTarget(currentTargetPin);
- }
- }
- return targetPinType;
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveTarget(org.eclipse.uml2.uml.InvocationAction)
- *
- * @param node
- * @return
- */
- @Override
- public InputPin deriveTarget(SendSignalAction node) {
- InputPin targetPin = UMLFactory.eINSTANCE.createInputPin();
- targetPin.setLower(1);
- targetPin.setUpper(1);
- targetPin.setName(TARGET_NAME);
- targetPin.setType(this.deriveTargetType(node));
- return targetPin;
- }
-
- /**
- * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments(org.eclipse.uml2.uml.InvocationAction)
- *
- * @param node
- * @return
- */
- @Override
- public List<InputPin> deriveArguments(SendSignalAction node) {
- List<InputPin> derivedInputPins = new ArrayList<InputPin>();
- if (node.getSignal() != null) {
- for (Property property : node.getSignal().getAllAttributes()) {
- InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
- derivedPin.setLower(property.getLower());
- derivedPin.setUpper(property.getUpper());
- derivedPin.setType(property.getType());
- derivedPin.setName(property.getName());
- derivedInputPins.add(derivedPin);
- }
- }
- return derivedInputPins;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * J�r�mie TATIBOUET (CEA LIST) - Initial API and implementation
+ * S�bastien REVOL (CEA LIST) - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.providers.UMLContentProvider;
+import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Reception;
+import org.eclipse.uml2.uml.SendSignalAction;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class SendSignalActionPinUpdater extends AbstractInvocationActionPinUpdater<SendSignalAction> {
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#updatePins(org.eclipse.uml2.uml.InvocationAction)
+ *
+ * @param node
+ */
+ @Override
+ public void updatePins(SendSignalAction node) {
+ // Update arguments
+ super.updatePins(node);
+ // Update target
+ InputPin targetPin = this.deriveTarget(node);
+ if (node.getTarget() == null) {
+ node.setTarget(targetPin);
+ } else {
+ update(node.getTarget(), targetPin);
+ }
+ }
+
+ private static boolean canReceive(Class clazz, Signal signal) {
+ Reception matchingReception = null;
+ Iterator<Reception> receptionsIterator = clazz.getOwnedReceptions().iterator();
+ while (matchingReception == null && receptionsIterator.hasNext()) {
+ Reception currentReception = receptionsIterator.next();
+ if (currentReception.getSignal() != null) {
+ matchingReception = currentReception.getSignal().conformsTo(signal) ? currentReception : null;
+ }
+ }
+ return matchingReception != null;
+ }
+
+ /**
+ * Derive the type of the target in the context of a SendSignalAction. Three cases are supported:
+ *
+ * 1] A port is specified to send the signal. In the theory, this port must be owned the class realizing the sending. Hence
+ * the type chosen for the target is the class owning the port.
+ *
+ * 2] The node already has a typed target pin. Make sure this type is still correct. This is evaluated by checking if
+ * the type has a reception for chosen signal. If it is the case the type is reused, otherwise the only remaining solution
+ * is to propose to the user all classes having a reception on the signal referenced by the action.
+ *
+ * @param node
+ * the send signal action for which the target type is derived
+ *
+ * @return the derived type or null
+ */
+ private Type deriveTargetType(SendSignalAction node) {
+ Type targetPinType = null;
+ if (node.getOnPort() != null) {
+ // If a port is specified it is possible to propose a type for the target pin. The type
+ // is the type of class owning the port. This proposal might not be always right however it
+ // if the signal is sent through a port it reasonable to think that the target used for the
+ // send is of the type of the port owner.
+ targetPinType = node.getOnPort().getClass_();
+ } else {
+ if (node.getTarget() != null) {
+ Type currentTargetPinType = node.getTarget().getType();
+ if (currentTargetPinType instanceof Class && canReceive((Class) currentTargetPinType, node.getSignal())) {
+ targetPinType = currentTargetPinType;
+ }
+ }
+ if (targetPinType == null && Display.getCurrent() !=null) {
+ // In this case there is no automated derivation possible. Indeed at most we can only propose
+ // to the user to choose among a list of type being able to accept the arrival of the signal
+ // specified for the given action.
+ //
+ // Note: This can only be realized if this code is called from UI thread
+ InputPin currentTargetPin = node.getTarget();
+ if (currentTargetPin == null) {
+ node.setTarget(UMLFactory.eINSTANCE.createInputPin());
+ }
+ UMLContentProvider provider = new UMLContentProvider(node.getTarget(), UMLPackage.eINSTANCE.getTypedElement_Type());
+ TreeSelectorDialog dialog = new TreeSelectorDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell());
+ dialog.setTitle("Select type");
+ dialog.setDescription("Select type for target input pin");
+ dialog.setContentProvider(provider);
+ dialog.setLabelProvider(new UMLLabelProvider());
+ int userResponse = dialog.open();
+ if (userResponse == Window.OK) {
+ Object[] result = dialog.getResult();
+ if (result != null && result.length > 0 && result[0] instanceof Type) {
+ targetPinType = (Type) result[0];
+ }
+ }
+ node.setTarget(currentTargetPin);
+ }
+ }
+ return targetPinType;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveTarget(org.eclipse.uml2.uml.InvocationAction)
+ *
+ * @param node
+ * @return
+ */
+ @Override
+ public InputPin deriveTarget(SendSignalAction node) {
+ InputPin targetPin = UMLFactory.eINSTANCE.createInputPin();
+ targetPin.setLower(1);
+ targetPin.setUpper(1);
+ targetPin.setName(TARGET_NAME);
+ targetPin.setType(this.deriveTargetType(node));
+ return targetPin;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.activity.edit.utils.updater.AbstractInvocationActionPinUpdater#deriveArguments(org.eclipse.uml2.uml.InvocationAction)
+ *
+ * @param node
+ * @return
+ */
+ @Override
+ public List<InputPin> deriveArguments(SendSignalAction node) {
+ List<InputPin> derivedInputPins = new ArrayList<InputPin>();
+ if (node.getSignal() != null) {
+ for (Property property : node.getSignal().getAllAttributes()) {
+ InputPin derivedPin = UMLFactory.eINSTANCE.createInputPin();
+ derivedInputPins.add(derivedPin);
+ derivedPin.setLower(property.getLower());
+ derivedPin.setUpper(property.getUpper());
+ derivedPin.setType(property.getType());
+ derivedPin.setName(property.getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(property) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(property)) {
+ UMLLabelInternationalization.getInstance().setLabel(derivedPin, UMLLabelInternationalization.getInstance().getLabelWithoutUML(property), null);
+ }
+ }
+ }
+ return derivedInputPins;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/handlers/SynchronizePinsParametersHandler.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/handlers/SynchronizePinsParametersHandler.java
index 832cc9fc19b..768440c420f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/handlers/SynchronizePinsParametersHandler.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/handlers/SynchronizePinsParametersHandler.java
@@ -11,6 +11,7 @@
* Arthur Daussy (Atos) - Initial API and implementation
* Arthur Daussy - 371712 : [Activitydiagram] Papyrus should provide a way to manually resynchronize pins and parameters on Call Actions
* Olivier Mélois (Atos) : olivier.melois@atos.net - 371712
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity.handlers;
@@ -65,6 +66,7 @@ import org.eclipse.papyrus.uml.diagram.activity.helper.IPinToParameterLinkComman
import org.eclipse.papyrus.uml.diagram.activity.helper.PinAndParameterSynchronizer;
import org.eclipse.papyrus.uml.diagram.activity.helper.datastructure.LinkPinToParameter;
import org.eclipse.papyrus.uml.diagram.activity.providers.UMLMarkerNavigationProvider;
+import org.eclipse.papyrus.uml.internationalization.edit.providers.InternationalizationUMLItemProviderAdapterFactory;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
@@ -378,7 +380,7 @@ public class SynchronizePinsParametersHandler extends AbstractSynchronizePinsAnd
for (ActivityEdge activityEdge : dialog.getEgdesToDelete()) {
// Create a marker for all deleted edges
if (!newHashSet.isEmpty()) {
- UMLItemProviderAdapterFactory umlAdapterFactory = new UMLItemProviderAdapterFactory();
+ InternationalizationUMLItemProviderAdapterFactory umlAdapterFactory = new InternationalizationUMLItemProviderAdapterFactory();
IItemLabelProvider edgeLabelProvider = (IItemLabelProvider) umlAdapterFactory.adapt(activityEdge, IItemLabelProvider.class);
IItemLabelProvider callActionLabelProvider = (IItemLabelProvider) umlAdapterFactory.adapt(invocationAction, IItemLabelProvider.class);
UMLMarkerNavigationProvider.addMarker(target, activityEdge.eResource().getURIFragment(activityEdge), EMFCoreUtil.getQualifiedName(invocationAction, true), "The edge " + edgeLabelProvider.getText(activityEdge)
@@ -635,7 +637,7 @@ public class SynchronizePinsParametersHandler extends AbstractSynchronizePinsAnd
}
private String getEdgeListString() {
- UMLItemProviderAdapterFactory t = new UMLItemProviderAdapterFactory();
+ InternationalizationUMLItemProviderAdapterFactory t = new InternationalizationUMLItemProviderAdapterFactory();
IItemLabelProvider provider = (IItemLabelProvider) t.adapt(callAction, IItemLabelProvider.class);
StringBuilder builder = new StringBuilder("If you synchronize " + provider.getText(callAction) + " the following edges will be deleted : \n ");//$NON-NLS-1$ //$NON-NLS-2$
for (ActivityEdge e : egdes) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java
index 3067cc6e2c1..04625899f3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinLabelHelper.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity.helper;
import java.util.Collection;
@@ -10,6 +23,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEd
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.Messages;
import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.papyrus.uml.tools.utils.ICustomAppearance;
import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
import org.eclipse.uml2.uml.Element;
@@ -65,12 +79,13 @@ public class PinLabelHelper extends StereotypedElementLabelHelper {
StringBuffer buffer = new StringBuffer();
if (maskValues.contains(ICustomAppearance.DISP_NAME)) {
buffer.append(" ");
- buffer.append(namedElement.getName()== null ? "" : namedElement.getName());
+ String name = UMLLabelInternationalization.getInstance().getLabel(namedElement);
+ buffer.append(null == name ? "" : name);
}
if (namedElement instanceof TypedElement) {
if (maskValues.contains(ICustomAppearance.DISP_TYPE)) {
if (((TypedElement) namedElement).getType() != null) {
- buffer.append(": " + ((TypedElement) namedElement).getType().getName());
+ buffer.append(": " + UMLLabelInternationalization.getInstance().getLabel(((TypedElement) namedElement).getType()));
} else {
buffer.append(": " + TypeUtil.UNDEFINED_TYPE_NAME);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
index 9a19b2cfbbb..54e73b7ad69 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptEventActionParser.java
@@ -1,140 +1,142 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.AcceptEventAction;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Trigger;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the label of an AcceptEventAction (not in
- * AcceptTimeEventAction mode). This parser refreshes the text displayed for the
- * Action.
- */
-public class AcceptEventActionParser extends MessageFormatParser implements ISemanticParser {
-
- public AcceptEventActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public AcceptEventActionParser(EAttribute[] features) {
- super(features);
- }
-
- public AcceptEventActionParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof AcceptEventAction) {
- AcceptEventAction action = (AcceptEventAction) obj;
- String name = action.getName();
- if (name != null) {// && !CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
- return name;
- }
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof AcceptEventAction) {
- AcceptEventAction action = (AcceptEventAction) element;
- semanticElementsBeingParsed.add(action);
- if (action.getTriggers() != null) {
- for (Trigger trigger : action.getTriggers()) {
- if (trigger != null) {
- semanticElementsBeingParsed.add(trigger);
- }
- }
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(feature) || UMLPackage.eINSTANCE.getTrigger_Event().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the label of an AcceptEventAction (not in
+ * AcceptTimeEventAction mode). This parser refreshes the text displayed for the
+ * Action.
+ */
+public class AcceptEventActionParser extends MessageFormatParser implements ISemanticParser {
+
+ public AcceptEventActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public AcceptEventActionParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public AcceptEventActionParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof AcceptEventAction) {
+ AcceptEventAction action = (AcceptEventAction) obj;
+ String name = UMLLabelInternationalization.getInstance().getLabel(action);
+ if (name != null) {// && !CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
+ return name;
+ }
+ }
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof AcceptEventAction) {
+ AcceptEventAction action = (AcceptEventAction) element;
+ semanticElementsBeingParsed.add(action);
+ if (action.getTriggers() != null) {
+ for (Trigger trigger : action.getTriggers()) {
+ if (trigger != null) {
+ semanticElementsBeingParsed.add(trigger);
+ }
+ }
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(feature) || UMLPackage.eINSTANCE.getTrigger_Event().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptTimeEventActionParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptTimeEventActionParser.java
index ea0f9234178..d1dee402d6d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptTimeEventActionParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AcceptTimeEventActionParser.java
@@ -1,141 +1,143 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.AcceptEventAction;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Trigger;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the label of an AcceptEventAction (only in
- * AcceptTimeEventAction mode). This parser refreshes the text displayed for the
- * Action.
- */
-public class AcceptTimeEventActionParser extends MessageFormatParser implements ISemanticParser {
-
- public AcceptTimeEventActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public AcceptTimeEventActionParser(EAttribute[] features) {
- super(features);
- }
-
- public AcceptTimeEventActionParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof AcceptEventAction) {
- AcceptEventAction action = (AcceptEventAction) obj;
- String name = action.getName();
- if (name != null && CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
- return name;
- }
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof AcceptEventAction) {
- AcceptEventAction action = (AcceptEventAction) element;
- semanticElementsBeingParsed.add(action);
- if (action.getTriggers() != null) {
- for (Trigger trigger : action.getTriggers()) {
- if (trigger != null) {
- semanticElementsBeingParsed.add(trigger);
- }
- }
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(feature) || UMLPackage.eINSTANCE.getTrigger_Event().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.helper.CustomAcceptEventActionEditHelper;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.AcceptEventAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the label of an AcceptEventAction (only in
+ * AcceptTimeEventAction mode). This parser refreshes the text displayed for the
+ * Action.
+ */
+public class AcceptTimeEventActionParser extends MessageFormatParser implements ISemanticParser {
+
+ public AcceptTimeEventActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public AcceptTimeEventActionParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public AcceptTimeEventActionParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof AcceptEventAction) {
+ AcceptEventAction action = (AcceptEventAction) obj;
+ String name = UMLLabelInternationalization.getInstance().getLabel(action);
+ if (name != null && CustomAcceptEventActionEditHelper.isAcceptTimeEventAction(action)) {
+ return name;
+ }
+ }
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof AcceptEventAction) {
+ AcceptEventAction action = (AcceptEventAction) element;
+ semanticElementsBeingParsed.add(action);
+ if (action.getTriggers() != null) {
+ for (Trigger trigger : action.getTriggers()) {
+ if (trigger != null) {
+ semanticElementsBeingParsed.add(trigger);
+ }
+ }
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getAcceptEventAction_Trigger().equals(feature) || UMLPackage.eINSTANCE.getTrigger_Event().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
index 13b0ee35d03..687df7a28cf 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
@@ -1,190 +1,191 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.ActivityEdge;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * A specific parser for displaying the weight of an Activity Edge. This parser
- * refreshes the text displayed for the weight.
- */
-public class ActivityEdgeWeightParser extends MessageFormatParser implements ISemanticParser {
-
- /** The format string for displaying the weight */
- private static final String WEIGHT_FORMAT = "{weight=%s}";
-
- public ActivityEdgeWeightParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public ActivityEdgeWeightParser(EAttribute[] features) {
- super(features);
- }
-
- public ActivityEdgeWeightParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- String value = getValueString(adapter, flags);
- if (value != null) {
- return value;
- }
- return "";
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object obj = adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- if (obj instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) obj;
- ValueSpecification valueSpec = edge.getWeight();
- if (valueSpec != null) {
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
- return command;
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- String label = getValueString(element, flags);
- if (label == null || label.length() == 0) {
- label = " ";
- } else {
- label = String.format(WEIGHT_FORMAT, label);
- }
- return label;
- }
-
- /**
- * Get the unformatted registered string value which shall be displayed
- */
- private String getValueString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) obj;
- ValueSpecification valueSpec = edge.getWeight();
- if (valueSpec != null) {
- String value = ValueSpecificationUtil.getSpecificationValue(valueSpec);
- if (value != null) {
- return value;
- }
- }
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) element;
- semanticElementsBeingParsed.add(edge);
- if (edge.getWeight() != null) {
- semanticElementsBeingParsed.add(edge.getWeight());
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getActivityEdge_Weight().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * A specific parser for displaying the weight of an Activity Edge. This parser
+ * refreshes the text displayed for the weight.
+ */
+public class ActivityEdgeWeightParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The format string for displaying the weight */
+ private static final String WEIGHT_FORMAT = "{weight=%s}";
+
+ public ActivityEdgeWeightParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public ActivityEdgeWeightParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public ActivityEdgeWeightParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ @Override
+ public String getEditString(IAdaptable adapter, int flags) {
+ String value = getValueString(adapter, flags, false);
+ if (value != null) {
+ return value;
+ }
+ return "";
+ }
+
+ @Override
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ Object obj = adapter.getAdapter(EObject.class);
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (obj instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) obj;
+ ValueSpecification valueSpec = edge.getWeight();
+ if (valueSpec != null) {
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
+ command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
+ return command;
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String label = getValueString(element, flags, true);
+ if (label == null || label.length() == 0) {
+ label = " ";
+ } else {
+ label = String.format(WEIGHT_FORMAT, label);
+ }
+ return label;
+ }
+
+ /**
+ * Get the unformatted registered string value which shall be displayed
+ */
+ private String getValueString(IAdaptable element, int flags, final boolean useInternationalizayion) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) obj;
+ ValueSpecification valueSpec = edge.getWeight();
+ if (valueSpec != null) {
+ String value = ValueSpecificationUtil.getSpecificationValue(valueSpec, useInternationalizayion);
+ if (value != null) {
+ return value;
+ }
+ }
+ }
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) element;
+ semanticElementsBeingParsed.add(edge);
+ if (edge.getWeight() != null) {
+ semanticElementsBeingParsed.add(edge.getWeight());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getActivityEdge_Weight().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityParameterNodeParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityParameterNodeParser.java
index be936cd9027..f7ed4961cd0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityParameterNodeParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityParameterNodeParser.java
@@ -1,174 +1,176 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.ActivityParameterNode;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.State;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * The Class ActivityParameterNodeParser.
- */
-public class ActivityParameterNodeParser extends MessageFormatParser implements ISemanticParser {
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with no
- * type
- */
- private static final String UNTYPED_PARAMETER_FORMAT = "%s";
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with its
- * type
- */
- private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with in
- * State property
- */
- private static final String STATE_FORMAT = System.getProperty("line.separator").concat("[%s]");
-
- /** The String for separating states */
- private static final String STATE_SEPARATOR = ", ";
-
- public ActivityParameterNodeParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public ActivityParameterNodeParser(EAttribute[] features) {
- super(features);
- }
-
- public ActivityParameterNodeParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * Gets the e structural feature.
- *
- * @param notification
- * @return the structural feature
- */
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- String result = "";
- ActivityParameterNode parameterNode = null;
- Object adapter = element.getAdapter(EObject.class);
- if (adapter instanceof ActivityParameterNode) {
- parameterNode = (ActivityParameterNode) adapter;
- String name = parameterNode.getName();
- result = String.format(UNTYPED_PARAMETER_FORMAT, name);
- // manage type
- if (parameterNode.getType() != null) {
- String type = parameterNode.getType().getName();
- result = String.format(TYPED_PARAMETER_FORMAT, name, type);
- }
- // manage states
- StringBuffer stateLabel = new StringBuffer();
- for (State state : parameterNode.getInStates()) {
- String stateName = state.getName();
- if (stateName == null) {
- stateName = "";
- }
- if (!"".equals(stateName)) {
- if (stateLabel.length() > 0) {
- stateLabel.append(STATE_SEPARATOR);
- }
- stateLabel.append(stateName);
- }
- }
- if (stateLabel.length() > 0) {
- result += String.format(STATE_FORMAT, stateLabel.toString());
- }
- }
- return result;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @SuppressWarnings("unchecked")
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- ActivityParameterNode parameterNode = null;
- if (element instanceof ActivityParameterNode) {
- parameterNode = (ActivityParameterNode) element;
- semanticElementsBeingParsed.add(parameterNode);
- if (parameterNode.getType() != null) {
- semanticElementsBeingParsed.add(parameterNode.getType());
- }
- if (parameterNode.getInStates() != null && !parameterNode.getInStates().isEmpty()) {
- semanticElementsBeingParsed.addAll(parameterNode.getInStates());
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.ActivityParameterNode;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * The Class ActivityParameterNodeParser.
+ */
+public class ActivityParameterNodeParser extends MessageFormatParser implements ISemanticParser {
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with no
+ * type
+ */
+ private static final String UNTYPED_PARAMETER_FORMAT = "%s";
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with its
+ * type
+ */
+ private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with in
+ * State property
+ */
+ private static final String STATE_FORMAT = System.getProperty("line.separator").concat("[%s]");
+
+ /** The String for separating states */
+ private static final String STATE_SEPARATOR = ", ";
+
+ public ActivityParameterNodeParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ public ActivityParameterNodeParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public ActivityParameterNodeParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ /**
+ * Gets the e structural feature.
+ *
+ * @param notification
+ * @return the structural feature
+ */
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String result = "";
+ ActivityParameterNode parameterNode = null;
+ Object adapter = element.getAdapter(EObject.class);
+ if (adapter instanceof ActivityParameterNode) {
+ parameterNode = (ActivityParameterNode) adapter;
+ String name = UMLLabelInternationalization.getInstance().getLabel(parameterNode);
+ result = String.format(UNTYPED_PARAMETER_FORMAT, name);
+ // manage type
+ if (parameterNode.getType() != null) {
+ String type = UMLLabelInternationalization.getInstance().getLabel(parameterNode.getType());
+ result = String.format(TYPED_PARAMETER_FORMAT, name, type);
+ }
+ // manage states
+ StringBuffer stateLabel = new StringBuffer();
+ for (State state : parameterNode.getInStates()) {
+ String stateName = UMLLabelInternationalization.getInstance().getLabel(state);
+ if (stateName == null) {
+ stateName = "";
+ }
+ if (!"".equals(stateName)) {
+ if (stateLabel.length() > 0) {
+ stateLabel.append(STATE_SEPARATOR);
+ }
+ stateLabel.append(stateName);
+ }
+ }
+ if (stateLabel.length() > 0) {
+ result += String.format(STATE_FORMAT, stateLabel.toString());
+ }
+ }
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public List getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ ActivityParameterNode parameterNode = null;
+ if (element instanceof ActivityParameterNode) {
+ parameterNode = (ActivityParameterNode) element;
+ semanticElementsBeingParsed.add(parameterNode);
+ if (parameterNode.getType() != null) {
+ semanticElementsBeingParsed.add(parameterNode.getType());
+ }
+ if (parameterNode.getInStates() != null && !parameterNode.getInStates().isEmpty()) {
+ semanticElementsBeingParsed.addAll(parameterNode.getInStates());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AssociatedBehaviorParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AssociatedBehaviorParser.java
index 445a050add0..c7c4d34fa53 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AssociatedBehaviorParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/AssociatedBehaviorParser.java
@@ -1,192 +1,198 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying a behavior which is associated to an
- * element. This parser refreshes the text displayed for the behavior.
- */
-public abstract class AssociatedBehaviorParser extends MessageFormatParser implements ISemanticParser {
-
- public AssociatedBehaviorParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public AssociatedBehaviorParser(EAttribute[] features) {
- super(features);
- }
-
- public AssociatedBehaviorParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- String value = getValueString(adapter, flags);
- if (value != null) {
- return value;
- }
- return "";
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object obj = adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- if (getReferenceFeature().getContainerClass().isInstance(obj)) {
- Object behavior = ((EObject) obj).eGet(getReferenceFeature());
- if (behavior instanceof Behavior) {
- return getModificationCommand((EObject) behavior, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- String label = getValueString(element, flags);
- if (label == null || label.length() == 0) {
- label = "";
- } else {
- label = String.format(getFormatString(), label);
- }
- return label;
- }
-
- /**
- * Get the string format for formatting the text value. This String must
- * contain a single "%s" occurrence where to place the value.
- *
- * @return the format string
- */
- protected abstract String getFormatString();
-
- /**
- * Get the unformatted registered string value which shall be displayed
- */
- private String getValueString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (getReferenceFeature().getContainerClass().isInstance(obj)) {
- Object behavior = ((EObject) obj).eGet(getReferenceFeature());
- if (behavior instanceof Behavior) {
- return ((Behavior) behavior).getName();
- }
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (getReferenceFeature().getContainerClass().isInstance(element)) {
- semanticElementsBeingParsed.add((Element) element);
- Object behavior = element.eGet(getReferenceFeature());
- if (behavior instanceof Behavior) {
- semanticElementsBeingParsed.add((Element) behavior);
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return getReferenceFeature().equals(feature) || UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
- }
-
- /**
- * Get the feature by which the property behavior is linked. This method
- * must be implemented by subclasses and the returned feature must reference
- * a Behavior.
- *
- * @return reference feature
- */
- protected abstract EStructuralFeature getReferenceFeature();
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying a behavior which is associated to an
+ * element. This parser refreshes the text displayed for the behavior.
+ */
+public abstract class AssociatedBehaviorParser extends MessageFormatParser implements ISemanticParser {
+
+ public AssociatedBehaviorParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public AssociatedBehaviorParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public AssociatedBehaviorParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ @Override
+ public String getEditString(IAdaptable adapter, int flags) {
+ String value = getValueString(adapter, flags, false);
+ if (value != null) {
+ return value;
+ }
+ return "";
+ }
+
+ @Override
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ Object obj = adapter.getAdapter(EObject.class);
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (getReferenceFeature().getContainerClass().isInstance(obj)) {
+ Object behavior = ((EObject) obj).eGet(getReferenceFeature());
+ if (behavior instanceof Behavior) {
+ return getModificationCommand((EObject) behavior, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String label = getValueString(element, flags, true);
+ if (label == null || label.length() == 0) {
+ label = "";
+ } else {
+ label = String.format(getFormatString(), label);
+ }
+ return label;
+ }
+
+ /**
+ * Get the string format for formatting the text value. This String must
+ * contain a single "%s" occurrence where to place the value.
+ *
+ * @return the format string
+ */
+ protected abstract String getFormatString();
+
+ /**
+ * Get the unformatted registered string value which shall be displayed
+ */
+ private String getValueString(final IAdaptable element, final int flags, final boolean useInternationalization) {
+ Object obj = element.getAdapter(EObject.class);
+ if (getReferenceFeature().getContainerClass().isInstance(obj)) {
+ Object behavior = ((EObject) obj).eGet(getReferenceFeature());
+ if (behavior instanceof Behavior) {
+ if(useInternationalization){
+ return UMLLabelInternationalization.getInstance().getLabel((Behavior)behavior);
+ }else{
+ return ((Behavior) behavior).getName();
+ }
+ }
+ }
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (getReferenceFeature().getContainerClass().isInstance(element)) {
+ semanticElementsBeingParsed.add((Element) element);
+ Object behavior = element.eGet(getReferenceFeature());
+ if (behavior instanceof Behavior) {
+ semanticElementsBeingParsed.add((Element) behavior);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return getReferenceFeature().equals(feature) || UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature);
+ }
+
+ /**
+ * Get the feature by which the property behavior is linked. This method
+ * must be implemented by subclasses and the returned feature must reference
+ * a Behavior.
+ *
+ * @return reference feature
+ */
+ protected abstract EStructuralFeature getReferenceFeature();
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallBehaviorActionParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallBehaviorActionParser.java
index 165b0e223d3..7abe6c40c5a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallBehaviorActionParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallBehaviorActionParser.java
@@ -1,149 +1,151 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.CallBehaviorAction;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the label of a CallBehaviorAction. This
- * parser refreshes the text displayed for the CallBehaviorAction.
- */
-public class CallBehaviorActionParser extends MessageFormatParser implements ISemanticParser {
-
- /** the format for CallBehaviorAction label */
- private static final String CALLBEHAVIORACTION_LABEL_FORMAT = "%s : %s";
-
- public CallBehaviorActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public CallBehaviorActionParser(EAttribute[] features) {
- super(features);
- }
-
- public CallBehaviorActionParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof CallBehaviorAction) {
- CallBehaviorAction action = (CallBehaviorAction) obj;
- String actionName = "";
- if (action.getName() != null) {
- actionName = action.getName();
- }
- String behaviorName = "";
- if (action.getBehavior() != null && action.getBehavior().getName() != null) {
- behaviorName = action.getBehavior().getName();
- }
- // display behavior name alone if name is not specified differently
- if ("".equals(actionName) || actionName.equals(behaviorName)) {
- return behaviorName;
- } else {
- return String.format(CALLBEHAVIORACTION_LABEL_FORMAT, actionName, behaviorName);
- }
- }
- return " ";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof CallBehaviorAction) {
- CallBehaviorAction action = (CallBehaviorAction) element;
- semanticElementsBeingParsed.add(action);
- Behavior behavior = action.getBehavior();
- if (behavior != null) {
- semanticElementsBeingParsed.add(behavior);
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.CallBehaviorAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the label of a CallBehaviorAction. This
+ * parser refreshes the text displayed for the CallBehaviorAction.
+ */
+public class CallBehaviorActionParser extends MessageFormatParser implements ISemanticParser {
+
+ /** the format for CallBehaviorAction label */
+ private static final String CALLBEHAVIORACTION_LABEL_FORMAT = "%s : %s";
+
+ public CallBehaviorActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public CallBehaviorActionParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public CallBehaviorActionParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof CallBehaviorAction) {
+ CallBehaviorAction action = (CallBehaviorAction) obj;
+ String actionName = "";
+ if (action.getName() != null) {
+ actionName = UMLLabelInternationalization.getInstance().getLabel(action);
+ }
+ String behaviorName = "";
+ if (action.getBehavior() != null && action.getBehavior().getName() != null) {
+ behaviorName = UMLLabelInternationalization.getInstance().getLabel(action.getBehavior());
+ }
+ // display behavior name alone if name is not specified differently
+ if ("".equals(actionName) || actionName.equals(behaviorName)) {
+ return behaviorName;
+ } else {
+ return String.format(CALLBEHAVIORACTION_LABEL_FORMAT, actionName, behaviorName);
+ }
+ }
+ return " ";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof CallBehaviorAction) {
+ CallBehaviorAction action = (CallBehaviorAction) element;
+ semanticElementsBeingParsed.add(action);
+ Behavior behavior = action.getBehavior();
+ if (behavior != null) {
+ semanticElementsBeingParsed.add(behavior);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getCallBehaviorAction_Behavior().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallOperationActionParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallOperationActionParser.java
index 159c9348ecb..f303d465fb4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallOperationActionParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/CallOperationActionParser.java
@@ -1,168 +1,170 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.CallOperationAction;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the label of a CallOperationAction. This
- * parser refreshes the text displayed for the CallOperationAction.
- */
-public class CallOperationActionParser extends MessageFormatParser implements ISemanticParser {
-
- private static final UMLPackage eUML = UMLPackage.eINSTANCE;
-
- public CallOperationActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public CallOperationActionParser(EAttribute[] features) {
- super(features);
- }
-
- public CallOperationActionParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isAffectingFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof CallOperationAction) {
- CallOperationAction action = (CallOperationAction) obj;
- String name = action.getName();
- String operation = "";
- if (name == null) {
- name = "";
- }
- if (action.getOperation() != null) {
- operation = action.getOperation().getName();
- if (operation == null) {
- operation = "";
- }
- }
- // name, operation and className are initialized with non null
- // values
- return getPrintString(name, operation);
- }
- return " ";
- }
-
- /**
- * Get the string to print with the given elements
- *
- * @param name
- * the name of the node or ""
- * @param operation
- * the name of the operation or ""
- * @param className
- * the name of the operation class or ""
- * @return the string to print
- */
- private String getPrintString(String name, String operation) {
- return isEmpty(name) ? operation : name;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isAffectingFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof CallOperationAction) {
- CallOperationAction action = (CallOperationAction) element;
- semanticElementsBeingParsed.add(action);
- Operation operation = action.getOperation();
- if (operation != null) {
- semanticElementsBeingParsed.add(operation);
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isAffectingFeature(EStructuralFeature feature) {
- return eUML.getNamedElement_Name().equals(feature) || //
- eUML.getCallOperationAction_Operation().equals(feature);
- }
-
- private static boolean isEmpty(String text) {
- return text == null || text.length() == 0;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.CallOperationAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the label of a CallOperationAction. This
+ * parser refreshes the text displayed for the CallOperationAction.
+ */
+public class CallOperationActionParser extends MessageFormatParser implements ISemanticParser {
+
+ private static final UMLPackage eUML = UMLPackage.eINSTANCE;
+
+ public CallOperationActionParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public CallOperationActionParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public CallOperationActionParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isAffectingFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof CallOperationAction) {
+ CallOperationAction action = (CallOperationAction) obj;
+ String name = UMLLabelInternationalization.getInstance().getLabel(action);
+ String operation = "";
+ if (name == null) {
+ name = "";
+ }
+ if (action.getOperation() != null) {
+ operation = UMLLabelInternationalization.getInstance().getLabel(action.getOperation());
+ if (operation == null) {
+ operation = "";
+ }
+ }
+ // name, operation and className are initialized with non null
+ // values
+ return getPrintString(name, operation);
+ }
+ return " ";
+ }
+
+ /**
+ * Get the string to print with the given elements
+ *
+ * @param name
+ * the name of the node or ""
+ * @param operation
+ * the name of the operation or ""
+ * @param className
+ * the name of the operation class or ""
+ * @return the string to print
+ */
+ private String getPrintString(String name, String operation) {
+ return isEmpty(name) ? operation : name;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isAffectingFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof CallOperationAction) {
+ CallOperationAction action = (CallOperationAction) element;
+ semanticElementsBeingParsed.add(action);
+ Operation operation = action.getOperation();
+ if (operation != null) {
+ semanticElementsBeingParsed.add(operation);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isAffectingFeature(EStructuralFeature feature) {
+ return eUML.getNamedElement_Name().equals(feature) || //
+ eUML.getCallOperationAction_Operation().equals(feature);
+ }
+
+ private static boolean isEmpty(String text) {
+ return text == null || text.length() == 0;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
index 7e56890ea05..2626e8832d0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
@@ -1,190 +1,191 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.ActivityEdge;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValueSpecification;
-
-/**
- * A specific parser for displaying the guard of an Activity Edge. This parser
- * refreshes the text displayed for the guard.
- */
-public class EdgeGuardParser extends MessageFormatParser implements ISemanticParser {
-
- /** The format string for displaying the guard */
- private static final String GUARD_FORMAT = "[%s]";
-
- public EdgeGuardParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public EdgeGuardParser(EAttribute[] features) {
- super(features);
- }
-
- public EdgeGuardParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- String value = getValueString(adapter, flags);
- if (value != null) {
- return value;
- }
- return "";
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object obj = adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- if (obj instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) obj;
- ValueSpecification valueSpec = edge.getGuard();
- if (valueSpec != null) {
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
- return command;
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- String label = getValueString(element, flags);
- if (label == null || label.length() == 0) {
- label = " ";
- } else {
- label = String.format(GUARD_FORMAT, label);
- }
- return label;
- }
-
- /**
- * Get the unformatted registered string value which shall be displayed
- */
- private String getValueString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) obj;
- ValueSpecification valueSpec = edge.getGuard();
- if (valueSpec != null) {
- String value = ValueSpecificationUtil.getSpecificationValue(valueSpec);
- if (value != null) {
- return value;
- }
- }
- }
- return "";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof ActivityEdge) {
- ActivityEdge edge = (ActivityEdge) element;
- semanticElementsBeingParsed.add(edge);
- if (edge.getGuard() != null) {
- semanticElementsBeingParsed.add(edge.getGuard());
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getActivityEdge_Guard().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.ActivityEdge;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * A specific parser for displaying the guard of an Activity Edge. This parser
+ * refreshes the text displayed for the guard.
+ */
+public class EdgeGuardParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The format string for displaying the guard */
+ private static final String GUARD_FORMAT = "[%s]";
+
+ public EdgeGuardParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public EdgeGuardParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public EdgeGuardParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ @Override
+ public String getEditString(IAdaptable adapter, int flags) {
+ String value = getValueString(adapter, flags, false);
+ if (value != null) {
+ return value;
+ }
+ return "";
+ }
+
+ @Override
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ Object obj = adapter.getAdapter(EObject.class);
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (obj instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) obj;
+ ValueSpecification valueSpec = edge.getGuard();
+ if (valueSpec != null) {
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
+ command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
+ return command;
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ String label = getValueString(element, flags, true);
+ if (label == null || label.length() == 0) {
+ label = " ";
+ } else {
+ label = String.format(GUARD_FORMAT, label);
+ }
+ return label;
+ }
+
+ /**
+ * Get the unformatted registered string value which shall be displayed
+ */
+ private String getValueString(IAdaptable element, int flags, final boolean useInternationalizayion) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) obj;
+ ValueSpecification valueSpec = edge.getGuard();
+ if (valueSpec != null) {
+ String value = ValueSpecificationUtil.getSpecificationValue(valueSpec, useInternationalizayion);
+ if (value != null) {
+ return value;
+ }
+ }
+ }
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof ActivityEdge) {
+ ActivityEdge edge = (ActivityEdge) element;
+ semanticElementsBeingParsed.add(edge);
+ if (edge.getGuard() != null) {
+ semanticElementsBeingParsed.add(edge.getGuard());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getActivityEdge_Guard().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ExceptionHandlerTypeParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ExceptionHandlerTypeParser.java
index ddf0f06e821..6b0559f9bd8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ExceptionHandlerTypeParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ExceptionHandlerTypeParser.java
@@ -1,145 +1,147 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ExceptionHandler;
-import org.eclipse.uml2.uml.StructuredActivityNode;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the type label of an ExceptionHandler. This
- * parser refreshes the text displayed for the ExceptionHandler.
- */
-public class ExceptionHandlerTypeParser extends MessageFormatParser implements ISemanticParser {
-
- /** The line break */
- private static final String LINE_BREAK = System.getProperty("line.separator");
-
- public ExceptionHandlerTypeParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public ExceptionHandlerTypeParser(EAttribute[] features) {
- super(features);
- }
-
- public ExceptionHandlerTypeParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- StringBuffer label = new StringBuffer();
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof ExceptionHandler) {
- EList<Classifier> excTypes = ((ExceptionHandler) obj).getExceptionTypes();
- for (Classifier type : excTypes) {
- if (type != null && !"".equals(type.getName()) && type.getName() != null) {
- if (label.length() > 0) {
- label.append(LINE_BREAK);
- }
- label.append(type.getName());
- }
- }
- }
- return label.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof StructuredActivityNode) {
- semanticElementsBeingParsed.add((ExceptionHandler) element);
- EList<Classifier> excTypes = ((ExceptionHandler) element).getExceptionTypes();
- for (Classifier type : excTypes) {
- semanticElementsBeingParsed.add(type);
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getExceptionHandler_ExceptionType().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExceptionHandler;
+import org.eclipse.uml2.uml.StructuredActivityNode;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the type label of an ExceptionHandler. This
+ * parser refreshes the text displayed for the ExceptionHandler.
+ */
+public class ExceptionHandlerTypeParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The line break */
+ private static final String LINE_BREAK = System.getProperty("line.separator");
+
+ public ExceptionHandlerTypeParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public ExceptionHandlerTypeParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public ExceptionHandlerTypeParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ StringBuffer label = new StringBuffer();
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof ExceptionHandler) {
+ EList<Classifier> excTypes = ((ExceptionHandler) obj).getExceptionTypes();
+ for (Classifier type : excTypes) {
+ if (type != null && !"".equals(type.getName()) && type.getName() != null) {
+ if (label.length() > 0) {
+ label.append(LINE_BREAK);
+ }
+ label.append(UMLLabelInternationalization.getInstance().getLabel(type));
+ }
+ }
+ }
+ return label.toString();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof StructuredActivityNode) {
+ semanticElementsBeingParsed.add((ExceptionHandler) element);
+ EList<Classifier> excTypes = ((ExceptionHandler) element).getExceptionTypes();
+ for (Classifier type : excTypes) {
+ semanticElementsBeingParsed.add(type);
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getExceptionHandler_ExceptionType().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ObjectNodeParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ObjectNodeParser.java
index 3ba8d2cebca..1e76256f0a9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ObjectNodeParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ObjectNodeParser.java
@@ -1,174 +1,176 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.ObjectNode;
-import org.eclipse.uml2.uml.State;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * The Class ObjectNodeParser. This parser handle labels for Object Nodes
- */
-public class ObjectNodeParser extends MessageFormatParser implements ISemanticParser {
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with no
- * type
- */
- private static final String UNTYPED_PARAMETER_FORMAT = "%s";
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with its
- * type
- */
- private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
-
- /**
- * The String format for displaying an ActivityParameterNodeParser with in
- * State property
- */
- private static final String STATE_FORMAT = System.getProperty("line.separator").concat("[%s]");
-
- /** The String for separating states */
- private static final String STATE_SEPARATOR = ", ";
-
- public ObjectNodeParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- public ObjectNodeParser(EAttribute[] features) {
- super(features);
- }
-
- public ObjectNodeParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * Gets the e structural feature.
- *
- * @param notification
- * @return the structural feature
- */
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- StringBuffer result = new StringBuffer();
- Object adapter = element.getAdapter(EObject.class);
- if (adapter instanceof ObjectNode) {
- ObjectNode objectNode = (ObjectNode) adapter;
- String name = objectNode.getName();
- // manage type
- if (objectNode.getType() != null) {
- String type = objectNode.getType().getName();
- result.append(String.format(TYPED_PARAMETER_FORMAT, name, type));
- } else {
- result.append(String.format(UNTYPED_PARAMETER_FORMAT, name));
- }
- // manage states
- StringBuffer stateLabel = new StringBuffer();
- for (State state : objectNode.getInStates()) {
- String stateName = state.getName();
- if (stateName == null) {
- stateName = "";
- }
- if (!"".equals(stateName)) {
- if (stateLabel.length() > 0) {
- stateLabel.append(STATE_SEPARATOR);
- }
- stateLabel.append(stateName);
- }
- }
- if (stateLabel.length() > 0) {
- result.append(String.format(STATE_FORMAT, stateLabel.toString()));
- }
- }
- return result.toString();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @SuppressWarnings("unchecked")
- public List getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- ObjectNode objectNode = null;
- if (element instanceof ObjectNode) {
- objectNode = (ObjectNode) element;
- semanticElementsBeingParsed.add(objectNode);
- if (objectNode.getType() != null) {
- semanticElementsBeingParsed.add(objectNode.getType());
- }
- if (objectNode.getInStates() != null && !objectNode.getInStates().isEmpty()) {
- semanticElementsBeingParsed.addAll(objectNode.getInStates());
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ObjectNode;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * The Class ObjectNodeParser. This parser handle labels for Object Nodes
+ */
+public class ObjectNodeParser extends MessageFormatParser implements ISemanticParser {
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with no
+ * type
+ */
+ private static final String UNTYPED_PARAMETER_FORMAT = "%s";
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with its
+ * type
+ */
+ private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
+
+ /**
+ * The String format for displaying an ActivityParameterNodeParser with in
+ * State property
+ */
+ private static final String STATE_FORMAT = System.getProperty("line.separator").concat("[%s]");
+
+ /** The String for separating states */
+ private static final String STATE_SEPARATOR = ", ";
+
+ public ObjectNodeParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ public ObjectNodeParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public ObjectNodeParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ /**
+ * Gets the e structural feature.
+ *
+ * @param notification
+ * @return the structural feature
+ */
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ StringBuffer result = new StringBuffer();
+ Object adapter = element.getAdapter(EObject.class);
+ if (adapter instanceof ObjectNode) {
+ ObjectNode objectNode = (ObjectNode) adapter;
+ String name = UMLLabelInternationalization.getInstance().getLabel(objectNode);
+ // manage type
+ if (objectNode.getType() != null) {
+ String type = UMLLabelInternationalization.getInstance().getLabel(objectNode.getType());
+ result.append(String.format(TYPED_PARAMETER_FORMAT, name, type));
+ } else {
+ result.append(String.format(UNTYPED_PARAMETER_FORMAT, name));
+ }
+ // manage states
+ StringBuffer stateLabel = new StringBuffer();
+ for (State state : objectNode.getInStates()) {
+ String stateName = UMLLabelInternationalization.getInstance().getLabel(state);
+ if (stateName == null) {
+ stateName = "";
+ }
+ if (!"".equals(stateName)) {
+ if (stateLabel.length() > 0) {
+ stateLabel.append(STATE_SEPARATOR);
+ }
+ stateLabel.append(stateName);
+ }
+ }
+ if (stateLabel.length() > 0) {
+ result.append(String.format(STATE_FORMAT, stateLabel.toString()));
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public List getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ ObjectNode objectNode = null;
+ if (element instanceof ObjectNode) {
+ objectNode = (ObjectNode) element;
+ semanticElementsBeingParsed.add(objectNode);
+ if (objectNode.getType() != null) {
+ semanticElementsBeingParsed.add(objectNode.getType());
+ }
+ if (objectNode.getInStates() != null && !objectNode.getInStates().isEmpty()) {
+ semanticElementsBeingParsed.addAll(objectNode.getInStates());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ParameterParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ParameterParser.java
index f40958ec85c..7825dca6af7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ParameterParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ParameterParser.java
@@ -1,149 +1,151 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying an Activity's Parameter. This parser
- * refreshes the text displayed for the Parameter.
- */
-public class ParameterParser extends MessageFormatParser implements ISemanticParser {
-
- /** The String format for displaying a parameter with its type */
- private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
-
- /** The String format for displaying a parameter with no type */
- private static final String UNTYPED_PARAMETER_FORMAT = "%s";
-
- public ParameterParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public ParameterParser(EAttribute[] features) {
- super(features);
- }
-
- public ParameterParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof Parameter) {
- Parameter parameter = (Parameter) obj;
- String name = parameter.getName();
- if (name == null) {
- name = " ";
- }
- if (parameter.getType() != null) {
- String type = parameter.getType().getName();
- if (type == null) {
- type = "";
- }
- return String.format(TYPED_PARAMETER_FORMAT, name, type);
- } else {
- return String.format(UNTYPED_PARAMETER_FORMAT, name);
- }
- }
- return " ";
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof Parameter) {
- Parameter parameter = (Parameter) element;
- semanticElementsBeingParsed.add(parameter);
- if (parameter.getType() != null) {
- semanticElementsBeingParsed.add(parameter.getType());
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying an Activity's Parameter. This parser
+ * refreshes the text displayed for the Parameter.
+ */
+public class ParameterParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The String format for displaying a parameter with its type */
+ private static final String TYPED_PARAMETER_FORMAT = "%s: %s";
+
+ /** The String format for displaying a parameter with no type */
+ private static final String UNTYPED_PARAMETER_FORMAT = "%s";
+
+ public ParameterParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public ParameterParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public ParameterParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof Parameter) {
+ Parameter parameter = (Parameter) obj;
+ String name = UMLLabelInternationalization.getInstance().getLabel(parameter);
+ if (name == null) {
+ name = " ";
+ }
+ if (parameter.getType() != null) {
+ String type = UMLLabelInternationalization.getInstance().getLabel(parameter.getType());
+ if (type == null) {
+ type = "";
+ }
+ return String.format(TYPED_PARAMETER_FORMAT, name, type);
+ } else {
+ return String.format(UNTYPED_PARAMETER_FORMAT, name);
+ }
+ }
+ return " ";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof Parameter) {
+ Parameter parameter = (Parameter) element;
+ semanticElementsBeingParsed.add(parameter);
+ if (parameter.getType() != null) {
+ semanticElementsBeingParsed.add(parameter.getType());
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getTypedElement_Type().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinParser.java
index 07b8a2abe05..6d96e37e971 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinParser.java
@@ -1,171 +1,173 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Pin;
-import org.eclipse.uml2.uml.State;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A specific parser for displaying the label of a Pin. This parser refreshes
- * the text displayed for the Pin.
- */
-public class PinParser extends MessageFormatParser implements ISemanticParser {
-
- /** The String format for displaying in State property */
- private static final String STATE_DISPLAY = System.getProperty("line.separator").concat("[%s]");
-
- /** The String for separating states */
- private static final String STATE_SEPARATOR = ", ";
-
- public PinParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public PinParser(EAttribute[] features) {
- super(features);
- }
-
- public PinParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- StringBuffer label = new StringBuffer();
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof Pin) {
- Pin pin = (Pin) obj;
- String name = pin.getName();
- if (name == null) {
- name = "";
- }
- label.append(name);
- if (pin.getInStates() != null) {
- // manage states
- StringBuffer stateLabel = new StringBuffer();
- for (State state : pin.getInStates()) {
- if (state != null) {
- String stateName = state.getName();
- if (stateName == null) {
- stateName = "";
- }
- if (!"".equals(stateName)) {
- if (stateLabel.length() > 0) {
- stateLabel.append(STATE_SEPARATOR);
- }
- stateLabel.append(stateName);
- }
- }
- }
- if (stateLabel.length() > 0) {
- label.append(String.format(STATE_DISPLAY, stateLabel.toString()));
- }
- }
- }
- if (label.length() == 0) {
- label.append(" ");
- }
- return label.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof Pin) {
- Pin pin = (Pin) element;
- semanticElementsBeingParsed.add(pin);
- if (pin.getInStates() != null) {
- for (State state : pin.getInStates()) {
- if (state != null) {
- semanticElementsBeingParsed.add(state);
- }
- }
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Pin;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A specific parser for displaying the label of a Pin. This parser refreshes
+ * the text displayed for the Pin.
+ */
+public class PinParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The String format for displaying in State property */
+ private static final String STATE_DISPLAY = System.getProperty("line.separator").concat("[%s]");
+
+ /** The String for separating states */
+ private static final String STATE_SEPARATOR = ", ";
+
+ public PinParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public PinParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public PinParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ StringBuffer label = new StringBuffer();
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof Pin) {
+ Pin pin = (Pin) obj;
+ String name = UMLLabelInternationalization.getInstance().getLabel(pin);
+ if (name == null) {
+ name = "";
+ }
+ label.append(name);
+ if (pin.getInStates() != null) {
+ // manage states
+ StringBuffer stateLabel = new StringBuffer();
+ for (State state : pin.getInStates()) {
+ if (state != null) {
+ String stateName = UMLLabelInternationalization.getInstance().getLabel(state);
+ if (stateName == null) {
+ stateName = "";
+ }
+ if (!"".equals(stateName)) {
+ if (stateLabel.length() > 0) {
+ stateLabel.append(STATE_SEPARATOR);
+ }
+ stateLabel.append(stateName);
+ }
+ }
+ }
+ if (stateLabel.length() > 0) {
+ label.append(String.format(STATE_DISPLAY, stateLabel.toString()));
+ }
+ }
+ }
+ if (label.length() == 0) {
+ label.append(" ");
+ }
+ return label.toString();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof Pin) {
+ Pin pin = (Pin) element;
+ semanticElementsBeingParsed.add(pin);
+ if (pin.getInStates() != null) {
+ for (State state : pin.getInStates()) {
+ if (state != null) {
+ semanticElementsBeingParsed.add(state);
+ }
+ }
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getObjectNode_InState().equals(feature);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
index 2a97593d358..203bce96dd2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
@@ -1,247 +1,249 @@
-/*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Atos Origin - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
-import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
-import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
-import org.eclipse.uml2.uml.Action;
-import org.eclipse.uml2.uml.ActionInputPin;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Pin;
-import org.eclipse.uml2.uml.ReadSelfAction;
-import org.eclipse.uml2.uml.ReadVariableAction;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.ValuePin;
-import org.eclipse.uml2.uml.ValueSpecification;
-import org.eclipse.uml2.uml.ValueSpecificationAction;
-import org.eclipse.uml2.uml.Variable;
-
-/**
- * A specific parser for displaying the label of a Pin. This parser refreshes
- * the text displayed for the Pin.
- */
-public class PinValueParser extends MessageFormatParser implements ISemanticParser {
-
- /** The keyword for indication a ReadSelfAction input pin */
- private static final String SELF_KEYWORD = "self";
-
- public PinValueParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- public PinValueParser(EAttribute[] features) {
- super(features);
- }
-
- public PinValueParser() {
- super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
- }
-
- protected EStructuralFeature getEStructuralFeature(Object notification) {
- EStructuralFeature featureImpl = null;
- if (notification instanceof Notification) {
- Object feature = ((Notification) notification).getFeature();
- if (feature instanceof EStructuralFeature) {
- featureImpl = (EStructuralFeature) feature;
- }
- }
- return featureImpl;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
- * (java.lang.Object , int)
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- EStructuralFeature feature = getEStructuralFeature(event);
- return isValidFeature(feature);
- }
-
- @Override
- public String getEditString(IAdaptable adapter, int flags) {
- return getPrintString(adapter, flags);
- }
-
- @Override
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object obj = adapter.getAdapter(EObject.class);
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- if (obj instanceof ValuePin) {
- ValuePin pin = (ValuePin) obj;
- ValueSpecification valueSpec = pin.getValue();
- if (valueSpec != null) {
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
- return command;
- }
- } else if (obj instanceof ActionInputPin) {
- ActionInputPin pin = (ActionInputPin) obj;
- Action action = pin.getFromAction();
- if (action instanceof ReadVariableAction) {
- Variable variable = ((ReadVariableAction) action).getVariable();
- if (variable != null) {
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(getModificationCommand(variable, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
- return command;
- }
- } else if (action instanceof ReadSelfAction) {
- return UnexecutableCommand.INSTANCE;
- } else if (action instanceof ValueSpecificationAction) {
- ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
- if (valueSpec != null) {
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
- command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
- return command;
- }
- }
- }
- return UnexecutableCommand.INSTANCE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
- * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- // ensure valueLabel is never null
- String valueLabel = " ";
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof ValuePin) {
- ValuePin pin = (ValuePin) obj;
- ValueSpecification valueSpec = pin.getValue();
- if (valueSpec != null) {
- String value = ValueSpecificationUtil.getSpecificationValue(valueSpec);
- if (value != null) {
- valueLabel = value;
- }
- }
- } else if (obj instanceof ActionInputPin) {
- ActionInputPin pin = (ActionInputPin) obj;
- Action action = pin.getFromAction();
- if (action instanceof ReadVariableAction) {
- Variable variable = ((ReadVariableAction) action).getVariable();
- if (variable != null) {
- String value = variable.getName();
- if (value != null) {
- valueLabel = value;
- }
- }
- } else if (action instanceof ReadSelfAction) {
- valueLabel = SELF_KEYWORD;
- } else if (action instanceof ValueSpecificationAction) {
- ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
- if (valueSpec != null) {
- String value = ValueSpecificationUtil.getSpecificationValue(valueSpec);
- if (value != null) {
- valueLabel = value;
- }
- }
- }
- }
- if (valueLabel.length() == 0) {
- valueLabel = " ";
- }
- return valueLabel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
- * java.lang.Object)
- */
- @Override
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- EStructuralFeature feature = getEStructuralFeature(notification);
- return isValidFeature(feature);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
- * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
- */
- @Override
- public List<?> getSemanticElementsBeingParsed(EObject element) {
- List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
- if (element instanceof Pin) {
- Pin pin = (Pin) element;
- semanticElementsBeingParsed.add(pin);
- if (pin instanceof ValuePin) {
- ValueSpecification valueSpec = ((ValuePin) pin).getValue();
- if (valueSpec != null) {
- semanticElementsBeingParsed.add(valueSpec);
- }
- } else if (pin instanceof ActionInputPin) {
- Action action = ((ActionInputPin) pin).getFromAction();
- if (action != null) {
- semanticElementsBeingParsed.add(action);
- }
- if (action instanceof ReadVariableAction) {
- Variable variable = ((ReadVariableAction) action).getVariable();
- if (variable != null) {
- semanticElementsBeingParsed.add(variable);
- }
- } else if (action instanceof ValueSpecificationAction) {
- ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
- if (valueSpec != null) {
- semanticElementsBeingParsed.add(valueSpec);
- }
- }
- }
- }
- return semanticElementsBeingParsed;
- }
-
- /**
- * Determines if the given feature has to be taken into account in this
- * parser
- *
- * @param feature
- * the feature to test
- * @return true if is valid, false otherwise
- */
- private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getValuePin_Value().equals(feature) || UMLPackage.eINSTANCE.getActionInputPin_FromAction().equals(feature)
- || UMLPackage.eINSTANCE.getVariableAction_Variable().equals(feature) || UMLPackage.eINSTANCE.getValueSpecificationAction_Value().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 Atos Origin.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.papyrus.uml.diagram.activity.parsers.MessageFormatParser;
+import org.eclipse.papyrus.uml.diagram.common.commands.SetValueSpecificationValueCommand;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.papyrus.uml.tools.utils.ValueSpecificationUtil;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActionInputPin;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Pin;
+import org.eclipse.uml2.uml.ReadSelfAction;
+import org.eclipse.uml2.uml.ReadVariableAction;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValuePin;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.ValueSpecificationAction;
+import org.eclipse.uml2.uml.Variable;
+
+/**
+ * A specific parser for displaying the label of a Pin. This parser refreshes
+ * the text displayed for the Pin.
+ */
+public class PinValueParser extends MessageFormatParser implements ISemanticParser {
+
+ /** The keyword for indication a ReadSelfAction input pin */
+ private static final String SELF_KEYWORD = "self";
+
+ public PinValueParser(EAttribute[] features, EAttribute[] editableFeatures) {
+ super(features, editableFeatures);
+ }
+
+ public PinValueParser(EAttribute[] features) {
+ super(features);
+ }
+
+ public PinValueParser() {
+ super(new EAttribute[] { UMLPackage.eINSTANCE.getNamedElement_Name() });
+ }
+
+ protected EStructuralFeature getEStructuralFeature(Object notification) {
+ EStructuralFeature featureImpl = null;
+ if (notification instanceof Notification) {
+ Object feature = ((Notification) notification).getFeature();
+ if (feature instanceof EStructuralFeature) {
+ featureImpl = (EStructuralFeature) feature;
+ }
+ }
+ return featureImpl;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.papyrus.uml.diagram.sequence.parsers.AbstractParser#isAffectingEvent
+ * (java.lang.Object , int)
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ EStructuralFeature feature = getEStructuralFeature(event);
+ return isValidFeature(feature);
+ }
+
+ @Override
+ public String getEditString(IAdaptable adapter, int flags) {
+ return getPrintString(adapter, flags);
+ }
+
+ @Override
+ public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
+ Object obj = adapter.getAdapter(EObject.class);
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(obj);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ if (obj instanceof ValuePin) {
+ ValuePin pin = (ValuePin) obj;
+ ValueSpecification valueSpec = pin.getValue();
+ if (valueSpec != null) {
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
+ command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
+ return command;
+ }
+ } else if (obj instanceof ActionInputPin) {
+ ActionInputPin pin = (ActionInputPin) obj;
+ Action action = pin.getFromAction();
+ if (action instanceof ReadVariableAction) {
+ Variable variable = ((ReadVariableAction) action).getVariable();
+ if (variable != null) {
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
+ command.compose(getModificationCommand(variable, UMLPackage.eINSTANCE.getNamedElement_Name(), newString));
+ return command;
+ }
+ } else if (action instanceof ReadSelfAction) {
+ return UnexecutableCommand.INSTANCE;
+ } else if (action instanceof ValueSpecificationAction) {
+ ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
+ if (valueSpec != null) {
+ CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Values"); //$NON-NLS-1$
+ command.compose(new CommandProxy(new SetValueSpecificationValueCommand(valueSpec, newString)));
+ return command;
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.sequence.parsers.MessageFormatParser#
+ * getPrintString(org.eclipse .core.runtime.IAdaptable, int)
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ // ensure valueLabel is never null
+ String valueLabel = " ";
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof ValuePin) {
+ ValuePin pin = (ValuePin) obj;
+ ValueSpecification valueSpec = pin.getValue();
+ if (valueSpec != null) {
+ String value = ValueSpecificationUtil.getSpecificationValue(valueSpec, true);
+ if (value != null) {
+ valueLabel = value;
+ }
+ }
+ } else if (obj instanceof ActionInputPin) {
+ ActionInputPin pin = (ActionInputPin) obj;
+ Action action = pin.getFromAction();
+ if (action instanceof ReadVariableAction) {
+ Variable variable = ((ReadVariableAction) action).getVariable();
+ if (variable != null) {
+ String value = UMLLabelInternationalization.getInstance().getLabel(variable);
+ if (value != null) {
+ valueLabel = value;
+ }
+ }
+ } else if (action instanceof ReadSelfAction) {
+ valueLabel = SELF_KEYWORD;
+ } else if (action instanceof ValueSpecificationAction) {
+ ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
+ if (valueSpec != null) {
+ String value = ValueSpecificationUtil.getSpecificationValue(valueSpec);
+ if (value != null) {
+ valueLabel = value;
+ }
+ }
+ }
+ }
+ if (valueLabel.length() == 0) {
+ valueLabel = " ";
+ }
+ return valueLabel;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * areSemanticElementsAffected (org.eclipse.emf.ecore.EObject,
+ * java.lang.Object)
+ */
+ @Override
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ EStructuralFeature feature = getEStructuralFeature(notification);
+ return isValidFeature(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#
+ * getSemanticElementsBeingParsed (org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ public List<?> getSemanticElementsBeingParsed(EObject element) {
+ List<Element> semanticElementsBeingParsed = new ArrayList<Element>();
+ if (element instanceof Pin) {
+ Pin pin = (Pin) element;
+ semanticElementsBeingParsed.add(pin);
+ if (pin instanceof ValuePin) {
+ ValueSpecification valueSpec = ((ValuePin) pin).getValue();
+ if (valueSpec != null) {
+ semanticElementsBeingParsed.add(valueSpec);
+ }
+ } else if (pin instanceof ActionInputPin) {
+ Action action = ((ActionInputPin) pin).getFromAction();
+ if (action != null) {
+ semanticElementsBeingParsed.add(action);
+ }
+ if (action instanceof ReadVariableAction) {
+ Variable variable = ((ReadVariableAction) action).getVariable();
+ if (variable != null) {
+ semanticElementsBeingParsed.add(variable);
+ }
+ } else if (action instanceof ValueSpecificationAction) {
+ ValueSpecification valueSpec = ((ValueSpecificationAction) action).getValue();
+ if (valueSpec != null) {
+ semanticElementsBeingParsed.add(valueSpec);
+ }
+ }
+ }
+ }
+ return semanticElementsBeingParsed;
+ }
+
+ /**
+ * Determines if the given feature has to be taken into account in this
+ * parser
+ *
+ * @param feature
+ * the feature to test
+ * @return true if is valid, false otherwise
+ */
+ private boolean isValidFeature(EStructuralFeature feature) {
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getValuePin_Value().equals(feature) || UMLPackage.eINSTANCE.getActionInputPin_FromAction().equals(feature)
+ || UMLPackage.eINSTANCE.getVariableAction_Variable().equals(feature) || UMLPackage.eINSTANCE.getValueSpecificationAction_Value().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PostConditionConstraintLabelParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PostConditionConstraintLabelParser.java
index 0e78513fd0b..5e9a898c5ad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PostConditionConstraintLabelParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PostConditionConstraintLabelParser.java
@@ -1,145 +1,157 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Specific Parser for the comment, in case they have a html format.
- */
-public class PostConditionConstraintLabelParser implements IParser {
-
- private static final String CHEVRON = String.valueOf("\u00AB") + "PostCondition" + String.valueOf("\u00BB");
-
- /**
- * {@inheritDoc}
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public List getSemanticElementsBeingParsed(EObject element) {
- List list = new ArrayList();
- list.add(element);
- return list;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditString(IAdaptable element, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return "<NULL CONSTRAINT>"; //$NON-NLS-1$
- }
- return constraint.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return UnexecutableCommand.INSTANCE;
- }
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(constraint);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Name"); //$NON-NLS-1$
- SetRequest request = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
- command.compose(new SetValueCommand(request));
- return command;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return "<NULL CONSTRAINT>"; //$NON-NLS-1$
- }
- return CHEVRON + constraint.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- if (event instanceof org.eclipse.emf.common.notify.Notification) {
- Object source = ((org.eclipse.emf.common.notify.Notification) event).getFeature();
- if (UMLPackage.eINSTANCE.getNamedElement_Name().equals(source)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- /**
- * Get the property associated with the given IAdaptable and the
- * memberEndIndex .
- *
- * @param element
- * the given IAdaptable
- * @return the property associated or null if it can't be found.
- */
- protected Constraint doAdapt(IAdaptable element) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof Constraint) {
- return (Constraint) obj;
- }
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Specific Parser for the comment, in case they have a html format.
+ */
+public class PostConditionConstraintLabelParser implements IParser {
+
+ private static final String CHEVRON = String.valueOf("\u00AB") + "PostCondition" + String.valueOf("\u00BB");
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getSemanticElementsBeingParsed(EObject element) {
+ List list = new ArrayList();
+ list.add(element);
+ return list;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return "<NULL CONSTRAINT>"; //$NON-NLS-1$
+ }
+ return UMLLabelInternationalization.getInstance().getLabel(constraint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(constraint);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ICommand command = null;
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(constraint) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(constraint)) {
+ final ModelSet modelSet = (ModelSet) constraint.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), constraint, newString, null));
+ } else {
+ command = new CompositeTransactionalCommand(editingDomain, "Set Name"); //$NON-NLS-1$
+ SetRequest request = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
+ command.compose(new SetValueCommand(request));
+ }
+ return command;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return "<NULL CONSTRAINT>"; //$NON-NLS-1$
+ }
+ return CHEVRON + UMLLabelInternationalization.getInstance().getLabel(constraint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ if (event instanceof org.eclipse.emf.common.notify.Notification) {
+ Object source = ((org.eclipse.emf.common.notify.Notification) event).getFeature();
+ if (UMLPackage.eINSTANCE.getNamedElement_Name().equals(source)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ return ParserEditStatus.EDITABLE_STATUS;
+ }
+
+ /**
+ * Get the property associated with the given IAdaptable and the
+ * memberEndIndex .
+ *
+ * @param element
+ * the given IAdaptable
+ * @return the property associated or null if it can't be found.
+ */
+ protected Constraint doAdapt(IAdaptable element) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof Constraint) {
+ return (Constraint) obj;
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PreConditionConstraintLabelParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PreConditionConstraintLabelParser.java
index 4dec17afced..ed62ad9e95e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PreConditionConstraintLabelParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PreConditionConstraintLabelParser.java
@@ -1,145 +1,157 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.uml2.uml.Constraint;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Specific Parser for the comment, in case they have a html format.
- */
-public class PreConditionConstraintLabelParser implements IParser {
-
- private static final String CHEVRON = String.valueOf("\u00AB") + "PreCondition" + String.valueOf("\u00BB");
-
- /**
- * {@inheritDoc}
- */
- public boolean areSemanticElementsAffected(EObject listener, Object notification) {
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public List getSemanticElementsBeingParsed(EObject element) {
- List list = new ArrayList();
- list.add(element);
- return list;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getEditString(IAdaptable element, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return "<NULL CONSTRAINT>"; //$NON-NLS-1$
- }
- return constraint.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return UnexecutableCommand.INSTANCE;
- }
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(constraint);
- if (editingDomain == null) {
- return UnexecutableCommand.INSTANCE;
- }
- CompositeTransactionalCommand command = new CompositeTransactionalCommand(editingDomain, "Set Name"); //$NON-NLS-1$
- SetRequest request = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
- command.compose(new SetValueCommand(request));
- return command;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getPrintString(IAdaptable element, int flags) {
- Constraint constraint = doAdapt(element);
- if (constraint == null) {
- return "<NULL CONSTRAINT>"; //$NON-NLS-1$
- }
- return CHEVRON + constraint.getName();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean isAffectingEvent(Object event, int flags) {
- if (event instanceof org.eclipse.emf.common.notify.Notification) {
- Object source = ((org.eclipse.emf.common.notify.Notification) event).getFeature();
- if (UMLPackage.eINSTANCE.getNamedElement_Name().equals(source)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- /**
- * Get the property associated with the given IAdaptable and the
- * memberEndIndex .
- *
- * @param element
- * the given IAdaptable
- * @return the property associated or null if it can't be found.
- */
- protected Constraint doAdapt(IAdaptable element) {
- Object obj = element.getAdapter(EObject.class);
- if (obj instanceof Constraint) {
- return (Constraint) obj;
- }
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 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:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.activity.parser.custom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Specific Parser for the comment, in case they have a html format.
+ */
+public class PreConditionConstraintLabelParser implements IParser {
+
+ private static final String CHEVRON = String.valueOf("\u00AB") + "PreCondition" + String.valueOf("\u00BB");
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean areSemanticElementsAffected(EObject listener, Object notification) {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getSemanticElementsBeingParsed(EObject element) {
+ List list = new ArrayList();
+ list.add(element);
+ return list;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IContentAssistProcessor getCompletionProcessor(IAdaptable element) {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getEditString(IAdaptable element, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return "<NULL CONSTRAINT>"; //$NON-NLS-1$
+ }
+ return UMLLabelInternationalization.getInstance().getLabel(constraint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICommand getParseCommand(IAdaptable element, String newString, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(constraint);
+ if (editingDomain == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ ICommand command = null;
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(constraint) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(constraint)) {
+ final ModelSet modelSet = (ModelSet) constraint.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), constraint, newString, null));
+ } else {
+ command = new CompositeTransactionalCommand(editingDomain, "Set Name"); //$NON-NLS-1$
+ SetRequest request = new SetRequest(constraint, UMLPackage.eINSTANCE.getNamedElement_Name(), newString);
+ command.compose(new SetValueCommand(request));
+ }
+ return command;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getPrintString(IAdaptable element, int flags) {
+ Constraint constraint = doAdapt(element);
+ if (constraint == null) {
+ return "<NULL CONSTRAINT>"; //$NON-NLS-1$
+ }
+ return CHEVRON + UMLLabelInternationalization.getInstance().getLabel(constraint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isAffectingEvent(Object event, int flags) {
+ if (event instanceof org.eclipse.emf.common.notify.Notification) {
+ Object source = ((org.eclipse.emf.common.notify.Notification) event).getFeature();
+ if (UMLPackage.eINSTANCE.getNamedElement_Name().equals(source)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IParserEditStatus isValidEditString(IAdaptable element, String editString) {
+ return ParserEditStatus.EDITABLE_STATUS;
+ }
+
+ /**
+ * Get the property associated with the given IAdaptable and the
+ * memberEndIndex .
+ *
+ * @param element
+ * the given IAdaptable
+ * @return the property associated or null if it can't be found.
+ */
+ protected Constraint doAdapt(IAdaptable element) {
+ Object obj = element.getAdapter(EObject.class);
+ if (obj instanceof Constraint) {
+ return (Constraint) obj;
+ }
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/parsers/MessageFormatParser.java
index 66a33a6a206..15a81a91a6c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src-gen/org/eclipse/papyrus/uml/diagram/activity/parsers/MessageFormatParser.java
@@ -9,6 +9,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.activity.parsers;
@@ -20,13 +21,20 @@ import java.text.ParsePosition;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.gmf.command.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.uml.diagram.activity.part.Messages;
import org.eclipse.papyrus.uml.diagram.activity.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
@@ -210,4 +218,44 @@ public class MessageFormatParser extends AbstractAttributeParser {
EObject element = (EObject) adapter.getAdapter(EObject.class);
return getViewProcessor().format(getValues(element), new StringBuffer(), new FieldPosition(0)).toString();
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.gmf.tooling.runtime.parsers.AbstractFeatureParser#getModificationCommand(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature, java.lang.Object)
+ */
+ @Override
+ protected ICommand getModificationCommand(final EObject element, final EStructuralFeature feature, final Object value) {
+ ICommand result = null;
+
+ // If the feature to edit is the name, check that this is not really the internationalization to edit and not the name
+ if (feature.equals(UMLPackage.eINSTANCE.getNamedElement_Name())) {
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(element) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement) element)) {
+ final ModelSet modelSet = (ModelSet) element.eResource().getResourceSet();
+ if (null != modelSet) {
+ result = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), (NamedElement) element, (String) value, null));
+ }
+ }
+ }
+
+ return null != result ? result : super.getModificationCommand(element, feature, value);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.gmf.tooling.runtime.parsers.AbstractAttributeParser#getValue(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature)
+ */
+ @Override
+ protected Object getValue(final EObject element, final EStructuralFeature feature) {
+ Object result = null;
+
+ if(element instanceof NamedElement && feature.equals(UMLPackage.eINSTANCE.getNamedElement_Name())){
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(element) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement)element)) {
+ result = UMLLabelInternationalization.getInstance().getLabelWithoutUML((NamedElement)element);
+ }
+ }
+
+ return null != result ? result : super.getValue(element, feature);
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
index eff3cedd6f5..bc466a74659 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/META-INF/MANIFEST.MF
@@ -45,7 +45,9 @@ Require-Bundle: org.eclipse.ui.navigator;bundle-version="[3.6.0,4.0.0)";visibili
org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)",
org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
- org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="[3.0.0,4.0.0)"
+ org.eclipse.papyrus.infra.gmfdiag.hyperlink;bundle-version="[3.0.0,4.0.0)",
+ org.eclipse.papyrus.uml.internationalization.utils;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.papyrus.infra.internationalization.utils;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 3.0.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
index 46adaf3c209..a0c40a3bce2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/UmlClassDiagramForMultiEditor.java
@@ -10,6 +10,7 @@
* Contributors:
* Cedric Dumoulin Cedric.Dumoulin@lifl.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 392301
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz;
@@ -23,6 +24,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.core.editor.BackboneException;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.internationalization.utils.utils.LabelInternationalization;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -70,7 +72,7 @@ public class UmlClassDiagramForMultiEditor extends org.eclipse.papyrus.uml.diagr
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
super.init(site, input);
- setPartName(getDiagram().getName());
+ setPartName(LabelInternationalization.getInstance().getDiagramLabel(getDiagram()));
titleImage = DIAG_IMG_DESC.createImage();
setTitleImage(titleImage);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
index 72844000775..4d7356b71bc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/DefferedAppliedStereotypeToDisplayCommand.java
@@ -1,103 +1,105 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Fadoi LAKHAL Fadoi.Lakhal@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.clazz.custom.command;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
-import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
-import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-/**
- * The Class DefferedAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to
- * display
- *
- * @deprecated The Display of stereotype is now treated with notation View (Bug 455311)
- * use the command into oep.uml.diagram.common.stereotype.display.command instead
- *
- */
-@Deprecated
-public class DefferedAppliedStereotypeToDisplayCommand extends CreateEAnnotationCommand {
-
- /** The qualified namedepht. */
- private String stereotypeList;
-
- /**
- * the presentation kind of applied stereotypes
- */
- private String appliedStereotypePresentationKind;
-
- private IAdaptable adapter;
-
- /**
- * Instantiates a new sets the applied stereotype to display command.
- *
- * @param domain
- * the domain
- * @param object
- * the object
- * @param stereotypeList
- * the stereotype list
- */
- public DefferedAppliedStereotypeToDisplayCommand(TransactionalEditingDomain domain, IAdaptable adapter, String stereotypeList, String appliedStereotypepresentationKind) {
- super(domain, null, UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION);
- this.adapter = adapter;
- this.stereotypeList = stereotypeList;
- this.appliedStereotypePresentationKind = appliedStereotypepresentationKind;
- }
-
- @Override
- public boolean canUndo() {
- return true;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void doExecute() {
- View view = adapter.getAdapter(View.class);
- EObject view_element = view.getElement();
- Element element = (Element) view_element;
- Iterator<?> listStereotype = element.getAppliedStereotypes().iterator();
- while (listStereotype.hasNext()) {
- Stereotype stereotypec = (Stereotype) listStereotype.next();
- String stereotype_string = stereotypec.getName();
- stereotypeList = stereotypeList + stereotype_string;
- }
- String stereoList = AppliedStereotypeHelper.getStereotypesToDisplay(view);
- if (!"".equals(stereoList)) {
- stereoList = stereoList + ",";
- }
- stereoList = stereoList + stereotypeList;
- EAnnotation oldAnnotation = view.getEAnnotation(UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION);
- if (oldAnnotation == null) {
- oldAnnotation = createEAnnotation();
- attachEannotation(oldAnnotation, view);
- }
- replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_WITHQN_LIST, AppliedStereotypeHelper.getStereotypesQNToDisplay(view));
- replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_LIST, stereoList);
- replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_PRESENTATION_KIND, appliedStereotypePresentationKind);
- replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.PROPERTY_STEREOTYPE_DISPLAY, AppliedStereotypeHelper.getAppliedStereotypesPropertiesToDisplay(view));
- replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_PROPERTY_LOCATION, AppliedStereotypeHelper.getAppliedStereotypesPropertiesLocalization(view));
- replaceEannotation(view.getEAnnotation(UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION), view);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2009 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:
+ * Fadoi LAKHAL Fadoi.Lakhal@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.custom.command;
+
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.emf.commands.CreateEAnnotationCommand;
+import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
+import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * The Class DefferedAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to
+ * display
+ *
+ * @deprecated The Display of stereotype is now treated with notation View (Bug 455311)
+ * use the command into oep.uml.diagram.common.stereotype.display.command instead
+ *
+ */
+@Deprecated
+public class DefferedAppliedStereotypeToDisplayCommand extends CreateEAnnotationCommand {
+
+ /** The qualified namedepht. */
+ private String stereotypeList;
+
+ /**
+ * the presentation kind of applied stereotypes
+ */
+ private String appliedStereotypePresentationKind;
+
+ private IAdaptable adapter;
+
+ /**
+ * Instantiates a new sets the applied stereotype to display command.
+ *
+ * @param domain
+ * the domain
+ * @param object
+ * the object
+ * @param stereotypeList
+ * the stereotype list
+ */
+ public DefferedAppliedStereotypeToDisplayCommand(TransactionalEditingDomain domain, IAdaptable adapter, String stereotypeList, String appliedStereotypepresentationKind) {
+ super(domain, null, UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION);
+ this.adapter = adapter;
+ this.stereotypeList = stereotypeList;
+ this.appliedStereotypePresentationKind = appliedStereotypepresentationKind;
+ }
+
+ @Override
+ public boolean canUndo() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doExecute() {
+ View view = adapter.getAdapter(View.class);
+ EObject view_element = view.getElement();
+ Element element = (Element) view_element;
+ Iterator<?> listStereotype = element.getAppliedStereotypes().iterator();
+ while (listStereotype.hasNext()) {
+ Stereotype stereotypec = (Stereotype) listStereotype.next();
+ String stereotype_string = UMLLabelInternationalization.getInstance().getKeyword(stereotypec);
+ stereotypeList = stereotypeList + stereotype_string;
+ }
+ String stereoList = AppliedStereotypeHelper.getStereotypesToDisplay(view);
+ if (!"".equals(stereoList)) {
+ stereoList = stereoList + ",";
+ }
+ stereoList = stereoList + stereotypeList;
+ EAnnotation oldAnnotation = view.getEAnnotation(UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION);
+ if (oldAnnotation == null) {
+ oldAnnotation = createEAnnotation();
+ attachEannotation(oldAnnotation, view);
+ }
+ replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_WITHQN_LIST, AppliedStereotypeHelper.getStereotypesQNToDisplay(view));
+ replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_LIST, stereoList);
+ replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_PRESENTATION_KIND, appliedStereotypePresentationKind);
+ replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.PROPERTY_STEREOTYPE_DISPLAY, AppliedStereotypeHelper.getAppliedStereotypesPropertiesToDisplay(view));
+ replaceEntry(oldAnnotation, UMLVisualInformationPapyrusConstant.STEREOTYPE_PROPERTY_LOCATION, AppliedStereotypeHelper.getAppliedStereotypesPropertiesLocalization(view));
+ replaceEannotation(view.getEAnnotation(UMLVisualInformationPapyrusConstant.STEREOTYPE_ANNOTATION), view);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
index 304b6984497..5e3b37b2858 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/command/PropertyCommandForAssociation.java
@@ -8,7 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.command;
@@ -21,7 +22,9 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.uml.diagram.clazz.providers.ElementInitializers;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
@@ -57,6 +60,9 @@ public class PropertyCommandForAssociation extends CreateElementCommand {
ElementInitializers.getInstance().init_Property_SignalAttributeLabel(newElement);
if (type != null && type instanceof Type) {
newElement.setName(((Type) type).getName());
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference((Type) type) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML((Type) type)) {
+ UMLLabelInternationalization.getInstance().setLabel((Type) type, UMLLabelInternationalization.getInstance().getLabelWithoutUML((Type) type), null);
+ }
}
return newElement;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
index 92ea0161a85..cd60b7646fa 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/helper/NestedStereotypeLabelHelper.java
@@ -8,6 +8,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.helper;
@@ -16,6 +17,7 @@ import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.common.helper.StereotypedElementLabelHelper;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.NamedElement;
/**
@@ -44,7 +46,7 @@ public class NestedStereotypeLabelHelper extends StereotypedElementLabelHelper {
@Override
protected String elementLabel(GraphicalEditPart editPart) {
NamedElement namedElement = getUMLElement(editPart);
- return namedElement == null ? "" : namedElement.getName();
+ return namedElement == null ? "" : UMLLabelInternationalization.getInstance().getLabel(namedElement);
}
/**
@@ -60,4 +62,4 @@ public class NestedStereotypeLabelHelper extends StereotypedElementLabelHelper {
}
return null;
}
-}
+} \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/ClassifierTemplateParameterParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/ClassifierTemplateParameterParser.java
index d9f75e3ef91..27d4b4e276a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/ClassifierTemplateParameterParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/ClassifierTemplateParameterParser.java
@@ -8,7 +8,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.parsers;
@@ -20,6 +21,7 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.ClassifierTemplateParameter;
import org.eclipse.uml2.uml.TemplateParameter;
@@ -52,13 +54,13 @@ public class ClassifierTemplateParameterParser implements IParser {
String out = "";
if (templateParam.getOwnedParameteredElement() instanceof Classifier) {
Classifier namedElement = (Classifier) templateParam.getOwnedParameteredElement();
- out = out + namedElement.getName() + ": " + namedElement.eClass().getName();
+ out = out + UMLLabelInternationalization.getInstance().getLabel(namedElement) + ": " + namedElement.eClass().getName();
}
if (templateParam instanceof ClassifierTemplateParameter) {
if (!((ClassifierTemplateParameter) templateParam).getConstrainingClassifiers().isEmpty()) {
out = out + ">";
for (int i = 0; i < ((ClassifierTemplateParameter) templateParam).getConstrainingClassifiers().size(); i++) {
- out = out + ((ClassifierTemplateParameter) templateParam).getConstrainingClassifiers().get(i).getName();
+ out = out + UMLLabelInternationalization.getInstance().getLabel(((ClassifierTemplateParameter) templateParam).getConstrainingClassifiers().get(i));
if (i < ((ClassifierTemplateParameter) templateParam).getConstrainingClassifiers().size() - 1) {
out = out + ", ";
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
index 238c56feb40..2ff8ddf6596 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/OperationParser.java
@@ -10,6 +10,7 @@
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.parsers;
@@ -31,7 +32,9 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Operation;
/**
@@ -59,7 +62,7 @@ public class OperationParser implements IParser {
EObject e = element.getAdapter(EObject.class);
if (e != null) {
final Operation operation = (Operation) e;
- return operation.getName();
+ return UMLLabelInternationalization.getInstance().getLabel(operation);
}
return "";
}
@@ -90,7 +93,11 @@ public class OperationParser implements IParser {
@Override
protected void doExecute() {
- operation.setName(result);
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(operation) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(operation)) {
+ UMLLabelInternationalization.getInstance().setLabel(operation, result, null);
+ }else{
+ operation.setName(result);
+ }
}
};
getEditingDomain().getCommandStack().execute(rc);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
index 9537a1f518d..e3d4e6551b8 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/PropertyParser.java
@@ -10,6 +10,7 @@
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.parsers;
@@ -33,7 +34,9 @@ import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.internationalization.common.utils.InternationalizationPreferencesUtils;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Property;
/**
@@ -62,7 +65,7 @@ public class PropertyParser implements IParser {
EObject e = element.getAdapter(EObject.class);
if (e != null) {
final Property property = (Property) e;
- return property.getName();
+ return UMLLabelInternationalization.getInstance().getLabel(property);
}
return "";
}
@@ -94,7 +97,11 @@ public class PropertyParser implements IParser {
@Override
protected void doExecute() {
- property.setName(result);
+ if (InternationalizationPreferencesUtils.getInternationalizationPreference(property) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(property)) {
+ UMLLabelInternationalization.getInstance().setLabel(property, result, null);
+ }else{
+ property.setName(result);
+