Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java b/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java
deleted file mode 100644
index 31b525eeed9..00000000000
--- a/org.eclipse.ui.examples.javaeditor/Eclipse Java Editor Example/org/eclipse/ui/examples/javaeditor/JavaTextHover.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.examples.javaeditor;
-
-
-import org.eclipse.jface.text.*;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * Example implementation for an <code>ITextHover</code> which hovers over Java code.
- */
-public class JavaTextHover implements ITextHover {
-
- /* (non-Javadoc)
- * Method declared on ITextHover
- */
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- if (hoverRegion != null) {
- try {
- if (hoverRegion.getLength() > -1)
- return textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
- } catch (BadLocationException x) {
- }
- }
- return JavaEditorMessages.getString("JavaTextHover.emptySelection"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * Method declared on ITextHover
- */
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- Point selection= textViewer.getSelectedRange();
- if (selection.x <= offset && offset < selection.x + selection.y)
- return new Region(selection.x, selection.y);
- return new Region(offset, 0);
- }
-}

Back to the top