From 0d05a8342de332c30bef13e3a36ea760bdb15e6a Mon Sep 17 00:00:00 2001 From: John Camelon Date: Wed, 1 Oct 2003 19:43:06 +0000 Subject: [PATCH] Patch for Bogdan Gheorghe. This patch fixes the indexer merge problem on large projects. Automation Test Suite run on Windows + Linux. --- core/org.eclipse.cdt.core/ChangeLog | 7 +++++++ core/org.eclipse.cdt.core/index/ChangeLog | 4 ++++ .../internal/core/index/impl/BlocksIndexOutput.java | 4 ++-- core/org.eclipse.cdt.core/parser/ChangeLog | 4 ++++ .../eclipse/cdt/internal/core/parser/Parser.java | 2 +- .../org/eclipse/cdt/internal/core/CDTLogWriter.java | 13 +++++++------ 6 files changed, 25 insertions(+), 9 deletions(-) diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index 7eae92a75ba..56c4b54b925 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,10 @@ +2003-10-01 Bogdan Gheorghe + + Modified CDTLogWriter: increased max log file size to 10MB; got rid of + the stack dumps/ + + * src/org/eclipse/cdt/internal/core/CDTLogWriter.java + 2003-10-01 Rob Jackson Avoid a NPE when processing non-absolute FILE references in elf binaries diff --git a/core/org.eclipse.cdt.core/index/ChangeLog b/core/org.eclipse.cdt.core/index/ChangeLog index 9f27bd3ea67..e77ddcb9369 100644 --- a/core/org.eclipse.cdt.core/index/ChangeLog +++ b/core/org.eclipse.cdt.core/index/ChangeLog @@ -1,3 +1,7 @@ +2003-10-01 Bogdan Gheorghe + Modified BlockIndexOutput.addInclude to properly flush an + include block once it's full. + 2003-09-30 Bogdan Gheorghe Changed logging for SourceIndexer to log file in cdt.core diff --git a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java index 68b6879a829..a0ee21085c1 100644 --- a/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java +++ b/core/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java @@ -121,7 +121,7 @@ public class BlocksIndexOutput extends IndexOutput { if (includeIndexBlock.isEmpty()) { return; } - flushWords(); + flushIncludes(); addInclude(entry); } } @@ -179,7 +179,7 @@ public class BlocksIndexOutput extends IndexOutput { /** * */ - public void flushIncludes() throws IOException { + protected void flushIncludes() throws IOException { if (!firstInBlock && includeIndexBlock != null) { // could have added a document without any indexed word, no block created yet includeIndexBlock.flush(); diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog b/core/org.eclipse.cdt.core/parser/ChangeLog index 8e5a9c90ff9..5752b2c50fc 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog +++ b/core/org.eclipse.cdt.core/parser/ChangeLog @@ -1,8 +1,12 @@ +2003-10-01 Bogdan Gheorghe + Modified CDT log dump in Parser.fetchToken to include error message + 2003-10-01 Andrew Niefer bug43450 - Scanner needs to handle include paths that contain quotes 2003-09-30 Bogdan Gheorghe Added CDT log dump in Parser.fetchToken to catch HandleInclusion failures + 2003-09-30 John Camelon Fixed Bug 43503 : Search:f_SD_01 cannot be found in ManyClasses20 Project Fixed Bug 43680 : Fix Parser Error Handling diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java index 7fc457c4398..bb35d3b3bf7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java @@ -4988,7 +4988,7 @@ public class Parser implements IParser catch (ScannerException e) { Util.debugLog( "ScannerException thrown : " + e.getMessage(), IDebugLogConstants.PARSER ); - org.eclipse.cdt.internal.core.model.Util.log(e, "Scanner Exception", ICLogConstants.CDT); //$NON-NLS-1$h + org.eclipse.cdt.internal.core.model.Util.log(e, "Scanner Exception: " + e.getMessage() , ICLogConstants.CDT); //$NON-NLS-1$h if( e.isSeriousError(mode) ) { failParse(); diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDTLogWriter.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDTLogWriter.java index c4d1466060b..dbef18b5f17 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDTLogWriter.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CDTLogWriter.java @@ -34,14 +34,14 @@ public class CDTLogWriter { protected boolean newSession = true; protected static final String SESSION = "*** SESSION";//$NON-NLS-1$ - protected static final String ENTRY = "*** ENTRY";//$NON-NLS-1$ - protected static final String SUBENTRY = "*** SUBENTRY";//$NON-NLS-1$ - protected static final String MESSAGE = "*** MESSAGE";//$NON-NLS-1$ - protected static final String STACK = "*** STACK";//$NON-NLS-1$ + protected static final String ENTRY = "ENTRY";//$NON-NLS-1$ + protected static final String SUBENTRY = "SUBENTRY";//$NON-NLS-1$ + protected static final String MESSAGE = "MESSAGE";//$NON-NLS-1$ + protected static final String STACK = "STACK";//$NON-NLS-1$ protected static final String LINE_SEPARATOR; protected static final String TAB_STRING = "\t";//$NON-NLS-1$ - protected static final long MAXLOG_SIZE = 5000000; + protected static final long MAXLOG_SIZE = 10000000; static { String s = System.getProperty("line.separator");//$NON-NLS-1$ LINE_SEPARATOR = s == null ? "\n" : s;//$NON-NLS-1$ @@ -185,7 +185,8 @@ public class CDTLogWriter { writeSpace(); writeln(status.getMessage()); - write(status.getException()); + //Took out the stack dump - too much space + //write(status.getException()); if (status.isMultiStatus()) { IStatus[] children = status.getChildren();