Questions to new WonderEntity templates

From: Johann Werner (j..yosys.de)
Date: Tue Jun 29 2010 - 13:22:34 UTC

  • Next message: David LeBer: "EntityModeler User Info stupid question?"

    Hi,

    the template files WonderEntity.java and _WonderEntity.java were changed recently. Now I have some observations and questions I wanted to share:

    1) in WonderEntity there is a method stub for init. It is declared as public though the overridden method in ERXGenericRecord is protected. Shouldn't they match?

    2) in _WonderEntity there is the static class stub _${entity.classNameWithoutPackage}Clazz extends ${parentClazzClass}. As this template represents the fixed part of the entity classes (every code change is overwritten during eogenerate) all modifications in the Clazz class would be useless. This raises the question if it is wise to put it there as it won't/shouldn't be ever used. Why not remove it and change the line in WonderEntity (where manual changes will be kept) to

    public static class ${entity.classNameWithoutPackage}Clazz extends ${parentClazzClass}

    3) subentities that have their parent entity in another framework are causing errors in Eclipse 3.6. For example I have SubEntity and ParentEntity. Then with the new templates I have

    public static class _SubEntityClazz extends ParentEntity.ParentEntityClazz { ...

    and Eclipse saying that "ParentEntity cannot be resolved to a type". If I either remove the "ParentEntity." part or add the full package name before ParentEntity the error is resolved. Of course Eclipse doesn't know ParentEntity as there is no import statement generated but why it doesn't complain "ParentEntityClazz" when removing "ParentEntity." escapes me. I think the best would be to add the full package name in the template.

    jw




    This archive was generated by hypermail 2.0.0 : Tue Jun 29 2010 - 13:23:34 UTC