Bug 407230 - [quick fix][spell checking] Quick fix on misspelled word does not use SpellingProblem#getProblems
Summary: [quick fix][spell checking] Quick fix on misspelled word does not use Spellin...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-05 06:23 EDT by Mattias Andersson CLA
Modified: 2023-12-02 10:21 EST (History)
2 users (show)

See Also:


Attachments
Sample plug-in (3.73 KB, application/octet-stream)
2013-05-06 12:54 EDT, Mattias Andersson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Andersson CLA 2013-05-05 06:23:41 EDT
When using a custom spelling engine extending org.eclipse.ui.workbench.texteditor.spellingEngine with the Java editor the custom spelling engine is used to find spelling errors, however proposed changes are retrieved from the default spelling engine. 

The custom spelling engine org.eclipse.ui.texteditor.spelling#SpellingProblem implementation is asked for position and the description about the spelling problem, however SpellingProblem#getProposals is never called. Instead JavaQuickFix#getCorrections always uses org.eclipse.jdt.internal.ui.text.spelling#SpellCheckEngine to get the proposals.
Comment 1 Dani Megert CLA 2013-05-06 05:51:07 EDT
The custom engine is responsible to create (or implement) the problems which then return the proposals.

If you still see this problem using 4.3 M7 [1], then please attach a sample plug-in with a custom spelling engine and steps to reproduce the problem.


>JavaQuickFix#getCorrections

This method  does not exist in the SDK.


[1] http://download.eclipse.org/eclipse/downloads/drops4/S-4.3M7-201305020800/
Comment 2 Mattias Andersson CLA 2013-05-06 12:54:37 EDT
Created attachment 230528 [details]
Sample plug-in
Comment 3 Mattias Andersson CLA 2013-05-06 13:05:09 EDT
Same problem, the call to default spelling engine now (in org.eclipse.jdt.ui_3.9.0) comes from org.eclipse.jdt.internal.ui.text.spelling.WordQuickFixProcessor. 

		final ISpellCheckEngine engine= SpellCheckEngine.getInstance();
		final ISpellChecker checker= engine.getSpellChecker();

With the spelling engine in the attached sample plug-in the word "proposal" is always considered misspelled. In an ordinary text editor "proposal 1", "proposal 2", "proposal 3" is proposed. In a Java editor "proposal" and "proposals" is proposed.
Comment 4 Mattias Andersson CLA 2013-05-16 14:37:14 EDT
Requested example uploaded
Comment 5 Dani Megert CLA 2013-05-17 06:05:08 EDT
WordQuickFixProcessor#getCorrections should ask the CoreSpellingProblem for the proposals and this should delegate to the original SpellingProblem.
Comment 6 Eclipse Genie CLA 2019-12-20 12:09:50 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Dani Megert CLA 2019-12-21 05:02:28 EST
Still valid as of 4.14.
Comment 8 Eclipse Genie CLA 2021-12-11 11:27:44 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 9 Eclipse Genie CLA 2023-12-02 10:21:41 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.