[jci] JaninoJavaCompiler and other issues
Hello, today I came across an issue with the Janino version 2.3.3 in use in JCI. It does not find static methods in classes. After an update to 2.3.8 (which unfortunately needs adaptions in JaninoJavaCompiler the compilation of my classes work again. Is there any interest in this update to JCI codebase? Next issue is triggered by this update to 2.3.8. We also use Janino for XSP compilation in Cocoon, which also did no longer work after the update to 2.3.8. I made the changes and now please let me point out the issues mentioned in the subject. The class is actually an implementation of Cocoon's LanguageCompiler interface and a wrapper around JaninoJavaCompiler. 1. The LanguageCompiler interface has a method setEncoding(String). Unfortunately I can not propagate the param to JaninoJavaCompiler, because the value is not parameterizable there, but hard-coded. 2. The CompilationProblem class has nice field storing e.g. location information. Unfortunately there is no access to these fields, just a toString() method. But the class CompilerError in Cocoon would like to see these informations. Would it be possible to add public getters to CompilationProblem? 3. The CompilationProblem is a nice abstraction, but isn't it somewhat limited? Both Eclipse and Janino provide more information than CompilationProblem can accept. Wouldn't it be better to convert CompilationProblem to an interface and create class like EclipseCompilationProblem and JaninoCompilationProblem being wrappers for the original problem/exception classes? So like in my case where I know that the CompilationProblem should be an instance of a JaninoCompilationProblem I can react more specifically (e.g. accessing the column number of the problem). WDYT? Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jci] JaninoJavaCompiler and other issues
today I came across an issue with the Janino version 2.3.3 in use in JCI. It does not find static methods in classes. After an update to 2.3.8 (which unfortunately needs adaptions in JaninoJavaCompiler the compilation of my classes work again. Is there any interest in this update to JCI codebase? Of course! ...what a question ;) Next issue is triggered by this update to 2.3.8. We also use Janino for XSP compilation in Cocoon, ..as well as the eclipse compiler - I know ;) which also did no longer work after the update to 2.3.8. I made the changes and now please let me point out the issues mentioned in the subject. The class is actually an implementation of Cocoon's LanguageCompiler interface and a wrapper around JaninoJavaCompiler. Why not create a JciCompiler implementation of the LanguageCompiler interface? It could act as a factory. The implementation could be passed in through the component configuration. 1. The LanguageCompiler interface has a method setEncoding(String). Unfortunately I can not propagate the param to JaninoJavaCompiler, because the value is not parameterizable there, but hard-coded. Ok ...already came across this too 2. The CompilationProblem class has nice field storing e.g. location information. Unfortunately there is no access to these fields, just a toString() method. But the class CompilerError in Cocoon would like to see these informations. Would it be possible to add public getters to CompilationProblem? Make sense 3. The CompilationProblem is a nice abstraction, but isn't it somewhat limited? Both Eclipse and Janino provide more information than CompilationProblem can accept. Wouldn't it be better to convert CompilationProblem to an interface and create class like EclipseCompilationProblem and JaninoCompilationProblem being wrappers for the original problem/exception classes? So like in my case where I know that the CompilationProblem should be an instance of a JaninoCompilationProblem I can react more specifically (e.g. accessing the column number of the problem). Sounds like a good idea! Will look into it tonight cheers -- Torsten PGP.sig Description: This is a digitally signed message part
Re: [jci] JaninoJavaCompiler and other issues
After an update to 2.3.8 (which unfortunately needs adaptions in JaninoJavaCompiler the compilation of my classes work again. Is there any interest in this update to JCI codebase? Of course! ...what a question ;) There is just the problem of the incompatible change, i.e. JCI does no longer work with Janino versions below 2.3.4. But this might be a minor issue as long as JCI has not been released. Next issue is triggered by this update to 2.3.8. We also use Janino for XSP compilation in Cocoon, ..as well as the eclipse compiler - I know ;) Yes, but this one works OOTB without JCI ;) The class is actually an implementation of Cocoon's LanguageCompiler interface and a wrapper around JaninoJavaCompiler. Why not create a JciCompiler implementation of the LanguageCompiler interface? It could act as a factory. The implementation could be passed in through the component configuration. Ah, of course, that's most consistent. Will look into it tonight I can do some of the work too and send in some patches if you like. I will see what you have managed tonight. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]