|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabledAdd @SuppressWarnings to all generated sources if Java 5 is enabled
------------------------------------------------------------------- Key: MODELLO-181 URL: http://jira.codehaus.org/browse/MODELLO-181 Project: Modello Issue Type: Improvement Components: modello-plugin-java Affects Versions: 1.0 Reporter: Benjamin Bentmann If Java 5 is enabled, Modello should decorate every generated top-level class with {code:java} @SuppressWarnings( "all" ) {code} to get rid of any IDE warnings from the generated code so that developers can focus on their own code. This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183717#action_183717 ] Ludovic Maître commented on MODELLO-181: ---------------------------------------- Hi, i personnally don't want to have a @SuppressWarning generated in all my classes, and i have no warning generated by Eclipse regarding my generated classes in Java 5. I guess with my patch MODELLO-213, peoples can tag their classes so this annotation is generated but i don't see the point in adding it whatever happen, it's up to the developer to decide IMHO. Best regards, > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183834#action_183834 ] Benjamin Bentmann commented on MODELLO-181: ------------------------------------------- bq. i personnally don't want to have a @SuppressWarning generated in all my classes And why, what would be the downside of this? bq. i have no warning generated by Eclipse Oh, neither have I if I just lower the Compiler warnings enough.... The point is, the code is generated and may not be modified by the user so one cannot expect the generated code to match the coding rules of the surrounding project. And getting a lot of warnings from stuff that you cannot fix is just annoying, it clutters the problem view and doesn't help to focus on the real problems. bq. peoples can tag their classes so this annotation is generated -1, Modello is there to generate code from a data model and the annotation SuppressWarnigns has nothing to do with the data model, it's a technical workaround for uneloquent code emitted by the tool. It shouldn't be the job of the user to teach the tool how to do its code generation properly so that it integrates nicely into IDEs. It should just work out of the box. > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183837#action_183837 ] Ludovic Maître commented on MODELLO-181: ---------------------------------------- Hi Benjamin, So i guess the best would be to have an option to generate (or not) this annotation so you can be happy and me too. What is sure is that i have contributed some code which allow to generate this annotation if somebody want to code it. Just please put this feature optional, perhaps i didn't measure all the implications to not have this annotation on my classes but i think it's up to the people which generate the code to decide. > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183838#action_183838 ] Benjamin Bentmann commented on MODELLO-181: ------------------------------------------- bq. Just please put this feature optional, perhaps i didn't measure all the implications to not have this annotation on my classes but i think it's up to the people which generate the code to decide. Let me ask again: What is the motivation to not have this annotation generated? There is no point in making an option without need. So I would like to understand this need that would justify the additional complexity to introduce an option. > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183841#action_183841 ] Ludovic Maître commented on MODELLO-181: ---------------------------------------- Hi Benjamin, The motivation is to be able to see the warnings. Also perhaps we should be able to choose which warning we want to suppress. I model my model in an UML tool where i should specify my model correctly, with the warnings i can see where i have badly modelized my associations, or where i have put a generic type where i could have put a parametized type. If there is too much warnings it is possible in most IDEs to hide categories of warnings, and i think that i can supress most of the warnings by modelling well my model, and that what will left is meaningful warnings. My tool argo2modello after convert the uml to modello model, i didn't modify the model a lot by hands and i manage annotations with tagdefinition/tagged value in the uml model : i want to be able to specify very precisely the objects in my model and not modello to take decisions for me for the generation, perhaps it's why we didn't have the same feeling about this issue (if you model in the xml files directly it is perhaps easiest for you to not write everywhere the annotations you want to have generated). I guess it would be easy to add a java.suppress-warnings=true metadata on the model element which manage the generation of the @SuppressWarning, as far as i know the code of modello-plugin-java, and it would stay an optional thing. If someone need to have a finer granularity it will still be possible to annotate separately the class tags (see MODELLO-211). > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ludovic Maître updated MODELLO-181: ----------------------------------- Attachment: annotation_suppresswarning.diff Patch which allow to specify a java.suppressWarning metadata on the model element; i.e : <model java.suppressWarnings="all"> ... > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=183949#action_183949 ] Ludovic Maître commented on MODELLO-181: ---------------------------------------- Hi all, I have asked the reporter of the issue (Benjamin) about my proposal and here is his comment*, that i publish here so we (users of modello) can discuss it: > is it ok for you if it only need to add the attribute java.suppressWarning="all" to the model xml element to generate the suppressWarning annotation on all classes of the model ? In principle yes, configuring this in a central place is easy enough :-) The thing that could need some rethought is whether this option should really be added to the model or instead be a configuration parameter of the Modello plugin. I mean this option looks similar to the useJava5 option: it basically tweaks the generated code but does not affect the set of generated classes/methods. Having useJava5 as a plugin parameter and java.suppressWarning on the model looks inconsistent then. I personally haven't thought much about whether we should move useJava5 to the model as well or make suppressWarning a plugin option. It's not a high priority issue for me anyway. So could other users and deves express their views on this ? (*sorry to have discussed out of the issue but i would like to know fast if it was ok for him or not) > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187291#action_187291 ] Herve Boutemy commented on MODELLO-181: --------------------------------------- ok for the principe. But I have some interrogations on details: if we implement {{java.suppressWarnings="all"}}, I suppose the idea is to permit {code:xml}<model java.suppressWarnings="cast,depreciation">{code} I dislike parsing such a value to generate {{@SuppressWarnings( "cast", "depreciation" )}} What about {code:xml}<model java.suppressAllWarnings="true">{code} ? With a default value to {{true}} since that fits best IMHO the current usage of Modello in Maven: everything is generated, avoid warnings. For Ludovic's usage, turning the value to {{false}} let play manually with annotation after MODELLO-211 WDYT? > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Fix For: 1.1 > > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Updated: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Herve Boutemy updated MODELLO-181: ---------------------------------- Fix Version/s: 1.1 > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Fix For: 1.1 > > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187297#action_187297 ] Ludovic Maître commented on MODELLO-181: ---------------------------------------- Hi, It's ok for me, > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Fix For: 1.1 > > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Closed: (MODELLO-181) Add @SuppressWarnings to all generated sources if Java 5 is enabled[ http://jira.codehaus.org/browse/MODELLO-181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Herve Boutemy closed MODELLO-181. --------------------------------- Assignee: Herve Boutemy Resolution: Fixed done in r1311 + r1312 > Add @SuppressWarnings to all generated sources if Java 5 is enabled > ------------------------------------------------------------------- > > Key: MODELLO-181 > URL: http://jira.codehaus.org/browse/MODELLO-181 > Project: Modello > Issue Type: Improvement > Components: modello-plugin-java > Affects Versions: 1.0 > Reporter: Benjamin Bentmann > Assignee: Herve Boutemy > Fix For: 1.1 > > Attachments: annotation_suppresswarning.diff > > > If Java 5 is enabled, Modello should decorate every generated top-level class with > {code:java} > @SuppressWarnings( "all" ) > {code} > to get rid of any IDE warnings from the generated code so that developers can focus on their own code. > This seems to require {{JStructure.addAnnotation()}} from the original Castor javasource package. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |