Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352680

Summary: [RDT] Unable to use TranslationUnit as a standalone parser
Product: [Tools] PTP Reporter: Ferosh Jacob <feroshjacob>
Component: RDTAssignee: Project Inbox <ptp-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: g.watson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ferosh Jacob CLA 2011-07-20 17:09:29 EDT
Build Identifier: v20110715906

TranslationUnit unit = new TranslationUnit(null, file.getName(), "test", file.toURI()); //$NON-NLS-1$
For the constructor above, the translationunit is not parsing the file, the content is always empty. It can be fixed if you replace the
 	public char[] getContents() {
		return new char[0];
	}
with 
	public char[] getContents() {
	      getCodeReader.buffer;
	}

Reproducible: Always

Steps to Reproduce:
1.Try to invoke the TranslationUnit constructor as mentioned above after setting up the path.
2. Even the test cases TranslationUnitTests fail
3.
Comment 1 Greg Watson CLA 2014-05-29 15:34:32 EDT
Assuming this will not be fixed.