How do I set "Show print margin" for my group?
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 .metadata
directory of your workspace. The specific file you are looking for is
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs
This file can contain the following two lines:
printMarginColumn=120
printMargin=true
If printMarginColumn
is not present, the default seems to be 80
.
If you change the settings on a project, the file is the same but the location is in your project's .settings
directory.
精彩评论