This new version of the syntax highlighting extension for OpenOffice.org brings the announced features. Many thanks for those who brought their improvement ideas.
- The language definition files are written on one line: 40% of time is thus gained during the definition file reading.
- The regular expressions used to find the keywords are compiled and stored in a regexp cache: this gains only 3% of time on the snippet highlighting… but it’s already interesting on huge snippets.
- A progress bar is now showing the highlighting progress.
- The languages names are sorted in the listbox… but their display name is still not shown.
- A fix for problems with keywords starting with the character ?.
The update site is not ready and the updated sources will be soon available on the Gnome SVN in the ooo-build project.
COOoder.oxt, v1.1 (307.91 KB)
EDIT The sources can be browsed on Gnome ViewVC
![[del.icio.us]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/dzone.png)
![[Facebook]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/google.png)
![[Newsvine]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/newsvine.png)
![[Slashdot]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/technorati.png)
![[Yahoo!]](http://cedric.bosdonnat.free.fr/wordpress/wp-content/plugins/bookmarkify/yahoo.png)


#1 by cbot on September 17th, 2008
Quote
I’ve been waiting for such a cool feature in OO!
Unfortunately, the extension hangs as soon as I choose a language
and hit “OK”.
Maybe reinstalling Java might help.. any suggestions?
#2 by Cédric on September 17th, 2008
Quote
cbot,
It seems strange… which version of Java are you using? Which version of OpenOffice.org? Which OS?
#3 by cbot on September 17th, 2008
Quote
WinXP x64,
Java 6 Update 7 (32bit),
OpenOffice.org 2.4.1
I tried the 64bit version of Java, but OO could not find it via Tools/Options/Java.
Using 32bit Java shouldn’t make any problems, right?
#4 by Cédric on September 17th, 2008
Quote
cbot,
From what I could read by browsing the web, running 32bits Java applications on 64bits machines can cause problems… this might be a source of the problem.
Here are some resources on OpenOffice.org x64 and Java:
http://wiki.services.openoffice.org/wiki/Porting_to_x86-64_(AMD64,_EM64T)#Java
I hope that helps
#5 by cbot on September 18th, 2008
Quote
Okay thanks,
but I still have the problem on my Notebook (WinXP 32bit, JRE 1.6u7, OO 2.4.1).
I’ll check if it helps to use the full Java Installation (Java SE)…
#6 by cbot on September 18th, 2008
Quote
Still the same…
do you use Linux? I’m running out of ideas, do you have any suggestions?
Should I try an older version of OO, COOder or even switch to Linux?
#7 by Cédric on September 18th, 2008
Quote
cbot,
Yes I’m using linux and COOoder runs on go-oo build provided by ubuntu and an OpenOffice.org 3 from the upstream. I will try to reproduce the bug on a windows machine…
#8 by cbot on September 22nd, 2008
Quote
OO3 Beta RC2 didn’t do the trick either… seems like this only works in Linux so far,
although I had some problems with PHP highlighting:
After a comment all source code will be grey (using “#” or “//”), GeSHi doesn’t do this.
#9 by Cédric on September 22nd, 2008
Quote
cbot,
For the windows problem I still hadn’t time to grab a windows machine and debug on it. I’ll try to do it ASAP… however I’m not at home during the whole week.
For the PHP problem, I have never seen this problem in my PHP test files. Could you provide some sample file with the problem ? I’m preparing some fixes in the syntax highlighting… so don’t hesitate to give me samples to help me to fix the problems you find out!
#10 by cbot on September 22nd, 2008
Quote
The problem is with every source file, everything after the comment will be grey:
<?php
include($_SERVER['DOCUMENT_ROOT'].”/include/site.phpi”);
require_once(“db.phpi”);
# sub-country handling
if ($_locale)
{
# sub-country. No $SITE defined locale.
$_country = $_locale;
} else {
# major site with own $SITE
$_country = $SITE['country'];
$_locale = $SITE['locale'];
}
include($_SERVER['DOCUMENT_ROOT'].”/include/site.phpi”);
require_once(“db.phpi”);
# sub-country handling
if ($_locale)
{
# sub-country. No $SITE defined locale.
$_country = $_locale;
} else {
# major site with own $SITE
$_country = $SITE['country'];
$_locale = $SITE['locale'];
}
# sub-country handling
if ($_locale)
{
# sub-country. No $SITE defined locale.
$_country = $_locale;
} else {
# major site with own $SITE
$_country = $SITE['country'];
$_locale = $SITE['locale'];
}
#11 by cbot on September 22nd, 2008
Quote
Oh sorry, seems like it got mixed up a bit :)
The first 5 lines should be enough.
#12 by Cédric on September 22nd, 2008
Quote
cbot,
Ok, I found the problem: some lines aren’t paragraphs in OpenOffice.org, but only line breaks. You should use paragraphs because the extension doesn’t looks the end of lines. The reason is simple: when you insert code, most of the time it is too long to fit into a single line and the highlighting would be wrong for line comments.
#13 by WSK on October 2nd, 2008
Quote
Hello,
while trying to install your extension on OO 3.0 I get an error after accepting the license conditions:
“Could not create java implememation loader”
Annotation:
On options in OO 3.0 selecting java OO crashes.
Regards
WSK
#14 by Cédric on October 2nd, 2008
Quote
WSK,
Have you a JRE installed on your machine ? What OS are you running ?
Cedric
#15 by Mike on October 20th, 2008
Quote
I use OpenOffice 3.0.0 OOO300m9 (Build:9358)
Win XP Prof Ver. 2002 SP3
Genuine Intel T2400 @ 1,83GHz, 2GB RAM
I cant find a description of the product and how it works.
After installation and restart I get a in my toolbar.
But I get no functionality after click
#16 by Mike on October 20th, 2008
Quote
… I use Java Version Sun 1.6.0_10-ea (Java\jdk1.6.0_10\jre)
Java HotSpot(TM) Client VM (build 1.6.0_10-ea-b07, mixed mode, sharing)
#17 by Cédric on October 22nd, 2008
Quote
Mike,
You don’t even have the language selection dialog ? This seems strange… I’ll have some debugging session for the windows platform soon, but I have other urgent things to fix and a huge amount of work.
Cedric
#18 by Mark on December 5th, 2008
Quote
A great idea, what all Linux programmers need. However, I seem to be having trouble with the implementation. The COOoder is located under Tools -> Add-Ons, and I have a COOoder toolbar. Unfortunately, nothing happens when clicking on either tool icon. I do not see an entry under Language for COOoder, should I?
Fedora 7 : kernel-2.6.23.17-88.fc7 : openoffice.org-writer-2.3.0-6.9.fc7 : jre-1.6.0_03-fcs : Dual Core AMD Opteron 180
#19 by Cédric on December 9th, 2008
Quote
Hi Mark,
That seems strange. Could you have a look at the extensions manager and check that everything in the COOoder is really activated ? Could you provide me the list of all the installed files by private mail ?
Thanks,
Cedric
#20 by mgayo on April 7th, 2009
Quote
I write a code fragment into OOo writer.
I have pushed de icon in the Coooder toolbat but nothing happened
How it is higlited now?
Exits a manual, tutorial, help, …?
#21 by Cédric on April 7th, 2009
Quote
mgayo,
Are you running the extension on Windows? If so, there is a known bug that I didn’t have time to fix.
#22 by mgayo on April 27th, 2009
Quote
@Cédric
Yes, runing in Windows.
Exits alternative?
#23 by Cédric on April 28th, 2009
Quote
@mgayo
Not yet, but I hope soon
#24 by Daniel on May 12th, 2009
Quote
I had the same “Could not create Java implementation loader” problem using Ubuntu.. I found the solution here:
http://wiki.services.openoffice.org/wiki/Extensions_trouble_shooting
Now it works fine… hope it can help somebody..
Thanks for this!
#25 by Cédric on May 12th, 2009
Quote
Daniel:
I wasn’t aware of that wiki page, thanks for the link.
#26 by Tuomas on May 13th, 2009
Quote
Hi Cédric,
Have you got schedule for the Windows problem? I tried to use Coooder in my system (WinXP32, OOo 3.0.1 and JRE v6u13). No matter which language selected for highlight, OOo gets stuck and must be killed from Task Manager.
Thank you!
#27 by Cédric on May 13th, 2009
Quote
Tuomas: not yet…
#28 by Michaël on August 28th, 2009
Quote
Hello Cedric,
same question as Tuomas, a couple of month later ;)
#29 by XDCK on October 8th, 2009
Quote
Hi! I have installed extenstion, everything OK, but nothing happens.
All my code-text are the same.
What have I do for that my text will be highlighted as css-code or php-code?
#30 by cyborg on November 14th, 2009
Quote
How include new syntax file definitions on cooder
#31 by Cédric on November 15th, 2009
Quote
You can checkout the sources and add the language file with this. The php folder in the sources contains some scripts to convert GeSHi syntax file into COOoder ones.
#32 by hope on January 25th, 2010
Quote
Regarding the crash for the windows, Im having the same problem.
Didn’t want to spoil the extension but here another alternative I use to create syntax highlighting for Open Office.
I’m using Notepad++ for the PHP coding
Then, at the top menu
> Plugins > NppExport > Copy RTF to clipboard
Then just paste into the Open Office.
Its works! at least on my open office 3.1.1 Writer.
Its quite annoying to use this method since I need to open every file on it anyway.
Hope the COOoder for window can be fix soon
#33 by Cédric on January 25th, 2010
Quote
Hi all,
I have finally taken some time to fix the windows bug. You should get the 1.1.2 release here: http://extensions.services.openoffice.org/project/coooder.
Thanks for using COOoder.