Eclipse使用REMOVE_PREFERENCE_MARKER包围自动生成的参数名称

时间:2017-04-26 20:49:52

标签: eclipse oomph

Eclipse围绕建议并使用" REMOVE_PREFERENCE_MARKER"自动生成参数名称。下面是一个自动生成的方法和显示建议的图像。我不明白为什么。

@Override
public int compareTo(Foo REMOVE_PREFERENCE_MARKEROREMOVE_PREFERENCE_MARKER) {
  // TODO Auto-generated method stub
  return 0;
}

REMOVE_PREFERENCE_MARKER

更新

我在我的Eclipse安装上搜索了一下,发现了这个......

╭─┤me@mycomputer├─┤/c/Users/me/eclipse/java-neon├─
╰─┤:)├╴ » ag 'REMOVE_PREFERENCE_MARKER'
eclipse/configuration/org.eclipse.oomph.setup/setup.log
5690:[2017-02-01 17:42:06] Performing Preference /instance/org.eclipse.debug.ui/Console.highWaterMark = REMOVE_PREFERENCE_MARKER
5691:[2017-02-01 17:42:06] Performing Preference /instance/org.eclipse.debug.ui/Console.lowWaterMark = REMOVE_PREFERENCE_MARKER
12788:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.argumentPrefixes = REMOVE_PREFERENCE_MARKER
12789:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.argumentSuffixes = REMOVE_PREFERENCE_MARKER
12790:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.fieldPrefixes = REMOVE_PREFERENCE_MARKER
12791:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.fieldSuffixes = REMOVE_PREFERENCE_MARKER
12792:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.localPrefixes = REMOVE_PREFERENCE_MARKER
12793:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.localSuffixes = REMOVE_PREFERENCE_MARKER
12794:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFieldPrefixes = REMOVE_PREFERENCE_MARKER
12795:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFieldSuffixes = REMOVE_PREFERENCE_MARKER
12796:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes = REMOVE_PREFERENCE_MARKER
12797:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes = REMOVE_PREFERENCE_MARKER
12798:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.exception.name = REMOVE_PREFERENCE_MARKER
12799:[2017-04-21 16:44:49] Performing Preference /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.gettersetter.use.is = REMOVE_PREFERENCE_MARKER
12800:[2017-04-21 16:44:50] Performing Preference /instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.overrideannotation = REMOVE_PREFERENCE_MARKER

看起来Oomph的偏好记录器应该受到指责。我似乎记得告诉它要做一些花了很长时间并且崩溃的事情,所以也许这就是" REMOVE_PREFERENCE_MARKER"字符串应该被删除但它在它做之前关闭了。如果我找到了更多内容,我会更新更新并发布答案。

1 个答案:

答案 0 :(得分:0)

仍然不确定它是如何发生的,但要修复它,请转到Window -> Preferences -> Java -> Code Style。每个“变量类型”字段都有REMOVE_PREFERENCE_MARKER作为“前缀列表”和“后缀列表”。 “catch块中的异常变量名称”也是REMOVE_PREFERENCE_MARKER

我删除了前缀和后缀,并将异常名称设置回e

“使用'是'返回布尔值的getter'的前缀”和“为新的重写方法添加'@Override'注释”已取消选中,所以我重新检查了它们。