diff options
author | Jonah Graham | 2018-11-20 16:20:42 +0000 |
---|---|---|
committer | Jonah Graham | 2018-11-22 21:47:02 +0000 |
commit | 170e654b4796bad1453ae85a427b97317d67a69a (patch) | |
tree | 6ca9b8a8fedd5fd25f97eb79c408312e256ff981 /build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java | |
parent | 35996a5c5ca5c254959ba48241eaada6dbf8628d (diff) | |
download | org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.gz org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.tar.xz org.eclipse.cdt-170e654b4796bad1453ae85a427b97317d67a69a.zip |
Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard
Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
Diffstat (limited to 'build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java')
-rw-r--r-- | build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java index 427cc0b56d1..b7570a541fb 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/TraceUtil.java @@ -7,7 +7,7 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: * IBM - Initial API and implementation * Markus Schorn (Wind River Systems) @@ -31,11 +31,12 @@ public class TraceUtil { public static final String EOL = System.getProperty("line.separator"); //$NON-NLS-1$ public static boolean SCANNER_CONFIG = false; private static LogWriter logger = null; - + static { - if (MakeCorePlugin.getDefault()!=null) // in case of running simple junit tests + if (MakeCorePlugin.getDefault() != null) // in case of running simple junit tests logger = new LogWriter(MakeCorePlugin.getDefault().getStateLocation().append(".log").toFile()); //$NON-NLS-1$ } + /* (non-Javadoc) * @see java.lang.Object#finalize() */ @@ -44,17 +45,17 @@ public class TraceUtil { logger.shutdown(); super.finalize(); } - + public static boolean isTracing() { return SCANNER_CONFIG; } - + public static void outputTrace(String prefix, String[] tokens, String postfix) { if (isTracing()) { System.out.print(prefix + ' '); for (int i = 0; i < tokens.length; i++) { System.out.print(tokens[i] + ' '); - + } System.out.println(postfix); } @@ -65,7 +66,7 @@ public class TraceUtil { System.out.println(prefix + ' ' + msg + ' ' + postfix); } } - + /** * For traces of type: * Title: @@ -78,21 +79,23 @@ public class TraceUtil { * item2[1] * ... */ - public static void outputTrace(String title, String subtitle1, List<String> item1, List<String> item1new, String subtitle2, List<String> item2) { + public static void outputTrace(String title, String subtitle1, List<String> item1, List<String> item1new, + String subtitle2, List<String> item2) { if (isTracing()) { //System.out.println(); System.out.println(title); - final String prefix = " "; //$NON-NLS-1$ - final String doublePrefix = " "; //$NON-NLS-1$ - System.out.println(prefix + subtitle1 + " (" + item1.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$ + final String prefix = " "; //$NON-NLS-1$ + final String doublePrefix = " "; //$NON-NLS-1$ + System.out.println(prefix + subtitle1 + " (" + item1.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$ int count = 0; - for (Iterator<String> i = item1.iterator(), j = item1new.iterator(); i.hasNext(); ) { - System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" +i.next() + (j.hasNext()?"\' -> \'" + j.next():"") + '\''); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + for (Iterator<String> i = item1.iterator(), j = item1new.iterator(); i.hasNext();) { + System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" + i.next() //$NON-NLS-1$ + + (j.hasNext() ? "\' -> \'" + j.next() : "") + '\''); //$NON-NLS-1$ //$NON-NLS-2$ } - System.out.println(prefix + subtitle2 + " (" + item2.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$ + System.out.println(prefix + subtitle2 + " (" + item2.size() + "):"); //$NON-NLS-1$ //$NON-NLS-2$ count = 0; - for (Iterator<String> i = item2.iterator(); i.hasNext(); ) { - System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" + i.next() + '\''); //$NON-NLS-1$ + for (Iterator<String> i = item2.iterator(); i.hasNext();) { + System.out.println(doublePrefix + String.valueOf(++count) + "\t\'" + i.next() + '\''); //$NON-NLS-1$ } } } @@ -139,8 +142,8 @@ public class TraceUtil { } } logger.flushLog(); + } catch (IOException e) { } - catch (IOException e) {} } public static void summaryTrace(String title, int workingDirsN, int commandsN, int filesN) { @@ -153,8 +156,8 @@ public class TraceUtil { logger.writeln(" Number of generic commands: " + Integer.toString(commandsN)); //$NON-NLS-1$ logger.writeln(" Number of compiled files: " + Integer.toString(filesN)); //$NON-NLS-1$ logger.flushLog(); + } catch (IOException e) { } - catch (IOException e) {} } /** @@ -167,8 +170,8 @@ public class TraceUtil { logger.writeln(); logger.writeln(trace); logger.flushLog(); + } catch (IOException e) { } - catch (IOException e) {} } } |