src/com/intellij/vssSupport/VssBundle.java (25 lines of code) (raw):

/* * Copyright (c) 2005 JetBrains s.r.o. All Rights Reserved. */ package com.intellij.vssSupport; import com.intellij.CommonBundle; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.PropertyKey; import java.lang.ref.Reference; import java.lang.ref.SoftReference; import java.util.ResourceBundle; public class VssBundle { public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) { return CommonBundle.message(getBundle(), key, params); } private static Reference<ResourceBundle> ourBundle; @NonNls private static final String BUNDLE = "com.intellij.vssSupport.VssBundle"; private VssBundle() { } private static ResourceBundle getBundle() { ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle); if (bundle == null) { bundle = ResourceBundle.getBundle(BUNDLE); ourBundle = new SoftReference<>(bundle); } return bundle; } }