diff --git a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java index 1b46d1d54da..021779664dc 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.ssh/src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java @@ -438,9 +438,6 @@ public class SshConnectorService extends StandardConnectorService implements ISs */ protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc) { - //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_DISCONNECT_FAILED, - // hostName, exc.getMessage()); //RSEUIPlugin.logError("Disconnect failed",exc); // temporary SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_FAILED, IStatus.ERROR, NLS.bind(CommonMessages.MSG_DISCONNECT_FAILED, hostName), exc); SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg); @@ -455,8 +452,6 @@ public class SshConnectorService extends StandardConnectorService implements ISs */ protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port) { - //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName) SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_CANCELLED, IStatus.CANCEL, NLS.bind(CommonMessages.MSG_DISCONNECT_CANCELLED, hostName)); SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg); msgDlg.open(); diff --git a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java index 99abdaeceab..fb4096a572f 100644 --- a/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java +++ b/rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java @@ -484,10 +484,6 @@ public class TelnetConnectorService extends StandardConnectorService implements */ protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc) { - // SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_DISCONNECT_FAILED, - // hostName, exc.getMessage()); - // RSEUIPlugin.logError("Disconnect failed",exc); // temporary SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_FAILED, IStatus.ERROR, @@ -504,9 +500,6 @@ public class TelnetConnectorService extends StandardConnectorService implements */ protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port) { - // SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, - // RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, ICommonMessageIds.MSG_DISCONNECT_CANCELLED, IStatus.CANCEL, diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java index f10717b2c7d..203ad6a3968 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFileOrFolderForm.java @@ -172,7 +172,6 @@ public class SystemSelectRemoteFileOrFolderForm this.fileMode = fileMode; callerInstanceOfWizardPage = (caller instanceof WizardPage); callerInstanceOfSystemPromptDialog = (caller instanceof SystemPromptDialog); - //rb = RSEUIPlugin.getResourceBundle(); sr = RSECorePlugin.getTheSystemRegistry(); // set default GUI diff --git a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java index 6335b2285a9..2df91d989cd 100644 --- a/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java +++ b/rse/plugins/org.eclipse.rse.processes.ui/src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java @@ -19,9 +19,6 @@ package org.eclipse.rse.internal.processes.ui; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessageFile; @@ -39,8 +36,6 @@ public class ProcessesPlugin extends SystemBasePlugin { //The shared instance. private static ProcessesPlugin plugin; - //Resource bundle. - private ResourceBundle resourceBundle; private static SystemMessageFile messageFile = null; private static SystemMessageFile defaultMessageFile = null; @@ -71,7 +66,6 @@ public class ProcessesPlugin extends SystemBasePlugin { public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; - resourceBundle = null; } /** @@ -81,32 +75,6 @@ public class ProcessesPlugin extends SystemBasePlugin { return plugin; } - /** - * Returns the string from the plugin's resource bundle, - * or 'key' if not found. - */ - public static String getResourceString(String key) { - ResourceBundle bundle = ProcessesPlugin.getDefault().getResourceBundle(); - try { - return (bundle != null) ? bundle.getString(key) : key; - } catch (MissingResourceException e) { - return key; - } - } - - /** - * Returns the plugin's resource bundle, - */ - public ResourceBundle getResourceBundle() { - try { - if (resourceBundle == null) - resourceBundle = ResourceBundle.getBundle("org.eclipse.rse.processes.ui.SystemProcessesResources"); //$NON-NLS-1$ - } catch (MissingResourceException x) { - resourceBundle = null; - } - return resourceBundle; - } - /** * Retrieve a message from this plugin's message file * @param msgId - the ID of the message to retrieve. This is the concatenation of the diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java index bb9dddec7b2..a0720534496 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/filters/dialogs/SystemFilterWorkWithFilterPoolsDialog.java @@ -447,9 +447,6 @@ public class SystemFilterWorkWithFilterPoolsDialog tree.refresh(parent); } catch (Exception exc) { - //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_EXCEPTION_DELETING,exc, - // pool.getName()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_DELETING).makeSubstitution(pool.getName(),exc)); msgDlg.open(); @@ -517,9 +514,6 @@ public class SystemFilterWorkWithFilterPoolsDialog } catch (Exception exc) { - //SystemMessage.displayExceptionMessage(getShell(),RSEUIPlugin.getResourceBundle(), - // ISystemMessages.MSG_EXCEPTION_RENAMING,exc, - // pool.getName()); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_RENAMING).makeSubstitution(pool.getName(),exc)); msgDlg.open(); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java index 95592e337e0..ddfc3bfde92 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -163,188 +163,6 @@ public abstract class SystemBasePlugin extends AbstractUIPlugin return descriptor; } - // ---------------------------------------- - // TRANSLATABLE RESOURCE-RELATED METHODS... - // ---------------------------------------- - - /** - * 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 descriptor for the plugin where the file is - * @param name of .properties file, without the '.properties' specified - * @return ResourceBundle if loaded successfully, null if not. - */ -// public static final ResourceBundle loadResourceBundle(Bundle bundle, String fileName) -// { -// ResourceBundle rb = null; -// boolean ok = false; -// try -// { -// URL url = resolveBundleNameNL(bundle, fileName+".properties"); -// logDebugMessage("SystemBasePlugin", "Trying this now: " + url.toString()); -// InputStream in = url.openStream(); -// rb = new PropertyResourceBundle(in); -// in.close(); -// ok = true; -// -// } -// catch (Exception exc) -// { -// logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",exc); -// } -// -// if (!ok) -// { -// Shell s = getActiveWorkbenchShell(); -// -// if (s == null) { -// Display d = Display.getCurrent(); -// -// if (d != null) { -// s = d.getActiveShell(); -// } -// else { -// d = Display.getDefault(); -// -// if (d != null) { -// s = d.getActiveShell(); -// } -// } -// } -// -// if (s != null) { -// org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(s); -// mb.setText("Unexcepted Error"); -// mb.setMessage("Unable to load resource file " + fileName + ".properties"); -// mb.open(); -// } -// } -// -// return rb; -// } - - /** - * Returns the plugin.properties resource bundle associated with the specified plugin descriptor - * - * @param descriptor for the plugin where the file is - * @return ResourceBundle if loaded successfully, null if not. - */ -// public static final ResourceBundle loadPluginResourceBundle(Bundle bundle) -// { -// ResourceBundle rb = null; -// try -// { -// rb = Platform.getResourceBundle(bundle); -// } -// catch (Exception exc) -// { -// logInfo("try for resource bundle plugin.properties not successful!"); -// } -// -// return rb; -// } - - /** - * Sets the default resource bundle for handling cases where strings aren't translated. 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 descriptor for the plugin where the file is - * @param name of .properties file, without the '.properties' specified - * @return ResourceBundle if loaded successfully, null if not. - */ -// public static final ResourceBundle loadDefaultResourceBundle(Bundle bundle, -// String fileName) -// { -// ResourceBundle rb = null; -// boolean ok = false; -// try -// { -// String name = fileName+".properties"; -// URL url = bundle.getEntry("/"+name); -// logDebugMessage("SystemBasePlugin", "Trying this now: " + url.toString()); -// InputStream in = url.openStream(); -// rb = new PropertyResourceBundle(in); -// in.close(); -// ok = true; -// } -// catch (Exception exc) -// { -// logError("SystemBasePlugin - try for resource bundle " + fileName + " not successful!",exc); -// } -// -// if (!ok) -// { -// -// Shell s = getActiveWorkbenchShell(); -// -// if (s == null) { -// Display d = Display.getCurrent(); -// -// if (d != null) { -// s = d.getActiveShell(); -// } -// else { -// d = Display.getDefault(); -// -// if (d != null) { -// s = d.getActiveShell(); -// } -// } -// } -// -// if (s != null) { -// org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(s); -// mb.setText("Unexcepted Error"); -// mb.setMessage("Unable to load resource file " + fileName + ".properties"); -// mb.open(); -// } -// } -// -// return rb; -// } - - /** - * Get a string from a given resource bundle. - * If not found, stack trace info is placed in the - * plugin's log file to help pinpoint the offending code. - */ -// public static String getString(ResourceBundle resourceBundle, String key) -// { -// try -// { -// return resourceBundle.getString(key); -// } -// catch (MissingResourceException exc) -// { -// SystemBasePlugin.logError("Missing resource: " + key, exc); -// } -// return null; -// } - - /** - * Get a string from a given resource bundle, with an english string to - * use a default if the given key is not found. - *

- * If not found, stack trace info is placed in the - * plugin's log file to help pinpoint the offending code. - */ -// public static String getString(ResourceBundle resourceBundle, String key, String defaultString) -// { -// String s = defaultString; -// try -// { -// s = resourceBundle.getString(key); -// } -// catch (MissingResourceException exc) -// { -// SystemBasePlugin.logError("Missing resource: " + key, exc); -// } -// return s; -// } - // ------------------ // MESSAGE METHODS... // ------------------ diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java index 68e4e325c73..f431b35136a 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/filters/dialogs/SystemNewFilterWizardNamePage.java @@ -208,7 +208,6 @@ public class SystemNewFilterWizardNamePage else if (poolWrapperInformation != null) { poolVerbiage = SystemWidgetHelpers.createVerbiage(composite_prompts, poolWrapperInformation.getVerbiageLabel(), nbrColumns, false, 200); - //poolWrapperCombo = SystemWidgetHelpers.createLabeledCombo(composite_prompts, null, poolWrapperInformation.getResourceBundle(), poolWrapperInformation.getPromptRBKey()); // d47323 poolWrapperCombo = SystemWidgetHelpers.createLabeledReadonlyCombo(composite_prompts, null, poolWrapperInformation.getPromptLabel(), poolWrapperInformation.getPromptTooltip()); poolComboLabel = SystemWidgetHelpers.getLastLabel(); poolWrappers = poolWrapperInformation.getWrappers();