Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2017-08-15 18:49:17 +0000
committerMorgan E. Cook2017-08-15 18:50:00 +0000
commit205e66249bb14f751e32cb76d90222dc19400c69 (patch)
treef07fd80a5e5095f5867f49d768d85bd8b9f75868 /plugins
parent5ca07e8816cda0c16e488ce67b01a84c061344c1 (diff)
downloadorg.eclipse.osee-205e66249bb14f751e32cb76d90222dc19400c69.tar.gz
org.eclipse.osee-205e66249bb14f751e32cb76d90222dc19400c69.tar.xz
org.eclipse.osee-205e66249bb14f751e32cb76d90222dc19400c69.zip
refactor: Add support for Configuration Not in WordML
Signed-off-by: Morgan E. Cook <morgan.e.cook@boeing.com> Change-Id: I68c273609e26b0734a076710bd5924094ddf67e5
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMLApplicabilityHandler.java51
-rw-r--r--plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordTemplateContentRendererHandler.java9
-rw-r--r--plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarLexer.java259
-rw-r--r--plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarParser.java405
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.g5
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.tokens21
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/readMe.txt4
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java19
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ApplicabilityQueryImpl.java25
-rw-r--r--plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/ApplicabilityQuery.java2
11 files changed, 463 insertions, 338 deletions
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMLApplicabilityHandler.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMLApplicabilityHandler.java
index 5247970dbe7..f8f95031873 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMLApplicabilityHandler.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMLApplicabilityHandler.java
@@ -17,7 +17,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
@@ -72,8 +71,10 @@ public class WordMLApplicabilityHandler {
validConfigurations = getValidConfigurations(orcsApi, branch);
viewApplicabilitiesMap =
- orcsApi.getQueryFactory().applicabilityQuery().getBranchViewFeatureValues(branchToUse, view);
- configurationToView = viewApplicabilitiesMap.get("config").iterator().next();
+ orcsApi.getQueryFactory().applicabilityQuery().getNamedViewApplicabilityMap(branchToUse, view);
+ ArtifactReadable viewArtifact =
+ orcsApi.getQueryFactory().fromBranch(branchToUse).andId(view).getResults().getAtMostOneOrNull();
+ configurationToView = viewArtifact.getName();
BranchReadable br = orcsApi.getQueryFactory().branchQuery().andId(branch).getResults().getOneOrNull();
if (br.getBranchType().equals(BranchType.MERGE)) {
@@ -93,11 +94,11 @@ public class WordMLApplicabilityHandler {
Matcher matcher = WordCoreUtil.FULL_PATTERN.matcher(toReturn);
while (searchIndex < toReturn.length() && matcher.find(searchIndex)) {
- String beginFeature = matcher.group(1) != null ? matcher.group(1) : null;
- String beginConfig = matcher.group(26) != null ? matcher.group(26) : null;
+ String beginFeature = matcher.group(1);
+ String beginConfig = matcher.group(26);
String endFeature = matcher.group(12) != null ? WordCoreUtil.textOnly(matcher.group(12)).toLowerCase() : null;
- String endConfig = matcher.group(43) != null ? WordCoreUtil.textOnly(matcher.group(43)).toLowerCase() : null;
+ String endConfig = matcher.group(48) != null ? WordCoreUtil.textOnly(matcher.group(48)).toLowerCase() : null;
if (beginFeature != null && WordCoreUtil.textOnly(beginFeature).toLowerCase().contains(
WordCoreUtil.FEATUREAPP)) {
@@ -109,8 +110,11 @@ public class WordMLApplicabilityHandler {
WordCoreUtil.CONFIGAPP)) {
if (isValidConfigurationBracket(beginConfig)) {
applicBlockCount += 1;
- searchIndex =
- addApplicabilityBlock(ApplicabilityType.Configuration, matcher, beginConfig, searchIndex, toReturn);
+ ApplicabilityType type = ApplicabilityType.Configuration;
+ if (beginConfig.contains("Not")) {
+ type = ApplicabilityType.NotConfiguration;
+ }
+ searchIndex = addApplicabilityBlock(type, matcher, beginConfig, searchIndex, toReturn);
} else {
searchIndex = matcher.end();
}
@@ -401,11 +405,13 @@ public class WordMLApplicabilityHandler {
parser.start();
- if (applic.getType().equals(ApplicabilityType.Feature)) {
+ ApplicabilityType type = applic.getType();
+
+ if (type.equals(ApplicabilityType.Feature)) {
toInsert =
getValidFeatureContent(fullText, applic.isInTable(), parser.getIdValuesMap(), parser.getOperators());
- } else if (applic.getType().equals(ApplicabilityType.Configuration)) {
- toInsert = getValidConfigurationContent(fullText, parser.getIdValuesMap());
+ } else if (type.equals(ApplicabilityType.Configuration) || type.equals(ApplicabilityType.NotConfiguration)) {
+ toInsert = getValidConfigurationContent(type, fullText, parser.getIdValuesMap());
}
} catch (RecognitionException ex) {
@@ -416,7 +422,7 @@ public class WordMLApplicabilityHandler {
return toInsert;
}
- public String getValidConfigurationContent(String fullText, HashMap<String, List<String>> id_value_map) {
+ public String getValidConfigurationContent(ApplicabilityType type, String fullText, HashMap<String, List<String>> id_value_map) {
Matcher match = WordCoreUtil.ELSE_PATTERN.matcher(fullText);
String beginningText = fullText;
String elseText = "";
@@ -433,22 +439,19 @@ public class WordMLApplicabilityHandler {
// Note: this assumes only OR's are put in between configurations
List<String> values = id_value_map.get(configurationToView.toUpperCase());
- if (values != null) {
- String value = values.get(0);
- if (!value.toLowerCase().equals("excluded")) {
+
+ if (type.equals(ApplicabilityType.NotConfiguration)) {
+ if (values != null) {
+ toReturn = elseText;
+ } else {
toReturn = beginningText;
}
+ } else if (values == null) {
+ toReturn = elseText;
} else {
- boolean isExcluded = false;
- for (Entry<String, List<String>> entry : id_value_map.entrySet()) {
- List<String> value = entry.getValue();
- isExcluded = value.get(0).toLowerCase().equals("excluded") ? true : false;
- if (!isExcluded) {
- break;
- }
- }
- toReturn = isExcluded ? beginningText : "";
+ toReturn = beginningText;
}
+
return toReturn;
}
diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordTemplateContentRendererHandler.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordTemplateContentRendererHandler.java
index 5c0c192e8b4..2edc73fb1de 100644
--- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordTemplateContentRendererHandler.java
+++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordTemplateContentRendererHandler.java
@@ -55,11 +55,12 @@ public class WordTemplateContentRendererHandler {
}
ArtifactReadable artifact = null;
if (txId.equals(TransactionId.SENTINEL)) {
- artifact = orcsApi.getQueryFactory().fromBranch(wtcData.getBranch()).andUuid(
- wtcData.getArtId()).includeDeletedArtifacts().includeDeletedAttributes().getResults().getAtMostOneOrNull();
+ artifact = orcsApi.getQueryFactory().fromBranch(wtcData.getBranch()).andId(ArtifactId.valueOf(
+ wtcData.getArtId())).includeDeletedArtifacts().includeDeletedAttributes().getResults().getAtMostOneOrNull();
} else {
- artifact = orcsApi.getQueryFactory().fromBranch(wtcData.getBranch()).fromTransaction(txId).andUuid(
- wtcData.getArtId()).includeDeletedArtifacts().includeDeletedAttributes().getResults().getAtMostOneOrNull();
+ artifact =
+ orcsApi.getQueryFactory().fromBranch(wtcData.getBranch()).fromTransaction(txId).andId(ArtifactId.valueOf(
+ wtcData.getArtId())).includeDeletedArtifacts().includeDeletedAttributes().getResults().getAtMostOneOrNull();
}
if (artifact != null) {
diff --git a/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarLexer.java b/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarLexer.java
index 2b3038a8218..c605c8d53cc 100644
--- a/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarLexer.java
+++ b/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarLexer.java
@@ -1,4 +1,5 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 ApplicabilityGrammar.g 2017-04-26 12:09:41
+// $ANTLR 3.2 Sep 23, 2009 12:02:23 ApplicabilityGrammar.g 2017-08-14 12:13:17
+
package org.eclipse.osee.framework.core.grammar;
import org.antlr.runtime.BaseRecognizer;
@@ -12,14 +13,17 @@ import org.antlr.runtime.RecognizerSharedState;
public class ApplicabilityGrammarLexer extends Lexer {
public static final int T__9 = 9;
- public static final int T__8 = 8;
public static final int OR = 6;
+ public static final int NOT = 7;
+ public static final int T__15 = 15;
+ public static final int T__16 = 16;
public static final int AND = 5;
public static final int T__11 = 11;
public static final int T__12 = 12;
public static final int T__13 = 13;
+ public static final int T__14 = 14;
public static final int ID = 4;
- public static final int WS = 7;
+ public static final int WS = 8;
public static final int EOF = -1;
public static final int T__10 = 10;
@@ -43,34 +47,15 @@ public class ApplicabilityGrammarLexer extends Lexer {
return "ApplicabilityGrammar.g";
}
- // $ANTLR start "T__8"
- public final void mT__8() throws RecognitionException {
- try {
- int _type = T__8;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:3:6: ( 'CONFIGURATION[' )
- // ApplicabilityGrammar.g:3:8: 'CONFIGURATION['
- {
- match("CONFIGURATION[");
-
- }
-
- state.type = _type;
- state.channel = _channel;
- } finally {
- }
- }
- // $ANTLR end "T__8"
-
// $ANTLR start "T__9"
public final void mT__9() throws RecognitionException {
try {
int _type = T__9;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:4:6: ( ']' )
- // ApplicabilityGrammar.g:4:8: ']'
+ // ApplicabilityGrammar.g:3:6: ( 'CONFIGURATION' )
+ // ApplicabilityGrammar.g:3:8: 'CONFIGURATION'
{
- match(']');
+ match("CONFIGURATION");
}
@@ -86,10 +71,10 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = T__10;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:5:7: ( 'FEATURE[' )
- // ApplicabilityGrammar.g:5:9: 'FEATURE['
+ // ApplicabilityGrammar.g:4:7: ( 'CONFIGURATION NOT' )
+ // ApplicabilityGrammar.g:4:9: 'CONFIGURATION NOT'
{
- match("FEATURE[");
+ match("CONFIGURATION NOT");
}
@@ -105,10 +90,10 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = T__11;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:6:7: ( '=' )
- // ApplicabilityGrammar.g:6:9: '='
+ // ApplicabilityGrammar.g:5:7: ( '[' )
+ // ApplicabilityGrammar.g:5:9: '['
{
- match('=');
+ match('[');
}
@@ -124,10 +109,10 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = T__12;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:7:7: ( '(' )
- // ApplicabilityGrammar.g:7:9: '('
+ // ApplicabilityGrammar.g:6:7: ( ']' )
+ // ApplicabilityGrammar.g:6:9: ']'
{
- match('(');
+ match(']');
}
@@ -143,10 +128,10 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = T__13;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:8:7: ( ')' )
- // ApplicabilityGrammar.g:8:9: ')'
+ // ApplicabilityGrammar.g:7:7: ( 'FEATURE[' )
+ // ApplicabilityGrammar.g:7:9: 'FEATURE['
{
- match(')');
+ match("FEATURE[");
}
@@ -157,13 +142,70 @@ public class ApplicabilityGrammarLexer extends Lexer {
}
// $ANTLR end "T__13"
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ApplicabilityGrammar.g:8:7: ( '=' )
+ // ApplicabilityGrammar.g:8:9: '='
+ {
+ match('=');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ } finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ApplicabilityGrammar.g:9:7: ( '(' )
+ // ApplicabilityGrammar.g:9:9: '('
+ {
+ match('(');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ } finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "T__16"
+ public final void mT__16() throws RecognitionException {
+ try {
+ int _type = T__16;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ApplicabilityGrammar.g:10:7: ( ')' )
+ // ApplicabilityGrammar.g:10:9: ')'
+ {
+ match(')');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ } finally {
+ }
+ }
+ // $ANTLR end "T__16"
+
// $ANTLR start "OR"
public final void mOR() throws RecognitionException {
try {
int _type = OR;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:76:10: ( '|' )
- // ApplicabilityGrammar.g:76:12: '|'
+ // ApplicabilityGrammar.g:78:10: ( '|' )
+ // ApplicabilityGrammar.g:78:12: '|'
{
match('|');
@@ -181,8 +223,8 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = AND;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:77:10: ( '&' )
- // ApplicabilityGrammar.g:77:12: '&'
+ // ApplicabilityGrammar.g:79:10: ( '&' )
+ // ApplicabilityGrammar.g:79:12: '&'
{
match('&');
@@ -195,13 +237,32 @@ public class ApplicabilityGrammarLexer extends Lexer {
}
// $ANTLR end "AND"
+ // $ANTLR start "NOT"
+ public final void mNOT() throws RecognitionException {
+ try {
+ int _type = NOT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // ApplicabilityGrammar.g:80:10: ( 'NOT' )
+ // ApplicabilityGrammar.g:80:12: 'NOT'
+ {
+ match("NOT");
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ } finally {
+ }
+ }
+ // $ANTLR end "NOT"
+
// $ANTLR start "ID"
public final void mID() throws RecognitionException {
try {
int _type = ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:78:4: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )* )
- // ApplicabilityGrammar.g:78:6: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )*
+ // ApplicabilityGrammar.g:81:4: ( ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )* )
+ // ApplicabilityGrammar.g:81:6: ( 'a' .. 'z' | 'A' .. 'Z' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )*
{
if ((input.LA(1) >= 'A' && input.LA(1) <= 'Z') || (input.LA(1) >= 'a' && input.LA(1) <= 'z')) {
input.consume();
@@ -212,7 +273,7 @@ public class ApplicabilityGrammarLexer extends Lexer {
throw mse;
}
- // ApplicabilityGrammar.g:78:25: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )*
+ // ApplicabilityGrammar.g:81:25: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ' ' )*
loop1: do {
int alt1 = 2;
int LA1_0 = input.LA(1);
@@ -259,10 +320,10 @@ public class ApplicabilityGrammarLexer extends Lexer {
try {
int _type = WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // ApplicabilityGrammar.g:80:4: ( ( ' ' | '\\r' | '\\t' | '\\n' )+ )
- // ApplicabilityGrammar.g:80:6: ( ' ' | '\\r' | '\\t' | '\\n' )+
+ // ApplicabilityGrammar.g:83:4: ( ( ' ' | '\\r' | '\\t' | '\\n' )+ )
+ // ApplicabilityGrammar.g:83:6: ( ' ' | '\\r' | '\\t' | '\\n' )+
{
- // ApplicabilityGrammar.g:80:6: ( ' ' | '\\r' | '\\t' | '\\n' )+
+ // ApplicabilityGrammar.g:83:6: ( ' ' | '\\r' | '\\t' | '\\n' )+
int cnt2 = 0;
loop2: do {
int alt2 = 2;
@@ -308,75 +369,96 @@ public class ApplicabilityGrammarLexer extends Lexer {
// $ANTLR end "WS"
public void mTokens() throws RecognitionException {
- // ApplicabilityGrammar.g:1:8: ( T__8 | T__9 | T__10 | T__11 | T__12 | T__13 | OR | AND | ID | WS )
- int alt3 = 10;
+ // ApplicabilityGrammar.g:1:8: ( T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | OR | AND | NOT | ID | WS )
+ int alt3 = 13;
alt3 = dfa3.predict(input);
switch (alt3) {
case 1:
- // ApplicabilityGrammar.g:1:10: T__8
+ // ApplicabilityGrammar.g:1:10: T__9
{
- mT__8();
+ mT__9();
}
break;
case 2:
- // ApplicabilityGrammar.g:1:15: T__9
+ // ApplicabilityGrammar.g:1:15: T__10
{
- mT__9();
+ mT__10();
}
break;
case 3:
- // ApplicabilityGrammar.g:1:20: T__10
+ // ApplicabilityGrammar.g:1:21: T__11
{
- mT__10();
+ mT__11();
}
break;
case 4:
- // ApplicabilityGrammar.g:1:26: T__11
+ // ApplicabilityGrammar.g:1:27: T__12
{
- mT__11();
+ mT__12();
}
break;
case 5:
- // ApplicabilityGrammar.g:1:32: T__12
+ // ApplicabilityGrammar.g:1:33: T__13
{
- mT__12();
+ mT__13();
}
break;
case 6:
- // ApplicabilityGrammar.g:1:38: T__13
+ // ApplicabilityGrammar.g:1:39: T__14
{
- mT__13();
+ mT__14();
}
break;
case 7:
- // ApplicabilityGrammar.g:1:44: OR
+ // ApplicabilityGrammar.g:1:45: T__15
{
- mOR();
+ mT__15();
}
break;
case 8:
- // ApplicabilityGrammar.g:1:47: AND
+ // ApplicabilityGrammar.g:1:51: T__16
{
- mAND();
+ mT__16();
}
break;
case 9:
- // ApplicabilityGrammar.g:1:51: ID
+ // ApplicabilityGrammar.g:1:57: OR
{
- mID();
+ mOR();
}
break;
case 10:
- // ApplicabilityGrammar.g:1:54: WS
+ // ApplicabilityGrammar.g:1:60: AND
+ {
+ mAND();
+
+ }
+ break;
+ case 11:
+ // ApplicabilityGrammar.g:1:64: NOT
+ {
+ mNOT();
+
+ }
+ break;
+ case 12:
+ // ApplicabilityGrammar.g:1:68: ID
+ {
+ mID();
+
+ }
+ break;
+ case 13:
+ // ApplicabilityGrammar.g:1:71: WS
{
mWS();
@@ -388,46 +470,57 @@ public class ApplicabilityGrammarLexer extends Lexer {
}
protected DFA3 dfa3 = new DFA3(this);
- static final String DFA3_eotS = "\1\uffff\1\11\1\uffff\1\11\7\uffff\15\11\1\uffff\5\11\1\uffff";
- static final String DFA3_eofS = "\37\uffff";
+ static final String DFA3_eotS =
+ "\1\uffff\1\13\2\uffff\1\13\5\uffff\1\13\2\uffff\5\13\1\25\2\13" + "\1\uffff\7\13\1\uffff\4\13\1\44\1\13\1\uffff\2\13\1\50\1\uffff";
+ static final String DFA3_eofS = "\51\uffff";
static final String DFA3_minS =
- "\1\11\1\117\1\uffff\1\105\7\uffff\1\116\1\101\1\106\1\124\1\111" + "\1\125\1\107\1\122\1\125\1\105\1\122\1\133\1\101\1\uffff\1\124\1" + "\111\1\117\1\116\1\133\1\uffff";
+ "\1\11\1\117\2\uffff\1\105\5\uffff\1\117\2\uffff\1\116\1\101\1\124" + "\1\106\1\124\1\40\1\111\1\125\1\uffff\1\107\1\122\1\125\1\105\1" + "\122\1\133\1\101\1\uffff\1\124\1\111\1\117\1\116\1\40\1\116\1\uffff" + "\1\117\1\124\1\40\1\uffff";
static final String DFA3_maxS =
- "\1\174\1\117\1\uffff\1\105\7\uffff\1\116\1\101\1\106\1\124\1\111" + "\1\125\1\107\1\122\1\125\1\105\1\122\1\133\1\101\1\uffff\1\124\1" + "\111\1\117\1\116\1\133\1\uffff";
+ "\1\174\1\117\2\uffff\1\105\5\uffff\1\117\2\uffff\1\116\1\101\1" + "\124\1\106\1\124\1\172\1\111\1\125\1\uffff\1\107\1\122\1\125\1\105" + "\1\122\1\133\1\101\1\uffff\1\124\1\111\1\117\1\116\1\172\1\116\1" + "\uffff\1\117\1\124\1\172\1\uffff";
static final String DFA3_acceptS =
- "\2\uffff\1\2\1\uffff\1\4\1\5\1\6\1\7\1\10\1\11\1\12\15\uffff\1" + "\3\5\uffff\1\1";
- static final String DFA3_specialS = "\37\uffff}>";
+ "\2\uffff\1\3\1\4\1\uffff\1\6\1\7\1\10\1\11\1\12\1\uffff\1\14\1" + "\15\10\uffff\1\13\7\uffff\1\5\6\uffff\1\1\3\uffff\1\2";
+ static final String DFA3_specialS = "\51\uffff}>";
static final String[] DFA3_transitionS = {
- "\2\12\2\uffff\1\12\22\uffff\1\12\5\uffff\1\10\1\uffff\1\5\1" + "\6\23\uffff\1\4\3\uffff\2\11\1\1\2\11\1\3\24\11\2\uffff\1\2" + "\3\uffff\32\11\1\uffff\1\7",
- "\1\13",
- "",
- "\1\14",
+ "\2\14\2\uffff\1\14\22\uffff\1\14\5\uffff\1\11\1\uffff\1\6\1" + "\7\23\uffff\1\5\3\uffff\2\13\1\1\2\13\1\4\7\13\1\12\14\13\1" + "\2\1\uffff\1\3\3\uffff\32\13\1\uffff\1\10",
+ "\1\15",
"",
"",
+ "\1\16",
"",
"",
"",
"",
"",
- "\1\15",
- "\1\16",
"\1\17",
+ "",
+ "",
"\1\20",
"\1\21",
"\1\22",
"\1\23",
"\1\24",
- "\1\25",
+ "\1\13\14\uffff\1\13\2\uffff\12\13\7\uffff\32\13\4\uffff\1" + "\13\1\uffff\32\13",
"\1\26",
"\1\27",
+ "",
"\1\30",
"\1\31",
- "",
"\1\32",
"\1\33",
"\1\34",
"\1\35",
"\1\36",
+ "",
+ "\1\37",
+ "\1\40",
+ "\1\41",
+ "\1\42",
+ "\1\43\14\uffff\1\13\2\uffff\12\13\7\uffff\32\13\4\uffff\1" + "\13\1\uffff\32\13",
+ "\1\45",
+ "",
+ "\1\46",
+ "\1\47",
+ "\1\13\14\uffff\1\13\2\uffff\12\13\7\uffff\32\13\4\uffff\1" + "\13\1\uffff\32\13",
""};
static final short[] DFA3_eot = DFA.unpackEncodedString(DFA3_eotS);
@@ -461,7 +554,7 @@ public class ApplicabilityGrammarLexer extends Lexer {
}
public String getDescription() {
- return "1:1: Tokens : ( T__8 | T__9 | T__10 | T__11 | T__12 | T__13 | OR | AND | ID | WS );";
+ return "1:1: Tokens : ( T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | OR | AND | NOT | ID | WS );";
}
}
diff --git a/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarParser.java b/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarParser.java
index 97a5951c062..e31c4aa4985 100644
--- a/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarParser.java
+++ b/plugins/org.eclipse.osee.framework.core/src-gen/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammarParser.java
@@ -1,4 +1,5 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 ApplicabilityGrammar.g 2017-04-26 12:09:41
+// $ANTLR 3.2 Sep 23, 2009 12:02:23 ApplicabilityGrammar.g 2017-08-14 12:13:17
+
package org.eclipse.osee.framework.core.grammar;
import java.util.ArrayList;
@@ -29,22 +30,28 @@ public class ApplicabilityGrammarParser extends Parser {
"ID",
"AND",
"OR",
+ "NOT",
"WS",
- "'CONFIGURATION['",
+ "'CONFIGURATION'",
+ "'CONFIGURATION NOT'",
+ "'['",
"']'",
"'FEATURE['",
"'='",
"'('",
"')'"};
public static final int T__9 = 9;
- public static final int T__8 = 8;
public static final int OR = 6;
+ public static final int NOT = 7;
+ public static final int T__15 = 15;
+ public static final int T__16 = 16;
public static final int AND = 5;
public static final int T__11 = 11;
public static final int T__12 = 12;
public static final int T__13 = 13;
+ public static final int T__14 = 14;
public static final int ID = 4;
- public static final int WS = 7;
+ public static final int WS = 8;
public static final int EOF = -1;
public static final int T__10 = 10;
@@ -105,7 +112,7 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "start"
- // ApplicabilityGrammar.g:38:1: start : applicability EOF ;
+ // ApplicabilityGrammar.g:40:1: start : applicability EOF ;
public final ApplicabilityGrammarParser.start_return start() throws RecognitionException {
ApplicabilityGrammarParser.start_return retval = new ApplicabilityGrammarParser.start_return();
retval.start = input.LT(1);
@@ -118,8 +125,8 @@ public class ApplicabilityGrammarParser extends Parser {
CommonTree EOF2_tree = null;
try {
- // ApplicabilityGrammar.g:38:24: ( applicability EOF )
- // ApplicabilityGrammar.g:38:27: applicability EOF
+ // ApplicabilityGrammar.g:40:24: ( applicability EOF )
+ // ApplicabilityGrammar.g:40:27: applicability EOF
{
root_0 = (CommonTree) adaptor.nil();
@@ -159,7 +166,7 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "applicability"
- // ApplicabilityGrammar.g:40:1: applicability : ( config_applicability | feature_applicability );
+ // ApplicabilityGrammar.g:42:1: applicability : ( config_applicability | feature_applicability );
public final ApplicabilityGrammarParser.applicability_return applicability() throws RecognitionException {
ApplicabilityGrammarParser.applicability_return retval = new ApplicabilityGrammarParser.applicability_return();
retval.start = input.LT(1);
@@ -171,13 +178,13 @@ public class ApplicabilityGrammarParser extends Parser {
ApplicabilityGrammarParser.feature_applicability_return feature_applicability4 = null;
try {
- // ApplicabilityGrammar.g:40:25: ( config_applicability | feature_applicability )
+ // ApplicabilityGrammar.g:42:25: ( config_applicability | feature_applicability )
int alt1 = 2;
int LA1_0 = input.LA(1);
- if ((LA1_0 == 8)) {
+ if (((LA1_0 >= 9 && LA1_0 <= 10))) {
alt1 = 1;
- } else if ((LA1_0 == 10)) {
+ } else if ((LA1_0 == 13)) {
alt1 = 2;
} else {
NoViableAltException nvae = new NoViableAltException("", 1, 0, input);
@@ -186,7 +193,7 @@ public class ApplicabilityGrammarParser extends Parser {
}
switch (alt1) {
case 1:
- // ApplicabilityGrammar.g:40:27: config_applicability
+ // ApplicabilityGrammar.g:42:27: config_applicability
{
root_0 = (CommonTree) adaptor.nil();
@@ -201,7 +208,7 @@ public class ApplicabilityGrammarParser extends Parser {
}
break;
case 2:
- // ApplicabilityGrammar.g:41:11: feature_applicability
+ // ApplicabilityGrammar.g:43:11: feature_applicability
{
root_0 = (CommonTree) adaptor.nil();
@@ -242,7 +249,7 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "config_applicability"
- // ApplicabilityGrammar.g:43:1: config_applicability : 'CONFIGURATION[' ( expressions )+ ']' ;
+ // ApplicabilityGrammar.g:45:1: config_applicability : ( 'CONFIGURATION' | 'CONFIGURATION NOT' ) '[' ( expressions )+ ']' ;
public final ApplicabilityGrammarParser.config_applicability_return config_applicability() throws RecognitionException {
ApplicabilityGrammarParser.config_applicability_return retval =
new ApplicabilityGrammarParser.config_applicability_return();
@@ -250,24 +257,36 @@ public class ApplicabilityGrammarParser extends Parser {
CommonTree root_0 = null;
- Token string_literal5 = null;
- Token char_literal7 = null;
- ApplicabilityGrammarParser.expressions_return expressions6 = null;
+ Token set5 = null;
+ Token char_literal6 = null;
+ Token char_literal8 = null;
+ ApplicabilityGrammarParser.expressions_return expressions7 = null;
- CommonTree string_literal5_tree = null;
- CommonTree char_literal7_tree = null;
+ CommonTree set5_tree = null;
+ CommonTree char_literal6_tree = null;
+ CommonTree char_literal8_tree = null;
try {
- // ApplicabilityGrammar.g:43:25: ( 'CONFIGURATION[' ( expressions )+ ']' )
- // ApplicabilityGrammar.g:43:27: 'CONFIGURATION[' ( expressions )+ ']'
+ // ApplicabilityGrammar.g:45:25: ( ( 'CONFIGURATION' | 'CONFIGURATION NOT' ) '[' ( expressions )+ ']' )
+ // ApplicabilityGrammar.g:45:27: ( 'CONFIGURATION' | 'CONFIGURATION NOT' ) '[' ( expressions )+ ']'
{
root_0 = (CommonTree) adaptor.nil();
- string_literal5 = (Token) match(input, 8, FOLLOW_8_in_config_applicability118);
- string_literal5_tree = (CommonTree) adaptor.create(string_literal5);
- adaptor.addChild(root_0, string_literal5_tree);
+ set5 = (Token) input.LT(1);
+ if ((input.LA(1) >= 9 && input.LA(1) <= 10)) {
+ input.consume();
+ adaptor.addChild(root_0, (CommonTree) adaptor.create(set5));
+ state.errorRecovery = false;
+ } else {
+ MismatchedSetException mse = new MismatchedSetException(null, input);
+ throw mse;
+ }
+
+ char_literal6 = (Token) match(input, 11, FOLLOW_11_in_config_applicability123);
+ char_literal6_tree = (CommonTree) adaptor.create(char_literal6);
+ adaptor.addChild(root_0, char_literal6_tree);
- // ApplicabilityGrammar.g:43:44: ( expressions )+
+ // ApplicabilityGrammar.g:45:68: ( expressions )+
int cnt2 = 0;
loop2: do {
int alt2 = 2;
@@ -279,14 +298,14 @@ public class ApplicabilityGrammarParser extends Parser {
switch (alt2) {
case 1:
- // ApplicabilityGrammar.g:43:44: expressions
+ // ApplicabilityGrammar.g:45:68: expressions
{
- pushFollow(FOLLOW_expressions_in_config_applicability120);
- expressions6 = expressions();
+ pushFollow(FOLLOW_expressions_in_config_applicability125);
+ expressions7 = expressions();
state._fsp--;
- adaptor.addChild(root_0, expressions6.getTree());
+ adaptor.addChild(root_0, expressions7.getTree());
}
break;
@@ -299,9 +318,9 @@ public class ApplicabilityGrammarParser extends Parser {
cnt2++;
} while (true);
- char_literal7 = (Token) match(input, 9, FOLLOW_9_in_config_applicability123);
- char_literal7_tree = (CommonTree) adaptor.create(char_literal7);
- adaptor.addChild(root_0, char_literal7_tree);
+ char_literal8 = (Token) match(input, 12, FOLLOW_12_in_config_applicability128);
+ char_literal8_tree = (CommonTree) adaptor.create(char_literal8);
+ adaptor.addChild(root_0, char_literal8_tree);
}
@@ -330,7 +349,7 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "feature_applicability"
- // ApplicabilityGrammar.g:45:1: feature_applicability : 'FEATURE[' ( expressions )+ ']' ;
+ // ApplicabilityGrammar.g:47:1: feature_applicability : 'FEATURE[' ( expressions )+ ']' ;
public final ApplicabilityGrammarParser.feature_applicability_return feature_applicability() throws RecognitionException {
ApplicabilityGrammarParser.feature_applicability_return retval =
new ApplicabilityGrammarParser.feature_applicability_return();
@@ -338,24 +357,24 @@ public class ApplicabilityGrammarParser extends Parser {
CommonTree root_0 = null;
- Token string_literal8 = null;
- Token char_literal10 = null;
- ApplicabilityGrammarParser.expressions_return expressions9 = null;
+ Token string_literal9 = null;
+ Token char_literal11 = null;
+ ApplicabilityGrammarParser.expressions_return expressions10 = null;
- CommonTree string_literal8_tree = null;
- CommonTree char_literal10_tree = null;
+ CommonTree string_literal9_tree = null;
+ CommonTree char_literal11_tree = null;
try {
- // ApplicabilityGrammar.g:45:25: ( 'FEATURE[' ( expressions )+ ']' )
- // ApplicabilityGrammar.g:45:27: 'FEATURE[' ( expressions )+ ']'
+ // ApplicabilityGrammar.g:47:25: ( 'FEATURE[' ( expressions )+ ']' )
+ // ApplicabilityGrammar.g:47:27: 'FEATURE[' ( expressions )+ ']'
{
root_0 = (CommonTree) adaptor.nil();
- string_literal8 = (Token) match(input, 10, FOLLOW_10_in_feature_applicability133);
- string_literal8_tree = (CommonTree) adaptor.create(string_literal8);
- adaptor.addChild(root_0, string_literal8_tree);
+ string_literal9 = (Token) match(input, 13, FOLLOW_13_in_feature_applicability138);
+ string_literal9_tree = (CommonTree) adaptor.create(string_literal9);
+ adaptor.addChild(root_0, string_literal9_tree);
- // ApplicabilityGrammar.g:45:38: ( expressions )+
+ // ApplicabilityGrammar.g:47:38: ( expressions )+
int cnt3 = 0;
loop3: do {
int alt3 = 2;
@@ -367,14 +386,14 @@ public class ApplicabilityGrammarParser extends Parser {
switch (alt3) {
case 1:
- // ApplicabilityGrammar.g:45:38: expressions
+ // ApplicabilityGrammar.g:47:38: expressions
{
- pushFollow(FOLLOW_expressions_in_feature_applicability135);
- expressions9 = expressions();
+ pushFollow(FOLLOW_expressions_in_feature_applicability140);
+ expressions10 = expressions();
state._fsp--;
- adaptor.addChild(root_0, expressions9.getTree());
+ adaptor.addChild(root_0, expressions10.getTree());
}
break;
@@ -387,9 +406,9 @@ public class ApplicabilityGrammarParser extends Parser {
cnt3++;
} while (true);
- char_literal10 = (Token) match(input, 9, FOLLOW_9_in_feature_applicability138);
- char_literal10_tree = (CommonTree) adaptor.create(char_literal10);
- adaptor.addChild(root_0, char_literal10_tree);
+ char_literal11 = (Token) match(input, 12, FOLLOW_12_in_feature_applicability143);
+ char_literal11_tree = (CommonTree) adaptor.create(char_literal11);
+ adaptor.addChild(root_0, char_literal11_tree);
}
@@ -418,27 +437,27 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "expressions"
- // ApplicabilityGrammar.g:47:1: expressions : ( ( operator )? expression ) ;
+ // ApplicabilityGrammar.g:49:1: expressions : ( ( operator )? expression ) ;
public final ApplicabilityGrammarParser.expressions_return expressions() throws RecognitionException {
ApplicabilityGrammarParser.expressions_return retval = new ApplicabilityGrammarParser.expressions_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- ApplicabilityGrammarParser.operator_return operator11 = null;
+ ApplicabilityGrammarParser.operator_return operator12 = null;
- ApplicabilityGrammarParser.expression_return expression12 = null;
+ ApplicabilityGrammarParser.expression_return expression13 = null;
try {
- // ApplicabilityGrammar.g:47:17: ( ( ( operator )? expression ) )
- // ApplicabilityGrammar.g:47:19: ( ( operator )? expression )
+ // ApplicabilityGrammar.g:49:17: ( ( ( operator )? expression ) )
+ // ApplicabilityGrammar.g:49:19: ( ( operator )? expression )
{
root_0 = (CommonTree) adaptor.nil();
- // ApplicabilityGrammar.g:47:19: ( ( operator )? expression )
- // ApplicabilityGrammar.g:47:20: ( operator )? expression
+ // ApplicabilityGrammar.g:49:19: ( ( operator )? expression )
+ // ApplicabilityGrammar.g:49:20: ( operator )? expression
{
- // ApplicabilityGrammar.g:47:20: ( operator )?
+ // ApplicabilityGrammar.g:49:20: ( operator )?
int alt4 = 2;
int LA4_0 = input.LA(1);
@@ -447,30 +466,30 @@ public class ApplicabilityGrammarParser extends Parser {
}
switch (alt4) {
case 1:
- // ApplicabilityGrammar.g:47:20: operator
+ // ApplicabilityGrammar.g:49:20: operator
{
- pushFollow(FOLLOW_operator_in_expressions152);
- operator11 = operator();
+ pushFollow(FOLLOW_operator_in_expressions157);
+ operator12 = operator();
state._fsp--;
- adaptor.addChild(root_0, operator11.getTree());
+ adaptor.addChild(root_0, operator12.getTree());
}
break;
}
- pushFollow(FOLLOW_expression_in_expressions155);
- expression12 = expression();
+ pushFollow(FOLLOW_expression_in_expressions160);
+ expression13 = expression();
state._fsp--;
- adaptor.addChild(root_0, expression12.getTree());
+ adaptor.addChild(root_0, expression13.getTree());
}
- operators.add((operator11 != null ? input.toString(operator11.start, operator11.stop) : null));
+ operators.add((operator12 != null ? input.toString(operator12.start, operator12.stop) : null));
}
@@ -499,52 +518,49 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "expression"
- // ApplicabilityGrammar.g:49:1: expression : ID ( '=' temp= val )? ;
+ // ApplicabilityGrammar.g:51:1: expression : ID ( '=' temp= val )? ;
public final ApplicabilityGrammarParser.expression_return expression() throws RecognitionException {
ApplicabilityGrammarParser.expression_return retval = new ApplicabilityGrammarParser.expression_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- Token ID13 = null;
- Token char_literal14 = null;
+ Token ID14 = null;
+ Token char_literal15 = null;
ApplicabilityGrammarParser.val_return temp = null;
- CommonTree ID13_tree = null;
- CommonTree char_literal14_tree = null;
+ CommonTree ID14_tree = null;
+ CommonTree char_literal15_tree = null;
try {
- // ApplicabilityGrammar.g:49:13: ( ID ( '=' temp= val )? )
- // ApplicabilityGrammar.g:49:15: ID ( '=' temp= val )?
+ // ApplicabilityGrammar.g:51:13: ( ID ( '=' temp= val )? )
+ // ApplicabilityGrammar.g:51:15: ID ( '=' temp= val )?
{
root_0 = (CommonTree) adaptor.nil();
- ID13 = (Token) match(input, ID, FOLLOW_ID_in_expression167);
- ID13_tree = (CommonTree) adaptor.create(ID13);
- adaptor.addChild(root_0, ID13_tree);
+ ID14 = (Token) match(input, ID, FOLLOW_ID_in_expression172);
+ ID14_tree = (CommonTree) adaptor.create(ID14);
+ adaptor.addChild(root_0, ID14_tree);
- id = (ID13 != null ? ID13.getText() : null);
- if (id != null) {
- id = id.trim();
- }
+ id = (ID14 != null ? ID14.getText() : null).trim();
id_values_map.put(id, new ArrayList<String>());
- // ApplicabilityGrammar.g:52:9: ( '=' temp= val )?
+ // ApplicabilityGrammar.g:54:9: ( '=' temp= val )?
int alt5 = 2;
int LA5_0 = input.LA(1);
- if ((LA5_0 == 11)) {
+ if ((LA5_0 == 14)) {
alt5 = 1;
}
switch (alt5) {
case 1:
- // ApplicabilityGrammar.g:52:10: '=' temp= val
+ // ApplicabilityGrammar.g:54:10: '=' temp= val
{
- char_literal14 = (Token) match(input, 11, FOLLOW_11_in_expression181);
- char_literal14_tree = (CommonTree) adaptor.create(char_literal14);
- adaptor.addChild(root_0, char_literal14_tree);
+ char_literal15 = (Token) match(input, 14, FOLLOW_14_in_expression186);
+ char_literal15_tree = (CommonTree) adaptor.create(char_literal15);
+ adaptor.addChild(root_0, char_literal15_tree);
- pushFollow(FOLLOW_val_in_expression185);
+ pushFollow(FOLLOW_val_in_expression190);
temp = val();
state._fsp--;
@@ -587,25 +603,25 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "val"
- // ApplicabilityGrammar.g:57:1: val : ( value | start_compound );
+ // ApplicabilityGrammar.g:59:1: val : ( value | start_compound );
public final ApplicabilityGrammarParser.val_return val() throws RecognitionException {
ApplicabilityGrammarParser.val_return retval = new ApplicabilityGrammarParser.val_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- ApplicabilityGrammarParser.value_return value15 = null;
+ ApplicabilityGrammarParser.value_return value16 = null;
- ApplicabilityGrammarParser.start_compound_return start_compound16 = null;
+ ApplicabilityGrammarParser.start_compound_return start_compound17 = null;
try {
- // ApplicabilityGrammar.g:57:7: ( value | start_compound )
+ // ApplicabilityGrammar.g:59:7: ( value | start_compound )
int alt6 = 2;
int LA6_0 = input.LA(1);
if (((LA6_0 >= ID && LA6_0 <= OR))) {
alt6 = 1;
- } else if ((LA6_0 == 12)) {
+ } else if ((LA6_0 == 15)) {
alt6 = 2;
} else {
NoViableAltException nvae = new NoViableAltException("", 6, 0, input);
@@ -614,30 +630,30 @@ public class ApplicabilityGrammarParser extends Parser {
}
switch (alt6) {
case 1:
- // ApplicabilityGrammar.g:57:10: value
+ // ApplicabilityGrammar.g:59:10: value
{
root_0 = (CommonTree) adaptor.nil();
- pushFollow(FOLLOW_value_in_val217);
- value15 = value();
+ pushFollow(FOLLOW_value_in_val222);
+ value16 = value();
state._fsp--;
- adaptor.addChild(root_0, value15.getTree());
+ adaptor.addChild(root_0, value16.getTree());
}
break;
case 2:
- // ApplicabilityGrammar.g:57:18: start_compound
+ // ApplicabilityGrammar.g:59:18: start_compound
{
root_0 = (CommonTree) adaptor.nil();
- pushFollow(FOLLOW_start_compound_in_val221);
- start_compound16 = start_compound();
+ pushFollow(FOLLOW_start_compound_in_val226);
+ start_compound17 = start_compound();
state._fsp--;
- adaptor.addChild(root_0, start_compound16.getTree());
+ adaptor.addChild(root_0, start_compound17.getTree());
}
break;
@@ -668,40 +684,40 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "start_compound"
- // ApplicabilityGrammar.g:59:1: start_compound : '(' compound_value ')' ;
+ // ApplicabilityGrammar.g:61:1: start_compound : '(' compound_value ')' ;
public final ApplicabilityGrammarParser.start_compound_return start_compound() throws RecognitionException {
ApplicabilityGrammarParser.start_compound_return retval = new ApplicabilityGrammarParser.start_compound_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- Token char_literal17 = null;
- Token char_literal19 = null;
- ApplicabilityGrammarParser.compound_value_return compound_value18 = null;
+ Token char_literal18 = null;
+ Token char_literal20 = null;
+ ApplicabilityGrammarParser.compound_value_return compound_value19 = null;
- CommonTree char_literal17_tree = null;
- CommonTree char_literal19_tree = null;
+ CommonTree char_literal18_tree = null;
+ CommonTree char_literal20_tree = null;
try {
- // ApplicabilityGrammar.g:59:18: ( '(' compound_value ')' )
- // ApplicabilityGrammar.g:59:20: '(' compound_value ')'
+ // ApplicabilityGrammar.g:61:18: ( '(' compound_value ')' )
+ // ApplicabilityGrammar.g:61:20: '(' compound_value ')'
{
root_0 = (CommonTree) adaptor.nil();
- char_literal17 = (Token) match(input, 12, FOLLOW_12_in_start_compound239);
- char_literal17_tree = (CommonTree) adaptor.create(char_literal17);
- adaptor.addChild(root_0, char_literal17_tree);
+ char_literal18 = (Token) match(input, 15, FOLLOW_15_in_start_compound244);
+ char_literal18_tree = (CommonTree) adaptor.create(char_literal18);
+ adaptor.addChild(root_0, char_literal18_tree);
id_values_map.get(id).add("(");
- pushFollow(FOLLOW_compound_value_in_start_compound254);
- compound_value18 = compound_value();
+ pushFollow(FOLLOW_compound_value_in_start_compound259);
+ compound_value19 = compound_value();
state._fsp--;
- adaptor.addChild(root_0, compound_value18.getTree());
- char_literal19 = (Token) match(input, 13, FOLLOW_13_in_start_compound265);
- char_literal19_tree = (CommonTree) adaptor.create(char_literal19);
- adaptor.addChild(root_0, char_literal19_tree);
+ adaptor.addChild(root_0, compound_value19.getTree());
+ char_literal20 = (Token) match(input, 16, FOLLOW_16_in_start_compound270);
+ char_literal20_tree = (CommonTree) adaptor.create(char_literal20);
+ adaptor.addChild(root_0, char_literal20_tree);
id_values_map.get(id).add(")");
@@ -732,25 +748,25 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "compound_value"
- // ApplicabilityGrammar.g:63:1: compound_value : ( ( value )+ | multiple_compounds );
+ // ApplicabilityGrammar.g:65:1: compound_value : ( ( value )+ | multiple_compounds );
public final ApplicabilityGrammarParser.compound_value_return compound_value() throws RecognitionException {
ApplicabilityGrammarParser.compound_value_return retval = new ApplicabilityGrammarParser.compound_value_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- ApplicabilityGrammarParser.value_return value20 = null;
+ ApplicabilityGrammarParser.value_return value21 = null;
- ApplicabilityGrammarParser.multiple_compounds_return multiple_compounds21 = null;
+ ApplicabilityGrammarParser.multiple_compounds_return multiple_compounds22 = null;
try {
- // ApplicabilityGrammar.g:63:18: ( ( value )+ | multiple_compounds )
+ // ApplicabilityGrammar.g:65:18: ( ( value )+ | multiple_compounds )
int alt8 = 2;
int LA8_0 = input.LA(1);
if (((LA8_0 >= ID && LA8_0 <= OR))) {
alt8 = 1;
- } else if ((LA8_0 == 12)) {
+ } else if ((LA8_0 == 15)) {
alt8 = 2;
} else {
NoViableAltException nvae = new NoViableAltException("", 8, 0, input);
@@ -759,11 +775,11 @@ public class ApplicabilityGrammarParser extends Parser {
}
switch (alt8) {
case 1:
- // ApplicabilityGrammar.g:63:20: ( value )+
+ // ApplicabilityGrammar.g:65:20: ( value )+
{
root_0 = (CommonTree) adaptor.nil();
- // ApplicabilityGrammar.g:63:20: ( value )+
+ // ApplicabilityGrammar.g:65:20: ( value )+
int cnt7 = 0;
loop7: do {
int alt7 = 2;
@@ -775,14 +791,14 @@ public class ApplicabilityGrammarParser extends Parser {
switch (alt7) {
case 1:
- // ApplicabilityGrammar.g:63:20: value
+ // ApplicabilityGrammar.g:65:20: value
{
- pushFollow(FOLLOW_value_in_compound_value277);
- value20 = value();
+ pushFollow(FOLLOW_value_in_compound_value282);
+ value21 = value();
state._fsp--;
- adaptor.addChild(root_0, value20.getTree());
+ adaptor.addChild(root_0, value21.getTree());
}
break;
@@ -798,16 +814,16 @@ public class ApplicabilityGrammarParser extends Parser {
}
break;
case 2:
- // ApplicabilityGrammar.g:63:29: multiple_compounds
+ // ApplicabilityGrammar.g:65:29: multiple_compounds
{
root_0 = (CommonTree) adaptor.nil();
- pushFollow(FOLLOW_multiple_compounds_in_compound_value282);
- multiple_compounds21 = multiple_compounds();
+ pushFollow(FOLLOW_multiple_compounds_in_compound_value287);
+ multiple_compounds22 = multiple_compounds();
state._fsp--;
- adaptor.addChild(root_0, multiple_compounds21.getTree());
+ adaptor.addChild(root_0, multiple_compounds22.getTree());
}
break;
@@ -838,7 +854,7 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "multiple_compounds"
- // ApplicabilityGrammar.g:65:1: multiple_compounds : start_compound operator compound_value ;
+ // ApplicabilityGrammar.g:67:1: multiple_compounds : start_compound operator compound_value ;
public final ApplicabilityGrammarParser.multiple_compounds_return multiple_compounds() throws RecognitionException {
ApplicabilityGrammarParser.multiple_compounds_return retval =
new ApplicabilityGrammarParser.multiple_compounds_return();
@@ -846,37 +862,37 @@ public class ApplicabilityGrammarParser extends Parser {
CommonTree root_0 = null;
- ApplicabilityGrammarParser.start_compound_return start_compound22 = null;
+ ApplicabilityGrammarParser.start_compound_return start_compound23 = null;
- ApplicabilityGrammarParser.operator_return operator23 = null;
+ ApplicabilityGrammarParser.operator_return operator24 = null;
- ApplicabilityGrammarParser.compound_value_return compound_value24 = null;
+ ApplicabilityGrammarParser.compound_value_return compound_value25 = null;
try {
- // ApplicabilityGrammar.g:65:22: ( start_compound operator compound_value )
- // ApplicabilityGrammar.g:65:24: start_compound operator compound_value
+ // ApplicabilityGrammar.g:67:22: ( start_compound operator compound_value )
+ // ApplicabilityGrammar.g:67:24: start_compound operator compound_value
{
root_0 = (CommonTree) adaptor.nil();
- pushFollow(FOLLOW_start_compound_in_multiple_compounds299);
- start_compound22 = start_compound();
+ pushFollow(FOLLOW_start_compound_in_multiple_compounds304);
+ start_compound23 = start_compound();
state._fsp--;
- adaptor.addChild(root_0, start_compound22.getTree());
- pushFollow(FOLLOW_operator_in_multiple_compounds311);
- operator23 = operator();
+ adaptor.addChild(root_0, start_compound23.getTree());
+ pushFollow(FOLLOW_operator_in_multiple_compounds316);
+ operator24 = operator();
state._fsp--;
- adaptor.addChild(root_0, operator23.getTree());
- id_values_map.get(id).add(input.toString(operator23.start, operator23.stop));
- pushFollow(FOLLOW_compound_value_in_multiple_compounds325);
- compound_value24 = compound_value();
+ adaptor.addChild(root_0, operator24.getTree());
+ id_values_map.get(id).add((operator24 != null ? input.toString(operator24.start, operator24.stop) : null));
+ pushFollow(FOLLOW_compound_value_in_multiple_compounds330);
+ compound_value25 = compound_value();
state._fsp--;
- adaptor.addChild(root_0, compound_value24.getTree());
+ adaptor.addChild(root_0, compound_value25.getTree());
}
@@ -905,25 +921,25 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "value"
- // ApplicabilityGrammar.g:69:1: value : (temp= operator )? ID ;
+ // ApplicabilityGrammar.g:71:1: value : (temp= operator )? ID ;
public final ApplicabilityGrammarParser.value_return value() throws RecognitionException {
ApplicabilityGrammarParser.value_return retval = new ApplicabilityGrammarParser.value_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- Token ID25 = null;
+ Token ID26 = null;
ApplicabilityGrammarParser.operator_return temp = null;
- CommonTree ID25_tree = null;
+ CommonTree ID26_tree = null;
try {
- // ApplicabilityGrammar.g:69:16: ( (temp= operator )? ID )
- // ApplicabilityGrammar.g:69:18: (temp= operator )? ID
+ // ApplicabilityGrammar.g:71:16: ( (temp= operator )? ID )
+ // ApplicabilityGrammar.g:71:18: (temp= operator )? ID
{
root_0 = (CommonTree) adaptor.nil();
- // ApplicabilityGrammar.g:69:22: (temp= operator )?
+ // ApplicabilityGrammar.g:71:22: (temp= operator )?
int alt9 = 2;
int LA9_0 = input.LA(1);
@@ -932,9 +948,9 @@ public class ApplicabilityGrammarParser extends Parser {
}
switch (alt9) {
case 1:
- // ApplicabilityGrammar.g:69:22: temp= operator
+ // ApplicabilityGrammar.g:71:22: temp= operator
{
- pushFollow(FOLLOW_operator_in_value344);
+ pushFollow(FOLLOW_operator_in_value349);
temp = operator();
state._fsp--;
@@ -946,17 +962,13 @@ public class ApplicabilityGrammarParser extends Parser {
}
- ID25 = (Token) match(input, ID, FOLLOW_ID_in_value347);
- ID25_tree = (CommonTree) adaptor.create(ID25);
- adaptor.addChild(root_0, ID25_tree);
+ ID26 = (Token) match(input, ID, FOLLOW_ID_in_value352);
+ ID26_tree = (CommonTree) adaptor.create(ID26);
+ adaptor.addChild(root_0, ID26_tree);
if ((temp != null ? input.toString(temp.start, temp.stop) : null) != null) id_values_map.get(id).add(
(temp != null ? input.toString(temp.start, temp.stop) : null));
- String id25 = (ID25 != null ? ID25.getText() : null);
- if (id25 != null) {
- id25 = id25.trim();
- }
- id_values_map.get(id).add(id25);
+ id_values_map.get(id).add((ID26 != null ? ID26.getText() : null).trim());
}
@@ -985,27 +997,27 @@ public class ApplicabilityGrammarParser extends Parser {
};
// $ANTLR start "operator"
- // ApplicabilityGrammar.g:75:1: operator : ( AND | OR );
+ // ApplicabilityGrammar.g:77:1: operator : ( AND | OR );
public final ApplicabilityGrammarParser.operator_return operator() throws RecognitionException {
ApplicabilityGrammarParser.operator_return retval = new ApplicabilityGrammarParser.operator_return();
retval.start = input.LT(1);
CommonTree root_0 = null;
- Token set26 = null;
+ Token set27 = null;
- CommonTree set26_tree = null;
+ CommonTree set27_tree = null;
try {
- // ApplicabilityGrammar.g:75:14: ( AND | OR )
+ // ApplicabilityGrammar.g:77:14: ( AND | OR )
// ApplicabilityGrammar.g:
{
root_0 = (CommonTree) adaptor.nil();
- set26 = (Token) input.LT(1);
+ set27 = (Token) input.LT(1);
if ((input.LA(1) >= AND && input.LA(1) <= OR)) {
input.consume();
- adaptor.addChild(root_0, (CommonTree) adaptor.create(set26));
+ adaptor.addChild(root_0, (CommonTree) adaptor.create(set27));
state.errorRecovery = false;
} else {
MismatchedSetException mse = new MismatchedSetException(null, input);
@@ -1038,34 +1050,35 @@ public class ApplicabilityGrammarParser extends Parser {
new BitSet(new long[] {0x0000000000000002L});
public static final BitSet FOLLOW_feature_applicability_in_applicability95 =
new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_8_in_config_applicability118 = new BitSet(new long[] {0x0000000000000070L});
- public static final BitSet FOLLOW_expressions_in_config_applicability120 =
- new BitSet(new long[] {0x0000000000000270L});
- public static final BitSet FOLLOW_9_in_config_applicability123 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_10_in_feature_applicability133 = new BitSet(new long[] {0x0000000000000070L});
- public static final BitSet FOLLOW_expressions_in_feature_applicability135 =
- new BitSet(new long[] {0x0000000000000270L});
- public static final BitSet FOLLOW_9_in_feature_applicability138 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_operator_in_expressions152 = new BitSet(new long[] {0x0000000000000070L});
- public static final BitSet FOLLOW_expression_in_expressions155 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_expression167 = new BitSet(new long[] {0x0000000000000802L});
- public static final BitSet FOLLOW_11_in_expression181 = new BitSet(new long[] {0x0000000000001070L});
- public static final BitSet FOLLOW_val_in_expression185 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_value_in_val217 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_start_compound_in_val221 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_12_in_start_compound239 = new BitSet(new long[] {0x0000000000001070L});
- public static final BitSet FOLLOW_compound_value_in_start_compound254 = new BitSet(new long[] {0x0000000000002000L});
- public static final BitSet FOLLOW_13_in_start_compound265 = new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_value_in_compound_value277 = new BitSet(new long[] {0x0000000000000072L});
- public static final BitSet FOLLOW_multiple_compounds_in_compound_value282 =
+ public static final BitSet FOLLOW_set_in_config_applicability118 = new BitSet(new long[] {0x0000000000000800L});
+ public static final BitSet FOLLOW_11_in_config_applicability123 = new BitSet(new long[] {0x0000000000000070L});
+ public static final BitSet FOLLOW_expressions_in_config_applicability125 =
+ new BitSet(new long[] {0x0000000000001070L});
+ public static final BitSet FOLLOW_12_in_config_applicability128 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_13_in_feature_applicability138 = new BitSet(new long[] {0x0000000000000070L});
+ public static final BitSet FOLLOW_expressions_in_feature_applicability140 =
+ new BitSet(new long[] {0x0000000000001070L});
+ public static final BitSet FOLLOW_12_in_feature_applicability143 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_operator_in_expressions157 = new BitSet(new long[] {0x0000000000000070L});
+ public static final BitSet FOLLOW_expression_in_expressions160 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_ID_in_expression172 = new BitSet(new long[] {0x0000000000004002L});
+ public static final BitSet FOLLOW_14_in_expression186 = new BitSet(new long[] {0x0000000000008070L});
+ public static final BitSet FOLLOW_val_in_expression190 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_value_in_val222 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_start_compound_in_val226 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_15_in_start_compound244 = new BitSet(new long[] {0x0000000000008070L});
+ public static final BitSet FOLLOW_compound_value_in_start_compound259 = new BitSet(new long[] {0x0000000000010000L});
+ public static final BitSet FOLLOW_16_in_start_compound270 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_value_in_compound_value282 = new BitSet(new long[] {0x0000000000000072L});
+ public static final BitSet FOLLOW_multiple_compounds_in_compound_value287 =
new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_start_compound_in_multiple_compounds299 =
+ public static final BitSet FOLLOW_start_compound_in_multiple_compounds304 =
new BitSet(new long[] {0x0000000000000060L});
- public static final BitSet FOLLOW_operator_in_multiple_compounds311 = new BitSet(new long[] {0x0000000000001070L});
- public static final BitSet FOLLOW_compound_value_in_multiple_compounds325 =
+ public static final BitSet FOLLOW_operator_in_multiple_compounds316 = new BitSet(new long[] {0x0000000000008070L});
+ public static final BitSet FOLLOW_compound_value_in_multiple_compounds330 =
new BitSet(new long[] {0x0000000000000002L});
- public static final BitSet FOLLOW_operator_in_value344 = new BitSet(new long[] {0x0000000000000010L});
- public static final BitSet FOLLOW_ID_in_value347 = new BitSet(new long[] {0x0000000000000002L});
+ public static final BitSet FOLLOW_operator_in_value349 = new BitSet(new long[] {0x0000000000000010L});
+ public static final BitSet FOLLOW_ID_in_value352 = new BitSet(new long[] {0x0000000000000002L});
public static final BitSet FOLLOW_set_in_operator0 = new BitSet(new long[] {0x0000000000000002L});
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java
index 52998db8557..63a8ad95561 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java
@@ -16,6 +16,7 @@ import java.util.ArrayList;
public class ApplicabilityBlock {
public enum ApplicabilityType {
Configuration,
+ NotConfiguration,
Feature
};
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.g b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.g
index 15268ce8468..efe954ebfb7 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.g
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.g
@@ -8,6 +8,8 @@ output=AST;
// START:members
@header {
+package org.eclipse.osee.framework.core.grammar;
+
import java.util.HashMap;
import java.util.Arrays;
import java.util.Collections;
@@ -40,7 +42,7 @@ start : applicability EOF! { operators.removeAll(Collections.s
applicability : config_applicability { applicabilityType="Config"; }
| feature_applicability { applicabilityType="Feature"; } ;
-config_applicability : 'CONFIGURATION[' expressions+ ']';
+config_applicability : ('CONFIGURATION'|'CONFIGURATION NOT')'[' expressions+ ']';
feature_applicability : 'FEATURE[' expressions+ ']' ;
@@ -75,6 +77,7 @@ value : temp=operator? ID {
operator : AND | OR;
OR : '|';
AND : '&';
+NOT : 'NOT';
ID : ('a'..'z'|'A'..'Z')('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|' ')* ;
WS : (' '|'\r'|'\t'|'\n')+ {$channel=HIDDEN;};
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.tokens b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.tokens
new file mode 100644
index 00000000000..0bae9b283d6
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityGrammar.tokens
@@ -0,0 +1,21 @@
+T__9=9
+OR=6
+NOT=7
+T__15=15
+T__16=16
+AND=5
+T__11=11
+T__12=12
+T__13=13
+T__14=14
+ID=4
+WS=8
+T__10=10
+']'=12
+'='=14
+'['=11
+'CONFIGURATION'=9
+')'=16
+'('=15
+'CONFIGURATION NOT'=10
+'FEATURE['=13
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/readMe.txt b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/readMe.txt
index 64e6b6f94b8..d6cba655048 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/readMe.txt
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/readMe.txt
@@ -1,13 +1,13 @@
How to make updates to the grammar:
1. Edit ApplicabilityGrammar.g
-2. Go to your git workspace into org.eclipse.osee/plugs/org.eclipse.osee.gramework.core/src/org/eclipse/osee/framework/core/grammar
+2. Go to your git workspace into org.eclipse.osee/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar
3. In command line: java -jar antlr-3.2.jar ApplicabilityGrammar.g
this generates new ApplicabilityGrammarLexer.java & ApplicabilityGramarParser.java
4. Add to top of generated files: package org.eclipse.osee.framework.core.grammar;
5. Move generated files under the src-gen folder under org.eclipse.osee.framework.core.grammar
-Note: The error below occurs with Antlr 3.2 on any java version higher than 8. Ignore the error becuase the grammar still generated the files correctly.
+Note: The error below occurs with Antlr 3.2 on any java version higher than 8. Ignore the error because the grammar still generated the files correctly.
error(10): internal error: Can't get property indirectDelegates using method get/isIndirectDelegates from org.antlr.tool.Grammar instance : java.lang.NullPointerException
java.util.Objects.requireNonNull(Unknown Source)
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java
index 3706fce3283..890d351919c 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java
@@ -55,24 +55,17 @@ public class WordCoreUtil {
"F" + WORD_ML_TAGS + "e" + WORD_ML_TAGS + "a" + WORD_ML_TAGS + "t" + WORD_ML_TAGS + "u" + WORD_ML_TAGS + "r" + WORD_ML_TAGS + "e";
public static String CONFIG =
"C" + WORD_ML_TAGS + "o" + WORD_ML_TAGS + "n" + WORD_ML_TAGS + "f" + WORD_ML_TAGS + "i" + WORD_ML_TAGS + "g" + WORD_ML_TAGS + "u" + WORD_ML_TAGS + "r" + WORD_ML_TAGS + "a" + WORD_ML_TAGS + "t" + WORD_ML_TAGS + "i" + WORD_ML_TAGS + "o" + WORD_ML_TAGS + "n";
+ public static String NOT = "N" + WORD_ML_TAGS + "o" + WORD_ML_TAGS + "t";
public static String ENDBRACKETS = WORD_ML_TAGS + " ?(\\[(.*?)\\]) ?";
public static String OPTIONAL_ENDBRACKETS = " ?(" + WORD_ML_TAGS + "(\\[.*?\\]))?";
public static String BEGINFEATURE = FEATURE + WORD_ML_TAGS + " ?" + ENDBRACKETS;
public static String ENDFEATURE = END + WORD_ML_TAGS + FEATURE + OPTIONAL_ENDBRACKETS;
- public static String BEGINCONFIG = CONFIG + WORD_ML_TAGS + " ?" + ENDBRACKETS;
+ public static String BEGINCONFIG =
+ CONFIG + WORD_ML_TAGS + "( " + WORD_ML_TAGS + NOT + WORD_ML_TAGS + ")? ?" + ENDBRACKETS;
public static String ENDCONFIG = END + WORD_ML_TAGS + CONFIG + OPTIONAL_ENDBRACKETS;
public static String ELSE_EXP = "(" + FEATURE + "|" + CONFIG + ")" + " " + ELSE;
- public static String LOGICAL_STRING = WORD_ML_TAGS + " ?(LM|ID).*?";
-
- public static Pattern LOGICAL_PATTERN =
- Pattern.compile(LOGICAL_STRING, Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.MULTILINE);
-
- public static Pattern FEATURE_CONFIG_PATTERN =
- Pattern.compile("(" + BEGINFEATURE + "(.*?)" + ENDFEATURE + ")|(" + BEGINCONFIG + "(.*?)" + ENDCONFIG + ")",
- Pattern.DOTALL | Pattern.MULTILINE);
-
public static Pattern ELSE_PATTERN = Pattern.compile(ELSE_EXP, Pattern.DOTALL | Pattern.MULTILINE);
public static String BIN_DATA_STRING = "<w:binData.*?w:name=\"(.*?)\".*?</w:binData>";
@@ -84,10 +77,6 @@ public class WordCoreUtil {
public static Pattern FULL_PATTERN =
Pattern.compile("(" + BEGINFEATURE + ")|(" + ENDFEATURE + ")|(" + BEGINCONFIG + ")|(" + ENDCONFIG + ")",
Pattern.DOTALL | Pattern.MULTILINE);
- public static Pattern START_PATTERN =
- Pattern.compile("(" + BEGINFEATURE + ") | (" + BEGINCONFIG + ")", Pattern.DOTALL | Pattern.MULTILINE);
- public static Pattern END_PATTERN =
- Pattern.compile("(" + ENDFEATURE + ") | (" + ENDCONFIG + ")", Pattern.DOTALL | Pattern.MULTILINE);
public static String EMPTY_LIST_REGEX =
"<w:p wsp:rsidP=\"[^\"]*?\" wsp:rsidR=\"[^\"]*?\" wsp:rsidRDefault=\"[^\"]*?\"><w:pPr><w:pStyle w:val=\"[^\"]*?\"></w:pStyle><w:listPr><wx:t wx:val=\"([^>]*?)\"></wx:t><wx:font wx:val=\"[^\"]*?\"></wx:font></w:listPr></w:pPr><w:r><w:t></w:t></w:r></w:p>";
@@ -126,7 +115,7 @@ public class WordCoreUtil {
String beginConfiguration = matcher.group(26) != null ? WordCoreUtil.textOnly(matcher.group(26)) : null;
String endFeature = matcher.group(12) != null ? WordCoreUtil.textOnly(matcher.group(12)) : null;
- String endConfiguration = matcher.group(43) != null ? WordCoreUtil.textOnly(matcher.group(43)) : null;
+ String endConfiguration = matcher.group(48) != null ? WordCoreUtil.textOnly(matcher.group(48)) : null;
if (beginFeature != null && beginFeature.toLowerCase().contains(FEATUREAPP)) {
applicBlockCount += 1;
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ApplicabilityQueryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ApplicabilityQueryImpl.java
index f18cdd86426..be9d9c7514a 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ApplicabilityQueryImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ApplicabilityQueryImpl.java
@@ -107,18 +107,19 @@ public class ApplicabilityQueryImpl implements ApplicabilityQuery {
}
@Override
- public Map<String, List<String>> getBranchViewFeatureValues(BranchId branch, ArtifactId viewId) {
- Map<String, List<String>> toReturn = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
- List<ApplicabilityToken> result = getViewApplicabilityTokens(viewId, branch);
-
- for (ApplicabilityToken app : result) {
- if (!app.getName().equalsIgnoreCase("Base") && !app.getName().contains("|") && !app.getName().contains("&")) {
- String[] values = app.getName().split("=");
-
- // This will not return Excluded Configurations
- if (values.length <= 2) {
- String name = values[0].trim();
- String value = values[1].trim();
+ public Map<String, List<String>> getNamedViewApplicabilityMap(BranchId branch, ArtifactId viewId) {
+ Map<String, List<String>> toReturn = new TreeMap<>();
+ List<ApplicabilityToken> appTokens = getViewApplicabilityTokens(viewId, branch);
+
+ for (ApplicabilityToken app : appTokens) {
+ // Ignore features with |s and &s, Ignore the configuration name
+ if (!app.getName().equalsIgnoreCase("Base") && !app.getName().contains("|") && !app.getName().contains(
+ "&") && !app.getName().toLowerCase().contains("config")) {
+ String[] split = app.getName().split("=");
+
+ if (split.length == 2) {
+ String name = split[0].trim();
+ String value = split[1].trim();
if (toReturn.containsKey(name)) {
List<String> list = new ArrayList<>();
diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/ApplicabilityQuery.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/ApplicabilityQuery.java
index 7cf6dec6cb8..94de765e4f4 100644
--- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/ApplicabilityQuery.java
+++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/search/ApplicabilityQuery.java
@@ -39,7 +39,7 @@ public interface ApplicabilityQuery {
List<ApplicabilityToken> getViewApplicabilityTokens(ArtifactId artId, BranchId branch);
- Map<String, List<String>> getBranchViewFeatureValues(BranchId branch, ArtifactId viewId);
+ Map<String, List<String>> getNamedViewApplicabilityMap(BranchId branch, ArtifactId viewId);
List<BranchViewData> getViews();
} \ No newline at end of file

Back to the top