Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivian Kong2009-10-27 11:03:54 -0400
committerVivian Kong2009-10-27 11:03:54 -0400
commit5247786e30241c3cd08bebdb68dae4fd4a66cb23 (patch)
treec6429d8039c20748cdc1483738d8208af6a0a2e7
parente6e71fa9940d9032fc4736329f01b4cc4544534d (diff)
downloadorg.eclipse.cdt-5247786e30241c3cd08bebdb68dae4fd4a66cb23.tar.gz
org.eclipse.cdt-5247786e30241c3cd08bebdb68dae4fd4a66cb23.tar.xz
org.eclipse.cdt-5247786e30241c3cd08bebdb68dae4fd4a66cb23.zip
Bug 293383 - Add trace() to PDOMWriter
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java13
2 files changed, 11 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java
index ed08ff0f72..bfd5b7b0c1 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java
@@ -510,7 +510,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
final String fileName = path.lastSegment();
try {
if (fShowActivity) {
- System.out.println("Indexer: parsing " + filePath + " up front"); //$NON-NLS-1$ //$NON-NLS-2$
+ trace("Indexer: parsing " + filePath + " up front"); //$NON-NLS-1$ //$NON-NLS-2$
}
monitor.subTask(getMessage(MessageKind.parsingFileTask,
fileName, path.removeLastSegments(1).toString()));
@@ -660,7 +660,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
Throwable th= null;
try {
if (fShowActivity) {
- System.out.println("Indexer: parsing " + path.toOSString()); //$NON-NLS-1$
+ trace("Indexer: parsing " + path.toOSString()); //$NON-NLS-1$
}
pm.subTask(getMessage(MessageKind.parsingFileTask,
path.lastSegment(), path.removeLastSegments(1).toString()));
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
index 92f1829508..307c8001b7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Markus Schorn - initial API and implementation
+ * IBM Corporation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom;
@@ -190,7 +191,7 @@ abstract public class PDOMWriter {
final IIndexFileLocation ifl= ifls[i];
if (ifl != null) {
if (fShowActivity) {
- System.out.println("Indexer: adding " + ifl.getURI()); //$NON-NLS-1$
+ trace("Indexer: adding " + ifl.getURI()); //$NON-NLS-1$
}
Throwable th= null;
try {
@@ -504,12 +505,16 @@ abstract public class PDOMWriter {
String pmsg= problem.getMessage();
if (pmsg != null && pmsg.length() > 0)
msg+= "; " + problem.getMessage(); //$NON-NLS-1$
- System.out.println(msg);
+ trace(msg);
}
private void reportProblem(IASTProblem problem) {
String msg= "Indexer: " + problem.getMessageWithLocation(); //$NON-NLS-1$
- System.out.println(msg);
+ trace(msg);
+ }
+
+ protected void trace(String message) {
+ System.out.println(message);
}
}

Back to the top