This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
As part of the new project implementation it will be hard to keep the original meaning of TM.currentCL() from openide or core, but it should not be as hard to provide that meaning from java module. That method is used to provide access to ClassLoader that can load all JavaClasses being developed and deployed (modules) in current state of the ide. The Java module should be able to monitor all opened projects and their classpath and be able to compose a classloader that will union all classes of these modules. Then there is just one problem - how openide or core will communicate with java module to get this classloader and show it to the user, but that is secondary problem.
Is this not dupe of issue #27112? Or perhaps a blocker for it?
Would adding that union as a (hidden) filesystem to the Repository help ?
Union FS would definitively solve this issue. The trouble is that I would like to make the UnionFS voluntary extension - it would be there just for some users. But I would like the currentClassLoader to work "right" all the time. I suggest to change TM.currentClassLoader in openide to use lookup to find all ClassLoaders, and test that one is marked as the "right" (java.util.Map or other trick). If no right is found it would delegate to the first one => currentClassLoader == systemClassLoader.
You know - (singleton)currentClassLoader will work just as bad (or as well) as the UnionFS: it still has to merge all execution paths from opened projects since it does not know what its client really wants.
You are right, but somehow I feel that it can do less harm. In FileSystem people can do different kind of things, for example modifications. When using currentClassLoader, the only reasonable thing is to search for a class, potentially resource. I believe that this is more easy to mess up than the union FS.
Sorry for last sentence, I have meant: The currentCL is less dangerous than union fs.
See the unionfs/filesystem compat issues document linked in the URL field.
Probably impractical.