Community
Participate
Working Groups
I suggest to enable the save actions on org.eclipse.jface and the jface snippets plug-ins to make it easier for contributors to deliver patches without issues.
https://git.eclipse.org/r/18487
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=db683aa42ed03ff3d7ad2312677554c4ef54b552
This change must be reverted. I added a method to a class in JFace and it reformatted the entire class. I don't mind minor changes, see how we do it in o.e.ui.workbench, but it can't reformat the entire class when I add one method. PW
I set the save action to format only the edited lines. I assume the "Correct intention" might have cause this issue. Also Bug 49619 seems to add whitespace to Javadoc. I revert the change and wait for the solution of 49619 to enable it again without "Correct intension".
Change reverted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=db6910fdfdee04bf4f2a4ccc10085c231f227754
New Gerrit review https://git.eclipse.org/r/22293
Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b2fda4bf714b20155bb7fe9d8649d4aa01e8c1a3
Verified in Git
This is insane. When you enable formatting on Save, you have to at least store project-specific formatter settings as well. > Make it easier That's purely subjective. For me, it's impossible to work efficiently in a project that automatically breaks my formatting on save. And to make complicated code more readable, you can't always rely on an automatic formatter that can't know about semantics and interesting similarities in code fragments (e.g. put line break where it makes sense). I'm fine with releasing a formatter profile, but forcing auto-mangling by the formatter on save is hardly making anything easier.
(In reply to Markus Keller from comment #9) > This is insane. When you enable formatting on Save, you have to at least > store project-specific formatter settings as well. I think "insane" is a very bad error description. What problem do you face? AFAIK platform.ui does not use project specific formatter. And most platform.ui projects use "Save actions" with "Format edited lines" which AFAICS is also used for JFace.
(In reply to Lars Vogel from comment #10) > And most > platform.ui projects use "Save actions" with "Format edited lines" which > AFAICS is also used for JFace. See for example org.eclipse.jdt.ui.prefs in org.eclipse.e4.ui.di from Paul. I think that was the example I used as template (not sure, its been a while).
(In reply to Lars Vogel from comment #10) > (In reply to Markus Keller from comment #9) > > This is insane. When you enable formatting on Save, you have to at least > > store project-specific formatter settings as well. > > I think "insane" is a very bad error description. What problem do you face? My workspace formatting profile is not exactly the same as existing code in org.eclipse.jface, so whenever I save a file, changed lines are jumping around and badly formatted. If you like Format on Save, then why don't you just enable it in your workspace?
(In reply to Markus Keller from comment #12) > (In reply to Lars Vogel from comment #10) > > (In reply to Markus Keller from comment #9) > > > This is insane. When you enable formatting on Save, you have to at least > > > store project-specific formatter settings as well. > > > > I think "insane" is a very bad error description. What problem do you face? > > My workspace formatting profile is not exactly the same as existing code in > org.eclipse.jface, so whenever I save a file, changed lines are jumping > around and badly formatted. > > If you like Format on Save, then why don't you just enable it in your > workspace? It should be enabled as in org.eclipse.ui.workbench. See Bug 258729 AFAICT that includes a specific formatter profile (it's per project, and should be used for the other Platform UI bundles as well) PW
(In reply to Paul Webster from comment #13) > It should be enabled as in org.eclipse.ui.workbench. See Bug 258729 > > AFAICT that includes a specific formatter profile (it's per project, and > should be used for the other Platform UI bundles as well) > > PW For me it's acceptable to enable formatting edited lines if the profile is also stored with the project. Otherwise it drives the developer insane ;-).
Note that the Eclipse default line length is 120 now, so you may want to use this in the profile.
(In reply to Markus Keller from comment #15) > Note that the Eclipse default line length is 120 now, so you may want to use > this in the profile. If that's the case I'm fine with updating that too. PW
(In reply to Paul Webster from comment #16) > (In reply to Markus Keller from comment #15) > > Note that the Eclipse default line length is 120 now, so you may want to use > > this in the profile. > > If that's the case I'm fine with updating that too. According to https://bugs.eclipse.org/bugs/show_bug.cgi?id=258729#c24 the line length was the only specific setting in the formatter. So we can switch back to the "Eclipse build-in" formatter. Correct?
(In reply to Lars Vogel from comment #17) > > According to https://bugs.eclipse.org/bugs/show_bug.cgi?id=258729#c24 the > line length was the only specific setting in the formatter. So we can switch > back to the "Eclipse build-in" formatter. Correct? As long as that makes it so that if someone gets the project and it auto-saves, it uses the correct profile I'm fine with that. PW
Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f8ee52fb149bc43705640a44c0b2d4b34ca8029d Sorry for the inconvenience.
.