// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   IbatisBundle.java

package org.intellij.ibatis.util;

import com.intellij.CommonBundle;
import org.jetbrains.annotations.PropertyKey;

import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;

public class IbatisBundle {
    private static Reference ourBundle;
    protected static final String PATH_TO_BUNDLE = "resource.IbatisBundle";

    private IbatisBundle() {
    }

    public static String message(@PropertyKey(resourceBundle = PATH_TO_BUNDLE)String key, Object... params) {
        return CommonBundle.message(getBundle(), key, params);
    }

    private static ResourceBundle getBundle() {
        ResourceBundle bundle = null;
        if (ourBundle != null)
            bundle = (ResourceBundle) ourBundle.get();
        if (bundle == null) {
            bundle = ResourceBundle.getBundle(PATH_TO_BUNDLE);
            ourBundle = new SoftReference(bundle);
        }
        return bundle;
    }


}

@@ -1,201 +1,4 @@
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.%0D%0A// Jad home page: http://www.kpdus.com/jad.html%0D%0A// Decompiler options: packimports(3) %0D%0A// Source File Name:   IbatisBundle.java%0D%0A%0D%0A
 pack
@@ -220,16 +220,83 @@
 dle;%0D%0A%0D%0A
+/**%0D%0A * resource bundle in the project%0D%0A *%0D%0A * @author Jacky%0D%0A */%0D%0A
 public c
@@ -471,24 +471,199 @@
 %7B%0D%0A    %7D%0D%0A%0D%0A
+    /**%0D%0A     * get resource bundle value from   resource.IbatisBundle%0D%0A     *%0D%0A     * @param key    key name%0D%0A     * @param params parameters%0D%0A     * @return value%0D%0A     */%0D%0A
     public s
@@ -830,24 +830,129 @@
 ;%0D%0A    %7D%0D%0A%0D%0A
+    /**%0D%0A     * get the bundle for resource.IbatisBundle%0D%0A     * @return ResourceBundle object%0D%0A     */%0D%0A
     private 
@@ -1293,24 +1293,24 @@
 rn bundle;%0D%0A
+
     %7D%0D%0A%0D%0A%0D%0A%7D
@@ -1306,13 +1306,11 @@
    %7D%0D%0A%0D%0A
-%0D%0A
 %7D%0D%0A

comment updated