Search in sources :

Example 1 with EdgeStyle

use of org.eclipse.sirius.components.view.EdgeStyle in project sirius-components by eclipse-sirius.

the class EdgeDescriptionItemProvider 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);
    EdgeTool newEdgeTool = ViewFactory.eINSTANCE.createEdgeTool();
    // $NON-NLS-1$
    newEdgeTool.setName("Create Edge");
    ChangeContext initialOperation = ViewFactory.eINSTANCE.createChangeContext();
    // $NON-NLS-1$
    initialOperation.setExpression("aql:semanticEdgeSource");
    newEdgeTool.getBody().add(initialOperation);
    newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.EDGE_DESCRIPTION__EDGE_TOOLS, newEdgeTool));
    EdgeStyle newEdgeStyle = ViewFactory.eINSTANCE.createEdgeStyle();
    // $NON-NLS-1$
    newEdgeStyle.setColor("#002639");
    newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.EDGE_DESCRIPTION__STYLE, newEdgeStyle));
    ConditionalEdgeStyle conditionalEdgeStyle = ViewFactory.eINSTANCE.createConditionalEdgeStyle();
    // $NON-NLS-1$
    conditionalEdgeStyle.setColor("#002639");
    newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.EDGE_DESCRIPTION__CONDITIONAL_STYLES, conditionalEdgeStyle));
}
Also used : ChangeContext(org.eclipse.sirius.components.view.ChangeContext) ConditionalEdgeStyle(org.eclipse.sirius.components.view.ConditionalEdgeStyle) EdgeStyle(org.eclipse.sirius.components.view.EdgeStyle) ConditionalEdgeStyle(org.eclipse.sirius.components.view.ConditionalEdgeStyle) EdgeTool(org.eclipse.sirius.components.view.EdgeTool)

Example 2 with EdgeStyle

use of org.eclipse.sirius.components.view.EdgeStyle 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));
}
Also used : NodeDescription(org.eclipse.sirius.components.view.NodeDescription) DropTool(org.eclipse.sirius.components.view.DropTool) EdgeDescription(org.eclipse.sirius.components.view.EdgeDescription) EdgeStyle(org.eclipse.sirius.components.view.EdgeStyle)

Example 3 with EdgeStyle

use of org.eclipse.sirius.components.view.EdgeStyle in project sirius-components by eclipse-sirius.

the class EdgeDescriptionImpl method basicSetStyle.

/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 *
 * @generated
 */
public NotificationChain basicSetStyle(EdgeStyle newStyle, NotificationChain msgs) {
    EdgeStyle oldStyle = this.style;
    this.style = newStyle;
    if (this.eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ViewPackage.EDGE_DESCRIPTION__STYLE, oldStyle, newStyle);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) ConditionalEdgeStyle(org.eclipse.sirius.components.view.ConditionalEdgeStyle) EdgeStyle(org.eclipse.sirius.components.view.EdgeStyle)

Aggregations

EdgeStyle (org.eclipse.sirius.components.view.EdgeStyle)3 ConditionalEdgeStyle (org.eclipse.sirius.components.view.ConditionalEdgeStyle)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 ChangeContext (org.eclipse.sirius.components.view.ChangeContext)1 DropTool (org.eclipse.sirius.components.view.DropTool)1 EdgeDescription (org.eclipse.sirius.components.view.EdgeDescription)1 EdgeTool (org.eclipse.sirius.components.view.EdgeTool)1 NodeDescription (org.eclipse.sirius.components.view.NodeDescription)1