Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] PDOM-Database Corrupt

Hi all,
I currently work on some refactoring stuff, therefor I try to find all references to a field with the PDOM. But the following code snippet won't work. It won't give any results and after that the PDOM-Database is corrupt. You can't start Eclipse after that (hangs on 75% of the startup procedure) until you delete the PDOM-Database (*.pdom files). I use the cdt code from cvs version 3.1.1. I'm not sure if this is a PDOM-Bug or if my code do something wrong or evil.
Thanks
leo

ITranslationUnit tu = (ITranslationUnit)CCorePlugin.getDefault().getCoreModel().create(file);
PDOM pdom = (PDOM)CCorePlugin.getPDOMManager().getPDOM(tu.getCProject()).getAdapter(PDOM.class);
System.out.println(pdom);
IPDOMResolver resolver = (IPDOMResolver)pdom;
		
// new PDOMCPPLinkage(pdom);
PDOMCPPLinkageFactory linkageFactory = new PDOMCPPLinkageFactory();
PDOMLinkage linkage = linkageFactory.createLinkage(pdom);
PDOMBinding pdomNameBinding = linkage.adaptBinding(nameBinding);
		
IASTName[] pdomref = resolver.getReferences(pdomNameBinding);
System.out.println("---REFERENCES from PDOM---");
for (IASTName refName : pdomref) {
	namePrinterHelper(refName);
}


Back to the top