Skip to content
Snippets Groups Projects
Commit f7d24d2b authored by Andreas Bayha's avatar Andreas Bayha
Browse files

Variability: Added syntax check for feature named


Feature names are now also checked for equality of keywords.

Issue-Ref: 3862
Issue-Url: af3#3862

Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent d18ed5d0
No related branches found
No related tags found
1 merge request!1803862
Pipeline #35371 passed
Pipeline: maven-releng

#35372

    FeatureModelTransformationUtils.java b38702296dcb48ff311b382bb9c05d2590e2dfac GREEN
    Pair.java 2dfd7dc65f7b9ba09a120f1a6058d1e8e9556a37 GREEN
    VariabilityUtils.java 1d84b70a1f26ee7b9df697fdc96b8e226762cb5d GREEN
    VariabilityUtils.java 68a8b79a3a6317a62a1ddaa048f127aec323d553 YELLOW
    VariabilityUtilsInternal.java 43d150214dd32e71f163bece306ad7661c2d5b4a GREEN
    ......@@ -156,8 +156,12 @@ public class VariabilityUtils {
    * @return Whether the given name is compatible with the presence condition systax.
    */
    public static boolean isNameLegalInPresenceCondition(String literalName) {
    if(literalName.equals("OR") || literalName.equals("AND") || literalName.equals("NOT") ||
    literalName.equals("DEFAULT")) {
    return false;
    }
    return literalName.matches(FEATURE_LITERAL_LEGAL_CHAR_REGEX + "*");
    // TODO (#3862): Check for keywords.
    }
    /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment