Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-07-06 08:24:48 +0000
committercletavernie2012-07-06 08:24:48 +0000
commit96cfdfa0775652747191a9010bc06584d58c3f18 (patch)
treecc9b8b4bda3bb7b6914a00a66abd8bcdca97d25e
parenta2862d1b80a22069b2dbc8ecdc2f5ea821fb1d53 (diff)
downloadorg.eclipse.papyrus-96cfdfa0775652747191a9010bc06584d58c3f18.tar.gz
org.eclipse.papyrus-96cfdfa0775652747191a9010bc06584d58c3f18.tar.xz
org.eclipse.papyrus-96cfdfa0775652747191a9010bc06584d58c3f18.zip
Bug 307317: [Composite Structure Diagram] Specific drop action to improve usability
https://bugs.eclipse.org/bugs/show_bug.cgi?id=307317
-rw-r--r--plugins/uml/org.eclipse.papyrus.diagram.composite/custom-src/org/eclipse/papyrus/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.composite/custom-src/org/eclipse/papyrus/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java b/plugins/uml/org.eclipse.papyrus.diagram.composite/custom-src/org/eclipse/papyrus/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java
index 25ac6d1ed9c..dceaa997874 100644
--- a/plugins/uml/org.eclipse.papyrus.diagram.composite/custom-src/org/eclipse/papyrus/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.diagram.composite/custom-src/org/eclipse/papyrus/diagram/composite/custom/edit/command/PropertyPartFromTypeCreateCommand.java
@@ -71,11 +71,11 @@ public class PropertyPartFromTypeCreateCommand extends EditElementCommand {
StructuredClassifier owner = (StructuredClassifier)getElementToEdit();
owner.getOwnedAttributes().add(newElement);
newElement.setType(type);
-
- ElementInitializers.getInstance().init_Property_3070(newElement);
-
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
-
+
+ String elementName = type.getName()+ Integer.toString(owner.getOwnedAttributes().size());
+
+ newElement.setName(elementName);
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
semanticAdapter.setElement(newElement);
return CommandResult.newOKCommandResult(semanticAdapter);
}

Back to the top