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.
The Editor API uses a lot of reflection. This makes code rather hard to read and it also adds another "hidden" dependency layer next to normal .class / Lookup / Layer.xml dependencies and service declaration. By reflection I also mean usage of the ClassLoader from the main Lookup and the "normal" reflection with Method (getDeclaredMethod), Field (getDeclaredField()). I did notice that some of the methods reached by reflection are expected to be moved in some friends API but a lot still remain. This doesn't apply just to the selected subcomponent but I can't seem to select more than one.
Could you please identify the offending places? Also, are you really referring to 5.0 source base? If so, I would suggest to look at the trunk sources. It's not that they would be better, but I don't see much point in analyzing sources that are two releases old. Anyway, thanks for the effort, really.
No, my mistake, it's the 6.0 sources. Basically just go in editor and do a grep on Lookup.getDefault().lookup(ClassLoader.class) for example. That's something we shouldn't have at all. Also lots of usage of java.lang.reflect.Field/Method. I find it disturbing that after all these ways to define services, etc. I still see reflection.
Ok, I'll go through the sources and try to compile the list. I expect some of the occurrences could be there for preserving backwards compatibility of old/deprecated stuff. But as you said, reflection should not be used in normal code.
moving opened issues from TM <= 6.1 to TM=Dev
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss