/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.

package cn.com.origin.autocode.handlers;

import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;

import com.teamcenter.rac.ui.commands.RACUICommandsActivator;

// Referenced classes of package com.teamcenter.rac.ui.commands:
//            RACUICommandsActivator

public class Messages
{

    public Messages()
    {
    }

    public static String getString(String s)
    {
        try
        {
            return RESOURCE_BUNDLE.getString(s);
        }
        catch(MissingResourceException _ex)
        {
            return (new StringBuilder(String.valueOf('!'))).append(s).append('!').toString();
        }
    }

    public static String[] getStringArray(String s)
    {
        try
        {
            String s1 = getString(s);
            String as[] = s1.split(",");
            String as1[] = new String[as.length];
            for(int i = 0; i < as.length; i++)
                as1[i] = as[i].trim();

            return as1;
        }
        catch(MissingResourceException _ex)
        {
            return (new String[] {
                (new StringBuilder(String.valueOf('!'))).append(s).append('!').toString()
            });
        }
    }

    public static Image getImage(String s)
    {
        ImageDescriptor imagedescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(RACUICommandsActivator.getBundleID(), s);
        if(imagedescriptor != null)
            return imagedescriptor.createImage();
        else
            return null;
    }

    private static final String BUNDLE_NAME = "cn.com.origin.autocode.handlers.messages_locale";
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("cn.com.origin.autocode.handlers.messages_locale");

}


/*
	DECOMPILATION REPORT

	Decompiled from: C:\TC\Siemens\Teamcenter11\portal\plugins\com.teamcenter.rac.ui.commands_11000.2.0.jar
	Total time: 49 ms
	Jad reported messages/errors:
	Exit status: 0
	Caught exceptions:
*/