Hello Daniel,
At line 90, the CDIBuilderDelegate#build() method calls the PackageDelegate#setPackage() method below which creates a 'class A {}' as shown below.
public void setPackage(IPackageDeclaration pkg, IRootDefinitionContext context) {
qualifiedName = pkg.getElementName();
IType contextType = null;
ICompilationUnit u = null;
if(pkg.getParent() instanceof ICompilationUnit) {
try {
u = ((ICompilationUnit)pkg.getParent()).getWorkingCopy(new NullProgressMonitor());
contextType = u.createType("class A {}", null, false, new NullProgressMonitor());
} catch (JavaModelException e) {
}
}
super.setAnnotatable(pkg, contextType, context, 0);
if (u != null) {
try {
u.discardWorkingCopy();
} catch (JavaModelException e) {
}
}
}
The JAX-RS plugin catches an event for this type creation but fails later. I can add some tests to verify that the type really exist, but still, is this necessary (just asking, don't take is bad) ?
Thanks.