Code::Blocks
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: danselmi 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 (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 (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
(http://developer.berlios.de/dbimage.php?id=4581)
-
A plugin to spell check comments in source codes can be found here: http://svn.berlios.de/svnroot/repos/spellchecker/trunk (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!
-
can we add this to the contrib plug-ins.
This sounds like a great addition ....
-
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.
-
+1 for the contribs :) even thought I don't write comments :)
-
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.
-
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:
-
+1 for the contribs ;)
-
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. ;-)
-
This plugin is real cool.
:lol:
-
+1 for contrib
Is that enough votes yet? :)
-
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)
-
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.
-
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]
-
I'd like to see this plugin added to contrib too!
Me too :D
-
I'd like to see this plugin added to contrib too!
Me too :D
I also agree!!! This is a great plugin!!!
I have some problem to enable the "online spell check", in fact, I can't enable the "online spell check".
Here are the steps:
1, check out the trunk code to the "E:\code\cb\cc_branch\src\plugins\contrib\spellcheck", and apply laube's patch
2, open SpellChecker.cbp and build it.
3, run the update.bat, download the language file from: English (United States) (http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/en_US.zip)
4, run the CB under output folder.
Then set the directory folder correctly. see:
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2010-07-15204641.png)
but I can only select some text, then use the context menu "spell..."
See:
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2010-07-15204731.png)
Thanks.
-
I cannot reproduce this bug. I am testing it with svn6386 Code::Blocks with no modifications to the C::B code.
Does it work with the trunk code without the patch?
Maybe I did something wrong with the scintilla events.
I am new to scintilla and threw something together to make it work faster for me.
One problem with the code is that when multiple wxEVT_SCI_MODIFIED events arrive before the next wxEVT_SCI_UPDATEUI event, the stored update regions can get out of sync with the editor. (and thus some words are not checked correctly) Is there a way we can set markers that stay in sync with the editor?
-
I cannot reproduce this bug. I am testing it with svn6386 Code::Blocks with no modifications to the C::B code.
Does it work with the trunk code without the patch?
thanks for your reply.
I have tested under the latest CC_branch.
If not applied your patch, there is a build error, around line: 72 of SpellCheckerPlugin.cpp
should be:
#ifdef CB_STATUS_BAR
,m_fld(NULL)
#endif
But I still can't enable the online spell. :(
-
@laube:
Thanks for your patch.
Since I had similar issues (slow down of scrolling made me ... arrgh! ) I tried a different approach: to only check the visible lines but never came to a working version (no event which showed that the range visible changed) the "OccurrenceHighlighter"(http://forums.codeblocks.org/index.php/topic,12569.msg85128.html#msg85128 (http://forums.codeblocks.org/index.php/topic,12569.msg85128.html#msg85128)) is a side effect of these experiments (and not working correctly... yet). I will test your patch and give you feedback.
@ollydbg:
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.
...
The xml file is named "OnlineSpellChecking.xml" and contains a list of indices (to check in) for every lexer-language.
regards,
danselmi
-
@ollydbg:
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.
...
The xml file is named "OnlineSpellChecking.xml" and contains a list of indices (to check in) for every lexer-language.
regards,
danselmi
Thanks for the help, it works now. So we need to copy the folder (containing "OnlineSpellChecking.xml" )
from
E:\code\cb\cc_branch\src\devel\share\CodeBlocks\SpellChecker
to
E:\code\cb\cc_branch\src\output\share\CodeBlocks\SpellChecker
:D
-
Thanks for the help, it works now. So we need to copy the folder (containing "OnlineSpellChecking.xml" )
from
E:\code\cb\cc_branch\src\devel\share\CodeBlocks\SpellChecker
to
E:\code\cb\cc_branch\src\output\share\CodeBlocks\SpellChecker
:D
There used to be a couple of lines in the update.bat that copied all .exe's and all .dll's from \devel\... and contribs to \output\...
But those lines were removed. It was declared that every plugin should execute its own update.bat in its post build step.
This really causes a mess. The plugin is now responsible for creating the ...\src\output folder chain in its prebuild or postbuild step if the ...\src\output folder chain doesn't exist yet.
This happens when CB is first built, or when ...\src\output is deleted before CB is re-built in order to get a completely clean \output build.
-
A plugin to spell check comments in source codes can be found here: http://svn.berlios.de/svnroot/repos/spellchecker/trunk (http://svn.berlios.de/svnroot/repos/spellchecker/trunk).
Could you build dll plugin for codeblocks-10.05 windows xp 32bit?
-
Hi danselmi,
SpellChecker is looking good. Thanks. :-)
Feature request:
Please make the Dictionaries and Thesauri fields full width so we can see what's in them. These fields should be manually editable, too.
Bug report:
The compiler complains about auto-importing occurring without being enabled.
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
||Info: resolving TiXmlString::nullrep_ by linking to __imp___ZN11TiXmlString8nullrep_E |
||Info: resolving vtable for TiXmlDocument by linking to __imp___ZTV13TiXmlDocument |
||Info: resolving vtable for wxDialogHelper by linking to __imp___ZTV14wxDialogHelper |
||Info: resolving vtable for wxScrollingDialog by linking to __imp___ZTV17wxScrollingDialog |
You can fix this by adding:
-Wl,--enable-auto-import
to the linker settings' "Other linker options:" for the "plugin" target.
Cheers,
Cryo.
-
Hi
Thanks for your feedbacks. It now has the fields full width and editable.
By the way, has anybody tested the "cbStatusBar" patch?
regards,
danselmi
-
By the way, has anybody tested the "cbStatusBar" patch?
I am using it literally since day one. ;-) No issues, except that for the spellchecker the field is always too small for me and instead of "en-EN" I see "en-". Also, it looks a bit ugly as the statusbar has a grey background, but the label is on white background.
-
Hi,
yes I prefered using the statusbar patch, since it is very easy to switch between different languages. BTW I would prefer to have the status bar more interactive like in other IDEs.
For example the statusbar patch could be used to switch between different character encodings or even to enable block select mode. I think that some features in Code::Blocks are really hidden. For example if you don't know the shortcut for block select mode you will never find it out. The other nice context menu Aligner is not really obvious. It would be better to add an icon for this purpose too.
-
how about a commit of that status bar patch on trunk, cc, debug ?
-
how about a commit of that status bar patch on trunk, cc, debug ?
Without any use as of e.g. the SpellChecker plugin you won't see much difference. Also I remember that danselmi ones said it's only a feasibility study.
-
Hi MortenMacFly,
I agree that it only makes sense if the feature is really used. Therefore we should think about what could be easier or reasonable if the status bar offers such a functionality.
-
Therefore we should think about what could be easier or reasonable if the status bar offers such a functionality.
True. I would (however) wait for danselmi's answer on that topic concerning the readiness:
Also I remember that danselmi ones said it's only a feasibility study.
-
Therefore we should think about what could be easier or reasonable if the status bar offers such a functionality.
True. I would (however) wait for danselmi's answer on that topic concerning the readiness:
Also I remember that danselmi ones said it's only a feasibility study.
It was a feasibility study, but I completely reworked it since then.
-
maybe the time has come to make a contrib plug-in out of this.
What things might be blocking at this moment ?
- windows build ok ?
- linux build ?
- everything portable ?
- dependencies to things outside CB ?
- ...
-
- windows build ok ?
Yes.
- everything portable ?
Looks like that, yes.
What things might be blocking at this moment ?
[...]
- dependencies to things outside CB ?
Not really stopping, but something to think about: You'll need a dictionary for your target language which I don't want to put into SVN (it makes no sense). Without that SpellChecker will not work, so we need some clarification (e.g. on first start) what to do and where to get them. That's a "feature" which is missing.
-
wow great news!
while i was using the online-spellchecker I have done some more changes to it.
The patch "online-spellchecker-style-fix.patch" implements the following:
- spellchecking in xml files (OnlineSpellChecking.xml)
- fixes the problem with style change in the middle of a word
- personal dictionary file load/save.
some notes about the dictionary file load/save: currently it locates the dictionary in the following Paths: sdConfig | sdBase. Maybe this needs some change.
The patch "online-spellchecker-efficiency.patch"
this path improves the personal dictionary efficiency by using a wxSortedArrayString and the style lookup by using a set. This patch is for efficiency only. (especially the style lookup should be efficient because it is done for every character.)
I hope these patches further improve the plugin!
Both patches are for revision 34 of the plugin.
laube
-
It is up to danselmi to "prepare" the plug-in, and tackle the concerns about the dictionary, have a look at the above mentioned patches. Once that is done, we can add it to contrib.
Sounds some exciting functionality is coming ...
-
Hi
The patches from laube are applied, thanks a lot.
I tried to explain how to install a dictionary in the wiki:
http://wiki.codeblocks.org/index.php?title=SpellChecker (http://wiki.codeblocks.org/index.php?title=SpellChecker)
and added a link to it in an AnnoyingDialog and to the config panel.
The following points are still open:
- The status bar patch is not reviewed (or at least I have no feedback)
- The personal dictionary does not change if the active language changes
-
The following points are still open:
- The status bar patch is not reviewed (or at least I have no feedback)
I've applied your patch (in a modified version) to trunk for testing. I am using it since "day 1" without any issues. If somebody complains we can revert this commit easily. In addition I would welcome if you apply the project clean-up patch attached to this post. It modifies the project files to be more consistent with the other plugins.
-
... In addition I would welcome if you apply the project clean-up patch attached to this post. It modifies the project files to be more consistent with the other plugins.
Applied. I really like to thank MortenMacFly for all the tests/patches/assistance.
- The personal dictionary does not change if the active language changes
Is now solved in rev 39.
So I have no more open points!
danselmi
-
So I have no more open points!
I have some: After the last update SpellChecker keeps asking me on startup of C::B to setup the folders to the dictionaries (which are correct btw). I assume it keeps asking because I don't have index files for the dictionaries. Unfortunately I don't know where to get them (the rest I got from OpenOffice.org) and as it works well without, too I would suggest you make the index file optional to avoid this bugging on startup.
-
I have some: After the last update SpellChecker keeps asking me on startup of C::B to setup the folders to the dictionaries (which are correct btw).
Do you mean the AnnoyingDialog? Does it ask even after you told it to "Don't Annoy me again!"?
-
Do you mean the AnnoyingDialog? Does it ask even after you told it to "Don't Annoy me again!"?
Yes I mean that. And no: It does not ask anymore. However, as not having the index file does not limit the functionality I believe this dialog should not show up every time. Sure thing that the other two files are required and setup correctly. My point is, that for some dictionaries you don't get the index files. So the dialog would impose you did something wrong which isn't the case.
-
...wait! I had a look at the code: You seem to always show this dialog, no matter if the settings are OK or not. Is that right? I think in that case you really should check if the user needs to be informed - that's only the case when the settings are incorrect. Otherwise this will surely lead to confusion (as in my case... ;-)).
-
...wait! I had a look at the code: You seem to always show this dialog, no matter if the settings are OK or not. Is that right? I think in that case you really should check if the user needs to be informed - that's only the case when the settings are incorrect. Otherwise this will surely lead to confusion (as in my case... ;-)).
So, I added a check if dictionaries are present and the dialog wil not be shown then.
-
So, I added a check if dictionaries are present and the dialog wil not be shown then.
Aaaah! Nice. :-) :)
Guess it's time to move it into the main repo I'd say. Didn't killerbot wanted to take care of it? Any comments/thoughts?
-
I will/can take care of it ;-)
-
SpellChecker is has a problem on the second splitted view: After splitting, the misspelled words are underlined with a single straight black line instead of a squiggly red underline. I will take a look at it if I find some time( Laube - some more free time;-)?
-
SpellChecker is has a problem on the second splitted view: After splitting, the misspelled words are underlined with a single straight black line instead of a squiggly red underline. I will take a look at it if I find some time( Laube - some more free time;-)?
If I find time I will look into it also.
-
Hello Everybody,
i am new to codeblock. so be gentle!.
I want to get this SpellChecker plugin, hence I got the code from the trunk and I opened the .cbp file via CB.
OS: WIn Xp SP3
CodBlock build option is set to VC++ 2005/2008
when I try to build i am getting following error. I am sure I may have miss a step here. so can somebody help me out.
cl : Command line error D8021 : invalid numeric argument '/Winvalid-pch'
cl : Command line error D8021 : invalid numeric argument '/Winvalid-pch'
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
thanks
-
Code::Blocks is build with MinGW gcc and even if you are able to build SpellChecker with VC, you will most likely not be able to use it unless you have a working (!) C::B build with VC.
-
SpellChecker is has a problem on the second splitted view: After splitting, the misspelled words are underlined with a single straight black line instead of a squiggly red underline. I will take a look at it if I find some time( Laube - some more free time;-)?
Should be fixed in newest trunk (svn r6844).
It also affected HighlightOccurrences and IncSearch.
By the way:
the call to stcr->SetIndicatorCurrent(GetIndicator());
in OnlineSpellChecker.cpp:152 is not needed. The current indicator is set per document and affects both views.
-
Wow, the spell checker plugin looks cool. I'm really missing that feature in CB. Is there any precompiled library (I'm a lazy person ;-)?
I tried to compile it under Ubuntu, but got stuck with error messages:
trunk/OnlineSpellChecker.cpp||In member function ‘void OnlineSpellChecker::DissectWordAndCheck(cbStyledTextCtrl*, int, int) const’:|
trunk/OnlineSpellChecker.cpp|244|error: ‘class cbStyledTextCtrl’ has no member named ‘IndicatorFillRange’|
trunk/OnlineSpellChecker.cpp|258|error: ‘class cbStyledTextCtrl’ has no member named ‘IndicatorFillRange’|
trunk/OnlineSpellChecker.cpp||In member function ‘void OnlineSpellChecker::ClearAllIndications(cbStyledTextCtrl*) const’:|
trunk/OnlineSpellChecker.cpp|287|error: ‘class cbStyledTextCtrl’ has no member named ‘SetIndicatorCurrent’|
trunk/OnlineSpellChecker.cpp|288|error: ‘class cbStyledTextCtrl’ has no member named ‘IndicatorClearRange’|
I'm having an CB SDK from ubuntu repos. So do that errors mean I need a newer SDK? After compiling the plugin with the new SDK does that mean I have to compile the whole CB as well, in order to work the plugin properly?
Thank you for you comments and time.
-
If it is C::B 8.02 you will have no luck.
Ubuntu (since 10.10 if I remember correctly) also has 10.05 in it's repo.
Alternatively you can use my repo (see signature), but read the notes about ubuntu (older ubuntu's used to have an incompatible wxWidgets).
-
Thank you for your swift answer, I'll give it a try.
Btw. thanks for developing and improving the wonderful opensource programming IDE :D
-
Mmmh... I just noticed that the option to change the language from the statusbar has gone in my builds...?! The statusbar does not show these elements anymore. Anybody else experiencing this?
-
I guess I missed something, so is there some tutorial or something helping how to compile this plugin? While I was unable to find it, I tried compile it by method attempt - failure but it failed at 5th error...
If you want to know the details, it's "cbstatusbar.h: No such file or directory", I was unable find it in src nor /usr/include directory and I installed dev version for codeblocks, wx ( 2.8 ) (libwxbase, wx-common, libwxgtk, wx headers, wxsmithlib) and hunspell (except hunspell I guessed all of them while I was unable find any clear info what is needed) . (Ubuntu 10.10.)
-
I'm here again, please bear with me ;-)
I upgraded the Ubuntu to 10.10 and download CB 10.05 from repo with its SDK. I tried to compiled the SpellCheckPlugin and got errors on every occurrence of cbStatusBar (not defined) as Leathnes reported, so I jsut commented that out and got stuck at linker error:
=== SpellChecker, plugin ===|
ld||cannot find -lwxscintilla|
Where the wxscintilla library should be located? Somewhere in the CB SDK? I searched for it without no luck.
Why this plugin creates directory in /home/devel/share/codeblocks/plugins? Seems a bit odd location...
Thanks for your help!
-
I upgraded the Ubuntu to 10.10 and download CB 10.05 from repo with its SDK.
SellChecker won't work with 10/05. It requires a patch applied to trunk of C::B after the release. Thus you need to compile C::B from trunk yourself to use this plugin. This will also make available all libraries you are asking for.
-
Mmmh... I just noticed that the option to change the language from the statusbar has gone in my builds...?! The statusbar does not show these elements anymore. Anybody else experiencing this?
It is because DoCreateStatusBar() gets called after ScanForPlugins() since rev6841. Additionally, plugins were not able to create their fields if the Statusbar was not visible at startup. The attached patch solves the problem (statusbar shows the mentioned field again).
There is/remains the problem that the statusbar is not positioned/sized correctly when it was hidden. (hide statusbar, resize cb, make the statusbar visible again! (resize cb and the statusbar is again positioned correctly) I try to look into this tomorrow.)
regards,
danselmi
-
Mmmh... I just noticed that the option to change the language from the statusbar has gone in my builds...?! The statusbar does not show these elements anymore. Anybody else experiencing this?
It is because DoCreateStatusBar() gets called after ScanForPlugins() since rev6841.
Dammed. This slipped through. Who did this and why?! (I'll have a look...).
-
Dammed. This slipped through. Who did this and why?! (I'll have a look...).
It was made to store the visible/hidden-state in the config to know it at startup (the patch does not remove this feature).
There is/remains the problem that the statusbar is not positioned/sized correctly when it was hidden. (hide statusbar, resize cb, make the statusbar visible again! (resize cb and the statusbar is again positioned correctly) I try to look into this tomorrow.)
Is solved with the new patch.
-
Is solved with the new patch.
Applied in trunk after succesful testing. Thanks!
-
Patch to Spell Checker Plugin; needed to compile under Windows when not using precompiled header sdk.h
Tim S.
Index: SpellCheckerPlugin.cpp
===================================================================
--- SpellCheckerPlugin.cpp (revision 41)
+++ SpellCheckerPlugin.cpp (working copy)
@@ -17,6 +17,11 @@
*
*/
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <configmanager.h>
+ #include <cbeditor.h>
+ #include <editormanager.h>
+#endif
#include <configurationpanel.h>
#include <editor_hooks.h>
#include <cbstyledtextctrl.h>
Index: OnlineSpellChecker.cpp
===================================================================
--- OnlineSpellChecker.cpp (revision 41)
+++ OnlineSpellChecker.cpp (working copy)
@@ -1,6 +1,11 @@
#include "OnlineSpellChecker.h"
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <cbeditor.h>
+ #include <editormanager.h>
+ #include <manager.h>
+#endif
#include <editorcolourset.h>
#include <cbstyledtextctrl.h>
#include "SpellCheckEngineInterface.h"
Index: SpellCheckHelper.cpp
===================================================================
--- SpellCheckHelper.cpp (revision 41)
+++ SpellCheckHelper.cpp (working copy)
@@ -19,6 +19,10 @@
#include "SpellCheckHelper.h"
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <configmanager.h>
+ #include <logmanager.h>
+#endif
#include "SpellCheckerPlugin.h"
SpellCheckHelper::SpellCheckHelper()
{
Index: SpellCheckerConfig.cpp
===================================================================
--- SpellCheckerConfig.cpp (revision 41)
+++ SpellCheckerConfig.cpp (working copy)
@@ -19,6 +19,10 @@
#include "SpellCheckerConfig.h"
#include "SpellCheckerPlugin.h"
#include "sdk.h" // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <wx/dir.h>
+#endif
+
#include "configmanager.h"
#define CFG_SPELLCHECK_ENABLE_ONLINE_CHECK _T("/SpellChecker/EnableOnlineChecker")
-
Hi, i actually was thinking of writing something similar but to check "literals" , i'll give it a try
votes++
-
Nice plug-in but a note on how to compile it would be useful (until it makes it into the C::B contributes).
I compiled it using C::B (svn trunk version) on Ubuntu. The first issue I had was related to not knowing where the Spell Check project sources should be installed relative to the C::B source tree. A point I'm still confused on.
I initially installed the Spell Check sources in a too shallow part of the directory tree and the post-build script tried to create impossible directories, i.e. "/home/devel/share". If put it too deep in the directory tree the "devel" and "output" directories were hidden among the C::B source tree. I assume it is supposed to be installed inside the C::B source tree as otherwise various header files aren't found (unless I resort to editing the #includes).
The linker option "--enable-auto-import" isn't supported, at least not in Ubuntu. Deleting it get round this problem. (From "man ld", this option is only supported on "i386 PE" targeted versions of ld. Although my Ubunutu version is 32 bit I guess its not "i386 PE".)
Finally, its not obvious what to do once it does build. I expected to find a plugin that I could then load into C::B using the add plugin interface. Eventually I worked out that the post-build script was trying to copy files directly into where it assumed the working copy of C::B was, i.e. /devel/share and /devel/output directories. I had to resort to manually copying the various Spell Checker files and directories into /usr/local/lib/codeblocks, /use/local/share/codeblocks (the standard development dirs on Linux for C::B). I'm guessing the current post-build script is written for windows?
-
I was just thinking how I wished I had this. And now I do... :)
I created a new folder called unofficial in the src/codeblocks directory and downloaded from svn there. Everything fell into place then.
the dictionaries are expected to be in a folder called dictionaries in the spellcheckers base directory. You need the aff, dic, dat, and idx files extracted from the open office plugin download. Honestly i just extracted the whole thing there though, works fine.
yeah the post build stuff is a direct xcopy console command instead of a portable squirrel script...
luckily I believe the syntax is the same though so just replace instances of xcopy with cp and you should be good.
-
yeah the post build stuff is a direct xcopy console command instead of a portable squirrel script...
luckily I believe the syntax is the same though so just replace instances of xcopy with cp and you should be good.
The "SpellCheck-unix.cbp" project script uses "cp" okay, it just doesn't copy them to anywhere sensible (as far as my Linux box is concerned).
P.S. thanks for the pointers about where to put things.
-
didn't even see the unix version there, heh...
But the cp stuff looks right once you put it one level above the plugins like I did everything should fall into place for linux people too.
also, don't forget to run the update shell or batch file after it's compiled to actually get the plugin installed into codeblocks.
I noticed a setting called "Enable online spell checker" Shouldn't that be inline? otherwise it kind of sounds like it's searching some sort of dictionary found on the internet...
I've also noticed it makes a notable impact on codeblocks speed. I get screen tearing sometimes with this turned on. So for now I'm just using it for right clicking on stuff to spell check. But it's just what I was looking for otherwise.
-
I tried to build the code from code::blocks, using the Spell-Checker-unix project file and it fails to compile because it can't find hunspell/hunspell.hxx. The non '-unix' project has the hunspell code included in it. any suggestions?
-
Install hunspell-dev/-devel or whatever is called on you distro, I guess.
-
hunspell is included in the spellchecker svn.
So my guess would be to check your os permissions.
failing that, make sure there aren't any broken file links in the project. if so, just re-add them.
-
Hunspell is only in the repository for the windows project. The unix project expects hunspell as a system-library. So:
Install hunspell-dev/-devel or whatever is called on you distro...
-
Thank you, I have gotten further but is still fails to compile. Now its complaining about annoyingdialog.h and not being able to find that. What package is annoyingdialog.h part of?
Thanks
-
It is part of the C::B's sdk and it should be placed in /usr/include/codeblocks
-
Hello Everybody.
Is this plugin somewhere available in a version to install with the plug-in-manager on a windows-computer (xp and 7)?
Best Regards,
Eckard Klotz.
-
Is this plugin somewhere available in a version to install with the plug-in-manager on a windows-computer (xp and 7)?
You can use this:
http://forums.codeblocks.org/index.php/topic,13234.msg88948.html#msg88948
Maybe it's time to merge the sources in the main repo anyways...
-
Maybe it's time to merge the sources in the main repo anyways...
No, we should provide better SDK, so people could build it themselves.
-
Maybe it's time to merge the sources in the main repo anyways...
No, we should provide better SDK, so people could build it themselves.
I don't know what you mean. Can you explain?
-
We need to provide the needed libs and headers, so people can build plugins without the need to build everything (CB and wxWidgets (pretty nasty one to build)) themselves.
-
Hello Morten.
Thankyou for your tip:
Is this plugin somewhere available in a version to install with the plug-in-manager on a windows-computer (xp and 7)?
You can use this:
http://forums.codeblocks.org/index.php/topic,13234.msg88948.html#msg88948
Maybe it's time to merge the sources in the main repo anyways...
While using the spell-checker with the original cb-instalation it works but it seams not possible to use this plugin-version with other versions of code::blocks. First I tried to copy the dll and the zip-file into the newest nightly and than I tried to put both into a zip-archiv and renamed it into "SpellChecker.cbplugin" to install it regulary. In both cases I get an sdk-version error after staring code::blocks.
When do you think it may be thinkable for you to include this plugin into the group of default-plugins? Or as a question to danselmi, may it be possible to post ready-build versions of your pluging on your project-page from time to time?
Best regards,
Eckard.
-
When do you think it may be thinkable for you to include this plugin into the group of default-plugins?
I guess asap...?! ;-)
Seriously: I am working with it permanently on Windows without any issues (it's one of my favourite plugins btw). Hence I don't know how well it works under Linux, as I never tried. Any experiences from other users?
What you can also try: Link against the DLL's (instead of libs) that ship with the nightlies. Under Windows this will work and you only need to compile the plugin.
-
configured it on linux, I have the impression that the 'how to configure' is not 100% up to date -> couldn't find thesauri.
First things I noticed, lot of underlined red words.For example this :
// namespace
It dosn't like the word namespace in comments. What is the best way, to get rid of such fakes ?
-
Right-click on the underlined word and chose and move the mouse over "Spelling suggestions for 'namespace'" and chose "Add 'namespace' to dictionary".
The thesauri are in the openoffice.org-thesaurus-packages or in their dependencies, the mythes-packages (on debian).
-
Is this 'add to dictionary' global for all packages using hunspell or it is codeblocks only?
-
Is this 'add to dictionary' global for all packages using hunspell or it is codeblocks only?
After a look into the code and some debugging:
it's a file in the codeblocks config-folder named xx_XX_personaldictionary.dic, where xx_XX is the language code for the language you have selected.
-
OK, this is almost perfect, probaby it should be in "$cb_settings/dicts/xx_XX_[personality].dic"?
-
Autotools build system is broken both in trunk and in debuggers branch on my CentOS 5.x system.
Here is the log:
$ ./bootstrap && ./configure --prefix=/home/tpetrov/software/ --with-contrib-plugins=all,-ToolsPlus,-FileManager,-NassiShneiderman,-codesnippets,-spellchecker --disable-pch --enable-debug
which: no dch in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/tpetrov/bin)
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable debugging... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working volatile... yes
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for getcwd... yes
checking for isascii... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strrchr... yes
checking for strstr... yes
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for library containing gzopen... -lz
checking for library containing BZ2_bzopen... no
checking whether to build the source formatter plugin... yes
checking whether to build the autosave plugin... yes
checking whether to build the class wizard plugin... yes
checking whether to build the code completion plugin... yes
checking whether to build the compiler plugin... yes
checking whether to build the debugger plugin... yes
checking whether to build the default MIME handler plugin... yes
checking whether to build the open files list plugin... yes
checking whether to build the foreign projects importer plugin... yes
checking whether to build the scripted wizard plugin... yes
checking whether to build the to-do plugin... yes
checking whether to build the abbreviations plugin... yes
checking whether to keep prebuild windows dll's in dist-tarball... yes
checking which (if any) contrib plugins to build... Unknown contrib plugin -ToolsPlus, ignoring
all -ToolsPlus -FileManager -NassiShneiderman -codesnippets -spellchecker
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 2.8.12)
checking for wxWidgets static library... no
checking for wxWidgets platform... wxGTK
checking for pkg-config... yes
checking for GTK2... configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GTK2_CFLAGS
and GTK2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See `config.log' for more details.
-
Autotools build system is broken both in trunk and in debuggers branch on my CentOS 5.x system.
Here is the log:
$ ./bootstrap && ./configure --prefix=/home/tpetrov/software/ --with-contrib-plugins=all,-ToolsPlus,-FileManager,-NassiShneiderman,-codesnippets,-spellchecker --disable-pch --enable-debug
which: no dch in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/tpetrov/bin)
checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking target system type... x86_64-redhat-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable debugging... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working volatile... yes
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for getcwd... yes
checking for isascii... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strrchr... yes
checking for strstr... yes
checking for dlopen in -ldl... yes
checking for pthread_create in -lpthread... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for library containing gzopen... -lz
checking for library containing BZ2_bzopen... no
checking whether to build the source formatter plugin... yes
checking whether to build the autosave plugin... yes
checking whether to build the class wizard plugin... yes
checking whether to build the code completion plugin... yes
checking whether to build the compiler plugin... yes
checking whether to build the debugger plugin... yes
checking whether to build the default MIME handler plugin... yes
checking whether to build the open files list plugin... yes
checking whether to build the foreign projects importer plugin... yes
checking whether to build the scripted wizard plugin... yes
checking whether to build the to-do plugin... yes
checking whether to build the abbreviations plugin... yes
checking whether to keep prebuild windows dll's in dist-tarball... yes
checking which (if any) contrib plugins to build... Unknown contrib plugin -ToolsPlus, ignoring
all -ToolsPlus -FileManager -NassiShneiderman -codesnippets -spellchecker
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 2.8.12)
checking for wxWidgets static library... no
checking for wxWidgets platform... wxGTK
checking for pkg-config... yes
checking for GTK2... configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables GTK2_CFLAGS
and GTK2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
See `config.log' for more details.
I have seen this issue too, but forgot it (no todo-list).
It should work if you enable spellchecker or disable MouseSap (none of these plugins causes the issue) and leave the rest of the plugins as you have it now.
I will try to find a workaround, seems to be a bug in autotools, but not absolutely sure about this.
I will look into it this evening.
-
I'll test on Monday, when I'm back at work...
-
I'll test on Monday, when I'm back at work...
No need to, the issue is fixed in trunk (svn r7369) and debugger-branch (svn r7370).
The cause was a misconfiguration of the pkg-config related stuff:
Note that if there is a possibility the first call to PKG_CHECK_MODULES might not happen, you should be sure to include an explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-
Thanks Jens. It is building correctly now.
I have a bug report:
if you have a string in the code like
char const *str="\tword";
The spellchecker ignores the \t and think, that I've typed tword.
Can you make it to know about C/C++ escape characters?
-
I have also a feature request, can you add a dialog for editing/viewing the words added to the custom dictionary?
-
I have also a feature request, can you add a dialog for editing/viewing the words added to the custom dictionary?
Configure a tool that starts the internal editor on the user-defined dictionaries (based on macros)?! ;-)
-
char const *str="\tword";
The spellchecker ignores the \t and think, that I've typed tword.
Can you make it to know about C/C++ escape characters?
I have also a feature request, can you add a dialog for editing/viewing the words added to the custom dictionary?
I will provide a patch in the next few days.
-
Is it possible use a easy way to select a spell checker list?
look at the image below:
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/spellcheck1.png)
I have a very complex context menu, and selecting a word need to move the mouse a lot.
another question is: is selecting the directory path can use some predefined macro, like: $(TARGET_COMPILER_DIR) like variables, so that use the directory file in a portable C::B can works.
thanks!!!
-
Ollydbg, unload some of the plugins :)
-
Here's the pathc to edit the personal dictionary file.
(detect c/c++ escapes still open...)
-
Hi
This patch disables the checker when no dictionaries are installed. Mentioned here:
...
2. In the SpellChecker settings (when not installed Dictionary) the checkbox "Enable online spell checker" inaccessible, and so impossible
to switch off SpellChecker (it's only accessible when Dictionary is installed).
...
and here:
...
how can i disable SPELL CHECKING, the checkbox is greyed out (but enabled) and every, really every word is underlined as not recognized!.
...
Index: SpellCheckerConfig.cpp
===================================================================
--- SpellCheckerConfig.cpp (revision 7390)
+++ SpellCheckerConfig.cpp (working copy)
@@ -95,6 +95,9 @@
cont = dir.GetNext(&strfilename);
}
}
+ // disable online checker if there are no dictionaries found
+ if (m_dictionaries.empty())
+ m_EnableOnlineChecker = false;
}
const std::vector<wxString> &SpellCheckerConfig::GetPossibleDictionaries()const
{
-
last patch already applied
-
...
if you have a string in the code like
char const *str="\tword";
The spellchecker ignores the \t and think, that I've typed tword.
Can you make it to know about C/C++ escape characters?
The attached patch solves this issue.
-
all patches applied :P
-
Is it possible to make support $(DATAPATH) and other CB global variables in the directory path (Dictionaries, Thesauri, Bitmaps)?
It's very important for a portable C::B works.
Thanks.
-
oh,great!this just solve my damn problem.....Thanks! :lol:
-
Is it possible to make support $(DATAPATH) and other CB global variables in the directory path (Dictionaries, Thesauri, Bitmaps)?
It's very important for a portable C::B works.
Thanks.
I also request this feature. :D
-
Is it possible to make support $(DATAPATH) and other CB global variables in the directory path (Dictionaries, Thesauri, Bitmaps)?
It's very important for a portable C::B works.
Thanks.
I hope this does the trick.
-
Is it possible to make support $(DATAPATH) and other CB global variables in the directory path (Dictionaries, Thesauri, Bitmaps)?
It's very important for a portable C::B works.
Thanks.
I hope this does the trick.
Thanks, I just test this patch, and it works fine.
I just put some strings like below:
$(CODEBLOCKS)\share\CodeBlocks\SpellChecker
and I have put files:
th_en_US_v2.dat
th_en_US_v2.idx
en_US.dic
en_US.aff
in that folder, and it works!!
Hopefully some dev can put this patch to trunk.
-
Hopefully some dev can put this patch to trunk.
I tried it myself meanwhile and committed accordingly. Thanks!
-
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
-
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:
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
-
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.
-
Danselmi:
This check is useless, because delete checks for NULL pointers! This is stated in the standard.
if (m_pSpellUserInterface != NULL)
delete m_pSpellUserInterface;
-
There is a small bug in spellcheker plugin - in UTF8 document only half of non-english word is underlined. Screenshot in the attachment.
-
It is not related to the encoding or the use characters. It does it for English letters, too.
-
Hmm... For me English words underlined fully.
BTW, I`m use WinXP with Russian localization.
-
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 (http://wiki.codeblocks.org/index.php?title=SpellChecker) indicates only the verification comments.
but can I add the full text file verification (*.txt, of course without highlighting) to 'wxSpellChecker' ?
-
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 (http://wiki.codeblocks.org/index.php?title=SpellChecker) indicates only the verification comments.
but can I add the full text file verification (*.txt, of course without highlighting) to 'wxSpellChecker' ?
Sure, just add<Language name="Plain text" index="0" />
to your OnlineSpellChecking.xml file and restart codeblocks.
-
//*** Translated by Google ***//
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) .
-
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.
-
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 ?
-
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.
-
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)
-
I am on windows 7 and i dont use mozilla products nor openoffice.
Can anyone share their dictionary or tell me how to use this plugin?
Using latest nightly!
-
Try :
http://wiki.codeblocks.org/index.php?title=SpellChecker
Dictionaries->download
-
Try :
http://wiki.codeblocks.org/index.php?title=SpellChecker
Dictionaries->download
Thanks!! :D
Working flawlessly now!
-
Try :
http://wiki.codeblocks.org/index.php?title=SpellChecker
Dictionaries->download
Thanks!! :D
Working flawlessly now!
BTW does it just highlights the spell errors or corrects them too?? Cos i am not able to find how to correct my spell errors in strings and comments
-
Have you tried to right click a marked word and checked "Spelling Suggestions for 'wrongword'"?
I will adjust the wiki...
-
Have you tried to right click a marked word and checked "Spelling Suggestions for 'wrongword'"?
I will adjust the wiki...
Sorry my bad! :P
Found it!!!
Thanks
-
I found a minor cosmetic issue with the SpellChecker plugin that bugged me somewhat, so I made the status bar menu and settings combo box use human-readable language names (i.e., "English (United States)") rather than the abbreviation which is not always clear to the user (i.e., "en_US").
The changes are in the attached patch. You'll notice a very primitive implementation of GetLanguageName(), but I ended up doing it this way, because I couldn't get it to work with neither wxHashMap nor std::map<> for some reason. I did lose patience, but still hope someone else takes the patch and refactors it to a more efficient alternative. For now, you can already get proper language names listed in the user interface using this patch.
EDIT: Fixed a bug in the previously uploaded patch.
-
Can you make the plugin support Language Tool :
http://languagetool.org/
http://languagetool.org/languages/
because only languagetool.org has Chinese spell checking.
And it also has Firefox/OpenOffice Add-on.
-
Mr Anselmi
Can you please make the SpellChecker support multiple languages?
My point is:
I use my native language for code comments, but comments have a big amount of english keywords.
Thanks for awesome plugin.
-
Is it just me or does it NOT compile anymore with:
||=== Build: hunspell in SpellChecker (compiler: GNU GCC Compiler x32) ===|
D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\SpellChecker\hunspell\src\hunspell\baseaffix.hxx|28|error: 'MAXCONDLEN' was not declared in this scope|
D:\coding\projects\sw\codeblocks\trunk\src\plugins\contrib\SpellChecker\hunspell\src\hunspell\baseaffix.hxx|30|error: 'MAXCONDLEN_1' was not declared in this scope|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|
Win7 x64
-
svn 10127 : compiles correctly
'MAXCONDLEN' is defined in 'atypes.hxx'
-
My bad, I messed up the project file. Sorry for the trouble.