| Summary: | ClasspathTypeProviderFactory may not use suitable ClassLoader | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Ed Willink <ed> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | christian.dietrich.opensource, moritz.eysholdt |
| Version: | 2.2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
|
Description
Ed Willink
this can no longer be reproduced since the factory does the following now
public ClassLoader getClassLoader(ResourceSet resourceSet) {
if (resourceSet instanceof XtextResourceSet) {
XtextResourceSet xtextResourceSet = (XtextResourceSet) resourceSet;
Object ctx = xtextResourceSet.getClasspathURIContext();
if (ctx != null) {
if (ctx instanceof Class<?>) {
return ((Class<?>)ctx).getClassLoader();
}
if (!(ctx instanceof ClassLoader)) {
return ctx.getClass().getClassLoader();
}
return (ClassLoader) ctx;
}
}
return classLoader;
}
I think the limitation is still there, since your code snippet doesn't help for an ordinary ResourceSet. However to ensure that JVMTypes are resolved in a worker thread, I had to rewrite anyway, so this problem no longer affects me. should think about this one more (In reply to Ed Willink from comment #2) > I think the limitation is still there, since your code snippet doesn't help > for an ordinary ResourceSet. This argument turns the bug into a duplicate of bug#326407 *** This bug has been marked as a duplicate of bug 326407 *** |