Author Topic: SpellChecker plugin  (Read 90057 times)

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
SpellChecker plugin
« on: October 09, 2009, 04:37:24 pm »
Hi.

A plugin to spell check comments in source codes can be found here: http://svn.berlios.de/svnroot/repos/spellchecker/trunk .

It can be configured (through OnlineSpellChecking.xml file) which lexer-styles have to be spell-checked. Sample config file provides: spell-check only comments in C/C++, VHDL and Verilog and spell-check sources for LaTeX.

Hunspell is used for the spell checker and wxSpellChecker (from wxCode) for the GUI. Code::Blocks project files (msw and linux) are provided (tested on winXP-sp3 and fedora 11). For linux, hunspell is assumed to be installed as a system library.

It needs dictionaries to work correctly. Dictionaries for hunspell and MyThes can be downloaded from http://wiki.services.openoffice.org/wiki/Dictionaries OOo 2.x files. OOo 3.x Extensions (.oxt) are zip'ed archives containing the same files.

Regards
danselmi




Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9489
Re: SpellChecker plugin
« Reply #1 on: October 09, 2009, 04:51:37 pm »
A plugin to spell check comments in source codes can be found here: http://svn.berlios.de/svnroot/repos/spellchecker/trunk .
All I can say: Awesome! I am using it for some time now. It works very well.
Grab it while it's hot!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5149
Re: SpellChecker plugin
« Reply #2 on: October 09, 2009, 05:34:35 pm »
can we add this to the contrib plug-ins.
This sounds like a great addition ....

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: SpellChecker plugin
« Reply #3 on: October 09, 2009, 06:29:18 pm »
Very nice plugin. It works, but I had some problems during installation:

- I tried to install / compile it without dictionaries. It compiled, but probably becase missing .dic and .aff files failed some post-compile script -> my installation was missing whole directory share\CodeBlocks\SpellChecker, where are stored not only dictionaries, but also some pictures and configuration file.

- Missing dictionary file (deleted) caused crash - so probably missing file-exist chceck.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11715
    • Travis build status
Re: SpellChecker plugin
« Reply #4 on: October 09, 2009, 07:55:56 pm »
+1 for the contribs :) even thought I don't write comments :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: SpellChecker plugin
« Reply #5 on: October 09, 2009, 10:24:19 pm »
I use Code::Blocks often for writing documentation in latex and I tested this plugin some weeks ago and it is really something I had been missing in the past. Thank you again danselmi.

Would be nice to see it in the contrib plugins.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: SpellChecker plugin
« Reply #6 on: October 10, 2009, 12:24:44 am »
Really cool!

What a pain in the ass i haven't been programming in c/c++ lately :( to enjoy this feature when writing doxygen documentation since I suck at english  :lol:

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: SpellChecker plugin
« Reply #7 on: October 12, 2009, 09:08:52 am »
+1 for the contribs  ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9489
Re: SpellChecker plugin
« Reply #8 on: October 23, 2009, 09:16:47 am »
One thing I've noticed:

When a word is underlined and I add it to the user dictionary it remains underlined.
This is unexpected behaviour IMHO. OO and Word remove the underline from all occurrences immediately.

Take it as a feature request. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: SpellChecker plugin
« Reply #9 on: November 09, 2009, 03:33:10 pm »
This plugin is real cool.
 :lol:

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: SpellChecker plugin
« Reply #10 on: November 09, 2009, 07:30:18 pm »
+1 for contrib

Is that enough votes yet? :)

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: SpellChecker plugin
« Reply #11 on: November 09, 2009, 09:20:49 pm »
When building this plugin using C::B worspace .. it creates this directory:

CodeBlocksSVN\src\devel\share\CodeBlocks\SpellChecker

with one xml file.

Then I run update.bat (using WinXP), which should copy this directory into "output" folder ... but this does not happens .. is this only my problem? Without this configuration file is plugin not functional.


PS: many thanks to developer, now are fixed plugin crashes when no dictionary is present.
PS2: is it difficult to implement configuration where can be set spellchecked lexer "classes"? (for example, i would be happy, if I could disable spellchecking of strings, but at the same time have enabled spellchecking of documentation blocks)


Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: SpellChecker plugin
« Reply #12 on: November 09, 2009, 10:25:00 pm »
PS2: is it difficult to implement configuration where can be set spellchecked lexer "classes"? (for example, i would be happy, if I could disable spellchecking of strings, but at the same time have enabled spellchecking of documentation blocks)
Remove the indices 6 and 12 from Language "C/C++" in OnlineSpellChecking.xml. This removes the checks of Strings in C/C++ files. The indices/names are from the lexer configuration files.

Offline laube

  • Single posting newcomer
  • *
  • Posts: 3
Re: SpellChecker plugin
« Reply #13 on: July 13, 2010, 11:30:21 pm »
i really like this plugin!

When i was editing large files OnlineSpellchecker really slowed down typing in codeblocks which was very annoying.
I have written a patch which rescans only the changed portions of the content. (style and content changes are monitored)
I have also added that composed words like 'OnlineSpellchecker' are checked correctly.
Also aberrations are handled (all uppercase words are ignored)
I also fixed a typo in SpellCheckerPlugin.cpp which prevented compilation when CB_STATUS_BAR is not defined.

I solved the problem that we cannot change styling while in wxEVT_SCI_MODIFIED event by introducing a queue for storing invalidated regions and then updating all regions in the next wxEVT_SCI_UPDATEUI event.

tell me what you think about this patch.

I'd like to see this plugin added to contrib too!

Simon

[attachment deleted by admin]

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: SpellChecker plugin
« Reply #14 on: July 14, 2010, 06:52:02 am »
I'd like to see this plugin added to contrib too!

Me too  :D