org.eclipse.jface.text.ITextHoverExtension2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spotless-ext-greclipse Show documentation
Show all versions of spotless-ext-greclipse Show documentation
Groovy Eclipse's formatter bundled for Spotless
The newest version!
/*******************************************************************************
* Copyright (c) 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jface.text;
/**
* Extension interface for {@link org.eclipse.jface.text.ITextHover}.
*
* Provides a way for hovers to return hover-specific information objects.
*
*
* @see org.eclipse.jface.text.ITextHover
* @since 3.4
*/
public interface ITextHoverExtension2 {
/**
* Returns the information which should be presented when a hover popup is shown
* for the specified hover region. The hover region has the same semantics
* as the region returned by {@link ITextHover#getHoverRegion(ITextViewer, int)}.
* If the returned information is null
, no hover popup will be shown.
*
* Note: Implementers have to ensure that {@link ITextHoverExtension#getHoverControlCreator()}
* returns {@link IInformationControl}s that implement
* {@link IInformationControlExtension2} and whose
* {@link IInformationControlExtension2#setInput(Object)} can handle the
* information objects returned by this method.
*
* Callers should ignore the text returned by {@link ITextHover#getHoverInfo(ITextViewer, IRegion)}.
*
* @param textViewer the viewer on which the hover popup should be shown
* @param hoverRegion the text range in the viewer which is used to determine
* the hover display information
* @return the hover popup display information, or null
if none available
*/
Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy