1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-16 12:45:41 +02:00

bug 261976: Externalize strings

This commit is contained in:
Andrew Gvozdev 2012-03-17 06:39:04 -04:00
parent ac840daf1c
commit bb9be952d5
4 changed files with 9 additions and 5 deletions

View file

@ -16,6 +16,7 @@ import java.io.OutputStream;
import java.util.Properties; import java.util.Properties;
import org.eclipse.cdt.internal.core.Cygwin; import org.eclipse.cdt.internal.core.Cygwin;
import org.eclipse.cdt.internal.core.Messages;
import org.eclipse.cdt.internal.core.ProcessClosure; import org.eclipse.cdt.internal.core.ProcessClosure;
import org.eclipse.cdt.utils.PathUtil; import org.eclipse.cdt.utils.PathUtil;
import org.eclipse.cdt.utils.spawner.EnvironmentReader; import org.eclipse.cdt.utils.spawner.EnvironmentReader;
@ -25,6 +26,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.osgi.util.NLS;
/** /**
* @noextend This class is not intended to be subclassed by clients. * @noextend This class is not intended to be subclassed by clients.
@ -201,8 +203,8 @@ public class CommandLauncher implements ICommandLauncher {
envPathValue = System.getenv(PATH_ENV); envPathValue = System.getenv(PATH_ENV);
} }
errorMessage = errorMessage + NEWLINE errorMessage = errorMessage + NEWLINE
+ "Error: Program \"" + command + "\" not found in PATH" + NEWLINE + NLS.bind(Messages.CommandLauncher_ProgramNotFoundInPath, command) + NEWLINE
+ "PATH=[" + envPathValue + "]" + NEWLINE; + "PATH=[" + envPathValue + "]" + NEWLINE; //$NON-NLS-1$ //$NON-NLS-2$
} }
setErrorMessage(errorMessage); setErrorMessage(errorMessage);
fProcess = null; fProcess = null;
@ -258,7 +260,7 @@ public class CommandLauncher implements ICommandLauncher {
if (monitor.isCanceled()) { if (monitor.isCanceled()) {
closure.terminate(); closure.terminate();
state = COMMAND_CANCELED; state = COMMAND_CANCELED;
setErrorMessage(CCorePlugin.getResourceString("CommandLauncher.error.commandCanceled")); //$NON-NLS-1$ setErrorMessage(Messages.CommandLauncher_CommandCancelled);
} }
try { try {

View file

@ -26,8 +26,6 @@ CoreModel.PathEntry.DuplicateEntry= Duplicate path entries found ({0}), path: [{
CoreModel.PathEntry.NestedEntry= Nested path entries CoreModel.PathEntry.NestedEntry= Nested path entries
CoreModel.PathEntry.InvalidPathEntry= Invalid path CoreModel.PathEntry.InvalidPathEntry= Invalid path
CommandLauncher.error.commandCanceled=Command canceled
CCProjectNature.exception.noNature=Project must have a cnature CCProjectNature.exception.noNature=Project must have a cnature
CCorePlugin.exception.noBinaryFormat=No Binary Format CCorePlugin.exception.noBinaryFormat=No Binary Format

View file

@ -16,6 +16,8 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.messages"; //$NON-NLS-1$ private static final String BUNDLE_NAME = "org.eclipse.cdt.internal.core.messages"; //$NON-NLS-1$
public static String Util_unexpectedError; public static String Util_unexpectedError;
public static String Addr_valueOutOfRange; public static String Addr_valueOutOfRange;
public static String CommandLauncher_CommandCancelled;
public static String CommandLauncher_ProgramNotFoundInPath;
public static String convention_illegalIdentifier; public static String convention_illegalIdentifier;
public static String convention_invalid; public static String convention_invalid;
public static String convention_reservedKeyword; public static String convention_reservedKeyword;

View file

@ -47,6 +47,8 @@ convention_enum_invalidName= Enum name is invalid
Util_unexpectedError=Unexpected error Util_unexpectedError=Unexpected error
Addr_valueOutOfRange=Address is outside valid range. Addr_valueOutOfRange=Address is outside valid range.
CommandLauncher_CommandCancelled=Command canceled
CommandLauncher_ProgramNotFoundInPath=Error: Program "{0}" not found in PATH
XmlUtil_InternalErrorLoading=Internal error while trying to load XML document XmlUtil_InternalErrorLoading=Internal error while trying to load XML document
XmlUtil_InternalErrorSerializing=Internal error while trying to serialize XML Document. XmlUtil_InternalErrorSerializing=Internal error while trying to serialize XML Document.