mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: render string literal with colon correctly in structure view (IDEA-138681)
GitOrigin-RevId: c1f6b7872d3b6f556582b84df35892f0ef2aa6d3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
278fba7b9b
commit
b6e7af0698
+5
-5
@@ -25,11 +25,11 @@ public abstract class JavaVariableBaseTreeElement<T extends PsiVariable> extends
|
||||
if (field == null) return "";
|
||||
|
||||
final boolean dumb = DumbService.isDumb(field.getProject());
|
||||
return StringUtil.replace(formatVariable(
|
||||
field,
|
||||
SHOW_NAME | (dumb ? 0 : SHOW_TYPE) | TYPE_AFTER | (dumb ? 0 : SHOW_INITIALIZER),
|
||||
PsiSubstitutor.EMPTY
|
||||
), ":", ": ");
|
||||
final String text = formatVariable(field,
|
||||
SHOW_NAME | (dumb ? 0 : SHOW_TYPE) | TYPE_AFTER | (dumb ? 0 : SHOW_INITIALIZER),
|
||||
PsiSubstitutor.EMPTY);
|
||||
final int colon = text.indexOf(':');
|
||||
return colon >= 0 ? text.substring(0, colon + 1) + ' ' + text.substring(colon + 1) : text;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user