void (@Nullable PsiVariable variable, String value) { if (variable == null || !variable.hasInitializer()) { super.updateTitle(variable, value); } else { final PsiExpression initializer = variable.getInitializer(); assert initializer != null; String text = variable.getText().replace(variable.getName(), value); text = text.replace(initializer.getText(), PsiExpressionTrimRenderer.render(initializer)); setPreviewText(text); revalidate(); } }