Grammarcells: Too long method in GrammarActionsDescriptor.java
When using grammar cells extensively, the method doGetSideTransformActions() can get too long:
[jetbrains.mps.make.CompilationErrorsHandler@69c09cb7] Compilation problems
[jetbrains.mps.make.CompilationErrorsHandler@69c09cb7] com\mbeddr\cpp\base\editor\GrammarActionsDescriptor.java : The code of method doGetSideTransformActions(TransformationMenuContext) is exceeding the 65535 bytes limit (line: 999)
Compilation finished: 1 errors, 0 warnings.
Error executing target jetbrains.mps.make.facets.JavaCompile.compile
Code in https://github.com/DSLFoundry/mbeddr.core/tree/grammarcells-issue-too-long-method
Attached the generated code.
@alexanderpann do you know if there was any change trageting this issue?
No, we didn't change anything. This exception could happen anywhere. If we would fix this, I would like to see a generic solution to the problem. Maybe some code that automatically splits up long methods into multiple methods.
The solution would be to extract this code in separate methods and call those methods. We would have to do it also for the other methods in the GrammarActionsDescriptor. To test it, it is enough to use 100 grammar.substitutions cells in one editor.