-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type checks not functional any more (since first CobiGen release) #40
Comments
Please also document potential changes in the dependencies done during development in the licence tracker: https://github.com/oasp/tools-cobigen/wiki/mgmt_dependency-and-license-tracking |
…e message) fixed casting problem: template methods are called with SimpleScalars instead of Strings
I think I didn't change the dependencies. I only used the TemplateMethodModelEx interface which belongs to Freemarker and so already is documented. |
But you have changed the dependency of cobigen-core from v1.0.0 to v1.1.0, haven't you? ;) |
ok added it. |
I only indicated that you do not state v1.1.0-SNAPSHOT as the new dependency :) But you have done it intuitively right :) |
ahhh :) |
oh... The new testcases test only the freemarkerutil methods but not JavaInputReader.getTemplateMethods(Object). I will add that one... |
I think the old FreeMarkerUtil can be removed completely as it is not used any more. Same for the tests of it. You will have your own tests testing the new templates methods. |
…dTest into small single testcases. + added some javadoc in IsSubtypeOfMethod
During your code cleanup you killed test Can you correct the failing test? |
yes sure ; ) |
…gories + Integration tests written for template methods
Unfortunately I found another issue during integration test. Maybe we should also introduce integration tests as you proposed. I refactored the test organisation a little bit to distinct unit test from integration tests. I also added a test suite in the You may want to have a look at the |
Now the two integration tests are valid, so I think the template methods should work for inputs of type
There is no solution for input of |
So if the |
how should we deal now with instances of JavaClass? |
I had a short look at |
|
Due to some more integration testing, I found further issues. |
the problem is, that the implemented methods expect an arg which is a |
I think this is FreeMarker internal stuff we have to fight with. As far as I got the idea of the FreeMarker types, a |
the failing test |
Due to the migration of the APPS-Generator's single application design to a more modularized architecture, the type checking template methods of the java plug-in have been destroyed.
The problem is, that the whole model will be converted to a DOM model to enable xPath expressions on the model within the template. As of the modularization, the type checking template methods are now part of the model itself and not part of the global variables of FreeMarker. Therefore, the needed ability to integrate a
BeanModel
for the util implementation in a generic way has been eliminated.Thus we have to find a new approach to handle this. My current proposal would be to add another method for InputReaders to be called beside the createModel() method. This method then might provide multiple function extensions for the template. I would also suggest to use the right extension point of FreeMarker for functions.
instanceOf
instead of the previously calledisSubtypeOf
isAbstract
The text was updated successfully, but these errors were encountered: