1 package net.sourceforge.phpeclipse.phpeditor;
3 /**********************************************************************
4 Copyright (c) 2000, 2002 IBM Corp. and others.
5 All rights reserved. This program and the accompanying materials
6 are made available under the terms of the Common Public License v1.0
7 which accompanies this distribution, and is available at
8 http://www.eclipse.org/legal/cpl-v10.html
11 IBM Corporation - Initial implementation
12 Klaus Hartlage - www.eclipseproject.de
13 **********************************************************************/
15 import org.eclipse.jface.text.BadLocationException;
16 import org.eclipse.jface.text.IDocument;
17 import org.eclipse.jface.text.IRegion;
18 import org.eclipse.jface.text.source.IAnnotationHover;
19 import org.eclipse.jface.text.source.ISourceViewer;
22 * The JavaAnnotationHover provides the hover support for java editors.
25 public class PHPAnnotationHover implements IAnnotationHover {
28 * Method declared on IAnnotationHover
30 public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
31 IDocument document= sourceViewer.getDocument();
34 IRegion info= document.getLineInformation(lineNumber);
35 return document.get(info.getOffset(), info.getLength());
36 } catch (BadLocationException x) {