Author Topic: SpellChecker plugin  (Read 138340 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #75 on: August 03, 2011, 08:45:35 am »
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.
(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 danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: SpellChecker plugin
« Reply #76 on: August 03, 2011, 08:56:49 am »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #77 on: August 03, 2011, 09:52:52 am »
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.
(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 eckard_klotz

  • Almost regular
  • **
  • Posts: 194
Re: SpellChecker plugin
« Reply #78 on: August 03, 2011, 01:44:03 pm »
Hello Morten.

Thankyou for your tip:
Quote
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SpellChecker plugin
« Reply #79 on: August 03, 2011, 04:47:38 pm »
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: SpellChecker plugin
« Reply #80 on: August 05, 2011, 02:30:31 pm »
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 :

Quote
// namespace

It dosn't like the word namespace in comments. What is the best way, to get rid of such fakes ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SpellChecker plugin
« Reply #81 on: August 05, 2011, 02:56:15 pm »
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).

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #82 on: August 05, 2011, 04:21:08 pm »
Is this 'add to dictionary' global for all packages using hunspell or it is codeblocks only?
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SpellChecker plugin
« Reply #83 on: August 05, 2011, 06:38:35 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #84 on: August 05, 2011, 06:56:56 pm »
OK, this is almost perfect, probaby it should be in "$cb_settings/dicts/xx_XX_[personality].dic"?
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #85 on: August 12, 2011, 06:01:04 pm »
Autotools build system is broken both in trunk and in debuggers branch on my CentOS 5.x system.

Here is the log:
Code
$ ./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.


(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SpellChecker plugin
« Reply #86 on: August 12, 2011, 07:38:39 pm »
Autotools build system is broken both in trunk and in debuggers branch on my CentOS 5.x system.

Here is the log:
Code
$ ./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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #87 on: August 12, 2011, 07:57:10 pm »
I'll test on Monday, when I'm back at work...
(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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SpellChecker plugin
« Reply #88 on: August 12, 2011, 09:45:41 pm »
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:
Quote from: pkg-config's man-page
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SpellChecker plugin
« Reply #89 on: August 15, 2011, 11:06:15 am »
Thanks Jens. It is building correctly now.

I have a bug report:

if you have a string in the code like
Code
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?
(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!]