1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

Externalize strings in ssh services

This commit is contained in:
Martin Oberhuber 2006-07-07 09:13:31 +00:00
parent 896ef5f33a
commit 54d0676204
4 changed files with 60 additions and 7 deletions

View file

@ -0,0 +1,3 @@
#Fri Jul 07 11:01:49 CEST 2006
eclipse.preferences.version=1
encoding//src/org/eclipse/rse/connectorservice/ssh/SshConnectorResources.properties=8859_1

View file

@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc.
* 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
*
* Contributors:
* Martin Oberhuber (Wind River) - initial API and implementation
*******************************************************************************/
package org.eclipse.rse.connectorservice.ssh;
import org.eclipse.osgi.util.NLS;
public class SshConnectorResources extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.rse.connectorservice.ssh.SshConnectorResources"; //$NON-NLS-1$
public static String SshConnectorService_Name;
public static String SshConnectorService_Description;
public static String SshConnectorService_ErrorDisconnecting;
public static String SshConnectorService_Info;
public static String SshConnectorService_Warning;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, SshConnectorResources.class);
}
private SshConnectorResources() {
}
}

View file

@ -0,0 +1,17 @@
################################################################################
# Copyright (c) 2006 Wind River Systems, Inc.
# 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
#
# Contributors:
# Martin Oberhuber (Wind River) - initial API and implementation
################################################################################
SshConnectorService_Name=SSH Connector Service
SshConnectorService_Description=SSH Connector Service Description
SshConnectorService_ErrorDisconnecting=ConnectionStatusListener: Error disconnecting
SshConnectorService_Warning=Warning
SshConnectorService_Info=Info

View file

@ -76,7 +76,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
//it will be overridden when the subsystem initializes (through
//setPort() on our base class -- I assume the port is meant to
//be a local port.
super("SSH Connector Service", "SSH Connector Service Description", host, 0);
super(SshConnectorResources.SshConnectorService_Name, SshConnectorResources.SshConnectorService_Description, host, 0);
fSessionLostHandler = null;
}
@ -418,7 +418,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
}
catch (Exception e)
{
SystemBasePlugin.logError("ConnectionStatusListener: Error disconnecting", e);
SystemBasePlugin.logError(SshConnectorResources.SshConnectorService_ErrorDisconnecting, e);
}
}
@ -482,7 +482,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
if (winShell != null && !winShell.isDisposed()
&& winShell.isVisible()) {
SystemBasePlugin
.logInfo("Using active workbench window as runnable context");
.logInfo("Using active workbench window as runnable context"); //$NON-NLS-1$
shell = winShell;
return win;
} else {
@ -491,7 +491,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
}
if (shell == null || shell.isDisposed() || !shell.isVisible()) {
SystemBasePlugin
.logInfo("Using progress monitor dialog with given shell as parent");
.logInfo("Using progress monitor dialog with given shell as parent"); //$NON-NLS-1$
shell = rshell;
}
IRunnableContext dlg = new ProgressMonitorDialog(rshell);
@ -527,7 +527,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName));
msgDlg.open();
}
};
}
/**
* Notification from sub-services that our session was lost.
@ -567,7 +567,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
final boolean[] retval = new boolean[1];
getStandardDisplay().syncExec(new Runnable() {
public void run() {
retval[0] = MessageDialog.openQuestion(null, "Warning", str);
retval[0] = MessageDialog.openQuestion(null, SshConnectorResources.SshConnectorService_Warning, str);
}
});
return retval[0];
@ -607,7 +607,7 @@ public class SshConnectorService extends AbstractConnectorService implements ISs
public void showMessage(final String message) {
getStandardDisplay().syncExec(new Runnable() {
public void run() {
MessageDialog.openInformation(null, "Info", message);
MessageDialog.openInformation(null, SshConnectorResources.SshConnectorService_Info, message);
}
});
}