Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
SpellChecker plugin
MortenMacFly:
--- Quote from: danselmi on January 07, 2011, 12:12:17 am ---Is solved with the new patch.
--- End quote ---
Applied in trunk after succesful testing. Thanks!
stahta01:
Patch to Spell Checker Plugin; needed to compile under Windows when not using precompiled header sdk.h
Tim S.
--- Code: ---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")
--- End code ---
virtuosonic:
Hi, i actually was thinking of writing something similar but to check "literals" , i'll give it a try
votes++
pacrook:
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?
ouch:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version