* Contributors:
* Christopher Lenz - initial API and implementation
*
- * $Id: XMLAnnotationHover.java,v 1.1 2004-09-02 18:28:03 jsurfer Exp $
+ * $Id: XMLAnnotationHover.java,v 1.2 2006-10-21 23:14:13 pombredanne Exp $
*/
package net.sourceforge.phpeclipse.xml.ui.internal.text;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.ISourceViewer;
-
/**
* Implements simple annotation hover to show the associated messages.
*/
public class XMLAnnotationHover implements IAnnotationHover {
/*
- * @see org.eclipse.jface.text.source.IAnnotationHover#getHoverInfo(org.eclipse.jface.text.source.ISourceViewer, int)
+ * @see org.eclipse.jface.text.source.IAnnotationHover#getHoverInfo(org.eclipse.jface.text.source.ISourceViewer,
+ * int)
*/
public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
List annotations = getAnnotationsForLine(sourceViewer, lineNumber);
StringBuffer buffer = new StringBuffer();
Iterator e = messages.iterator();
- while (e.hasNext()) {
+ while (e.hasNext()) {
buffer.append("- "); //$NON-NLS-1$
buffer.append(e.next());
buffer.append('\n');
Position position = model.getPosition(a);
if (position != null) {
try {
- int annotationLine = document
- .getLineOfOffset(position.getOffset());
+ int annotationLine = document.getLineOfOffset(position
+ .getOffset());
if (annotationLine == line) {
retVal.add(a);
}