Eclipse will place a light gray line on a column you choose when you select from Preferences > General > Editors > Text Editors and check the “Show print margin” checkbox.
If I add this line to my Checkstyle external file:
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="150"/>
then Format (Ctrl-Shift-F) will do a good job in splitting lines before column 150.
Is there a means, such as an XML file, in which I might set the value of the text editor “Show print margin”? I would like my department to have the formatter split lines at 150 (can do) and have all Eclipse IDEs show the gray line at column 150 (don’t know how).
I have tried toggling the “Show print margin” checkbox and even checking “Show line numbers,” but I cannot find a file that Eclipse altered, in either my Eclipse executable path or my project files that reflects this change. It must to be stored somewhere: these persists across Eclipse sessions.
If you change your settings via the Preference menu, you are changing the workspace settings. The files you are looking for are therefore located in the
.metadatadirectory of your workspace. The specific file you are looking for isThis file can contain the following two lines:
If
printMarginColumnis not present, the default seems to be80.If you change the settings on a project, the file is the same but the location is in your project’s
.settingsdirectory.