mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 293383 - Add trace() to PDOMWriter
This commit is contained in:
parent
cbc078f817
commit
84ac7856bc
2 changed files with 11 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* IBM Corporation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom;
|
||||
|
||||
|
@ -532,7 +533,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()));
|
||||
|
@ -682,7 +683,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()));
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* IBM Corporation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.pdom;
|
||||
|
||||
|
@ -198,7 +199,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$
|
||||
}
|
||||
index.acquireWriteLock(readlockCount);
|
||||
long start= System.currentTimeMillis();
|
||||
|
@ -523,12 +524,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);
|
||||
}
|
||||
|
||||
protected IStatus createStatus(String msg) {
|
||||
|
|
Loading…
Add table
Reference in a new issue