Search in sources :

Example 1 with ChangeContext

use of org.eclipse.sirius.components.view.ChangeContext 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)

Aggregations

ChangeContext (org.eclipse.sirius.components.view.ChangeContext)1 ConditionalEdgeStyle (org.eclipse.sirius.components.view.ConditionalEdgeStyle)1 EdgeStyle (org.eclipse.sirius.components.view.EdgeStyle)1 EdgeTool (org.eclipse.sirius.components.view.EdgeTool)1