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

FeatureModel: Added check for empty feature name to editor


Empty Strings are no longer accepted in the feature editor.

Issue-ref: 4257
Issue-URL: af3#4257

Signed-off-by: default avatarAndreas Bayha <bayha@fortiss.org>
parent 6dc6e46f
No related branches found
No related tags found
1 merge request!1914257
VariabilityUtils.java ccbcc8a13557a107608130e25880f9523b84cfba GREEN
VariabilityUtils.java 7b423cb9f0e267ecb42c74c6fe8d2a23c1f6bf06 YELLOW
......@@ -18,6 +18,8 @@ package org.fortiss.tooling.ext.variability.util;
import static org.fortiss.tooling.ext.variability.model.VariabilityModelElementFactory.createOptionalVariationPointSpecification;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getFirstChildWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import static org.fortiss.variability.util.VariabilityUtils.FEATURE_LITERAL_LEGAL_CHAR_REGEX;
import static org.fortiss.variability.util.VariabilityUtils.PRESENCE_CONDITIONS_KEYWORDS;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.tooling.base.model.element.IModelElement;
......@@ -35,6 +37,12 @@ import org.fortiss.variability.presence.compiler.PresenceConditionCompiler;
*/
public class VariabilityUtils {
/** Failure message for incorrect Feature names. */
public final static String FEATURE_NAME_ERROR_MSG = "Feature names may only contain " +
FEATURE_LITERAL_LEGAL_CHAR_REGEX.replaceAll("\\\\", "") +
", must not be empty and must be different from the keywords " +
PRESENCE_CONDITIONS_KEYWORDS.replaceAll("\\|", ", ") + ".";
/**
* Checks for the given {@link EObject} whether it has been deactivated by a
* {@link DeactivationSpecification}.
......
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