From 7f5e7f3b3a643e84bbc0e0c45cb5b926b8b3fab4 Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Thu, 27 Apr 2006 17:47:15 +0000 Subject: [PATCH] Removing redundant load methods. --- .../eclipse/rse/core/SystemBasePlugin.java | 106 ------------------ 1 file changed, 106 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java index 965e49cf4fe..4ff8e2faaca 100644 --- a/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/systems/org/eclipse/rse/core/SystemBasePlugin.java @@ -859,112 +859,6 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin // ---------------------------------------- /** - * Sets the resource bundle. Called by child class in their - * constructor, say, to load in their resource bundle. Handles - * rare case when not found by telling user, then dying. - * Note: This is NOT to be used for plugin.properties since Eclipse handles that file differently. - * @param name of .properties file, without the '.properties' specified - * @return ResourceBundle if loaded successfully, null if not. - */ - public final ResourceBundle loadResourceBundle(String fileName) - { - ResourceBundle rb = null; - try { - IPath path = new Path("$nl$/"+fileName+".properties"); - URL url = Platform.find(getBundle(), path); - if ( url != null ) - { - InputStream in = url.openStream(); - rb = new PropertyResourceBundle(in); - in.close(); - } - else - logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",null); - } catch (IOException e) { - logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",e); - } - return rb; - } - - /** - * Sets the default resource bundle (so that untranslated strings can be obtained). Called by child class in their - * constructor, say, to load in their resource bundle. Handles - * rare case when not found by telling user, then dying. - * Note: This is NOT to be used for plugin.properties since Eclipse handles that file differently. - * @param name of .properties file, without the '.properties' specified - * @return ResourceBundle if loaded successfully, null if not. - */ - public final ResourceBundle loadDefaultResourceBundle(String fileName) - { - ResourceBundle rb = null; - try { - - IPath path = new Path(fileName+".properties"); - URL url = Platform.find(getBundle(), path); - if ( url != null ) - { - InputStream in = url.openStream(); - rb = new PropertyResourceBundle(in); - in.close(); - } - else - logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",null); - } catch (IOException e) { - logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",e); - } - return rb; - } - - - /** - * Parse the given message file that is in the plugin into memory, into a SystemMessageFile object. - * @param fileName - unqualified name of the .xml message file, inluding the .xml extension. - * @return SystemMessageFile (null if unable to load the file) - */ - public final SystemMessageFile loadMessageFile(String fileName) - { - SystemMessageFile mf = null; - try - { - IPath path = new Path("$nl$/"+fileName); - URL url = Platform.find(getBundle(), path); - - if (url != null) { - url = Platform.resolve(url); - mf = new SystemUIMessageFile(/*url.toString()*/url.getPath(), getBundle().getEntry("/").getPath()); - } - } catch (Exception exc) - { - logError("Error loading message file " + fileName ,exc); - } - return mf; - } - - /** - * Parse the given message file that is in the plugin into memory, into a SystemMessageFile object. - * @param fileName - unqualified name of the .xml message file, inluding the .xml extension. - * @return SystemMessageFile (null if unable to load the file) - */ - public final SystemMessageFile loadDefaultMessageFile(String fileName) - { - SystemMessageFile mf = null; - try - { - IPath path = new Path(fileName); - URL url = Platform.find(getBundle(), path); - - if (url != null) { - url = Platform.resolve(url); - mf = new SystemUIMessageFile(/*url.toString()*/url.getPath(), getBundle().getEntry("/").getPath()); - } - } catch (Exception exc) - { - logError("Error loading message file " + fileName ,exc); - } - return mf; - } - - /** * Put up an error message when a programming error is detected. * Please note this should never happen in production so we don't translate! */