From 7e69767ade6096ab2a243ae2419009095f50482d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Ha=C3=9Flinger?= Date: Sun, 25 Apr 2021 22:00:39 +0200 Subject: [PATCH] Optimize information for nested objects --- .../de/marhali/easyi18n/ui/editor/I18nKeyAnnotator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/marhali/easyi18n/ui/editor/I18nKeyAnnotator.java b/src/main/java/de/marhali/easyi18n/ui/editor/I18nKeyAnnotator.java index 4568a1d..77feb12 100644 --- a/src/main/java/de/marhali/easyi18n/ui/editor/I18nKeyAnnotator.java +++ b/src/main/java/de/marhali/easyi18n/ui/editor/I18nKeyAnnotator.java @@ -48,7 +48,9 @@ public class I18nKeyAnnotator implements Annotator { return; } - holder.newAnnotation(HighlightSeverity.INFORMATION, - "I18n(" + previewLocale + ": " + node.getValue().get(previewLocale) + ")").create(); + String tooltip = node.isLeaf() ? "I18n(" + previewLocale + ": " + node.getValue().get(previewLocale) + ")" + : "I18n ([])"; + + holder.newAnnotation(HighlightSeverity.INFORMATION, tooltip).create(); } } \ No newline at end of file