Community
Participate
Working Groups
The code formatting is already provided by core, can the API for code cleanup or at least save actions be put in core as well so it can be used by external formatters such as https://site.trajano.net/m2e-codestyle-maven-plugin/
I am talking about this API http://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fui%2Fcleanup%2Fpackage-summary.html Which is presently on the UI
Currently we have no time to look into this, due to priority on Java 9 work. Still a few remarks: I can see that most of the API package itself has no dependencies into other parts of JDT/UI, but at least ICleanUpConfigurationUI has a dependency on SWT which is a no-go for JDT/Core. Would this be just about moving the interfaces and leaving all implementation in JDT/UI. In particular, what about classes like org.eclipse.jdt.internal.corext.fix.CleanUpRegistry org.eclipse.jdt.internal.corext.fix.CleanUpRefactoring where clean-ups a managed and invoked? These parts are more intertwined with UI code than the interfaces themselves. What is helped if only the interfaces are moved, but no code in JDT/Core uses them? What about the individual implementations, subtypes of ICleanUp? Isn't that actually what you want to invoke in a headless setting? => I'm not convinced that copying a few interfaces into JDT/Core alone provides any benefit. => If, OTOH, implementations should be moved, too, we'd be speaking about a complex refactoring. Are you potentially interested in contributing such a refactoring? If so, let's wait until after Java 9 GA to discuss this in a bit more detail. Also the JDT/LS project might have a say in that discussion ... @Olivier, are you still reading JDT/Core bugs? :)
Ideally I would like to have an API that would allow me to do the following: (this has M2E impact too) m2e.generateProjectConfiguration("project path"): IJavaProject (to generate the .classpath and .project) this will need to generate the classpath and project files either directly or in-memory (ideal) and returns an IJavaProject (I'm just guessing that's what JDT projects are called) IJavaProject or other projects extend something like "ICleanupCapable" Then ICleanupCapable looks like interface ICleanupCapable { CleanupSteps generateCleanupSteps(ICleanupConfiguration); } that would generate the steps for cleanup. Then have a method that I can call to actually apply the cleanup steps. Unlike the formatter this is more complex because you would need the project context to have the classpath etc. Formatter is only limited to a single file.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.