org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/sdt/utils/noexport/Messages.java
author tasneems@symbian.org
Wed, 27 Jan 2010 15:05:37 -0800
changeset 50 0560e98b9bf6
child 196 dac81ca327ce
permissions -rw-r--r--
Added widget project nature and WRT validators
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     1
/**
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     2
 * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     3
 * All rights reserved.
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     5
 * under the terms of the License "Eclipse Public License v1.0"
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     8
 *
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
     9
 * Initial Contributors:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    10
 * Symbian Foundation - initial contribution.
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    11
 * Contributors:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    12
 * Description:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    13
 * Overview:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    14
 * Details:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    15
 * Platforms/Drives/Compatibility:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    16
 * Assumptions/Requirement/Pre-requisites:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    17
 * Failures and causes:
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    18
 */
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    19
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    20
package org.symbian.tools.wrttools.sdt.utils.noexport;
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    21
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    22
import java.util.MissingResourceException;
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    23
import java.util.ResourceBundle;
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    24
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    25
/**
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    26
 * @author eswartz
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    27
 *
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    28
 */
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    29
public class Messages {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    30
    private static final String BUNDLE_NAME = "com.nokia.sdt.utils.noexport.messages";//$NON-NLS-1$
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    31
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    32
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    33
            .getBundle(BUNDLE_NAME);
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    34
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    35
    private Messages() {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    36
    }
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    37
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    38
    public static String getString(String key) {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    39
        try {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    40
            return RESOURCE_BUNDLE.getString(key);
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    41
        } catch (MissingResourceException e) {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    42
            return '!' + key + '!';
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    43
        }
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    44
    }
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    45
}