Bug 66829 - Error in log if you create a C++ Class specifying Base Class in C++ Class wizard
Summary: Error in log if you create a C++ Class specifying Base Class in C++ Class wizard
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 69872
Blocks:
  Show dependency tree
 
Reported: 2004-06-12 12:04 EDT by Magda Bologa CLA
Modified: 2009-01-09 15:18 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magda Bologa CLA 2004-06-12 12:04:16 EDT
Problem: Error in log if you create a C++ Class specifying Base Class in C++ 
Class wizard (From Navigator View and C++ Projects View)
Repro with Standard and managed make C++ project.
Tested with:
Eclipse Platform
Version: 3.0.0
Build id: 200406030854

Eclipse C/C++ Development Tools
Version: 2.0.0
Build id: 200406030301


Steps: just create a Standard or managed make C++ project and add a class C1 
using the C++ class Wizard.
Now add another class C++ Class C2 (From Navigator View and C++ Projects View)
specifying Base Class as C1 in C++ Class wizard .
Actual: class created correctly but you get exceptions in log

Error log.


org.eclipse.cdt.core.parser.ParseError
	at java.lang.Throwable.<init>(Throwable.java)
	at org.eclipse.cdt.core.parser.ParseError.<init>(ParseError.java:48)
	at org.eclipse.cdt.internal.core.parser.ExpressionParser.LA
(ExpressionParser.java)
	at org.eclipse.cdt.internal.core.parser.ExpressionParser.LT
(ExpressionParser.java)
	at org.eclipse.cdt.internal.core.parser.Parser.classSpecifier
(Parser.java:2725)
	at org.eclipse.cdt.internal.core.parser.Parser.declSpecifierSeq
(Parser.java:1742)
	at org.eclipse.cdt.internal.core.parser.Parser.simpleDeclaration
(Parser.java:1018)
	at 
org.eclipse.cdt.internal.core.parser.Parser.simpleDeclarationStrategyUnion
(Parser.java:833)
	at org.eclipse.cdt.internal.core.parser.Parser.declaration
(Parser.java:811)
	at org.eclipse.cdt.internal.core.parser.Parser.translationUnit
(Parser.java:181)
	at org.eclipse.cdt.internal.core.parser.Parser.parse(Parser.java:134)
	at org.eclipse.cdt.internal.core.browser.cache.TypeParser.parseContents
(TypeParser.java:424)
	at org.eclipse.cdt.internal.core.browser.cache.TypeParser.parseSource
(TypeParser.java:319)
	at org.eclipse.cdt.internal.core.browser.cache.TypeParser.findType
(TypeParser.java:231)
	at 
org.eclipse.cdt.internal.core.browser.cache.TypeLocatorJob.runWithDelegatedProgr
ess(TypeLocatorJob.java:50)
	at org.eclipse.cdt.internal.core.browser.cache.BasicJob.run
(BasicJob.java:72)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java)
Comment 1 John Camelon CLA 2004-06-14 07:39:40 EDT
Chris, this looks to me to be a timeout.  
Why does the type-cache provide a timeout?  Do you not need the information to 
continue?  
Comment 2 Chris Wiebe CLA 2004-06-14 15:42:21 EDT
I believe it's because I use the timeout to do an early exit from the parse as
soon as I've found the info I need (ie looking up a specific type declaration).

The log entry is probably spurious and unnecessary.  You can remove this line:

TypeParser.java : 505
> CCorePlugin.log(e);
Comment 3 Chris Wiebe CLA 2004-06-18 16:11:22 EDT
This is sort-of fixed since I no longer write unnecessary parser errors to the log.

John, is there a way to cleanly terminate the parser?
Comment 4 John Camelon CLA 2004-06-18 16:22:19 EDT
Not yet.  What you are doing is fine, just be sure to catch the ParseError as 
you expect it. 
Ideally what I would like to do is allow for users to throw a 
TerminateParseException from within an ISourceElementRequestor rather than 
using the timeout facility, it is rather heavyweight.
Comment 5 Kleo Hapitas CLA 2004-07-07 16:56:36 EDT
PR was not targeted to any particular release. Changing target milestone to 2.1
Comment 6 Magda Bologa CLA 2004-07-08 11:50:25 EDT
I just tried the scenario with CDT 2.0 GA 200406301134 (with Eclipse 3.0 GA 
200406251208) and the error is not reproducible anymore.

This defect can be closed - OK now :)
Comment 7 Chris Wiebe CLA 2004-07-13 11:47:55 EDT
This bug is fixed but the underlying problem should still be addressed - namely,
how to cancel the parser "nicely".  See bug #69872.
Comment 8 Chris Wiebe CLA 2004-11-05 13:55:59 EST
Fixed.