LightweightHint (@NotNull Editor editor, @Nullable VirtualFile file, @Nullable @NlsSafe String key) { if (file == null && key == null) return null; JPanel panel = new JPanel(); panel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); if (file != null) { panel.add(new JLabel(file.getPresentableName() + (key == null ? "" : ": "), IconUtil.getIcon(file, 0, editor.getProject()), SwingConstants.LEFT)); } if (key != null) { panel.add(new JLabel(key, IconManager.getInstance().getPlatformIcon(PlatformIcons.Property), SwingConstants.LEFT)); } panel.setOpaque(!ExperimentalUI.isNewUI()); return EditPropertyValueTooltipManager.showTooltip(editor, panel, true); }