Author Topic: SpellChecker plugin  (Read 101787 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9597
Re: SpellChecker plugin
« Reply #105 on: August 25, 2011, 08:28:29 am »
Hopefully some dev can put this patch to trunk.
I tried it myself meanwhile and committed accordingly. Thanks!
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 gd_on

  • Lives here!
  • ****
  • Posts: 578
Re: SpellChecker plugin
« Reply #106 on: August 25, 2011, 11:23:37 am »
Just a suggestion in SpellChecker :
could you modify some strings preceded by a _ with a _T because I think that many of them do not need to be tranlated (and probably must not):
For example there is a \r, a single space (in SpellCheckEngineInterface) and some *aspell* (as delete_aspell*, get_aspell*, new_aspell*,...)
Thanks.

gd_on
« Last Edit: August 25, 2011, 11:42:11 am by gd_on »
Windows 10 64 bits (20.04), svn C::B (last version or almost!), wxWidgets 3.1.4, Msys2 Compilers 10.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: SpellChecker plugin
« Reply #107 on: August 28, 2011, 12:49:15 pm »
I have a little problem with debian.
I just try to configure it and give it a try, but the dictionary  choicelist is empty...
Another thing, I can't check/uncheck the "enable online spell checker".

I thought in first time I didn't have hunspell dictionaries (btw, I'm lost with aspell, hunspell and ispell... this is the spell hell :D) but  aptitude search hunspell* |grep "i A" give me that:
Code: [Select]
i A hunspell-fr                     - French dictionary for hunspell            
i A libhunspell-1.2-0               - spell checker and morphological analyzer (
so it is already installed...

[edit]
BTW, I've forgotten to say I am using rev 7386dbg from jens' debian repo
« Last Edit: August 29, 2011, 09:09:54 am by Freem »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: SpellChecker plugin
« Reply #108 on: September 05, 2011, 08:49:35 pm »
Suggestion: waiting until the user moves the cursor off the word or adding a small time delay before checking a word's spelling would be useful.  Currently, longer words always get highlighted red because the user does not get a chance to finish typing them before the spelling is checked.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12810
    • Travis build status
Re: SpellChecker plugin
« Reply #109 on: October 04, 2011, 05:27:35 pm »
Danselmi:
This check is useless, because delete checks for NULL pointers! This is stated in the standard.
Code: [Select]
  if (m_pSpellUserInterface != NULL)
    delete m_pSpellUserInterface;
(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 Alatar

  • Multiple posting newcomer
  • *
  • Posts: 60
Re: SpellChecker plugin
« Reply #110 on: November 11, 2011, 05:23:42 pm »
There is a small bug in spellcheker plugin - in UTF8 document only half of non-english word is underlined. Screenshot in the attachment.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12810
    • Travis build status
Re: SpellChecker plugin
« Reply #111 on: November 11, 2011, 05:38:19 pm »
It is not related to the encoding or the use characters. It does it for English letters, too.
(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 Alatar

  • Multiple posting newcomer
  • *
  • Posts: 60
Re: SpellChecker plugin
« Reply #112 on: November 12, 2011, 09:54:23 am »
Hmm... For me English words underlined fully.

BTW, I`m use WinXP with Russian localization.
« Last Edit: November 12, 2011, 09:56:57 am by Alatar »

Offline LETARTARE

  • Regular
  • ***
  • Posts: 425
  • L'ami de l'homme.The friend of man.
Re: SpellChecker plugin
« Reply #113 on: November 22, 2011, 01:20:45 pm »
hello,
I just downloaded 'svn7550', which works well under Vista.
I start to use 'wxSpellChecker' with C + +. It seems to work fine.
page http://wiki.codeblocks.org/index.php?title=SpellChecker indicates
Quote
only the verification comments.
but can I add the full text file verification (*.txt, of course without highlighting) to 'wxSpellChecker' ?
CB-rev12207, plugins : QtPregen-2.7.3-sdk240
1-Win 7 Business Pack 1 64bits :  wx-3.1.3, gcc-8.1.0,
2-Vista Business Pack2 32bits : wx-3.1.4, gcc-8.1.0
3-OpenSuse-15.1-Leap 64bits : wx-3.03, gcc-7.5.
=> !! The messages are translated by Deepl !!

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: SpellChecker plugin
« Reply #114 on: November 23, 2011, 02:45:28 pm »
hello,
I just downloaded 'svn7550', which works well under Vista.
I start to use 'wxSpellChecker' with C + +. It seems to work fine.
page http://wiki.codeblocks.org/index.php?title=SpellChecker indicates
Quote
only the verification comments.
but can I add the full text file verification (*.txt, of course without highlighting) to 'wxSpellChecker' ?


Sure, just add
Code: [Select]
<Language name="Plain text" index="0" /> to your OnlineSpellChecking.xml file and restart codeblocks.

Offline LETARTARE

  • Regular
  • ***
  • Posts: 425
  • L'ami de l'homme.The friend of man.
Re: SpellChecker plugin
« Reply #115 on: November 24, 2011, 09:17:54 am »
//*** Translated by Google ***//

Quote
Sure, just add
Code:
<Language name="Plain text" index="0" />

to your OnlineSpellChecking.xml file and restart codeblocks.

Thank you very much for your answer
I tried with or without this change.
But in fact, simply select the desired word and then use either the context menu or the Edit menu for either a correction or a synonym.
But why select it, while for C + + comments just place the cursor on the word?

You can add keyboard shortcuts : F10 to Spelling, Shift-F10 to Thesaurus

On the other hand, the translation of menu entries does not work (French svn 7451) on my pc (VISTA pack2) .

CB-rev12207, plugins : QtPregen-2.7.3-sdk240
1-Win 7 Business Pack 1 64bits :  wx-3.1.3, gcc-8.1.0,
2-Vista Business Pack2 32bits : wx-3.1.4, gcc-8.1.0
3-OpenSuse-15.1-Leap 64bits : wx-3.03, gcc-7.5.
=> !! The messages are translated by Deepl !!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12810
    • Travis build status
Re: SpellChecker plugin
« Reply #116 on: November 24, 2011, 10:07:02 am »
You can add keyboard shortcuts : F10 to Spelling, Shift-F10 to Thesaurus
1. F10 is reserved key for the GTK menu and cannot be set by the applications.
2. You can set some shortcuts for menu item using the keybinder/keyboard shortcuts plugin.
(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 LETARTARE

  • Regular
  • ***
  • Posts: 425
  • L'ami de l'homme.The friend of man.
Re: SpellChecker plugin
« Reply #117 on: November 24, 2011, 10:28:52 am »
You can add keyboard shortcuts : F10 to Spelling, Shift-F10 to Thesaurus
1. F10 is reserved key for the GTK menu and cannot be set by the applications.
2. You can set some shortcuts for menu item using the keybinder/keyboard shortcuts plugin.

I did not know, because these shortcuts were free on my  version svn7550
so I tried ALT-F10 which is also free.
What the menu GTK ?
« Last Edit: November 24, 2011, 10:30:40 am by LETARTARE »
CB-rev12207, plugins : QtPregen-2.7.3-sdk240
1-Win 7 Business Pack 1 64bits :  wx-3.1.3, gcc-8.1.0,
2-Vista Business Pack2 32bits : wx-3.1.4, gcc-8.1.0
3-OpenSuse-15.1-Leap 64bits : wx-3.03, gcc-7.5.
=> !! The messages are translated by Deepl !!

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: SpellChecker plugin
« Reply #118 on: November 24, 2011, 10:44:52 am »
On windows it's ok to use F10 and ctrl-F10 for what ever you want. So use them in keybinder/keyboard shortcuts plugin.

@LETARTARE
Spelling is only possible over selected text (this is possibly wrong in plain text files but codeblocks is an IDE).
So select all (ctrl+a) followed by F10 will check the spelling of the whole file. This is independant of the highlight mode.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: SpellChecker plugin
« Reply #119 on: November 30, 2011, 04:28:10 am »
I have a suggestion to improve this plugin; currently, one of the separators used to split words is the single quote (').  This works correctly in most cases, however, if a contraction is used (ex. don't), the sections are split, resulting in invalid words.

To work around this problem, the plugin could:
1. Identify a word marked as misspelled
2. Check if the character(s) deliminating it from the next word is(are) exactly ' or \'
   a. Process the concatenation of both words, with a single quote (') between them, as a single word
   b. If it forms a correctly spelled word, mark it as such; otherwise treat as two separate words (again)