Search in sources :

Example 1 with AdditiveOperator

use of org.yakindu.base.expressions.expressions.AdditiveOperator in project statecharts by Yakindu.

the class NumericalAddSubtractExpressionImpl method setOperator.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setOperator(AdditiveOperator newOperator) {
    AdditiveOperator oldOperator = operator;
    operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ExpressionsPackage.NUMERICAL_ADD_SUBTRACT_EXPRESSION__OPERATOR, oldOperator, operator));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AdditiveOperator(org.yakindu.base.expressions.expressions.AdditiveOperator)

Example 2 with AdditiveOperator

use of org.yakindu.base.expressions.expressions.AdditiveOperator in project statecharts by Yakindu.

the class NumericalAddSubtractExpressionItemProvider method getText.

/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
    AdditiveOperator labelValue = ((NumericalAddSubtractExpression) object).getOperator();
    String label = labelValue == null ? null : labelValue.toString();
    return label == null || label.length() == 0 ? getString("_UI_NumericalAddSubtractExpression_type") : getString("_UI_NumericalAddSubtractExpression_type") + " " + label;
}
Also used : AdditiveOperator(org.yakindu.base.expressions.expressions.AdditiveOperator) NumericalAddSubtractExpression(org.yakindu.base.expressions.expressions.NumericalAddSubtractExpression)

Aggregations

AdditiveOperator (org.yakindu.base.expressions.expressions.AdditiveOperator)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 NumericalAddSubtractExpression (org.yakindu.base.expressions.expressions.NumericalAddSubtractExpression)1