updated build.xml
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / PHPTextHover.java
index 7be2787..7ce2ef1 100644 (file)
@@ -70,7 +70,8 @@ public class PHPTextHover implements ITextHover {
             // elbuffer.getHoverText());
             //            }
           }
-          String hoverInfo = (String) functionDescriptions.get(word);
+          String hoverInfo = 
+            (String) functionDescriptions.get(word);
           if (hoverInfo == null && fProject != null) {
             // get the possible PHPDoc information from the index file
             IdentifierIndexManager indexManager = PHPeclipsePlugin.getDefault()
@@ -82,8 +83,14 @@ public class PHPTextHover implements ITextHover {
                 String filename;
                 FileReader phpdocFileReader;
                 StringBuffer hoverInfoBuffer = new StringBuffer();
-                String workspaceLocation = PHPeclipsePlugin.getWorkspace()
-                    .getRoot().getLocation().toString();
+                String workspaceLocation;
+                if (fProject!=null) {
+                  workspaceLocation = fProject.getLocation().toString()+'/';
+                } else {
+                  // should never happen?
+                  workspaceLocation = PHPeclipsePlugin.getWorkspace()
+                  .getRoot().getLocation().toString();
+                }
                 //                boolean foundPHPdoc = false;
                 for (int i = 0; i < list.size(); i++) {
                   location = (PHPIdentifierLocation) list.get(i);