Skip to content
Snippets Groups Projects
Commit 2d195716 authored by Sebastian Bergemann's avatar Sebastian Bergemann
Browse files

RED (3 related FIXME)

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



Signed-off-by: default avatarSebastian Bergemann <bergemann@fortiss.org>
parent f7d24d2b
No related branches found
No related tags found
1 merge request!1803862
Pipeline #35403 failed
...@@ -61,6 +61,8 @@ public class PresenceConditionProposalProvider extends ProposalProviderBase { ...@@ -61,6 +61,8 @@ public class PresenceConditionProposalProvider extends ProposalProviderBase {
List<String> stringLiterals = literals.stream().map(l -> l.getName()).collect(toList()); List<String> stringLiterals = literals.stream().map(l -> l.getName()).collect(toList());
// FIXME (SB): if you have a final operator list (in the utils class), you can replace this
// list here with it.
stringLiterals.addAll(asList("DEFAULT", "NOT", "AND", "OR")); stringLiterals.addAll(asList("DEFAULT", "NOT", "AND", "OR"));
List<String> proposals = List<String> proposals =
......
...@@ -156,6 +156,8 @@ public class VariabilityUtils { ...@@ -156,6 +156,8 @@ public class VariabilityUtils {
* @return Whether the given name is compatible with the presence condition systax. * @return Whether the given name is compatible with the presence condition systax.
*/ */
public static boolean isNameLegalInPresenceCondition(String literalName) { public static boolean isNameLegalInPresenceCondition(String literalName) {
// FIXME (SB): if you have a final operator list (in the utils class), you can use this here
// (go through it with stream and return the false when anyMatch hits)
if(literalName.equals("OR") || literalName.equals("AND") || literalName.equals("NOT") || if(literalName.equals("OR") || literalName.equals("AND") || literalName.equals("NOT") ||
literalName.equals("DEFAULT")) { literalName.equals("DEFAULT")) {
return false; return false;
......
...@@ -49,6 +49,9 @@ public class VariabilityUtilsInternal { ...@@ -49,6 +49,9 @@ public class VariabilityUtilsInternal {
public final static String FEATURE_LITERAL_LEGAL_CHAR_REGEX = public final static String FEATURE_LITERAL_LEGAL_CHAR_REGEX =
"[a-zA-Z\\d\\$&\\[\\]_\\-\\+@/\\\\,\\.=]"; "[a-zA-Z\\d\\$&\\[\\]_\\-\\+@/\\\\,\\.=]";
// FIXME (SB): add a final string list containing all valid operators (AND, OR, ...) to be able
// to use this list a other places
/** /**
* Retrieves all elements of type T from a containment tree. The 'context' is * Retrieves all elements of type T from a containment tree. The 'context' is
* any element in a containment tree. The result will also contain all parents, * any element in a containment tree. The result will also contain all parents,
......
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