Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 243687

Summary: Spell checking does not ignore doxygen commands
Product: [Tools] CDT Reporter: Torge Riedel <torgeriedel>
Component: cdt-parserAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andrew.ferguson, eclipse.sprigogin
Version: 5.0   
Target Milestone: 5.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 297376    

Description Torge Riedel CLA 2008-08-10 13:47:56 EDT
Build ID: I20080617-2000

Steps To Reproduce:
1. Create a CDT C++ project
2. Add a new class
3. Document the class using doxygen -> most of the doxygen commands are marked as "not correctly spelled"


More information:
Comment 1 Andrew Ferguson CLA 2008-08-11 05:37:48 EDT
the editor won't be aware of doxygen tags unless it has been configured for doxygen - see
   Project Properties -> C/C++ General -> Enable project specific settings -> choose doxygen
Comment 2 Torge Riedel CLA 2008-08-11 12:28:14 EDT
Cool, never seen this before, is it new to Ganymede?

Ok, set documentation tool to "doxygen", but now spell checking marks all HTML-Tags I used in the documentation. Is there another setting for this? I searched whole preferences, but haven't found it.
Comment 3 Andrew Ferguson CLA 2008-08-12 06:14:00 EDT
hi Sergey, just to check - I don't see a difference in the spell checking of html tags with doxygen turned on or off (this is consistent with what I'd expect from the code). I'd agree it makes sense to support it for a particular doc tool (e.g. doxygen) - are you proposing to add html tag awareness to doxygen in particular? i.e. 
     org.eclipse.cdt.ui.text.doctools.doxygen.DoxygenMultilineConfiguration.getSpellingDictionary()
org.eclipse.cdt.ui.text.doctools.doxygen.DoxygenSinglelineConfiguration.getSpellingDictionary()
Comment 4 Sergey Prigogin CLA 2008-08-12 10:13:48 EDT
I was thinking of allowing html tags in all comments and string literals, irrespectively of doxygen. I haven't looked at it closely, but if doxygen comments require special treatment on top of that, it can be done too.
Comment 5 Andrew Ferguson CLA 2008-08-13 12:48:49 EDT
strictly speaking the content of comments is a property of the documentation tool associated with the project. If I remember correctly the tags supported by other tools does differ slightly:
   http://en.wikipedia.org/wiki/Comparison_of_documentation_generators

I've not a good feeling for how important this is as I'm unaware of any documentation tool plug-in other than the in-built doxygen, but it might make sense to add the recognition of html tags to the doxygen dictionary only at this stage (?)


Comment 6 Sergey Prigogin CLA 2008-08-13 13:44:55 EDT
(In reply to comment #5)
> I've not a good feeling for how important this is as I'm unaware of any
> documentation tool plug-in other than the in-built doxygen, but it might make
> sense to add the recognition of html tags to the doxygen dictionary only at
> this stage (?)

Andrew, I agree with you in principle on comments, but recognition of html tags in string literals seems to be a useful feature too. I've ran across quite a few programs that generate html without using templates and would benefit from it. To keep things simple, I'm going to add a dictionary of html tags and preferences controlling whether it is used for comments and/or string literals.
Comment 7 Torge Riedel CLA 2008-08-14 01:24:45 EDT
One more question: I've found some missing entries in the spell checking dictionary like "inline" or "Linux" (wondering that the last is missing, but "Windows" is not ...). There is a tool displayed for adding such entries to the dictionary, is there a possibility to pass this words to the "spell checking project" (if there exists one), to do not only extend the dictionary locally?
Comment 8 Sergey Prigogin CLA 2008-08-14 13:00:38 EDT
The dictionaries used by CDT are located in org.eclipse.cdt.ui/dictionaries. The dictionaries are plain text files. Feel free to file a bug and attach a patch to it. It's probably a good idea to keep CDT and JDT dictionaries in sync and to provide patches for both at the same time. JDT dictionaries are located in org.eclipse.jdt.ui/dictionaries.
Comment 9 Torge Riedel CLA 2008-08-15 01:31:46 EDT
Thank you very much, but that file and that directory doesn't exist. But I've seen that I can configure a user dictionary. I will follow your advice and file a bug if my user dictionary has enough words to do so.

Beside this there is another point for spell checking regarding doxygen:

         /**
          * Returns the info of the current instance.
          * @param argc
          *    Number of arguments.
          * @param argv
          *    Pointer to array of arguments.
          * @return
          *    Info of current instance.
          */

'argc' and 'argv' are marked by spell checking as unknown words. I would wonder if most of the parameter names in C/C++ are correct spelled single words, right? Think you should deactivate marking such parameter names or - and that's mostly the best - add an option the preferences.
Comment 10 Sergey Prigogin CLA 2008-08-15 13:49:43 EDT
(In reply to comment #9)
> Thank you very much, but that file and that directory doesn't exist.

To see the dictionary files you have to pull the source of org.eclipse.cdt.ui plugin from CVS repository (dev.eclipse.org/cvsroot/tools).
Comment 11 Sergey Prigogin CLA 2008-08-26 13:39:53 EDT
Moving out of 5.0.1 release due to lack of time.
Comment 12 Sergey Prigogin CLA 2008-09-23 09:10:37 EDT
Dictionary of HTML tags has been added to HEAD and cdt_5_0 >20080922. There is no option to turn it off. Please let me know if you can't live without a switch that would turn it off.
Comment 13 Sergey Prigogin CLA 2008-09-24 12:58:15 EDT
AFAICT all issues raised in this bug have been addressed in cdt_5_0 and HEAD > 20080922. Please reopen if you find any unresolved issues.