sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.graphicsmemory/src/com/nokia/carbide/cpp/pi/graphicsmemory/Messages.java
changeset 12 ae255c9aa552
equal deleted inserted replaced
11:5b9d4d8641ce 12:ae255c9aa552
       
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.carbide.cpp.pi.graphicsmemory;
       
    19 
       
    20 import java.util.MissingResourceException;
       
    21 import java.util.ResourceBundle;
       
    22 
       
    23 
       
    24 public final class Messages {
       
    25 	private static final String BUNDLE_NAME = GraphicsMemoryPlugin.PLUGIN_ID+".messages"; //$NON-NLS-1$
       
    26 
       
    27 	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
       
    28 			.getBundle(BUNDLE_NAME);
       
    29 
       
    30 	private Messages() {
       
    31 	}
       
    32 
       
    33 	public static String getString(String key) {
       
    34 		try {
       
    35 			return RESOURCE_BUNDLE.getString(key);
       
    36 		} catch (MissingResourceException e) {
       
    37 			return '!' + key + '!';
       
    38 		}
       
    39 	}
       
    40 }