Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352680 - [RDT] Unable to use TranslationUnit as a standalone parser
Summary: [RDT] Unable to use TranslationUnit as a standalone parser
Status: CLOSED WONTFIX
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 17:09 EDT by Ferosh Jacob CLA
Modified: 2014-05-29 15:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.