I am working with Java. If I hit Ctrl+Shift+F in Eclipse Helios, it will auto format the entire file instead of the lines I edited. This becomes a nightmare at the time of check in when someone else uses a different style on the same file. Is there a way to tell eclipse to only format the touched lines in a file.
eclipse reformat only edited lines
Asked Answered
Windows-Preferences-Java-Editor-Save Actions
Format only saved lines. However, if you hit Ctrl+shift+f i don't think there is a way that only edited lines will be saved.
If you select a range of lines in the editor then the format is done just on that range, if there is nothing selected the whole file is formatted.
You can change the formatting style used in Preferences / Java / Code Style / Formatter.
You can control formatting and other actions done when saving a file in the Jova / Editor / Save Actions preferences.
Look at the preferences page for the available Save Actions.
© 2022 - 2024 — McMap. All rights reserved.