Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-11-24 12:49:41 +0000
committervincent lorenzo2016-11-29 11:01:26 +0000
commit3ed639ecef256da3eeff86d3b428720561f362df (patch)
treeea5d0d552c2e0b62cd9ee3cafd907ee69c0ad2e8 /plugins
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>
Diffstat (limited to 'plugins')
-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
513 files changed, 26259 insertions, 17255 deletions
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);
+ }
}
};
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/RoleInstanceSpecificationLinkParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
index 5f63299c4fd..dbbf495960f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/RoleInstanceSpecificationLinkParser.java
@@ -10,6 +10,8 @@
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - bug 382954
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.parsers;
@@ -19,6 +21,7 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.InstanceSpecification;
/**
@@ -69,6 +72,6 @@ public class RoleInstanceSpecificationLinkParser implements IParser {
private String getNamedNodeType(IAdaptable element) {
InstanceSpecification instanceSpecification = (InstanceSpecification) element.getAdapter(EObject.class);
- return instanceSpecification.getName();
+ return UMLLabelInternationalization.getInstance().getLabel(instanceSpecification);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/SlotParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/SlotParser.java
index 9a5bad1ac41..d1ca3ff78c1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/SlotParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/SlotParser.java
@@ -9,6 +9,7 @@
*
* Contributors:
* 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;
@@ -25,6 +26,7 @@ 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.diagram.clazz.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.InstanceValue;
import org.eclipse.uml2.uml.Slot;
import org.eclipse.uml2.uml.StructuralFeature;
@@ -92,9 +94,9 @@ public class SlotParser implements IParser {
return "<UNDEFINED>";
}
StructuralFeature feature = slot.getDefiningFeature();
- String result = slot.getDefiningFeature().getName();
+ String result = UMLLabelInternationalization.getInstance().getLabel(slot.getDefiningFeature());
if (feature.getType() != null) {
- result += " : " + feature.getType().getName();
+ result += " : " + UMLLabelInternationalization.getInstance().getLabel(feature.getType());
}
if (slot.getValues().isEmpty()) {
return result;
@@ -104,7 +106,7 @@ public class SlotParser implements IParser {
while (iter.hasNext()) {
ValueSpecification currentSpecification = iter.next();
if (currentSpecification instanceof InstanceValue && ((InstanceValue) currentSpecification).getInstance() != null) {
- result = result + ((InstanceValue) currentSpecification).getInstance().getName() + ", ";
+ result = result + UMLLabelInternationalization.getInstance().getLabel(((InstanceValue) currentSpecification).getInstance()) + ", ";
} else {
result = result + currentSpecification.stringValue() + ", ";
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
index dd5d0725b79..d56c4bdbd75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateBindingParser.java
@@ -9,6 +9,8 @@
*
* Contributors:
* 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;
@@ -25,6 +27,7 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.TemplateBinding;
import org.eclipse.uml2.uml.TemplateParameterSubstitution;
@@ -82,10 +85,10 @@ public class TemplateBindingParser implements IParser {
while (bindIter.hasNext()) {
TemplateParameterSubstitution substitution = bindIter.next();
if (substitution.getFormal() != null && substitution.getFormal().getParameteredElement() instanceof NamedElement) {
- out = out + ((NamedElement) substitution.getFormal().getParameteredElement()).getName();
+ out = out + UMLLabelInternationalization.getInstance().getLabel(((NamedElement) substitution.getFormal().getParameteredElement()));
}
if (substitution.getActual() instanceof NamedElement) {
- out = out + " -> " + ((NamedElement) substitution.getActual()).getName() + "\n";
+ out = out + " -> " + UMLLabelInternationalization.getInstance().getLabel(((NamedElement) substitution.getActual())) + "\n";
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
index 24034a02b47..c244e0e649d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/parsers/TemplateParameterParser.java
@@ -9,6 +9,7 @@
*
* Contributors:
* 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;
@@ -25,6 +26,10 @@ import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
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.ClassifierTemplateParameter;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Operation;
@@ -68,8 +73,13 @@ public class TemplateParameterParser implements IParser {
if (templateParam.getParameteredElement() instanceof NamedElement) {
NamedElement namedElement = (NamedElement) templateParam.getParameteredElement();
String name = newString.substring(0, newString.indexOf(":"));
- SetRequest request = new SetRequest(namedElement, UMLPackage.eINSTANCE.getNamedElement_Name(), name.trim());
- command = new SetValueCommand(request);
+ if(InternationalizationPreferencesUtils.getInternationalizationPreference(namedElement) && null != UMLLabelInternationalization.getInstance().getLabelWithoutUML(namedElement)){
+ final ModelSet modelSet = (ModelSet)namedElement.eResource().getResourceSet();
+ command = new EMFtoGMFCommandWrapper(UMLLabelInternationalization.getInstance().getSetLabelCommand(modelSet.getTransactionalEditingDomain(), namedElement, name.trim(), null));
+ }else{
+ SetRequest request = new SetRequest(namedElement, UMLPackage.eINSTANCE.getNamedElement_Name(), name.trim());
+ command = new SetValueCommand(request);
+ }
}
}
return command;
@@ -86,7 +96,7 @@ public class TemplateParameterParser implements IParser {
String out = "";
if (templateParam.getParameteredElement() instanceof NamedElement) {
NamedElement namedElement = (NamedElement) templateParam.getParameteredElement();
- out = namedElement.getName() + ": " + namedElement.eClass().getName();
+ out = UMLLabelInternationalization.getInstance().getLabel(namedElement) + ": " + namedElement.eClass().getName();
}
if (templateParam instanceof OperationTemplateParameter) {
if (templateParam.getParameteredElement() != null) {
@@ -97,7 +107,7 @@ public class TemplateParameterParser implements IParser {
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 + ", ";
}
@@ -107,7 +117,7 @@ public class TemplateParameterParser implements IParser {
if (templateParam.getDefault() instanceof Operation) {
out = out + "=" + displayOperation((Operation) templateParam.getDefault());
} else if (templateParam.getDefault() instanceof NamedElement) {
- out = out + "=" + ((NamedElement) templateParam.getDefault()).getName();
+ out = out + "=" + UMLLabelInternationalization.getInstance().getLabel(((NamedElement) templateParam.getDefault()));
}
return out;
}
@@ -115,11 +125,11 @@ public class TemplateParameterParser implements IParser {
}
protected String displayOperation(Operation op) {
- String out = op.getName() + "(";
+ String out = UMLLabelInternationalization.getInstance().getLabel(op) + "(";
Iterator<Parameter> iter = op.getOwnedParameters().iterator();
while (iter.hasNext()) {
Parameter param = iter.next();
- out = out + param.getName();
+ out = out + UMLLabelInternationalization.getInstance().getLabel(param);
if (!param.equals(op.getOwnedParameters().get(op.getOwnedParameters().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/policies/InformationFlowCustomLabelEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InformationFlowCustomLabelEditPolicy.java
index 0dc616a06c2..8e5cfb75638 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InformationFlowCustomLabelEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InformationFlowCustomLabelEditPolicy.java
@@ -9,6 +9,8 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
@@ -16,6 +18,7 @@ import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InformationFlowConveyedLabelEditPart;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.InformationFlow;
@@ -124,7 +127,7 @@ public class InformationFlowCustomLabelEditPolicy extends AbstractCustomLabelEdi
if (getUMLElement() instanceof InformationFlow) {
EList<Classifier> classes = ((InformationFlow) getUMLElement()).getConveyeds();
for (int i = 0; i < classes.size(); i++) {
- name += classes.get(i).getName();
+ name += UMLLabelInternationalization.getInstance().getLabel(classes.get(i));
if (i != classes.size() - 1) {
name += ", ";
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
index cc7cdcca308..4603c5a9b7b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/InstanceSpecificationRoleDisplayEditPolicy.java
@@ -11,6 +11,8 @@
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - bug 382954
* Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Patch #44973
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Bug 496905
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.clazz.custom.policies;
@@ -29,6 +31,7 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.core.listenerservice.IPapyrusListener;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.papyrus.uml.internationalization.utils.utils.UMLLabelInternationalization;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.InstanceSpecification;
@@ -191,7 +194,7 @@ public abstract class InstanceSpecificationRoleDisplayEditPolicy extends Graphic
protected void refreshDisplay() {
if (hostSemanticElement != null) {
if (getInterestingProperty() != null) {
- ((ITextAwareEditPart) getHost()).setLabelText(getInterestingProperty().getName());
+ ((ITextAwareEditPart) getHost()).setLabelText(UMLLabelInternationalization.getInstance().getLabel(getInterestingProperty()));
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/parsers/MessageFormatParser.java
index d4d0ba9e5e4..6a53bda1693 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/parsers/MessageFormatParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src-gen/org/eclipse/papyrus/uml/diagram/clazz/parsers/MessageFormatParser.java
@@ -1,205 +1,253 @@
-/**
- * Copyright (c) 2014 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.clazz.parsers;
-
-import java.text.FieldPosition;
-import java.text.MessageFormat;
-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.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.uml.diagram.clazz.part.Messages;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditorPlugin;
-
-/**
- * @generated
- */
-public class MessageFormatParser extends AbstractAttributeParser {
-
- /**
- * @generated
- */
- private String defaultPattern;
- /**
- * @generated
- */
- private String defaultEditablePattern;
-
- /**
- * @generated
- */
- private MessageFormat viewProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editorProcessor;
-
- /**
- * @generated
- */
- private MessageFormat editProcessor;
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features) {
- super(features);
- }
-
- /**
- * @generated
- */
- public MessageFormatParser(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- }
-
- /**
- * @generated
- */
- protected String getDefaultPattern() {
- if (defaultPattern == null) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < features.length; i++) {
- if (i > 0) {
- sb.append(' ');
- }
- sb.append('{');
- sb.append(i);
- sb.append('}');
- }
- defaultPattern = sb.toString();
- }
- return defaultPattern;
- }
-
- /**
- * @generated
- */
- public void setViewPattern(String viewPattern) {
- super.setViewPattern(viewPattern);
- viewProcessor = null;
- }
-
- /**
- * @generated
- */
- public void setEditorPattern(String editorPattern) {
- super.setEditorPattern(editorPattern);
- editorProcessor = null;
- }
-
- /**