1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.ui.text.java.hover;
13 import net.sourceforge.phpdt.ui.text.java.hover.IJavaEditorTextHover;
15 import org.eclipse.jface.text.IRegion;
16 import org.eclipse.jface.text.ITextViewer;
17 import org.eclipse.ui.IEditorPart;
20 public class JavaTypeHover implements IJavaEditorTextHover {
22 private IJavaEditorTextHover fAnnotationHover;
23 //private IJavaEditorTextHover fJavadocHover;
25 public JavaTypeHover() {
26 fAnnotationHover= new AnnotationHover();
27 // fJavadocHover= new JavadocHover();
31 * @see IJavaEditorTextHover#setEditor(IEditorPart)
33 public void setEditor(IEditorPart editor) {
34 fAnnotationHover.setEditor(editor);
35 // fJavadocHover.setEditor(editor);
39 * @see ITextHover#getHoverRegion(ITextViewer, int)
41 public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
42 //return fJavadocHover.getHoverRegion(textViewer, offset);
47 * @see ITextHover#getHoverInfo(ITextViewer, IRegion)
49 public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
50 String hoverInfo= fAnnotationHover.getHoverInfo(textViewer, hoverRegion);
51 if (hoverInfo != null)
54 //return fJavadocHover.getHoverInfo(textViewer, hoverRegion);