X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java index 7da54c2..1156dee 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPSourceViewerConfiguration.java @@ -371,7 +371,12 @@ public class PHPSourceViewerConfiguration extends SourceViewerConfiguration { * Method declared on SourceViewerConfiguration */ public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) { - IFile f = ((IFileEditorInput) fEditor.getEditorInput()).getFile(); - return new PHPTextHover(f.getProject()); + try { + IFile f = ((IFileEditorInput) fEditor.getEditorInput()).getFile(); + return new PHPTextHover(f.getProject()); + } catch (NullPointerException e) { + // this exception occurs, if getTextHover is called by preference pages ! + } + return new PHPTextHover(null); } }