Bug 165378 - GCCLanguage/GPPLanguage logger dependent on Platform/CCorePlugin
Summary: GCCLanguage/GPPLanguage logger dependent on Platform/CCorePlugin
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.0 M4   Edit
Assignee: Chris Recoskie CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks: 151846
  Show dependency tree
 
Reported: 2006-11-21 16:27 EST by Jason Montojo CLA
Modified: 2008-06-20 10:30 EDT (History)
0 users

See Also:


Attachments
Patch from Jason Montojo (10.74 KB, text/plain)
2006-11-24 09:41 EST, Chris Recoskie CLA
no flags Details
Patch from Jason Montojo (10.74 KB, patch)
2006-11-24 09:41 EST, Chris Recoskie CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Montojo CLA 2006-11-21 16:27:18 EST
The method getASTTranslationUnit on GCCLanguage and GPPLanguage uses org.eclipse.cdt.internal.core.parser.ParserLogService to log parse errors.  

ParserLogService calls org.eclipse.cdt.internal.core.model.Util.log() which delegates logging to CCorePlugin.

This is not practical for someone who wants to use the parser outside of CDT.  They should be given the opportunity to provide their own IParserLogService instead of relying on what CCorePlugin provides.

I'm proposing to change the signature of ILanguage.getASTTranslationUnit() to allow a client to pass their own logger.  Perhaps something like this:

public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log) throws CoreException;
Comment 1 Jason Montojo CLA 2006-11-22 09:42:19 EST
Patch in progress
Comment 2 Chris Recoskie CLA 2006-11-24 09:41:29 EST
Created attachment 54478 [details]
Patch from Jason Montojo
Comment 3 Chris Recoskie CLA 2006-11-24 09:41:38 EST
Created attachment 54479 [details]
Patch from Jason Montojo
Comment 4 Chris Recoskie CLA 2006-11-30 11:21:32 EST
Applied to HEAD.