* 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);
}
}