[Solved] Format: manual override of org.eclipse.jdt.core.prefs and org.eclipse.jdt.ui.prefs works? [message #1820590] |
Thu, 23 January 2020 15:11 |
Chkiron Chronos Messages: 8 Registered: October 2019 |
Junior Member |
|
|
Hi all
I have a task that is to programatically configure an Eclipse code style formatter. Idea is that a developer will check out code from repo and, as part of the build, Eclipse will be configured with the intended settings.
The way I discovered on how to do that is to create or overwrite the files org.eclipse.jdt.core.prefs and org.eclipse.jdt.ui.prefs in {$project}/.settings
In my tests in a fresh Eclipse installation, it seems that is working - if i change a property in core.prefs or ui.prefs and refresh the project, they will become active.
However, if I go to Preferences | Java | Code Style | Formatter, the Active profile is still Eclipse [built-in].
So, I am wondering:
1. is this the way to go, to achieve this objective? Or there is a smarter way?
2. why changing the files do not change the Formatter Preferences | Java | Code Style | Formatter? For example, I can see org.eclipse.jdt.core.formatter.lineSplit=200 working when I press CTRL+SHIFT+F, but on the Preferences GUI the value for "maximum line width" is still 120
Many thanks,
Kind regards,
2CH
[Updated on: Mon, 27 January 2020 10:47] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02964 seconds