Author: pkluegl
Date: Wed Apr  9 11:17:45 2014
New Revision: 1585934

URL: http://svn.apache.org/r1585934
Log:
UIMA-3728
- fixed path to type system of imported script in language checker

Modified:
    
uima/ruta/trunk/ruta-ep-ide-ui/src/main/java/org/apache/uima/ruta/ide/validator/LanguageCheckerVisitor.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=1585934&r1=1585933&r2=1585934&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
 Wed Apr  9 11:17:45 2014
@@ -83,6 +83,7 @@ import org.apache.uima.util.InvalidXMLEx
 import org.apache.uima.util.XMLInputSource;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.dltk.ast.ASTListNode;
@@ -254,8 +255,13 @@ public class LanguageCheckerVisitor exte
           if (file == null && url == null) {
             pr.reportProblem(problemFactory.createFileNotFoundProblem(sRef, 
localPath));
           } else {
+            IProject referredProject 
=sourceModule.getScriptProject().getProject();
+            if(file != null) {
+              // script in other project? use that if the file was found in 
the workspace
+              referredProject = file.getProject();
+            }
             IPath typeSystemDescriptorPath = 
RutaProjectUtils.getTypeSystemDescriptorPath(
-                    file.getLocation(), 
sourceModule.getScriptProject().getProject());
+                    file.getLocation(), referredProject);
             TypeSystemDescription tsDesc = 
importCompleteTypeSystem(typeSystemDescriptorPath, url);
 
             List<String> checkDuplicateShortNames = 
checkOnAmbiguousShortNames(tsDesc);


Reply via email to