use of org.eclipse.sirius.components.view.DropTool in project sirius-components by eclipse-sirius.
the class DiagramDescriptionItemProvider method collectNewChildDescriptors.
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created
* under this object. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
NodeDescription nodeChild = ViewFactory.eINSTANCE.createNodeDescription();
// $NON-NLS-1$
nodeChild.setName("Node");
nodeChild.setStyle(ViewFactory.eINSTANCE.createNodeStyle());
newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.DIAGRAM_DESCRIPTION__NODE_DESCRIPTIONS, nodeChild));
EdgeDescription edgeChild = ViewFactory.eINSTANCE.createEdgeDescription();
// $NON-NLS-1$
edgeChild.setName("Edge");
EdgeStyle newEdgeStyle = ViewFactory.eINSTANCE.createEdgeStyle();
// $NON-NLS-1$
newEdgeStyle.setColor("#002639");
edgeChild.setStyle(newEdgeStyle);
newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.DIAGRAM_DESCRIPTION__EDGE_DESCRIPTIONS, edgeChild));
DropTool dropTool = ViewFactory.eINSTANCE.createDropTool();
// $NON-NLS-1$
dropTool.setName("On Drop");
newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.DIAGRAM_DESCRIPTION__ON_DROP, dropTool));
}
use of org.eclipse.sirius.components.view.DropTool in project sirius-components by eclipse-sirius.
the class DiagramDescriptionImpl method basicSetOnDrop.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public NotificationChain basicSetOnDrop(DropTool newOnDrop, NotificationChain msgs) {
DropTool oldOnDrop = this.onDrop;
this.onDrop = newOnDrop;
if (this.eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ViewPackage.DIAGRAM_DESCRIPTION__ON_DROP, oldOnDrop, newOnDrop);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations