From c058ac00df48f51b050f58f96fc0673d6685474e Mon Sep 17 00:00:00 2001 From: Christian W. Damus Date: Wed, 27 May 2015 09:35:14 -0400 Subject: Bug 440263: [All Diagrams] Do not set default names for relationships https://bugs.eclipse.org/bugs/show_bug.cgi?id=440263 Remove initialization of names for trace and refine abstractions. Change-Id: Iaaa78758f04cf8a6ecb05f20bceaffe8b85095e1 Reviewed-on: https://git.eclipse.org/r/48764 Reviewed-by: Remi Schnekenburger Tested-by: Remi Schnekenburger --- .../uml/service/types/helper/advice/RefineEditHelperAdvice.java | 7 +------ .../uml/service/types/helper/advice/TraceEditHelperAdvice.java | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/RefineEditHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/RefineEditHelperAdvice.java index 2f86612ee0f..18e96105c5d 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/RefineEditHelperAdvice.java +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/RefineEditHelperAdvice.java @@ -9,6 +9,7 @@ * Contributors: * CEA LIST - Initial API and implementation * Christian W. Damus - bug 467920 + * Christian W. Damus - bug 440263 * *****************************************************************************/ @@ -21,7 +22,6 @@ import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; -import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.profile.standard.Refine; import org.eclipse.uml2.uml.profile.standard.StandardPackage; @@ -46,11 +46,6 @@ public class RefineEditHelperAdvice extends AbstractStereotypedElementEditHelper NamedElement element = (NamedElement) request.getElementToConfigure(); if (element != null) { StereotypeApplicationHelper.getInstance(element).applyStereotype(element, StandardPackage.Literals.REFINE); - - // Set default name - // Initialize the element name based on the created IElementType - String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(StandardPackage.Literals.REFINE.getName(), element.eContainer().eContents()); - element.setName(initializedName); } return CommandResult.newOKCommandResult(element); } diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/TraceEditHelperAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/TraceEditHelperAdvice.java index 53085b63380..e7b8d9437fa 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/TraceEditHelperAdvice.java +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/TraceEditHelperAdvice.java @@ -9,6 +9,7 @@ * Contributors: * CEA LIST - Initial API and implementation * Christian W. Damus - bug 467920 + * Christian W. Damus - bug 440263 * *****************************************************************************/ @@ -21,7 +22,6 @@ import org.eclipse.gmf.runtime.common.core.command.CommandResult; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; -import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; import org.eclipse.uml2.uml.NamedElement; import org.eclipse.uml2.uml.profile.standard.StandardPackage; import org.eclipse.uml2.uml.profile.standard.Trace; @@ -46,11 +46,6 @@ public class TraceEditHelperAdvice extends AbstractStereotypedElementEditHelperA NamedElement element = (NamedElement) request.getElementToConfigure(); if (element != null) { StereotypeApplicationHelper.getInstance(element).applyStereotype(element, StandardPackage.Literals.TRACE); - - // Set default name - // Initialize the element name based on the created IElementType - String initializedName = NamedElementUtil.getDefaultNameWithIncrementFromBase(StandardPackage.Literals.TRACE.getName(), element.eContainer().eContents()); - element.setName(initializedName); } return CommandResult.newOKCommandResult(element); } -- cgit v1.2.3