1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 20:35:38 +02:00

move messages into own message class

This commit is contained in:
David Inglis 2004-05-05 02:46:50 +00:00
parent a9e573a74c
commit ab74918aec
15 changed files with 100 additions and 73 deletions

View file

@ -23,6 +23,7 @@ import org.eclipse.cdt.core.ErrorParserManager;
import org.eclipse.cdt.core.model.ICModelMarker;
import org.eclipse.cdt.core.resources.ACBuilder;
import org.eclipse.cdt.core.resources.IConsole;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.StreamMonitor;
import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory;
import org.eclipse.core.resources.IContainer;
@ -45,8 +46,6 @@ import org.eclipse.core.runtime.jobs.Job;
public class MakeBuilder extends ACBuilder {
private static final String BUILD_ERROR = "MakeBuilder.buildError"; //$NON-NLS-1$
public final static String BUILDER_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"; //$NON-NLS-1$
public MakeBuilder() {
@ -116,7 +115,7 @@ public class MakeBuilder extends ACBuilder {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(MakeCorePlugin.getResourceString("MakeBuilder.Invoking_Make_Builder") + currProject.getName(), 100); //$NON-NLS-1$
monitor.beginTask(MakeMessages.getString("MakeBuilder.Invoking_Make_Builder") + currProject.getName(), 100); //$NON-NLS-1$
try {
IPath buildCommand = info.getBuildCommand();
@ -204,11 +203,11 @@ public class MakeBuilder extends ACBuilder {
} catch (IOException e) {
}
// Before launching give visual cues via the monitor
monitor.subTask(MakeCorePlugin.getResourceString("MakeBuilder.Invoking_Command") + launcher.getCommandLine()); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("MakeBuilder.Invoking_Command") + launcher.getCommandLine()); //$NON-NLS-1$
if (launcher.waitAndRead(sniffer, sniffer, new SubProgressMonitor(monitor, 0))
!= CommandLauncher.OK)
errMsg = launcher.getErrorMessage();
monitor.subTask(MakeCorePlugin.getResourceString("MakeBuilder.Updating_project")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("MakeBuilder.Updating_project")); //$NON-NLS-1$
try {
// Do not allow the cancel of the refresh, since the builder is external
@ -229,7 +228,7 @@ public class MakeBuilder extends ACBuilder {
buf.append(' ');
}
String errorDesc = MakeCorePlugin.getFormattedString(BUILD_ERROR, buf.toString());
String errorDesc = MakeMessages.getFormattedString("MakeBuilder.buildError", buf.toString()); //$NON-NLS-1$
buf = new StringBuffer(errorDesc);
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
@ -240,7 +239,7 @@ public class MakeBuilder extends ACBuilder {
stdout.close();
stderr.close();
monitor.subTask(MakeCorePlugin.getResourceString("MakeBuilder.Creating_Markers")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("MakeBuilder.Creating_Markers")); //$NON-NLS-1$
sniffer.close();
epm.reportProblems();
cos.close();

View file

@ -12,17 +12,14 @@ package org.eclipse.cdt.make.core;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo;
import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo;
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser;
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigBuilder;
import org.eclipse.cdt.make.internal.core.BuildInfoFactory;
@ -62,8 +59,6 @@ public class MakeCorePlugin extends Plugin {
//The shared instance.
private static MakeCorePlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/**
* The constructor.
@ -71,11 +66,6 @@ public class MakeCorePlugin extends Plugin {
public MakeCorePlugin(IPluginDescriptor descriptor) {
super(descriptor);
plugin = this;
try {
resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.make.core.PluginResources"); //$NON-NLS-1$
} catch (MissingResourceException x) {
resourceBundle = null;
}
}
/**
@ -100,30 +90,6 @@ public class MakeCorePlugin extends Plugin {
ResourcesPlugin.getPlugin().getLog().log(status);
}
/**
* Returns the string from the plugin's resource bundle,
* or 'key' if not found.
*/
public static String getResourceString(String key) {
ResourceBundle bundle = MakeCorePlugin.getDefault().getResourceBundle();
try {
return bundle.getString(key);
} catch (MissingResourceException e) {
return key;
}
}
public static String getFormattedString(String key, String arg) {
return MessageFormat.format(getResourceString(key), new String[] { arg });
}
/**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
public static String getUniqueIdentifier() {
if (getDefault() == null) {
// If the default instance is not yet initialized,

View file

@ -40,6 +40,7 @@ import org.eclipse.cdt.core.parser.IScannerInfoProvider;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.MakeScannerInfo;
import org.eclipse.cdt.make.core.MakeScannerProvider;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.scannerconfig.util.ScannerConfigUtil;
import org.eclipse.cdt.make.internal.core.scannerconfig.util.SymbolEntry;
import org.eclipse.core.resources.IProject;
@ -183,7 +184,7 @@ public class DiscoveredScannerInfoProvider extends AbstractCExtension implements
// Add the symbol to the symbol list
String symbol = ((Element)child).getAttribute(SYMBOL);
String removed = ((Element)child).getAttribute(REMOVED);
boolean bRemoved = (removed != null && removed.equals("true")); // $NON-NLS-1$
boolean bRemoved = (removed != null && removed.equals("true")); //$NON-NLS-1$
ScannerConfigUtil.scAddSymbolString2SymbolEntryMap(symbols, symbol, !bRemoved);
}
child = child.getNextSibling();
@ -304,21 +305,21 @@ public class DiscoveredScannerInfoProvider extends AbstractCExtension implements
private void loadDiscoveredScannerInfoFromState(IProject project, LinkedHashMap includes, LinkedHashMap symbols) throws CoreException {
// Save the document
IPath path = MakeCorePlugin.getWorkingDirectory();
path = path.append(project.getName() + ".sc");
path = path.append(project.getName() + ".sc"); //$NON-NLS-1$
if (path.toFile().exists()) {
try {
FileInputStream file = new FileInputStream(path.toFile());
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = parser.parse(file);
Node rootElement = document.getFirstChild();
if (rootElement.getNodeName().equals("scannerInfo")) {
if (rootElement.getNodeName().equals("scannerInfo")) { //$NON-NLS-1$
Node child = rootElement.getFirstChild();
loadDiscoveredScannerInfo(includes, symbols, child);
}
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR,
MakeCorePlugin.getUniqueIdentifier(), -1,
MakeCorePlugin.getResourceString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
MakeMessages.getString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
} catch (ParserConfigurationException e) {
MakeCorePlugin.log(e);
} catch (FactoryConfigurationError e) {
@ -334,8 +335,8 @@ public class DiscoveredScannerInfoProvider extends AbstractCExtension implements
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.newDocument();
Element rootElement = doc.createElement("scannerInfo");
rootElement.setAttribute("id", CDESCRIPTOR_ID);
Element rootElement = doc.createElement("scannerInfo"); //$NON-NLS-1$
rootElement.setAttribute("id", CDESCRIPTOR_ID); //$NON-NLS-1$
doc.appendChild(rootElement);
saveDiscoveredScannerInfo(scannerInfo, rootElement, doc);
@ -352,7 +353,7 @@ public class DiscoveredScannerInfoProvider extends AbstractCExtension implements
// Save the document
IPath path = MakeCorePlugin.getWorkingDirectory();
path = path.append(project.getName() + ".sc");
path = path.append(project.getName() + ".sc"); //$NON-NLS-1$
try {
FileOutputStream file = new FileOutputStream(path.toFile());
file.write(stream.toByteArray());
@ -360,7 +361,7 @@ public class DiscoveredScannerInfoProvider extends AbstractCExtension implements
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR,
MakeCorePlugin.getUniqueIdentifier(), -1,
MakeCorePlugin.getResourceString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
MakeMessages.getString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
}
// Close the streams

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.make.core.scannerconfig;
import java.util.Map;
import org.eclipse.cdt.core.resources.ACBuilder;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoCollector;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
@ -49,7 +50,7 @@ public class ScannerConfigBuilder extends ACBuilder {
if (autodiscoveryEnabled) {
monitor.beginTask("ScannerConfigBuilder.Invoking_Builder", 100); //$NON-NLS-1$
monitor.subTask(MakeCorePlugin.getResourceString("ScannerConfigBuilder.Invoking_Builder") + //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder") + //$NON-NLS-1$
getProject().getName());
ScannerInfoCollector.getInstance().updateScannerConfiguration(getProject(), new SubProgressMonitor(monitor, 100));
}

View file

@ -318,7 +318,7 @@ public class BuildInfoFactory {
ICommand builder;
builder = MakeProjectNature.getBuildSpec(project, builderID);
if (builder == null) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("BuildInfoFactory.Missing_Builder") + builderID, null)); //$NON-NLS-1$
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("BuildInfoFactory.Missing_Builder") + builderID, null)); //$NON-NLS-1$
}
args = builder.getArguments();
}

View file

@ -0,0 +1,56 @@
/*******************************************************************************
* Copyright (c) 2002, 2003, 2004 QNX Software Systems Ltd. and others. All
* rights reserved. This program and the accompanying materials are made
* available under the terms of the Common Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: QNX Software Systems - Initial API and implementation
******************************************************************************/
package org.eclipse.cdt.make.internal.core;
import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class MakeMessages {
private static final String RESOURCE_BUNDLE= MakeMessages.class.getName();
private static ResourceBundle fgResourceBundle;
static {
try {
fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
} catch (MissingResourceException x) {
fgResourceBundle = null;
}
}
private MakeMessages() {
}
public static String getString(String key) {
try {
return fgResourceBundle.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
} catch (NullPointerException e) {
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
/**
* Gets a string from the resource bundle and formats it with the argument
*
* @param key the string used to get the bundle value, must not be null
*/
public static String getFormattedString(String key, Object arg) {
return MessageFormat.format(getString(key), new Object[] { arg });
}
/**
* Gets a string from the resource bundle and formats it with arguments
*/
public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
}
}

View file

@ -3,7 +3,7 @@ MakeBuilder.buildError=Error launching builder ({0})
MakeBuilder.Invoking_Make_Builder=Invoking Make Builder...
MakeBuilder.Invoking_Command=Invoking Command:
MakeBuilder.Updating_project=Updating project...
MakeBuidler.Creating_Markers=Generating markers...
MakeBuilder.Creating_Markers=Generating markers...
BuildInfoFactory.Missing_Builder=Missing Builder:

View file

@ -61,10 +61,10 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
public void addTarget(IContainer container, IMakeTarget target) throws CoreException {
if (container instanceof IWorkspaceRoot) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
}
if (target.getContainer() != null) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.add_temporary_target"), null)); //$NON-NLS-1$
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.add_temporary_target"), null)); //$NON-NLS-1$
}
IProject project = container.getProject();
ProjectTargets projectTargets = (ProjectTargets)projectMap.get(project);
@ -96,7 +96,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
projectTargets = readTargets(project);
}
if (!projectTargets.contains((MakeTarget)target)) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
}
((MakeTarget)target).setName(name);
updateTarget((MakeTarget) target);
@ -255,7 +255,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
projectTargets.saveTargets();
} catch (IOException e) {
throw new CoreException(
new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.error_writing_file"), e)); //$NON-NLS-1$
new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeMessages.getString("MakeTargetManager.error_writing_file"), e)); //$NON-NLS-1$
}
}

View file

@ -139,7 +139,7 @@ public class ProjectTargets {
ArrayList list = (ArrayList) targetMap.get(target.getContainer());
if (list != null && list.contains(target)) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
MakeCorePlugin.getResourceString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
MakeMessages.getString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
}
if (list == null) {
list = new ArrayList();

View file

@ -28,6 +28,7 @@ import org.eclipse.cdt.core.resources.IConsole;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo;
import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.StreamMonitor;
import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerConfigUtil;
import org.eclipse.core.resources.IMarker;
@ -67,7 +68,7 @@ public class DefaultExternalScannerInfoProvider implements IExternalScannerInfoP
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(MakeCorePlugin.getResourceString("ExternalScannerInfoProvider.Reading_Specs"), 100); //$NON-NLS-1$
monitor.beginTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs"), 100); //$NON-NLS-1$
try {
IConsole console = CCorePlugin.getDefault().getConsole(EXTERNAL_SI_PROVIDER_CONSOLE_ID);
@ -75,7 +76,7 @@ public class DefaultExternalScannerInfoProvider implements IExternalScannerInfoP
OutputStream cos = console.getOutputStream();
// Before launching give visual cues via the monitor
monitor.subTask(MakeCorePlugin.getResourceString("ExternalScannerInfoProvider.Reading_Specs")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs")); //$NON-NLS-1$
String errMsg = null;
CommandLauncher launcher = new CommandLauncher();
@ -87,7 +88,7 @@ public class DefaultExternalScannerInfoProvider implements IExternalScannerInfoP
String ca = coligate(compileArguments);
monitor.subTask(MakeCorePlugin.getResourceString("ExternalScannerInfoProvider.Invoking_Command") //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Invoking_Command") //$NON-NLS-1$
+ fCompileCommand.toString() + ca);
cos = new StreamMonitor(new SubProgressMonitor(monitor, 70), cos, 100);
@ -104,19 +105,19 @@ public class DefaultExternalScannerInfoProvider implements IExternalScannerInfoP
if (launcher.waitAndRead(sniffer, sniffer, new SubProgressMonitor(monitor, 0)) != CommandLauncher.OK) {
errMsg = launcher.getErrorMessage();
}
monitor.subTask(MakeCorePlugin.getResourceString("ExternalScannerInfoProvider.Parsing_Output")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Parsing_Output")); //$NON-NLS-1$
}
else {
errMsg = launcher.getErrorMessage();
}
if (errMsg != null) {
String errorDesc = MakeCorePlugin.getFormattedString(EXTERNAL_SI_PROVIDER_ERROR,
String errorDesc = MakeMessages.getFormattedString(EXTERNAL_SI_PROVIDER_ERROR,
fCompileCommand.toString() + ca);
addMarker(currentProject, -1, errorDesc, IMarkerGenerator.SEVERITY_WARNING, null);
}
monitor.subTask(MakeCorePlugin.getResourceString("ExternalScannerInfoProvider.Creating_Markers")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Creating_Markers")); //$NON-NLS-1$
sniffer.close();
cos.close();
}

View file

@ -27,6 +27,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo;
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigNature;
import org.eclipse.cdt.make.internal.core.MakeMessages;
/**
* Creates a ScannerConfigBuilderInfo variant
@ -274,7 +275,7 @@ public class ScannerConfigInfoFactory {
if (builder == null) {
throw new CoreException(new Status(IStatus.ERROR,
MakeCorePlugin.getUniqueIdentifier(), -1,
MakeCorePlugin.getResourceString("ScannerConfigInfoFactory.Missing_Builder")//$NON-NLS-1$
MakeMessages.getString("ScannerConfigInfoFactory.Missing_Builder")//$NON-NLS-1$
+ builderID, null));
}
args = builder.getArguments();

View file

@ -38,6 +38,7 @@ import org.eclipse.cdt.make.core.scannerconfig.DiscoveredScannerInfo;
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo;
import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider;
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigBuilder;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator;
import org.eclipse.cdt.make.internal.core.scannerconfig.util.ScannerConfigUtil;
@ -153,17 +154,17 @@ public class ScannerInfoCollector {
*/
private void updateScannerConfig(IProject project, IProgressMonitor monitor) {
IScannerInfoProvider provider = CCorePlugin.getDefault().getScannerInfoProvider(project);
monitor.beginTask(MakeCorePlugin.getResourceString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
monitor.beginTask(MakeMessages.getString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
if (provider != null) {
IScannerInfo scanInfo = provider.getScannerInformation(project);
if (scanInfo != null) {
if (scanInfo instanceof DiscoveredScannerInfo) {
DiscoveredScannerInfo discScanInfo = (DiscoveredScannerInfo)scanInfo;
String projectName = project.getName();
monitor.subTask(MakeCorePlugin.getResourceString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
if (scannerConfigNeedsUpdate(discScanInfo, projectName)) {
monitor.worked(50);
monitor.subTask(MakeCorePlugin.getResourceString("ScannerInfoCollector.Updating") + projectName); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + projectName); //$NON-NLS-1$
try {
// update scanner configuration
discScanInfo.update();

View file

@ -15,6 +15,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.internal.core.MakeMessages;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
@ -50,7 +51,7 @@ public class GCCScannerConfigUtil {
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR,
MakeCorePlugin.getUniqueIdentifier(), -1,
MakeCorePlugin.getResourceString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
MakeMessages.getString("GCCScannerConfigUtil.Error_Message"), e)); //$NON-NLS-1$
}
}
}

View file

@ -90,7 +90,7 @@ public class GCCScannerInfoConsoleParser implements IScannerInfoConsoleParser {
if (symbol.length() == 0) {
if (scanner.hasMoreTokens()) {
symbol = scanner.nextToken();
if (symbol.startsWith("-")) { // $NON-NLS-1$
if (symbol.startsWith("-")) { //$NON-NLS-1$
cashedToken = symbol;
continue;
}
@ -107,7 +107,7 @@ public class GCCScannerInfoConsoleParser implements IScannerInfoConsoleParser {
if (iPath.length() == 0) {
if (scanner.hasMoreTokens()) {
iPath = scanner.nextToken();
if (iPath.startsWith("-")) { // $NON-NLS-1$
if (iPath.startsWith("-")) { //$NON-NLS-1$
cashedToken = iPath;
continue;
}

View file

@ -53,9 +53,9 @@ public class TraceUtil {
System.out.println(prefix + subtitle1 + " (" + item1.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$
int count = 0;
for (Iterator i = item1.iterator(), j = item1new.iterator(); i.hasNext(); ) {
System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" +(String)i.next() + (j.hasNext()?"\' -> \'" + (String)j.next():"") + '\''); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" +(String)i.next() + (j.hasNext()?"\' -> \'" + (String)j.next():"") + '\''); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
System.out.println(prefix + subtitle2 + " (" + item2.size() + "):"); //$NON-NLS-1$
System.out.println(prefix + subtitle2 + " (" + item2.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$
count = 0;
for (Iterator i = item2.iterator(); i.hasNext(); ) {
System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" + (String)i.next() + '\''); //$NON-NLS-1$