org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/core/status/Messages.java
author tasneems@symbian.org
Wed, 27 Jan 2010 15:05:37 -0800
changeset 50 0560e98b9bf6
child 74 1f72e81a1aa7
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.core.status;
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
public class Messages {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    26
	private static final String BUNDLE_NAME = "com.nokia.wrt.core.status.messages"; //$NON-NLS-1$
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
	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    29
			.getBundle(BUNDLE_NAME);
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    30
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    31
	private Messages() {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    32
	}
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    33
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    34
	public static String getString(String key) {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    35
		try {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    36
			return RESOURCE_BUNDLE.getString(key);
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    37
		} catch (MissingResourceException e) {
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    38
			return '!' + key + '!';
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    39
		}
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    40
	}
0560e98b9bf6 Added widget project nature and WRT validators
tasneems@symbian.org
parents:
diff changeset
    41
}