Bug 265780 - [spell checking] Spellchecker dictionary is missing many programming vocabularies (quick fix)
Summary: [spell checking] Spellchecker dictionary is missing many programming vocabula...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 343571 (view as bug list)
Depends on: 198152 250688 183880
Blocks:
  Show dependency tree
 
Reported: 2009-02-22 21:10 EST by Ben Bucksch CLA
Modified: 2023-08-14 19:56 EDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Bucksch CLA 2009-02-22 21:10:21 EST
Build ID: M20080911-1700

Steps To Reproduce:
Reproduction:
1. Write // TODO Refactor

Actual result:
"Refactor" is red underlined as mis-spelled

Expected result:
Not marked as mis-spelled, as it's spelled correctly. In fact, it's appearing in Eclipse UI itself! (context menu for Java class in Package Explorer.)

Expected:
All commonly used words in programming are in the default dictionary, so that I don't have to add them all.

Examples (*not* conclusive):
refactor
charset
unicode
latin
charsets
ms
decrypt
subtypes

This bug is not about these specific words, but about adding all commonly used programming terms. It seems the dictionary is made only for normal English, not for programmers, so this is a general bug.

More information:
Comment 1 Dani Megert CLA 2009-02-23 04:33:08 EST
Due to history the spelling engine is currently in JDT but it should be moved to a lower non-JDT dependent layer and hence the dictionary should not contain coding specific words. However, when pushing down the spelling engine we should allow to extend it e.g. by JDT, which would add the JDT and coding related words.
Comment 2 Ben Bucksch CLA 2009-02-23 11:46:12 EST
Please don't make it too complicated, and and holding up the bug.
This bug is just about adding some vocabulary, adding some strings.

I understand what you say, but I propose:
For now, add just these vocabularies. Put them in a different source code file (appended during build), at the end of the file, or whatever.

When you separate the spellchecker from JDT, leave things as-is. "refactor" and "charset" is applicable to C++ as well, and even allowing these terms in normal English text is not harmful, in fact even expected: I may be writing a document about the design of the app or similar.

So, I'd claim these programming terms are needed everywhere.

The Eclipse framework is primarily used by developers. I understand that it's a platform and I could build an email client based on SWT, but I think it's rather unlikely that my mom is going to use that. And even if so, I don't think allowing "refactor" and "std" would do her harm. Nothing in comparison to the harm it does the developers who do write "refactor" in their emails.
Comment 3 Dani Megert CLA 2011-05-24 06:11:28 EDT
*** Bug 343571 has been marked as a duplicate of this bug. ***
Comment 4 Laurent Barbareau CLA 2012-07-24 16:58:49 EDT
(In reply to comment #1)
> Due to history the spelling engine is currently in JDT
That's what I just figured out in 3.7 platform...

> but it should be moved to a lower non-JDT dependent layer
Nice !
Maybe this has been forgotten ?
I didn't checked into the 4.2 platform but I suppose this is not done, nor a priority.

Any information about that issue ?
Comment 5 Dani Megert CLA 2012-07-25 06:36:36 EDT
(In reply to comment #4)
> (In reply to comment #1)
> > Due to history the spelling engine is currently in JDT
> That's what I just figured out in 3.7 platform...
> 
> > but it should be moved to a lower non-JDT dependent layer
> Nice !
> Maybe this has been forgotten ?
> I didn't checked into the 4.2 platform but I suppose this is not done, 
Correct.

> nor a priority.
Correct. We have no plans to work on that.
Comment 6 Paul Benedict CLA 2013-10-28 11:42:53 EDT
When I created issue 265780, I learned the "rules" of the dictionary: only real words should be included. OK, but there are many technical words that will never make it into a real dictionary (e.g., "servlet").

I don't know if Eclipse supports having many internal dictionaries, but I recommend Eclipse provide a technical dictionary as well. The goal is to separate out common words from technical words. And since technical dictionaries are usually specific to a scientific field, an enhancement would be to create a Java technical dictionary that's only enabled for JDT projects.
Comment 7 Andre Veltstra CLA 2019-07-11 12:32:49 EDT
Please reconsider the former conclusion on this enhancement request. 
  
I'm getting really tired of teaching Eclipse all the Java language names and standard JDK class and method names every time I reinstall Eclipse. Java language names and JDK class and method names should never cause the spell checker to mark it as a spelling error. 

 
Case in point: the spell checker in version 2019-06 marked the word "int" as incorrect. That's outright ridiculous.
Comment 8 Eclipse Genie CLA 2021-08-22 13:55:33 EDT
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-08-13 18:18:30 EDT
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 10 Ben Bucksch CLA 2023-08-14 19:56:08 EDT
If you're not able to let the spellchecker use multiple dictionaries, this could be worked around with a build-time task to append words to the upstream dictionary.

Given that this bug exists since almost 15 years, and people still complain about it, it would be nice to have some kind of fix.

Alternatively, all else failing, disable the spell-checker by default. A mal-functioning spell checker is worse than none.