本文为转载,
以下的转载地址为
https://blog.csdn.net/liusa825983081/article/details/79746269
Java代码:打开Eclipse的Window菜单,然后Preferences->Java->Code Style->Formatter->Edit ->Line Wrapping->Maximum line width:
CSS代码:Window->Preferences->Web->CSS Files->Editor->Line width:
HTML代码:Window->Preferences->Web->HTML Files->Editor->Line width:
JSP代码:Window->Preferences->Web->JSP Files->Editor->Line width:
最简单的方法是直接在搜索框输入line即可
以下的转载地址为
https://blog.csdn.net/qq_38728790/article/details/78905388
在修改eclipse的多行注释会自动换行的问题时,将每行的字数从80改成800,发现无法修改,会提示“this is a built-in profile,change the name to create a new profile”,如下图所示:
会出现“this is a built-in profile,change the name to create a new profile”提示,是因为一直在修改他内置的配置文件,这样是不允许的。可以在windows–Preferences–Java–Code style–Formatter 这里,右边找到一个“New…”这个,自己新建一个配置文件,自己起一个名字,然后里面的内容会和系统是默认一致的,这时候更改新的配置文件。如下图所示
1)点击New
2)弹出框中写上别名
3)名字起好并保存后选择该名称
4)选择Edit
5)选择Comments–将Enable Javadoc comment formatting的勾去掉并将滚动条往下滚动直到看到Maximun line width for comment 的值 从80改成800,保证每行的内容可以写很多个,这样就不会换行了
然后选择Line width