Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因此,我们正在代码库中集成另一个项目。它不符合我们的格式规则。我在保存配置后自动格式化。因此,我可以转到每个文件并再次保存它,但是有没有办法编写 Eclipse 脚本,以便它将格式化规则应用于我工作区中的每个文件?
右键单击项目(可以多选)并Source -> Format在菜单中选择。
Source -> Format
试试Source -> Clean up...,Use custom profile -> Configure...。它在那里有更强大的选择。
Source -> Clean up...
Use custom profile -> Configure...
确保您在 Package Explorer 中,然后右键单击并选择 Source 菜单。其他一些视图(例如,导航器)不会显示此选项。