Search in sources :

Example 1 with UnaryOperator

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

the class NumericalUnaryExpressionItemProvider method getText.

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

Example 2 with UnaryOperator

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

the class NumericalUnaryExpressionImpl method setOperator.

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

Aggregations

UnaryOperator (org.yakindu.base.expressions.expressions.UnaryOperator)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 NumericalUnaryExpression (org.yakindu.base.expressions.expressions.NumericalUnaryExpression)1