Hi, Your previous patch has already been commited, please provide a patch against the current trunk for your bugfixes.
Mathieu De : [email protected] [mailto:[email protected]] De la part de Topcased user list where issues are discussed Envoyé : lundi 28 janvier 2013 10:35 À : [email protected] Objet : Re: [Topcased-users] cumulative patch for UML2Java Done. New versions of patches (with some more bug fixes and first try of importing used classifiers) and testing models loaded in the tracker. Waitin for comments on topcased-devel list. Regards, Jean-Pierre PECUCHET 2013/1/21 Topcased user list where issues are discussed <[email protected]<mailto:[email protected]>> Hi, Thanks for your patch, it looks great. We are officially in code freeze since Friday for the 5.3.0 release, but we haven't begin the validation and your patch is self contained (no modification of core components) so we are planning to integrate it. However we need a way to test your modifications quickly, could you provide an uml model for that ? If you can add it to your bug on the gforge it would be great. On a side note please use topcased-devel (http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-devel) since this is clearly not a user discussion. Regards, Mathieu Velten Atos - TOPCASED Team De : [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] De la part de Topcased user list where issues are discussed Envoyé : samedi 19 janvier 2013 19:24 À : [email protected]<mailto:[email protected]> Objet : [Topcased-users] cumulative patch for UML2Java Hi, I already proposed some bug fixes and enhancements in previous patches : Generate Java menu don't launch the good plugin at http://gforge.enseeiht.fr/tracker/?func=detail&aid=3526&group_id=24&atid=180 Incorrect log path for the Java generation at http://gforge.enseeiht.fr/tracker/?func=detail&aid=3528&group_id=52&atid=109 wrong template for Java generation at http://gforge.enseeiht.fr/tracker/?func=detail&aid=3529&group_id=52&atid=109 Wrong attributes generation in UML to Java http://gforge.enseeiht.fr/tracker/?func=detail&atid=109&aid=3541&group_id=52 More than 15 bug fixes for java generation at http://gforge.enseeiht.fr/tracker/?func=detail&aid=3596&group_id=52&atid=109 But all the patches where computed from the same CVS head and when the committer applied the fourth one (#3541), the other patches can't be applied anymore. I come back with a cumulative patch from the 5.2.0 head. It contains bugs fixes and enhancements of previous patches #3526, #3528, #3529 and #3596. I also included some new bugs fixes and enhancements as follows. Bug fixes: --------- 1- Generate Interface extensions 2- For an abstract Class, generate a protected default constructor 3- Generate the super() call in default constructor, even when no superclass declared 4- When given, use default value to initialize an attribute. 5- Generate a final qualifier for readonly owned attributes (was made for associations) 6- For multiple attributes, distinguish between type declaration (an Interface, typically List, is expected in most programming styles) and the implementation Class (typically ArrayList). Introduction of some (Interface, Class) pairs in the File Properties Uml2Java menu. 7- Generate the Exception throws for methods generated from implemented interfaces or abstract inherited operations 8- Generate a synchronized qualifier for an operation with concurrency = guarded 9- Use the full method signature in the "// Start of user code for ..." comment to avoid code loss during second time generation in case of overloading or internals. 10- For an attribute or an operation typed by an enumeration, don't initialize with or return an instance of this non instanciable type but instead, the first litteral. 11- Idem, for an attribute or an operation typed by an Interface or Abstract Class, don't initialize with or return an instance of this non instanciable type but try to find an implementation Class. (For this first try, priority to an implementation in the same package. To be improved.) 12- Idem, for an attribute or an operation of multi valued type, don't return an instance of the base type but a Collection implementation (the one chooses with the (Interface, Class) pair in the File Properties Uml2Java menu (was already made for associations). 13- Generate list element accessor and adder for multiple attributes, not only for multiple associations. 14- Normalize accessors names : isName (instead of getName) for the getter of a Boolean attribute; and for a multiple attribute, getName for the arrayed attribute (we had getNameList for an association and getName for an attribute), getNameElt for getting an element (we had getName for an association and nothing for an attribute), addNameElt for adding an element (we had addName for an association and nothing for an attribute). 15- In automated generated accessors, don't use the this. access for a static attribute. 16- Generate an import for the pair (Interface, Class) when a multiple attribute (was only made when presence of a multiple association) 17- When a method is to be generated due to an Interface or an inherited abstract operation, don't duplicate when the method is already owned or inherited (including generated accessors). For accessors, don't generate the automatic version, but give priority to owned, interface or abstract declarations as they can be there to modify visibility or to throw exceptions. [For this first try, we don't take visibility into account. As visibility can be relaxed, this will have to be improved] 18- Correctly generate an operation opaque behavior (at the beginning of the body, after the "// Start of user code for ..." [sadly, Topcased don't allow to give an opaque behavior for an interface or abstract operation, but only for standard ones]. Enhancements: ------------ 1- When an operation to be generated (owned, abstract or implemented) is recognized as being an accessor according to the naming convention above, generate the standard accessor body (instead of the default void or return Type() body). 2- Idem when an operation is recognized as being a constructor (generate a body with initialization of the attributes with same names as parameters). 3- For those using this programming style, introduction of a switch in the File Properties Uml2Java menu for using setters for attributes initialization in the constructors. 4- For those using this programming style, introduction of a switch in the File Properties Uml2Java menu for initializing the attributes in the constructor instead of the declaration (except for static final ones). 5- Generate a // TODO comment for generated code that would be checked by the user 6- Generate imports from package imports and from dependencies [to be improved to avoid redondancies] Remains to be done: ------------------ 1- Update the documentation (to be seen with the developer team) 2- Grab inherited associations (currently only attributes) to identify those accessors among the operations to be generated (owned, interface or abstract) and to use them for initializations in the parameterized constructors. 3- Filter generated imports to avoid redundancies 4- Improve the choice of implementation Class used for initializing or returning an Interface type (priority to classes in dependencies, in same package, with shorter implementation path) 5- Generate author from Model 6- Look at what could be generated from sequences 7- Improve Model validation and warnings produced. Will be particularly useful for UML modeling beginners like my students who can create so incredible and unpredictable model pieces! I just upload the patches at http://gforge.enseeiht.fr/tracker/index.php?func=detail&aid=4331&group_id=52&atid=109 Could I hope to see these patches applied for the 5.3.0 version ? Thanks, Jean-Pierre PECUCHET INSA Rouen - LITIS Avenue de l'Université - BP 8 - 76801 Saint-Étienne-du-Rouvray Cedex France http://www.insa-rouen.fr & LITIS - EA4108 http://www.litislab.fr Tel: (+33) 232 956 543<tel:%28%2B33%29%20232%20956%20543> Mobile: (+33) 680 856 214<tel:%28%2B33%29%20680%20856%20214> ________________________________ Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos ne pourra être engagée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être engagée pour tout dommage résultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. _______________________________________________ Topcased-users mailing list [email protected]<mailto:[email protected]> http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users
_______________________________________________ Topcased-users mailing list [email protected] http://lists.gforge.enseeiht.fr/cgi-bin/mailman/listinfo/topcased-users
