[ui] IJPL-148514 Alt+Click copy html tags from popup

(cherry picked from commit e134e1ba189884d280d1243bd3432189bf3fb9b6)

IJ-CR-157859

GitOrigin-RevId: d229d811b756a16a005d537bd3d38e60f10aaf7b
This commit is contained in:
Piotr Tomiak
2025-03-14 20:18:17 +01:00
committed by intellij-monorepo-bot
parent f7f0e69ecc
commit 826155474b

View File

@@ -562,7 +562,7 @@ public final class UIUtil {
/**
* Computes the minimum size the component must have to keep the given number of characters
*
* <p>
* Same as {@code computeTextComponentMinimumSize(preferredSize, text, fontMetrics, 4)}.
*
* @param preferredSize the size of the component needed to keep everything, usually computed by {@link Component#getPreferredSize()}
@@ -593,6 +593,7 @@ public final class UIUtil {
* Because of fractional font metrics, fractional scaling, complicated calculations, rounding errors and other such things
* it's hard to make strict guarantees here.
* </p>
*
* @param preferredSize the size of the component needed to keep everything, usually computed by {@link Component#getPreferredSize()}
* @param text the currently set text
* @param fontMetrics the current font metrics
@@ -2610,7 +2611,7 @@ public final class UIUtil {
if (!builder.isEmpty()) {
builder.append(' ');
}
builder.append(StringUtil.removeHtmlTags(candidate).trim());
builder.append(StringUtil.removeHtmlTags(candidate, true).trim());
}
if (component instanceof Container) {
Component[] components = ((Container)component).getComponents();