Search in sources :

Example 1 with SeverityKind

use of com.avaloq.tools.ddk.checkcfg.checkcfg.SeverityKind in project dsl-devkit by dsldevkit.

the class CheckConfigurationPropertiesGenerator method putCheckSeverity.

/**
 * Put check severity property.
 *
 * @param properties
 *          the properties
 * @param language
 *          the language
 * @param configuredCheck
 *          the check
 */
private void putCheckSeverity(final Properties properties, final String language, final ConfiguredCheck configuredCheck) {
    SeverityKind severity = configuredCheck.getSeverity();
    if (severity == SeverityKind.DEFAULT) {
        // Default value doesn't need to be stored.
        return;
    }
    String severityValue = String.valueOf(com.avaloq.tools.ddk.check.check.SeverityKind.getByName(configuredCheck.getSeverity().getName().toLowerCase(Locale.ENGLISH)).getValue());
    if (language != null) {
        properties.put(LanguageSpecificCheckConfigurationStore.getLanguageSpecificKey(language, CheckPropertiesGenerator.checkSeverityKey(configuredCheck.getCheck())), severityValue);
    } else {
        properties.put(CheckPropertiesGenerator.checkSeverityKey(configuredCheck.getCheck()), severityValue);
    }
}
Also used : SeverityKind(com.avaloq.tools.ddk.checkcfg.checkcfg.SeverityKind)

Example 2 with SeverityKind

use of com.avaloq.tools.ddk.checkcfg.checkcfg.SeverityKind in project dsl-devkit by dsldevkit.

the class ConfiguredCheckImpl method setSeverity.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setSeverity(SeverityKind newSeverity) {
    SeverityKind oldSeverity = severity;
    severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, CheckcfgPackage.CONFIGURED_CHECK__SEVERITY, oldSeverity, severity));
}
Also used : SeverityKind(com.avaloq.tools.ddk.checkcfg.checkcfg.SeverityKind) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

SeverityKind (com.avaloq.tools.ddk.checkcfg.checkcfg.SeverityKind)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1