Author: rob
Date: Mon Nov 29 13:46:45 2010
New Revision: 24915
URL: https://svn.nixos.org/websvn/nix/?rev=24915&sc=1

Log:
nix-eclipse: add fallback for import resolving

Modified:
   nix-eclipse/trunk/org.nix.editor/trans/nix.str

Modified: nix-eclipse/trunk/org.nix.editor/trans/nix.str
==============================================================================
--- nix-eclipse/trunk/org.nix.editor/trans/nix.str      Mon Nov 29 11:13:03 
2010        (r24914)
+++ nix-eclipse/trunk/org.nix.editor/trans/nix.str      Mon Nov 29 13:46:45 
2010        (r24915)
@@ -19,8 +19,11 @@
     with
       filename := <guarantee-extension(|"decorated.aterm")> path
 
-rules // import resolving  
-  editor-resolve :     
+rules // import resolving
+  
+  editor-resolve = editor-resolve-decl <+ editor-resolve-path <+ 
editor-resolve-fallback  
+    
+  editor-resolve-decl :        
        (selected, position, ast, path, project-path) -> target
        where 
          ast2 := <DecoratedAst>ast; 
@@ -29,11 +32,16 @@
   decl-of : Var(x) -> <VarDef>x     
   //decl-of : Id(x) -> <VarDef>x     
        
-  editor-resolve :
+  editor-resolve-path :
     (Path(p), position, ast, path, project-path) -> <parse-file> file
-    with
+    where
       file := <resolve-import-path(|path)> p
 
+  editor-resolve-fallback :
+    (t, position, ast, path, project-path) -> <parse-file> file
+    where
+      <oncetd(?Path(p))>t ; file := <resolve-import-path(|path)> p
+
   resolve-path(|basepath) =
        ?p
   ; if <is-abspath>p then 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to