简体   繁体   中英

Disabling Eclipse's spelling error quick fix

If I type a method name that does not exist, Eclipse always offers me a quick fix (ctrl+1 or cmd+1) to create the method. For example, if I type handleIntent which is a non-existant method, Eclipse suggests Create method handleIntent(Intent) .

However, in certain cases, Eclipse also suggests a quick fix that offers a different method as if I typed the name wrongly. In the above example Eclipse suggests Change to setIntent(..) as the first suggestion.

After using Eclipse for so long, I'm accustomed to pressing ctrl+1 (or cmd+1) then Enter to create a new method. The spelling fix suggestion prevents me from doing that, and I can't predict beforehand whether Eclipse would offer me that spelling fix. I'm looking for a way to disable that spelling fix suggestion.

不需要的建议

A plugin can contribute a quick fix processor (extension point org.eclipse.jdt.ui.quickFixProcessors ) that will propose quick fixes to solve a warning or an error in an editor.

The jdt ui plugin contributes two of those, a default quick fix processor and a spelling quick fix processor. It assume that those are used to populate the list of available quick fixes in java source code documents.

Unfortunatly (for you) they are two big collections of fixes and proposals and there doesn't seem to be a property or mechanism to switch on/off individual fix proposals or to control the ordering.

Under preferences-->General-->Editors-->Text Editors-->Spelling, uncheck "Enable spell checking".

You cannot turn 'off' individual Quick fixes.

However, if you think that the order of quick fixes in the proposal list could be improved please file a bug against JDT/UI

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM