mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
Externalize Strings on remotecdt
This commit is contained in:
parent
e9a568db01
commit
e30fe6981c
5 changed files with 60 additions and 13 deletions
|
@ -0,0 +1,3 @@
|
|||
#Tue Sep 19 23:47:40 CEST 2006
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/org/eclipse/rse/remotecdt/messages.properties=8859_1
|
|
@ -0,0 +1,30 @@
|
|||
package org.eclipse.rse.remotecdt;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public class Messages extends NLS {
|
||||
private static final String BUNDLE_NAME = "org.eclipse.rse.remotecdt.messages"; //$NON-NLS-1$
|
||||
|
||||
public static String RemoteCMainTab_Program;
|
||||
public static String RemoteCMainTab_SkipDownload;
|
||||
public static String RemoteCMainTab_ErrorNoProgram;
|
||||
public static String RemoteCMainTab_ErrorNoConnection;
|
||||
public static String RemoteCMainTab_Connection;
|
||||
public static String RemoteCMainTab_New;
|
||||
|
||||
public static String RemoteRunLaunchDelegate_RemoteShell;
|
||||
public static String RemoteRunLaunchDelegate_1;
|
||||
public static String RemoteRunLaunchDelegate_3;
|
||||
public static String RemoteRunLaunchDelegate_4;
|
||||
public static String RemoteRunLaunchDelegate_5;
|
||||
public static String RemoteRunLaunchDelegate_6;
|
||||
public static String RemoteRunLaunchDelegate_7;
|
||||
|
||||
static {
|
||||
// initialize resource bundle
|
||||
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
|
||||
}
|
||||
|
||||
private Messages() {
|
||||
}
|
||||
}
|
|
@ -39,10 +39,10 @@ import org.eclipse.swt.widgets.Text;
|
|||
public class RemoteCMainTab extends CMainTab {
|
||||
|
||||
/* Labels and Error Messages */
|
||||
private static final String REMOTE_PROG_LABEL_TEXT = "Remote Path for C/C++ Application:"; //$NON-NLS-1$
|
||||
private static final String SKIP_DOWNLOAD_BUTTON_TEXT = "Skip download to target path."; //$NON-NLS-1$
|
||||
private static final String REMOTE_PROG_TEXT_ERROR = "Remote executable path is not specified."; //$NON-NLS-1$
|
||||
private static final String CONNECTION_TEXT_ERROR = "Remote Connection must be selected."; //$NON-NLS-1$
|
||||
private static final String REMOTE_PROG_LABEL_TEXT = Messages.RemoteCMainTab_Program;
|
||||
private static final String SKIP_DOWNLOAD_BUTTON_TEXT = Messages.RemoteCMainTab_SkipDownload;
|
||||
private static final String REMOTE_PROG_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoProgram;
|
||||
private static final String CONNECTION_TEXT_ERROR = Messages.RemoteCMainTab_ErrorNoConnection;
|
||||
|
||||
/* Defaults */
|
||||
private static final String REMOTE_PATH_DEFAULT = EMPTY_STRING;
|
||||
|
@ -134,7 +134,7 @@ public class RemoteCMainTab extends CMainTab {
|
|||
projComp.setLayoutData(gd);
|
||||
|
||||
connectionLabel = new Label(projComp, SWT.NONE);
|
||||
connectionLabel.setText("Connection:"); //$NON-NLS-1$
|
||||
connectionLabel.setText(Messages.RemoteCMainTab_Connection);
|
||||
gd = new GridData();
|
||||
gd.horizontalSpan = 1;
|
||||
connectionLabel.setLayoutData(gd);
|
||||
|
@ -152,7 +152,7 @@ public class RemoteCMainTab extends CMainTab {
|
|||
});
|
||||
updateConnectionPulldown();
|
||||
|
||||
newRemoteConnectionButton = createPushButton(projComp, "New", null); //$NON-NLS-1$
|
||||
newRemoteConnectionButton = createPushButton(projComp, Messages.RemoteCMainTab_New, null);
|
||||
newRemoteConnectionButton.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
public void widgetSelected(SelectionEvent evt) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
|
|||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||
import org.eclipse.debug.core.ILaunchManager;
|
||||
import org.eclipse.debug.core.model.IProcess;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
import org.eclipse.rse.core.model.IHost;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.services.IService;
|
||||
|
@ -91,7 +92,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
command_arguments += " " + arguments; //$NON-NLS-1$
|
||||
remoteShellProcess = remoteShellExec(config, IRemoteConnectionConfigurationConstants.ATTR_REMOTE_DEBUGGER_COMMAND,
|
||||
command_arguments);
|
||||
DebugPlugin.newProcess(launch, remoteShellProcess, "Remote Shell"); //$NON-NLS-1$
|
||||
DebugPlugin.newProcess(launch, remoteShellProcess, Messages.RemoteRunLaunchDelegate_RemoteShell);
|
||||
|
||||
// Pre-set configuration constants for the GDBSERVERCDIDebugger to indicate how the gdbserver
|
||||
// was automatically started on the remote. GDBServerCDIDebugger uses these to figure out how
|
||||
|
@ -157,7 +158,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
|
||||
} else {
|
||||
IStatus status = new Status(IStatus.ERROR, getPluginID(),
|
||||
IStatus.OK, "Unidentified mode " + mode + " passed to RemoteRunLaunchDelegate", null); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IStatus.OK, NLS.bind(Messages.RemoteRunLaunchDelegate_1, mode), null);
|
||||
throw new CoreException(status);
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +189,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
|
||||
// Check that the service requested is file or shell.
|
||||
if(!kindOfService.equals(SHELL_SERVICE) && !kindOfService.equals(FILE_SERVICE))
|
||||
abort("Wrong service requested.", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
|
||||
abort(Messages.RemoteRunLaunchDelegate_3, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
|
||||
IHost currentConnection = getCurrentConnection(config);
|
||||
|
||||
|
@ -201,7 +202,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
break;
|
||||
}
|
||||
if(i >= subSystems.length)
|
||||
abort("No subsystem found.\n", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
|
||||
abort(Messages.RemoteRunLaunchDelegate_4, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
|
||||
// Need to run this in the UI thread
|
||||
|
||||
|
@ -218,7 +219,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
});
|
||||
|
||||
if(!subsystem.isConnected())
|
||||
abort("Could not connection to the remote system.", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
|
||||
abort(Messages.RemoteRunLaunchDelegate_5, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
|
||||
if(kindOfService.equals(SHELL_SERVICE))
|
||||
return ((IShellServiceSubSystem) subsystem).getShellService();
|
||||
|
@ -246,7 +247,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
Thread.sleep(500);
|
||||
p.destroy();
|
||||
} catch (Exception e) {
|
||||
abort("Error during file upload.", e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR ); //$NON-NLS-1$
|
||||
abort(Messages.RemoteRunLaunchDelegate_6, e, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -273,7 +274,7 @@ public class RemoteRunLaunchDelegate extends AbstractCLaunchDelegate {
|
|||
if (p != null) {
|
||||
p.destroy();
|
||||
}
|
||||
abort("Could not create the hostShellProcess.\n", null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR); //$NON-NLS-1$
|
||||
abort(Messages.RemoteRunLaunchDelegate_7, null, ICDTLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
|
||||
}
|
||||
return p;
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
RemoteRunLaunchDelegate_RemoteShell=Remote Shell
|
||||
RemoteRunLaunchDelegate_1=Unidentified mode {0} passed to RemoteRunLaunchDelegate
|
||||
RemoteRunLaunchDelegate_3=Wrong service requested.
|
||||
RemoteRunLaunchDelegate_4=No subsystem found.\n
|
||||
RemoteRunLaunchDelegate_5=Could not connect to the remote system.
|
||||
RemoteRunLaunchDelegate_6=Error during file upload.
|
||||
RemoteRunLaunchDelegate_7=Could not create the hostShellProcess.\n
|
||||
RemoteCMainTab_Program=Remote Path for C/C++ Application:
|
||||
RemoteCMainTab_SkipDownload=Skip download to target path.
|
||||
RemoteCMainTab_ErrorNoProgram=Remote executable path is not specified.
|
||||
RemoteCMainTab_ErrorNoConnection=Remote Connection must be selected.
|
||||
RemoteCMainTab_Connection=Connection:
|
||||
RemoteCMainTab_New=New
|
Loading…
Add table
Reference in a new issue