mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
javadoc
This commit is contained in:
@@ -25,13 +25,28 @@ import org.jetbrains.annotations.Nullable;
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Provides the possibility to display a preview component when holding the Shift key and hovering over a PSI element in the text editor.
|
||||
* These preview components are currently used primarily for displaying color values.
|
||||
*
|
||||
* @author yole
|
||||
*/
|
||||
public interface PreviewHintProvider {
|
||||
ExtensionPointName<PreviewHintProvider> EP_NAME = ExtensionPointName.create("com.intellij.previewHintProvider");
|
||||
|
||||
/**
|
||||
* Returns true if Shift-hover preview is supported for the given file.
|
||||
*
|
||||
* @param file the file to check for preview availability
|
||||
* @return true if preview is supported, false otherwise.
|
||||
*/
|
||||
boolean isSupportedFile(PsiFile file);
|
||||
|
||||
/**
|
||||
* Returns the Swing component to be displayed in the Shift-preview popup for the specified element.
|
||||
*
|
||||
* @param element the element for which preview is requested
|
||||
* @return the component or null if no preview is available for the specified element.
|
||||
*/
|
||||
@Nullable
|
||||
JComponent getPreviewComponent(@NotNull PsiElement element);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user