import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+
import net.sourceforge.phpdt.internal.corext.phpdoc.PHPDocUtil;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
import net.sourceforge.phpeclipse.builder.PHPIdentifierLocation;
import net.sourceforge.phpeclipse.phpeditor.php.PHPElement;
import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.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()
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);