Alternatives for @Internal

Hi, folks:
I developed an IDEA plugin, but during the compatibility verification before publishing, it was flagged for using an internal API.

I used the class DocumentFragmentTooltipRenderer, which has now been marked as an internal API, to display tooltips.

I initially attempted to replace it with the following code:

DocumentFragment range = createDocumentFragment(editorEx, region);  
HintManager.getInstance().showInformationHint(editorEx, editorEx.getDocument().getText(range.getTextRange()));  

However, the tooltip no longer displays syntax highlighting as it originally did:

Any suggestions would be greatly appreciated.

Additionally, I have created this issue in the issue tracker.

Thanks for highlighting, discussion should continue in the created issue.

Hello @yann.cebron,

Regarding the previously mentioned plugin, to be precise, I have forked an outdated plugin.
It creates custom FoldRegions and uses

TooltipController.getInstance().showTooltip(  
    editor,  
    point,  
    new DocumentFragmentTooltipRenderer(documentFragment),  
    false,  
    FOLDING_TOOLTIP_GROUP  
);  

to display the original text of the folded region.

The effect is similar to:

Since DocumentFragmentTooltipRenderer has been marked as an internal API,
I would like to replace it with an alternative method, such as

HintManager.getInstance().showInformationHint

However, I noticed that other custom FoldRegions automatically display the original folded text when the mouse moves, even without using showTooltip.

How can I programmatically disable the automatic display of folded text for FoldRegion?