You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/08/29 15:58:27 UTC

svn commit: r1518651 - /uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java

Author: pkluegl
Date: Thu Aug 29 13:58:26 2013
New Revision: 1518651

URL: http://svn.apache.org/r1518651
Log:
UIMA-3227
- fixed duplicate types problem reporter, just switched checks because there is a return. This means that there is no warning about equal short names now, as it should be

Modified:
    uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java

Modified: uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java?rev=1518651&r1=1518650&r2=1518651&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/RutaTypeChecker.java Thu Aug 29 13:58:26 2013
@@ -228,18 +228,18 @@ public class RutaTypeChecker implements 
       // }
       if (s instanceof RutaTypeDeclaration) {
         RutaTypeDeclaration newType = (RutaTypeDeclaration) s;
-        if (reportWarningOnShortNames && shortTypes.contains(newType.getName())) {
-          IProblem problem = problemFactory.createDuplicateShortName(newType,
-                  ProblemSeverity.WARNING);
-          rep.reportProblem(problem);
-          return false;
-        }
         String longName = getLongLocalName(newType.getName());
         if (completeTypes.contains(longName)) {
           IProblem problem = problemFactory.createIdConflictsWithTypeProblem(newType);
           rep.reportProblem(problem);
           return false;
         }
+        if (reportWarningOnShortNames && shortTypes.contains(newType.getName())) {
+          IProblem problem = problemFactory.createDuplicateShortName(newType,
+                  ProblemSeverity.WARNING);
+          rep.reportProblem(problem);
+          return false;
+        }
         if (typeVariables.contains(newType.getName()) || otherVariables.contains(newType.getName())) {
           IProblem problem = problemFactory.createIdConflictsWithVariableProblem(newType);
           rep.reportProblem(problem);