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 org.eclipse.jface.text.IRegion;
14 import org.eclipse.jface.text.ITextViewer;
16 import org.eclipse.ui.IEditorPart;
18 import net.sourceforge.phpdt.ui.text.java.hover.IJavaEditorTextHover;
21 public class JavaTypeHover implements IJavaEditorTextHover {
23 private IJavaEditorTextHover fAnnotationHover;
24 //private IJavaEditorTextHover fJavadocHover;
26 public JavaTypeHover() {
27 fAnnotationHover= new AnnotationHover();
28 // fJavadocHover= new JavadocHover();
32 * @see IJavaEditorTextHover#setEditor(IEditorPart)
34 public void setEditor(IEditorPart editor) {
35 fAnnotationHover.setEditor(editor);
36 // fJavadocHover.setEditor(editor);
40 * @see ITextHover#getHoverRegion(ITextViewer, int)
42 public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
43 //return fJavadocHover.getHoverRegion(textViewer, offset);
48 * @see ITextHover#getHoverInfo(ITextViewer, IRegion)
50 public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
51 String hoverInfo= fAnnotationHover.getHoverInfo(textViewer, hoverRegion);
52 if (hoverInfo != null)
55 //return fJavadocHover.getHoverInfo(textViewer, hoverRegion);