Open sergej-koscejev opened 3 weeks ago
Is our reflection approach with Java 21 even possible? I am not sure if we can rewrite the code but we can give it a try.
I saw some quite complicated code here and there on StackOverflow to work around final
in JDK 21 but I'd rather invest effort towards moving to the API than maintaining hacks.
https://stackoverflow.com/a/78249703 is the code I was referring to, in case we do decide to follow that route.
EditorComponent#setIntentionMenuProducer
API was introduced in 2023.2 (or perhaps earlier) to support the use case of custom grouped intention menu, so it should be possible to rewrite the code without accessingmyLightBulb
via reflection. This is important because modifying private final fields got more complicated in Java 21 and the current code does not work with MPS master.