Java 删除eclipse中的双间距

Java 删除eclipse中的双间距,java,apache-flex,flash-builder,Java,Apache Flex,Flash Builder,我将我的项目导入eclipse,它变成了双倍行距。有人知道如何解决这个问题吗 已尝试: Find: [\t ]+$ Replace With: Nothing //error: incompatible line delimiter Find: \s*\n Replace With: Nothing //error: incompatible line delimiter Find: ^\s*\r?\n Replace With: /R //error: incompatible li

我将我的项目导入eclipse,它变成了双倍行距。有人知道如何解决这个问题吗

已尝试:

Find: [\t ]+$ 
Replace With: Nothing //error: incompatible line delimiter

Find: \s*\n 
Replace With: Nothing //error: incompatible line delimiter

Find:  ^\s*\r?\n
Replace With: /R //error: incompatible line delimiter

Find:  ^\s*\r?\n
Replace With: nothing //string not found

Find:  (.)\r\n(.)
Replace With: nothing //string not found

File > Convert Line Delimiters to > Windows //no changes

Source > Apply Formatting //grayed out

CTRL + Shift + F //doesn't remove double spaces
您是否尝试过(当然使用regex check):

查找:^\s*\r?\n

替换为:\R

这将查找一行或双线,并将其替换为一行

编辑:

Find: [\t ]+$ 
Replace With: Nothing //error: incompatible line delimiter

Find: \s*\n 
Replace With: Nothing //error: incompatible line delimiter

Find:  ^\s*\r?\n
Replace With: /R //error: incompatible line delimiter

Find:  ^\s*\r?\n
Replace With: nothing //string not found

Find:  (.)\r\n(.)
Replace With: nothing //string not found

File > Convert Line Delimiters to > Windows //no changes

Source > Apply Formatting //grayed out

CTRL + Shift + F //doesn't remove double spaces

有一个相关的帖子,也许其中一个答案对你来说是正确的:

项目属性中
我去了
flexFormatter
并将选项
保留这么多空行
改为0。

为什么不在整个项目上使用Source>格式功能?@lauretg,Source>应用格式显示为灰色,我相信这就是ctrl+shift+f所说的。我想知道为什么它一开始就变成了双倍行距。Eclipse可以毫无问题地将CR+LF作为行分隔符处理。1.确保项目一开始就没有中断。2.项目的默认行分隔符是什么?它在项目属性中。可能的重复项是否有帮助?与此分隔符不兼容的行分隔符
\r
应该是不必要的。只要加载了文本,Eclipse就会将任何行分隔符视为一个单独的
\n
。如果我找到:^\s*\r?\n并替换为:nothing,我会得到“string not found”,这意味着Eclipse找不到具有此类分隔符的行。您是否签出了相关帖子?在执行(调整后的)帖子中的操作之前,您是否也尝试过转换到Unix?