| Summary: | Add ability to run a source Clean Up after code generation | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Thomas Hallgren <thomas> |
| Component: | Tools | Assignee: | Dave Steinberg <davidms> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | Ed.Merks, marcelop |
| Version: | 2.5.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Thomas Hallgren
*** Bug 285367 has been marked as a duplicate of this bug. *** Marcelo, I seem to recall having looked at this in the past and that there was no programmatic way to invoke cleanup as part of code generation (which needs to work without the UI). Although I can do a second investigation, a quick search on Google indicates that JDT's Clean Up feature is still tied to the UI. The second link below (from October, 2008) sort of shows that things have not changed too much since I've looked at it. http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/ui/cleanup/package-summary.html http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg23593.html Perhaps something similar to what Achim does in bug 278844 is needed. If it's in the same vicinity, perhaps the timing is good to file another bugzilla. I find myself cleaning up, over and over again, and still being uncertain if I forgot some clean up every time I check in. It would help me a lot even if the genmodel did a clean-up automatically only when running with a UI. In fact, I don't see myself ever generating the model code and then checking-in when running headless. I do understand that running headless code generation as part of a build is very interesting. But a clean-up is a bit different in that it's often not needed in that scenario. If the code builds, who cares if it looks nice right? In contrast, when you do actual work on the code in your IDE with the intention of checking it in to a SCM, it's essential that the clean-up is performed. Both because you'd like to see it in nicely cleaned and formatted while working, and perhaps more importantly that a failure to do that will create a merge hell. Would it be difficult to add this as a UI only function? I think it would be somewhat difficult, as all compilation-unit-level handling happens in the UI-independent code. It sounds like this would be a nice convenience but, unfortunately, with things as tight as they are, I just can't see it as a priority. We now clean up used imports during merge so that's the most important cleanup I believe. *** This bug has been marked as a duplicate of bug 175282 *** |