API for lazy localized messages

Use `XBundle.lazyMessage()` API a string to be changed to its localized variant on a language plugin enabling w/o restart

`public static Supplier<String> lazyMessage() {...}` added into many bundle classes

GitOrigin-RevId: 8c6ef21c8bc774614e6bb94dad27ff5db6cbff07
This commit is contained in:
Dmitry.Krasilschikov
2020-02-02 14:38:04 +02:00
committed by intellij-monorepo-bot
parent a6623419bb
commit d4c5ac8854
75 changed files with 522 additions and 4 deletions

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class ImagesBundle extends DynamicBundle { public class ImagesBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.ImagesBundle"; @NonNls private static final String BUNDLE = "messages.ImagesBundle";
private static final ImagesBundle INSTANCE = new ImagesBundle(); private static final ImagesBundle INSTANCE = new ImagesBundle();
@@ -30,4 +32,9 @@ public class ImagesBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CompilerBundle extends DynamicBundle { public class CompilerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CompilerBundle"; @NonNls private static final String BUNDLE = "messages.CompilerBundle";
private static final CompilerBundle INSTANCE = new CompilerBundle(); private static final CompilerBundle INSTANCE = new CompilerBundle();
@@ -30,4 +32,9 @@ public class CompilerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -22,6 +22,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DebuggerBundle extends DynamicBundle { public class DebuggerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DebuggerBundle"; @NonNls private static final String BUNDLE = "messages.DebuggerBundle";
private static final DebuggerBundle INSTANCE = new DebuggerBundle(); private static final DebuggerBundle INSTANCE = new DebuggerBundle();
@@ -33,6 +35,11 @@ public class DebuggerBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
public static String getAddressDisplayName(final RemoteConnection connection) { public static String getAddressDisplayName(final RemoteConnection connection) {
return connection.isUseSockets() ? StringUtil.notNullize(connection.getDebuggerHostName()) + ":" + connection.getDebuggerAddress() return connection.isUseSockets() ? StringUtil.notNullize(connection.getDebuggerHostName()) + ":" + connection.getDebuggerAddress()
: connection.getDebuggerAddress(); : connection.getDebuggerAddress();

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JavaUiBundle extends DynamicBundle { public class JavaUiBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.JavaUiBundle"; @NonNls private static final String BUNDLE = "messages.JavaUiBundle";
private static final JavaUiBundle INSTANCE = new JavaUiBundle(); private static final JavaUiBundle INSTANCE = new JavaUiBundle();
@@ -16,4 +18,9 @@ public class JavaUiBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class QuickFixBundle extends DynamicBundle { public class QuickFixBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.QuickFixBundle"; @NonNls private static final String BUNDLE = "messages.QuickFixBundle";
private static final QuickFixBundle INSTANCE = new QuickFixBundle(); private static final QuickFixBundle INSTANCE = new QuickFixBundle();
@@ -16,4 +18,9 @@ public class QuickFixBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CompletionBundle extends DynamicBundle { public class CompletionBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CompletionBundle"; @NonNls private static final String BUNDLE = "messages.CompletionBundle";
private static final CompletionBundle INSTANCE = new CompletionBundle(); private static final CompletionBundle INSTANCE = new CompletionBundle();
@@ -30,4 +32,9 @@ public class CompletionBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JavadocBundle extends DynamicBundle { public class JavadocBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.JavadocBundle"; @NonNls private static final String BUNDLE = "messages.JavadocBundle";
private static final JavadocBundle INSTANCE = new JavadocBundle(); private static final JavadocBundle INSTANCE = new JavadocBundle();
@@ -30,4 +32,9 @@ public class JavadocBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class RefactorJBundle extends DynamicBundle { public class RefactorJBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.RefactorJBundle"; @NonNls private static final String BUNDLE = "messages.RefactorJBundle";
private static final RefactorJBundle INSTANCE = new RefactorJBundle(); private static final RefactorJBundle INSTANCE = new RefactorJBundle();
@@ -30,4 +32,9 @@ public class RefactorJBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JavaCoreBundle extends DynamicBundle { public class JavaCoreBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.JavaCoreBundle"; @NonNls private static final String BUNDLE = "messages.JavaCoreBundle";
private static final JavaCoreBundle INSTANCE = new JavaCoreBundle(); private static final JavaCoreBundle INSTANCE = new JavaCoreBundle();
@@ -30,7 +32,12 @@ public class JavaCoreBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
public static boolean contains(String key) { public static boolean contains(String key) {
return INSTANCE.containsKey(key); return INSTANCE.containsKey(key);
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JavaErrorBundle extends DynamicBundle { public class JavaErrorBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.JavaErrorBundle"; @NonNls public static final String BUNDLE = "messages.JavaErrorBundle";
public static final JavaErrorBundle INSTANCE = new JavaErrorBundle(); public static final JavaErrorBundle INSTANCE = new JavaErrorBundle();
@@ -15,6 +17,11 @@ public class JavaErrorBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
JavaErrorBundle() { JavaErrorBundle() {
super(BUNDLE); super(BUNDLE);
} }

View File

@@ -5,6 +5,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class JsonBundle extends DynamicBundle { public class JsonBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.JsonBundle"; @NonNls public static final String BUNDLE = "messages.JsonBundle";
private static final JsonBundle INSTANCE = new JsonBundle(); private static final JsonBundle INSTANCE = new JsonBundle();
@@ -17,4 +19,9 @@ public class JsonBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class AnalysisScopeBundle extends DynamicBundle { public class AnalysisScopeBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.AnalysisScopeBundle"; @NonNls private static final String BUNDLE = "messages.AnalysisScopeBundle";
private static final AnalysisScopeBundle INSTANCE = new AnalysisScopeBundle(); private static final AnalysisScopeBundle INSTANCE = new AnalysisScopeBundle();
@@ -30,4 +32,9 @@ public class AnalysisScopeBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DaemonBundle extends DynamicBundle { public class DaemonBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DaemonBundle"; @NonNls private static final String BUNDLE = "messages.DaemonBundle";
private static final DaemonBundle INSTANCE = new DaemonBundle(); private static final DaemonBundle INSTANCE = new DaemonBundle();
@@ -30,4 +32,9 @@ public class DaemonBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CommonQuickFixBundle extends DynamicBundle { public class CommonQuickFixBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.CommonQuickFixBundle"; @NonNls public static final String BUNDLE = "messages.CommonQuickFixBundle";
private static final CommonQuickFixBundle INSTANCE = new CommonQuickFixBundle(); private static final CommonQuickFixBundle INSTANCE = new CommonQuickFixBundle();
@@ -16,4 +18,9 @@ public class CommonQuickFixBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class InspectionsBundle extends DynamicBundle { public class InspectionsBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.InspectionsBundle"; @NonNls public static final String BUNDLE = "messages.InspectionsBundle";
private static final InspectionsBundle INSTANCE = new InspectionsBundle(); private static final InspectionsBundle INSTANCE = new InspectionsBundle();
@@ -30,4 +32,9 @@ public class InspectionsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class FindBundle extends DynamicBundle { public class FindBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.FindBundle"; @NonNls private static final String BUNDLE = "messages.FindBundle";
private static final FindBundle INSTANCE = new FindBundle(); private static final FindBundle INSTANCE = new FindBundle();
@@ -33,4 +35,9 @@ public class FindBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CodeInsightBundle extends DynamicBundle { public class CodeInsightBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CodeInsightBundle"; @NonNls private static final String BUNDLE = "messages.CodeInsightBundle";
private static final CodeInsightBundle INSTANCE = new CodeInsightBundle(); private static final CodeInsightBundle INSTANCE = new CodeInsightBundle();
@@ -30,4 +32,9 @@ public class CodeInsightBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class EditorBundle extends DynamicBundle { public class EditorBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.EditorBundle"; @NonNls private static final String BUNDLE = "messages.EditorBundle";
private static final EditorBundle INSTANCE = new EditorBundle(); private static final EditorBundle INSTANCE = new EditorBundle();
@@ -30,4 +32,9 @@ public class EditorBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class PsiBundle extends DynamicBundle { public class PsiBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.PsiBundle"; @NonNls private static final String BUNDLE = "messages.PsiBundle";
private static final PsiBundle INSTANCE = new PsiBundle(); private static final PsiBundle INSTANCE = new PsiBundle();
@@ -30,7 +32,12 @@ public class PsiBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@NotNull @NotNull
public static String visibilityPresentation(@NotNull String modifier) { public static String visibilityPresentation(@NotNull String modifier) {
return message(modifier + ".visibility.presentation"); return message(modifier + ".visibility.presentation");

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class LangBundle extends DynamicBundle { public class LangBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.LangBundle"; @NonNls private static final String BUNDLE = "messages.LangBundle";
private static final LangBundle INSTANCE = new LangBundle(); private static final LangBundle INSTANCE = new LangBundle();
@@ -33,4 +35,9 @@ public class LangBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class FileTypesBundle extends DynamicBundle { public class FileTypesBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.FileTypesBundle"; @NonNls private static final String BUNDLE = "messages.FileTypesBundle";
@@ -33,4 +35,9 @@ public class FileTypesBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -5,6 +5,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DupLocatorBundle extends DynamicBundle { public class DupLocatorBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DupLocatorBundle"; @NonNls private static final String BUNDLE = "messages.DupLocatorBundle";
@@ -18,4 +20,9 @@ public class DupLocatorBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DvcsBundle extends DynamicBundle { public class DvcsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DvcsBundle"; @NonNls private static final String BUNDLE = "messages.DvcsBundle";
private static final DvcsBundle INSTANCE = new DvcsBundle(); private static final DvcsBundle INSTANCE = new DvcsBundle();
@@ -31,6 +33,11 @@ public class DvcsBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@NotNull @NotNull
public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) { public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) {
return message(key); return message(key);

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class VcsBundle extends DynamicBundle { public class VcsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.VcsBundle"; @NonNls private static final String BUNDLE = "messages.VcsBundle";
public static final VcsBundle INSTANCE = new VcsBundle(); public static final VcsBundle INSTANCE = new VcsBundle();
@@ -31,6 +33,11 @@ public class VcsBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
public static String getString(@PropertyKey(resourceBundle = BUNDLE) final String key) { public static String getString(@PropertyKey(resourceBundle = BUNDLE) final String key) {
return message(key); return message(key);
} }

View File

@@ -6,6 +6,8 @@ import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
/** /**
* @author lesya * @author lesya
*/ */
@@ -15,6 +17,11 @@ public class ExecutionBundle extends DynamicBundle {
return ourInstance.getMessage(key, params); return ourInstance.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, Object @NotNull ... params) {
return ourInstance.getLazyMessage(key, params);
}
public static final String PATH_TO_BUNDLE = "messages.ExecutionBundle"; public static final String PATH_TO_BUNDLE = "messages.ExecutionBundle";
private static final AbstractBundle ourInstance = new ExecutionBundle(); private static final AbstractBundle ourInstance = new ExecutionBundle();

View File

@@ -22,6 +22,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class RefactoringBundle extends DynamicBundle { public class RefactoringBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.RefactoringBundle"; @NonNls private static final String BUNDLE = "messages.RefactoringBundle";
private static final RefactoringBundle INSTANCE = new RefactoringBundle(); private static final RefactoringBundle INSTANCE = new RefactoringBundle();
@@ -32,7 +34,12 @@ public class RefactoringBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@NotNull @NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) {
return INSTANCE.getMessage(key); return INSTANCE.getMessage(key);

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class UsageViewBundle extends DynamicBundle { public class UsageViewBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.UsageView"; @NonNls private static final String BUNDLE = "messages.UsageView";
@@ -33,6 +35,11 @@ public class UsageViewBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@SuppressWarnings({"AutoBoxing"}) @SuppressWarnings({"AutoBoxing"})
public static String getOccurencesString(int usagesCount, int filesCount) { public static String getOccurencesString(int usagesCount, int filesCount) {
return " (" + message("occurence.info.occurence", usagesCount, filesCount) + ")"; return " (" + message("occurence.info.occurence", usagesCount, filesCount) + ")";

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CodeEditorBundle extends DynamicBundle { public class CodeEditorBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CodeEditorBundle"; @NonNls private static final String BUNDLE = "messages.CodeEditorBundle";
private static final CodeEditorBundle INSTANCE = new CodeEditorBundle(); private static final CodeEditorBundle INSTANCE = new CodeEditorBundle();
@@ -31,4 +33,9 @@ public class CodeEditorBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class ToolsBundle extends DynamicBundle { public class ToolsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.ToolsBundle"; @NonNls private static final String BUNDLE = "messages.ToolsBundle";
private static final ToolsBundle INSTANCE = new ToolsBundle(); private static final ToolsBundle INSTANCE = new ToolsBundle();
@@ -33,4 +35,9 @@ public class ToolsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
/** /**
* Provides access to localized properties of the IntelliJ Platform. * Provides access to localized properties of the IntelliJ Platform.
*/ */
@@ -35,4 +37,9 @@ public class ApplicationBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DiffBundle extends DynamicBundle { public class DiffBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DiffBundle"; @NonNls private static final String BUNDLE = "messages.DiffBundle";
@@ -31,4 +33,9 @@ public class DiffBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class KeyMapBundle extends DynamicBundle { public class KeyMapBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.KeyMapBundle"; @NonNls private static final String BUNDLE = "messages.KeyMapBundle";
private static final KeyMapBundle INSTANCE = new KeyMapBundle(); private static final KeyMapBundle INSTANCE = new KeyMapBundle();
@@ -31,4 +33,9 @@ public class KeyMapBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class OptionsBundle extends DynamicBundle { public class OptionsBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.OptionsBundle"; @NonNls public static final String BUNDLE = "messages.OptionsBundle";
public static final OptionsBundle INSTANCE = new OptionsBundle(); public static final OptionsBundle INSTANCE = new OptionsBundle();
@@ -30,4 +32,9 @@ public class OptionsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DiagnosticBundle extends DynamicBundle { public class DiagnosticBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DiagnosticBundle"; @NonNls private static final String BUNDLE = "messages.DiagnosticBundle";
private static final DiagnosticBundle INSTANCE = new DiagnosticBundle(); private static final DiagnosticBundle INSTANCE = new DiagnosticBundle();
@@ -30,4 +32,9 @@ public class DiagnosticBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public final class ProjectBundle extends DynamicBundle { public final class ProjectBundle extends DynamicBundle {
@NonNls @NonNls
public static final String BUNDLE = "messages.ProjectBundle"; public static final String BUNDLE = "messages.ProjectBundle";
@@ -19,4 +21,9 @@ public final class ProjectBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CloudBundle extends DynamicBundle { public class CloudBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CloudBundle"; @NonNls private static final String BUNDLE = "messages.CloudBundle";
private static final CloudBundle INSTANCE = new CloudBundle(); private static final CloudBundle INSTANCE = new CloudBundle();
@@ -30,4 +32,9 @@ public class CloudBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class SMTestsRunnerBundle extends DynamicBundle { public class SMTestsRunnerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.SMTestsRunnerBundle"; @NonNls private static final String BUNDLE = "messages.SMTestsRunnerBundle";
private static final SMTestsRunnerBundle INSTANCE = new SMTestsRunnerBundle(); private static final SMTestsRunnerBundle INSTANCE = new SMTestsRunnerBundle();
@@ -30,4 +32,9 @@ public class SMTestsRunnerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -5,6 +5,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class SSRBundle extends DynamicBundle { public class SSRBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.SSRBundle"; @NonNls private static final String BUNDLE = "messages.SSRBundle";
private static final SSRBundle INSTANCE = new SSRBundle(); private static final SSRBundle INSTANCE = new SSRBundle();
@@ -15,4 +17,9 @@ public class SSRBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -5,6 +5,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class TaskBundle extends DynamicBundle { public class TaskBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.TaskBundle"; @NonNls private static final String BUNDLE = "messages.TaskBundle";
private static final TaskBundle INSTANCE = new TaskBundle(); private static final TaskBundle INSTANCE = new TaskBundle();
@@ -15,4 +17,9 @@ public class TaskBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -45,7 +45,7 @@ public abstract class AbstractBundle {
} }
@NotNull @NotNull
public Supplier<String> localizedMessage(@NotNull String key, Object @NotNull ... params) { public Supplier<String> getLazyMessage(@NotNull String key, Object @NotNull ... params) {
return () -> getMessage(key, params); return () -> getMessage(key, params);
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class XDebuggerBundle extends DynamicBundle { public class XDebuggerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.XDebuggerBundle"; @NonNls private static final String BUNDLE = "messages.XDebuggerBundle";
private static final XDebuggerBundle INSTANCE = new XDebuggerBundle(); private static final XDebuggerBundle INSTANCE = new XDebuggerBundle();
@@ -31,4 +33,9 @@ public class XDebuggerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class InspectionGadgetsBundle extends DynamicBundle { public class InspectionGadgetsBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.InspectionGadgetsBundle"; @NonNls public static final String BUNDLE = "messages.InspectionGadgetsBundle";
private static final InspectionGadgetsBundle INSTANCE = new InspectionGadgetsBundle(); private static final InspectionGadgetsBundle INSTANCE = new InspectionGadgetsBundle();
@@ -16,4 +18,9 @@ public class InspectionGadgetsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -7,6 +7,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class IntelliLangBundle extends DynamicBundle { public class IntelliLangBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.IntelliLangBundle"; @NonNls private static final String BUNDLE = "messages.IntelliLangBundle";
private static final IntelliLangBundle INSTANCE = new IntelliLangBundle(); private static final IntelliLangBundle INSTANCE = new IntelliLangBundle();
@@ -17,4 +19,9 @@ public class IntelliLangBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class IntentionPowerPackBundle extends DynamicBundle { public class IntentionPowerPackBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.IntentionPowerPackBundle"; @NonNls private static final String BUNDLE = "messages.IntentionPowerPackBundle";
private static final IntentionPowerPackBundle INSTANCE = new IntentionPowerPackBundle(); private static final IntentionPowerPackBundle INSTANCE = new IntentionPowerPackBundle();
@@ -31,6 +33,11 @@ public class IntentionPowerPackBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
public static String defaultableMessage(@PropertyKey(resourceBundle = BUNDLE) String key, Object... params) { public static String defaultableMessage(@PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {
return INSTANCE.messageOrDefault(key, "default", true, params); return INSTANCE.messageOrDefault(key, "default", true, params);
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class AntBundle extends DynamicBundle { public class AntBundle extends DynamicBundle {
@NonNls protected static final String BUNDLE = "messages.AntBundle"; @NonNls protected static final String BUNDLE = "messages.AntBundle";
private static final AntBundle INSTANCE = new AntBundle(); private static final AntBundle INSTANCE = new AntBundle();
@@ -30,4 +32,9 @@ public class AntBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class AntActionsBundle extends DynamicBundle { public class AntActionsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.AntActionsBundle"; @NonNls private static final String BUNDLE = "messages.AntActionsBundle";
private static final AntActionsBundle INSTANCE = new AntActionsBundle(); private static final AntActionsBundle INSTANCE = new AntActionsBundle();
@@ -30,4 +32,9 @@ public class AntActionsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -19,6 +19,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class CvsBundle extends DynamicBundle { public class CvsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CvsBundle"; @NonNls private static final String BUNDLE = "messages.CvsBundle";
private static final CvsBundle INSTANCE = new CvsBundle(); private static final CvsBundle INSTANCE = new CvsBundle();
@@ -30,6 +32,11 @@ public class CvsBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
public static String getCvsDisplayName() { public static String getCvsDisplayName() {
return message("general.cvs.display.name"); return message("general.cvs.display.name");
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class EclipseBundle extends DynamicBundle { public class EclipseBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.EclipseBundle"; @NonNls private static final String BUNDLE = "messages.EclipseBundle";
private static final EclipseBundle INSTANCE = new EclipseBundle(); private static final EclipseBundle INSTANCE = new EclipseBundle();
@@ -30,4 +32,9 @@ public class EclipseBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GitBundle extends DynamicBundle { public class GitBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GitBundle"; @NonNls private static final String BUNDLE = "messages.GitBundle";
private static final GitBundle INSTANCE = new GitBundle(); private static final GitBundle INSTANCE = new GitBundle();
@@ -31,6 +33,11 @@ public class GitBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@NotNull @NotNull
public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) { public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) {
return message(key); return message(key);

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GradleInspectionBundle extends DynamicBundle { public class GradleInspectionBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GradleInspectionBundle"; @NonNls private static final String BUNDLE = "messages.GradleInspectionBundle";
private static final GradleInspectionBundle INSTANCE = new GradleInspectionBundle(); private static final GradleInspectionBundle INSTANCE = new GradleInspectionBundle();
@@ -30,4 +32,9 @@ public class GradleInspectionBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyBundle extends DynamicBundle { public class GroovyBundle extends DynamicBundle {
public static final String BUNDLE = "messages.GroovyBundle"; public static final String BUNDLE = "messages.GroovyBundle";
private static final GroovyBundle INSTANCE = new GroovyBundle(); private static final GroovyBundle INSTANCE = new GroovyBundle();
@@ -30,4 +32,9 @@ public class GroovyBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyInspectionBundle extends DynamicBundle { public class GroovyInspectionBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GroovyInspectionBundle"; @NonNls private static final String BUNDLE = "messages.GroovyInspectionBundle";
private static final GroovyInspectionBundle INSTANCE = new GroovyInspectionBundle(); private static final GroovyInspectionBundle INSTANCE = new GroovyInspectionBundle();
@@ -30,4 +32,9 @@ public class GroovyInspectionBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyIntentionsBundle extends DynamicBundle { public class GroovyIntentionsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GroovyIntentionsBundle"; @NonNls private static final String BUNDLE = "messages.GroovyIntentionsBundle";
private static final GroovyIntentionsBundle INSTANCE = new GroovyIntentionsBundle(); private static final GroovyIntentionsBundle INSTANCE = new GroovyIntentionsBundle();
@@ -31,4 +33,9 @@ public class GroovyIntentionsBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyCodeInsightBundle extends DynamicBundle { public class GroovyCodeInsightBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GroovyCodeInsightBundle"; @NonNls private static final String BUNDLE = "messages.GroovyCodeInsightBundle";
private static final GroovyCodeInsightBundle INSTANCE = new GroovyCodeInsightBundle(); private static final GroovyCodeInsightBundle INSTANCE = new GroovyCodeInsightBundle();
@@ -30,4 +32,9 @@ public class GroovyCodeInsightBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyDocBundle extends DynamicBundle { public class GroovyDocBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GroovyDocBundle"; @NonNls private static final String BUNDLE = "messages.GroovyDocBundle";
private static final GroovyDocBundle INSTANCE = new GroovyDocBundle(); private static final GroovyDocBundle INSTANCE = new GroovyDocBundle();
@@ -31,5 +33,10 @@ public class GroovyDocBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class GroovyRefactoringBundle extends DynamicBundle { public class GroovyRefactoringBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.GroovyRefactoringBundle"; @NonNls private static final String BUNDLE = "messages.GroovyRefactoringBundle";
private static final GroovyRefactoringBundle INSTANCE = new GroovyRefactoringBundle(); private static final GroovyRefactoringBundle INSTANCE = new GroovyRefactoringBundle();
@@ -31,4 +33,9 @@ public class GroovyRefactoringBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -17,6 +17,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class HgBundle extends DynamicBundle { public class HgBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.HgBundle"; @NonNls private static final String BUNDLE = "messages.HgBundle";
private static final HgBundle INSTANCE = new HgBundle(); private static final HgBundle INSTANCE = new HgBundle();
@@ -27,4 +29,9 @@ public class HgBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class MarkdownBundle extends DynamicBundle { public class MarkdownBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MarkdownBundle"; @NonNls private static final String BUNDLE = "messages.MarkdownBundle";
private static final MarkdownBundle INSTANCE = new MarkdownBundle(); private static final MarkdownBundle INSTANCE = new MarkdownBundle();
@@ -30,4 +32,9 @@ public class MarkdownBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class MavenDomBundle extends DynamicBundle { public class MavenDomBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MavenDomBundle"; @NonNls private static final String BUNDLE = "messages.MavenDomBundle";
private static final MavenDomBundle INSTANCE = new MavenDomBundle(); private static final MavenDomBundle INSTANCE = new MavenDomBundle();
@@ -30,4 +32,9 @@ public class MavenDomBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class IndicesBundle extends DynamicBundle { public class IndicesBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MavenIndicesBundle"; @NonNls private static final String BUNDLE = "messages.MavenIndicesBundle";
private static final IndicesBundle INSTANCE = new IndicesBundle(); private static final IndicesBundle INSTANCE = new IndicesBundle();
@@ -30,4 +32,9 @@ public class IndicesBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class MavenProjectBundle extends DynamicBundle { public class MavenProjectBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MavenProjectBundle"; @NonNls private static final String BUNDLE = "messages.MavenProjectBundle";
private static final MavenProjectBundle INSTANCE = new MavenProjectBundle(); private static final MavenProjectBundle INSTANCE = new MavenProjectBundle();
@@ -30,4 +32,9 @@ public class MavenProjectBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class TasksBundle extends DynamicBundle { public class TasksBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MavenTasksBundle"; @NonNls private static final String BUNDLE = "messages.MavenTasksBundle";
private static final TasksBundle INSTANCE = new TasksBundle(); private static final TasksBundle INSTANCE = new TasksBundle();
@@ -30,4 +32,9 @@ public class TasksBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class MavenWizardBundle extends DynamicBundle { public class MavenWizardBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.MavenWizardBundle"; @NonNls private static final String BUNDLE = "messages.MavenWizardBundle";
private static final MavenWizardBundle INSTANCE = new MavenWizardBundle(); private static final MavenWizardBundle INSTANCE = new MavenWizardBundle();
@@ -16,4 +18,9 @@ public class MavenWizardBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class PropertiesBundle extends DynamicBundle { public class PropertiesBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.PropertiesBundle"; @NonNls private static final String BUNDLE = "messages.PropertiesBundle";
private static final PropertiesBundle INSTANCE = new PropertiesBundle(); private static final PropertiesBundle INSTANCE = new PropertiesBundle();
@@ -30,4 +32,9 @@ public class PropertiesBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class ShBundle extends DynamicBundle { public class ShBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.ShBundle"; @NonNls public static final String BUNDLE = "messages.ShBundle";
private static final ShBundle INSTANCE = new ShBundle(); private static final ShBundle INSTANCE = new ShBundle();
@@ -16,4 +18,9 @@ public class ShBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class SvnBundle extends DynamicBundle { public class SvnBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.SvnBundle"; @NonNls private static final String BUNDLE = "messages.SvnBundle";
@@ -32,6 +34,11 @@ public class SvnBundle extends DynamicBundle {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
@NotNull @NotNull
public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) { public static String getString(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key) {
return message(key); return message(key);

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DesignerBundle extends DynamicBundle { public class DesignerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DesignerBundle"; @NonNls private static final String BUNDLE = "messages.DesignerBundle";
private static final DesignerBundle INSTANCE = new DesignerBundle(); private static final DesignerBundle INSTANCE = new DesignerBundle();
@@ -30,4 +32,9 @@ public class DesignerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class UIDesignerBundle extends DynamicBundle { public class UIDesignerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.UIDesignerBundle"; @NonNls private static final String BUNDLE = "messages.UIDesignerBundle";
private static final UIDesignerBundle INSTANCE = new UIDesignerBundle(); private static final UIDesignerBundle INSTANCE = new UIDesignerBundle();
@@ -30,4 +32,9 @@ public class UIDesignerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -5,6 +5,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class YAMLBundle extends DynamicBundle { public class YAMLBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.YAMLBundle"; @NonNls private static final String BUNDLE = "messages.YAMLBundle";
private static final YAMLBundle INSTANCE = new YAMLBundle(); private static final YAMLBundle INSTANCE = new YAMLBundle();
@@ -15,4 +17,9 @@ public class YAMLBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class PyPsiBundle extends DynamicBundle { public class PyPsiBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.PyPsiBundle"; @NonNls private static final String BUNDLE = "messages.PyPsiBundle";
public static final PyPsiBundle INSTANCE = new PyPsiBundle(); public static final PyPsiBundle INSTANCE = new PyPsiBundle();
@@ -30,4 +32,9 @@ public class PyPsiBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class RestBundle extends DynamicBundle { public class RestBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.RestBundle"; @NonNls private static final String BUNDLE = "messages.RestBundle";
private static final RestBundle INSTANCE = new RestBundle(); private static final RestBundle INSTANCE = new RestBundle();
@@ -30,4 +32,9 @@ public class RestBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class PyBundle extends DynamicBundle { public class PyBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.PyBundle"; @NonNls public static final String BUNDLE = "messages.PyBundle";
public static final PyBundle INSTANCE = new PyBundle(); public static final PyBundle INSTANCE = new PyBundle();
@@ -30,4 +32,9 @@ public class PyBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class SpellCheckerBundle extends DynamicBundle { public class SpellCheckerBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.SpellCheckerBundle"; @NonNls private static final String BUNDLE = "messages.SpellCheckerBundle";
private static final SpellCheckerBundle INSTANCE = new SpellCheckerBundle(); private static final SpellCheckerBundle INSTANCE = new SpellCheckerBundle();
@@ -30,4 +32,9 @@ public class SpellCheckerBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -21,6 +21,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class DomBundle extends DynamicBundle { public class DomBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DomBundle"; @NonNls private static final String BUNDLE = "messages.DomBundle";
private static final DomBundle INSTANCE = new DomBundle(); private static final DomBundle INSTANCE = new DomBundle();
@@ -31,4 +33,9 @@ public class DomBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }

View File

@@ -6,6 +6,8 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey; import org.jetbrains.annotations.PropertyKey;
import java.util.function.Supplier;
public class XmlBundle extends DynamicBundle { public class XmlBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "messages.XmlBundle"; @NonNls public static final String BUNDLE = "messages.XmlBundle";
private static final XmlBundle INSTANCE = new XmlBundle(); private static final XmlBundle INSTANCE = new XmlBundle();
@@ -16,4 +18,9 @@ public class XmlBundle extends DynamicBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getMessage(key, params); return INSTANCE.getMessage(key, params);
} }
@NotNull
public static Supplier<String> lazyMessage(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
return INSTANCE.getLazyMessage(key, params);
}
} }