| Summary: | GEF project should define and adopt source code formatting guidelines | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Nyßen <nyssen> | ||||
| Component: | Misc | Assignee: | Alexander Nyßen <nyssen> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | aboyko, ahunter.eclipse, irbull, steeg, unger | ||||
| Version: | 3.6 | ||||||
| Target Milestone: | 3.6.0 (Helios) RC2 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Alexander Nyßen
Next week I will select each of the Draw2d, Zest and GEF bundles and do an organize imports and then a source format. I plan to leave the code formats the same as the default in Eclipse 3.6. I am going to look and see if the platform has changed any of the defaults in their bundles, I do not think they have. Let me know if this is not a good thing. For me the default formatter settings are fine, nevertheless because they enable contributors to create patches without having to set up special formatters in their development environment. I would recommend to also specify an auto-save action (as a project-specific setting) for all plugins to ensure formatting/organizing imports is always performed upon saving changes. This would help to prevent that the format can become invalid again just because somebody forgets to apply the formatter/organizer. It may also ensure that all patches are created w.r.t. the defined formatter settings and do not use unnecessary imports. (In reply to comment #1) > Let me know if this is not a good thing. This seems ok, the only concern I have is with outstanding patches... they likely won't apply after re-formatting the code. For Zest this should be ok. What about the Draw2D and GEF bundles? As I said in the gef-dev newsgroup, I went though all the defects in Bugzilla with patches and added comments with regards to each defect. I have not gone though the feature patches, but most are old. I imagine if someone wants their contribution, they would be willing to create a new patch for Post Helios. I agree that proper formatting guidelines should be defined, however, I'm not really happy with the default settings of the Eclipse formatter. Especially the 80-character line limitation is not appropriate nowadays. In my opinion, code that has been formatted with the default settings is unreadable. We released 3.6 M7 today so moving unresolved bugs to 3.6 RC1. We need to re-access if we can complete these for Helios. Anthony, wouldn't it be a good opportunity to perform re-formatting now, directly after the milestone has been build? We have two active bugs with patches going on. The second we get these in I am going to: - format - organize imports - update copyrights Committed "Organize Imports" to HEAD(In reply to comment #8) > We have two active bugs with patches going on. The second we get these in I am > going to: > > - format > - organize imports > - update copyrights Committed in three deliveries to HEAD: - organize imports - format - update copyrights Using Eclipse 3.6 RC1 Created attachment 169219 [details]
Java-Editor Auto-Save settings
May I propose that - as I already mentioned - we also define an auto-save action for the java-editor to ensure that formatting and imports remain intact (I have added a screenshots with the settings we could use)?
Sounds good to me, can you commit the new org.eclipse.jdt.ui.prefs to each of the plugins in GEF/Draw2d/Zest ? Yes, I will take care. We forgot to add Fabian to this Bugzilla so he is aware too. I will let Fabian do these activities to the dot4zest plugins. Committed preference-settings for all Java-nature plug-ins of Draw2D, GEF, and Zest ( despite org.eclispe.zest.core, which already had defined more strict options, including the organization of imports and the re-formatting) to cvs HEAD. Updated the Contributor Guide (http://wiki.eclipse.org/GEF_Contributor_Guide) to mention this as well. (In reply to comment #13) > We forgot to add Fabian to this Bugzilla so he is aware too. I will let Fabian > do these activities to the dot4zest plugins. Thanks for adding me - I have updated the formatting, headers and settings in the dot4zest plugins. |