Search code examples
eclipseoomph

Eclipse surrounds auto-generated param names with REMOVE_PREFERENCE_MARKER


Eclipse is surrounding suggestions and auto-generated parameter names with "REMOVE_PREFERENCE_MARKER". Below is an auto-generated method and image showing the suggestions. I have no idea why.

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

REMOVE_PREFERENCE_MARKER


Update:

I ran a search on my Eclipse installation and found this...

╭─┤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

It looks like Oomph's preference recorder is to blame. I seem to remember telling it to do something that took a long time and it crashed, so maybe this "REMOVE_PREFERENCE_MARKER" string is supposed to be deleted but it closed before it did or something. I will update with more as I find more and post an answer if I solve it.


Solution

  • Still not sure how it happened, but to fix it go to Window -> Preferences -> Java -> Code Style. Each "Variable Type" field had REMOVE_PREFERENCE_MARKER as the "Prefix list" and "Suffix list". Also the "Exception variable name in catch blocks" was REMOVE_PREFERENCE_MARKER.

    I removed the prefixes and suffixes and set the exception name back to e.

    Also "Use 'is' prefix for getters that return boolean" and "Add '@Override' annotation for new overriding methods" became unchecked, so I rechecked them.