Author: pkluegl
Date: Sat Dec 29 22:16:37 2018
New Revision: 1849943

URL: http://svn.apache.org/viewvc?rev=1849943&view=rev
Log:
UIMA-5915: fallback on type of variable for checking valid feature match 
combination

Modified:
    
uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
    
uima/ruta/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java

Modified: 
uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
URL: 
http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java?rev=1849943&r1=1849942&r2=1849943&view=diff
==============================================================================
--- 
uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
 (original)
+++ 
uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.java
 Sat Dec 29 22:16:37 2018
@@ -942,6 +942,8 @@ public class LanguageCheckerVisitor exte
           kind = RutaTypeConstants.RUTA_TYPE_S;
         } else if (fme.getValue() instanceof NumericLiteral) {
           kind = RutaTypeConstants.RUTA_TYPE_N;
+        } else if (fme.getValue() instanceof RutaVariableReference) {
+          kind = ((RutaVariableReference) fme.getValue()).getType();
         } else if (fme.getValue() instanceof RutaFunction) {
           // check on function deactivates, requires correct parsing of AST 
with external factory
           kind = -1;

Modified: 
uima/ruta/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java
URL: 
http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java?rev=1849943&r1=1849942&r2=1849943&view=diff
==============================================================================
--- 
uima/ruta/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java
 (original)
+++ 
uima/ruta/trunk/ruta-ep-ide/src/main/java/org/apache/uima/ruta/ide/parser/ast/ExpressionFactory.java
 Sat Dec 29 22:16:37 2018
@@ -145,6 +145,14 @@ public class ExpressionFactory extends A
     return newVariableReference(atRef, RutaTypeConstants.RUTA_TYPE_AT);
   }
 
+  public static VariableReference createAnnotationVariableReference(Token 
atRef) {
+    return newVariableReference(atRef, RutaTypeConstants.RUTA_TYPE_UA);
+  }
+
+  public static VariableReference createAnnotationListVariableReference(Token 
atRef) {
+    return newVariableReference(atRef, RutaTypeConstants.RUTA_TYPE_UAL);
+  }
+
   public static Expression createAnnotationTypeConstantReference(Token 
atBasic) {
     int bounds[] = getBounds(atBasic);
     return new RutaVariableReference(bounds[0], bounds[1], atBasic.getText(),


Reply via email to