Search in sources :

Example 1 with Casing

use of com.avaloq.tools.ddk.xtext.scope.scope.Casing in project dsl-devkit by dsldevkit.

the class ScopingGeneratorUtil method isCaseInsensitive.

/**
 * Determine whether a certain scope expression is case sensitive or not.
 *
 * @param expr
 *          The scope expression.
 * @return true, if the expression is case insensitive; false otherwise.
 */
public static boolean isCaseInsensitive(final NamedScopeExpression expr) {
    Casing casing = null;
    if (expr.isCaseDef()) {
        casing = expr.getCasing();
    } else {
        NamingSection naming = EObjectUtil.eContainer(expr, ScopeModel.class).getNaming();
        casing = naming != null ? naming.getCasing() : Casing.SENSITIVE;
    }
    return casing == Casing.INSENSITIVE;
}
Also used : ScopeModel(com.avaloq.tools.ddk.xtext.scope.scope.ScopeModel) Casing(com.avaloq.tools.ddk.xtext.scope.scope.Casing) NamingSection(com.avaloq.tools.ddk.xtext.scope.scope.NamingSection)

Example 2 with Casing

use of com.avaloq.tools.ddk.xtext.scope.scope.Casing in project dsl-devkit by dsldevkit.

the class NamedScopeExpressionImpl method setCasing.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setCasing(Casing newCasing) {
    Casing oldCasing = casing;
    casing = newCasing == null ? CASING_EDEFAULT : newCasing;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ScopePackage.NAMED_SCOPE_EXPRESSION__CASING, oldCasing, casing));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Casing(com.avaloq.tools.ddk.xtext.scope.scope.Casing)

Example 3 with Casing

use of com.avaloq.tools.ddk.xtext.scope.scope.Casing in project dsl-devkit by dsldevkit.

the class NamingSectionImpl method setCasing.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setCasing(Casing newCasing) {
    Casing oldCasing = casing;
    casing = newCasing == null ? CASING_EDEFAULT : newCasing;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ScopePackage.NAMING_SECTION__CASING, oldCasing, casing));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) Casing(com.avaloq.tools.ddk.xtext.scope.scope.Casing)

Aggregations

Casing (com.avaloq.tools.ddk.xtext.scope.scope.Casing)3 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 NamingSection (com.avaloq.tools.ddk.xtext.scope.scope.NamingSection)1 ScopeModel (com.avaloq.tools.ddk.xtext.scope.scope.ScopeModel)1