diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java index 684dff1acd1..86c864e1ed9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/util/TraceUtil.java @@ -18,67 +18,65 @@ import org.eclipse.cdt.core.parser.IProblem; * @author ddaoust */ public class TraceUtil { - public static void outputTrace(IParserLogService log, String preface, IProblem problem, String first, String second, String third ) { - if( log.isTracing() ) { + public static void outputTrace(IParserLogService log, String preface, IProblem problem, + String first, String second, String third) { + if (log.isTracing()) { StringBuffer buffer = new StringBuffer(); - if( preface != null ) buffer.append( preface ); - if( problem != null ) buffer.append( problem.getMessageWithLocation()); - if( first != null ) buffer.append( first ); - if( second != null ) buffer.append( second ); - if( third != null ) buffer.append( third ); - log.traceLog( buffer.toString() ); + if (preface != null) buffer.append(preface); + if (problem != null) buffer.append(problem.getMessageWithLocation()); + if (first != null) buffer.append(first); + if (second != null) buffer.append(second); + if (third != null) buffer.append(third); + log.traceLog(buffer.toString()); } } - public static void outputTrace(IParserLogService log, String preface, IProblem problem ) { - if( log.isTracing() ) { + + public static void outputTrace(IParserLogService log, String preface, IProblem problem) { + if (log.isTracing()) { StringBuffer buffer = new StringBuffer(); - if( preface != null ) buffer.append( preface ); - if( problem != null ) buffer.append( problem.getMessageWithLocation()); - log.traceLog( buffer.toString() ); + if (preface != null) buffer.append(preface); + if (problem != null) buffer.append(problem.getMessageWithLocation()); + log.traceLog(buffer.toString()); } } - public static void outputTrace(IParserLogService log, String preface, IProblem problem, char[] first, String second, String third ) { - if( log.isTracing() ) { + + public static void outputTrace(IParserLogService log, String preface, IProblem problem, + char[] first, String second, String third) { + if (log.isTracing()) { StringBuffer buffer = new StringBuffer(); - if( preface != null ) buffer.append( preface ); - if( problem != null ) buffer.append( problem.getMessageWithLocation()); - if( first != null ) buffer.append( first ); - if( second != null ) buffer.append( second ); - if( third != null ) buffer.append( third ); - log.traceLog( buffer.toString() ); + if (preface != null) buffer.append(preface); + if (problem != null) buffer.append(problem.getMessageWithLocation()); + if (first != null) buffer.append(first); + if (second != null) buffer.append(second); + if (third != null) buffer.append(third); + log.traceLog(buffer.toString()); } } - public static void outputTrace(IParserLogService log, String preface, IProblem problem, int first, String second, int third ) { - if( log.isTracing() ) { - outputTrace( - log, - preface, - problem, - Integer.toString( first ), - second, - Integer.toString( third ) ); + + public static void outputTrace(IParserLogService log, String preface, IProblem problem, + int first, String second, int third) { + if (log.isTracing()) { + outputTrace(log, preface, problem, Integer.toString(first), second, Integer.toString(third)); } } - public static void outputTrace(IParserLogService log, String preface, String first, String second, String third ) { - outputTrace(log, preface, null, first, second, third); + + public static void outputTrace(IParserLogService log, String preface, String first, + String second, String third) { + outputTrace(log, preface, null, first, second, third); } + public static void outputTrace(IParserLogService log, String preface) { - if( log.isTracing() ){ - if ( preface != null ) - log.traceLog( preface ); + if (log.isTracing() && preface != null) { + log.traceLog(preface); } } - /** - * @param logService - * @param preface - * @param data - */ + public static void outputTrace(IParserLogService logService, String preface, String data) { - if( logService.isTracing() ) { + if (logService.isTracing()) { StringBuffer buffer = new StringBuffer(); - if( preface != null ) buffer.append( preface ); - if( data != null ) buffer.append( data ); - logService.traceLog( buffer.toString() ); + if (preface != null) buffer.append(preface); + if (data != null) buffer.append(data); + logService.traceLog(buffer.toString()); } } }