COOoder

4.333335
Average: 4.3 (12 votes)
Bash script highlighted

This extension provides syntax highlighting features for OpenOffice.org. COOoder will be usefull for developers wanting to present code fragments in writer documents. The colors used are the same than the ones from GeSHi. Character styles will be created for each language element.

Download extension
Operating System: System Independent
Compatible with: OpenOffice.org 2.4 | StarOffice 8 Update 9 or higher.
Version: 1.1.2
Date: 2010-Jan-27
Size: 401.69 KB

License: Opensource | GNU Lesser General Public License
Source code: Browse source code
Downloads: Today: 11 | Week: 65 | Month: 339 | Year: 23,853

Comments

Unfortunately now that

Unfortunately now that Coooder works, I found it quite useless. For JavaScript snippets, it doesn't set the correct character sázkové kanceláře or style, it doesn't auto-indent, it doesn't highlight comments, sázkové tipy it doesn't highlight strings, it doesn't remove formatting from stavkove kancelarie changed keywords, and sometimes it doesn't work at all.I definitely won't use it. I hope that future versions would be sázky better than this one.

How to assign COOoder to HotKeys?

Hi

I'd like to assign some key to open COOoder window, and, if it's possible - not to open it at all - but just highlight the selected text with coooder (i.e. to specify a lang somewhere too). But I can't find COOoder macros in the macros list. Where is it?

Code inside a table

When code is inside a table, Coooder show a popup error without any message. The same code outside the table works fine.
openoffice.org-base-3.1.1-19.34.fc12.x86_64
COOoder 1.1.2

Adding a new language syntax format definition

I'd like to use COOoder to document a language definition document. Thus I need to define a new syntax format spec for this new language. How do I go about this?

Many, many thanks in advance!

- Scott

Hello Scott, All you need is

Hello Scott,

All you need is to create the Geshi language definition and run this script:
http://cgit.freedesktop.org/libreoffice/build/tree/extensions/coooder/ph...

I will generate the xml language files from the ones contained in Geshi.

Very nice extension

Hi,
I installed your extension and I like it very much. Using Ubuntu 9.10 I had to install openoffice.org-dev first (like aconrad before) to get the installer work and had to restart OpenOffice once. Thank you for this very useful tool.

Greetings
ntrunk

Option frame

Hello
Can you add an option (default or not) to insert selected text into the frame?
I always put colorized text in the frame to improve visibility.

Thanks, Piotr

How to use this extension?

Hi Cédric!

I would love to use your extension, but I don't know how. The installation was successful (I guess), and now I can't figure out how to enable the syntax highlighting. Can you give me instructions?

Thanks,
Tobias

Ok, on the 2nd restart of OO

Ok, on the 2nd restart of OO the COOoder toolbar showed up. Still, some instructions would make things easier.

Nice! :)

Let me add three comments:
- I would be great if COOoder would also apply a "Paragraph style". In most cases you also would like to change the font type and font size and at the moment you have to do that manually.
- Am I right that all the time you change something in the code, you have to press the COOoder button again? This makes the workflow a bit awkward.
- The "Language selection" does not remember your last selection. Most of the time you use one language in your document and it is annoying always having to select it again.

And I also discovered one bug: Enter the following code:

class Test {
public void test() {
print 'test';
}
}

Apply the syntax highlighting for Java. Then place the cursor behind "print 'test';", press "Return" and enter "print 'another test';". Then select the text and apply the highlighting again. The 2nd "print" is not highlighted correctly.

Nice tool

I am using both OOo and MS Office, and this would be a nice tool in Word. Don't get me wrong, I would use OOo all the time, but my company enforces MS.
Just starting to use it. Though I had some problems with make it work, but I love the support for languages and the easy of use.

But I run into a little problem. If I select text for formatting inside a table or a frame/textbox I get an error with the title "Errror during syntax highlighting" with no message.
If I do the formatting inside the page it works fine.

Thanks for this tool.

Many thanks for your

Many thanks for your encouraging comment.

WRT the error you have, it seems that the selection isn't handled in the tables / frames. I'll try to have a look at that soon.

Thanks again for using it.

incompatibility with java 1.5

Hi

It seems to be a good extension, but it crashed ooo every time I tried to install it with java 1.5.0_17 which was on the computer I'm on.
I installed java 1.6.0_19 and it fixed the problem.

PS : I'm regulary changing computer, so I installed portable version of both oOo and java

Just wanted to say

thank you very much.

Love this

Hey Cédric,

I love this extension!! I am writing a user guide which contains Beanshell and Java fragments. It works like a charm and makes my document look epic!

I got three suggestions:
1) Initially I had to search where the function went to, then after a bit of searching, I saw a toolbar with one button in the top left of my window. Perhaps there is a way to make this more obvious?
2) Can you make the dialog remember the previous choice? I guess most people will be working with one language anyway. Perhaps even, a "do not ask again" checkbox, so you can hit the button in the toolbar and bosh, all done? (The for example shift-clicking the button would bring the dialog back up again if you want to change the language)
3) Make the change an atomic operation, so the undo function goes back to the previous format at once.

I don't know if this is all possible, but hey, I gotta try :)

Thanks for your efforts, and keep up the good work!

Cheers,

SurfMan

Hi SurfMan, Many thanks for

Hi SurfMan,

Many thanks for your encouraging message!

Regarding your suggestions:

  1. indeed I would need to improve that
  2. Pre-selecting the previous language is much easier to do :)
  3. I'm not sure we could change that: the Undoable operations are defined in the core. In order to be able to have it considered as a single operation by Undo/redo, we would need some additional API or transform the extension into core dev...

Update error

Hi
When i try to look for update for my OOo extensions, i receive always an error message from coooder.
It says:

"http://cedric.bosdonnat.free.fr/coooder/COOoder.update.xml does not exist"

It happens all the time.

Thanks
Regards

Windows bug fixed by 1.1.2

Hi all,

Thanks for using COOoder. I finally have taken some time to fix the windows problem. This has been released as 1.1.2.

Thanks!

Thanks! Its great.

Ahh... Only as advice: Use "Liberation Mono or LuxyMono or FreeMono" because the identation is important. ^_^

no download??

it returns me

THANK YOU!

Sorry no download available or similar....

Oops, something wrong seems

Oops, something wrong seems to have happened when creating the 1.1.2 release. This is now fixed.

now it works

ok thanks
now it works

^^

When I tried to add COOoder

When I tried to add COOoder to my OpenOffice 3.0.1/ubuntu 9.04 x64 install, as soon as I select the COOoder.txt file and accept the license agreement, I get the following error message:

(com.sun.start.registry.CannotRegisterImplementationException){{Message = "", Context = (com.sun.star.uno.Xinterface) @0 }}

Reading the previous comments, I also made sure I had sun-java6-jdk installed and told OpenOffice about it. What could I be missing here?

fixed

I had the same problem. I had to install "openoffice.org-dev" in order to get through the installation:


$ sudo aptitude install openoffice.org-dev
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Lecture de l'information d'état étendu
Initialisation de l'état des paquets... Fait
Les NOUVEAUX paquets suivants vont être installés :
dmake{a} ecj{a} ecj-gcj{a} fastjar{a} gcj-4.4-jdk{a} gcj-4.4-jre{a} gcj-4.4-jre-headless{a} gcj-jdk{a} gcj-jre{a} gcj-jre-headless{a}
libantlr-java{a} libecj-java{a} libecj-java-gcj{a} libgcj10-awt{a} libgcj10-dev{a} libstlport4.6-dev{a} openoffice.org-dev
openoffice.org-java-common{a}
0 paquets mis à jour, 18 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 17,5Mo d'archives. Après dépaquetage, 80,6Mo seront utilisés.
Voulez-vous continuer ? [Y/n/?]

As you can see, it installed gcj. Just make sure openoffice uses the Java from Sun: Tools > options > openoffice.org > java

HTH,
Alex

it finally works

Thank you aconrad for solving the problem.
Unfortunately now that Coooder works, I found it quite useless. For JavaScript snippets, it doesn't set the correct character or style, it doesn't auto-indent, it doesn't highlight comments, it doesn't highlight strings, it doesn't remove formatting from changed keywords, and sometimes it doesn't work at all.
I definitely won't use it. I hope that future versions would be better than this one.

Weird way to motivate developers

Hi uccio,

These kind of comment will certainly not engage me in continuing the development of this extension any further... As this is an open source extension you can also help to fix some bugs annoying you. It's really a pity that you show yourself as a simple consumer!

Same problem for me too

I have Open Office 3.1.1 on Ubuntu 9.10 32bit

Strange, I have just tried

Strange, I have just tried it on OpenOffice.org 3.1.1 / OpenSuse 11.2 x64 and I had no problem. Are you using the default OpenOffice.org from Ubuntu? Did you try on a more recent version of Ubuntu?

Same problem here

Hi there. I'm having the same problem using Openoffice 3.1.1-5ubuntu1 using Java 1.6.0_15 under Ubuntu 9.10. Is there any solution yet?

Very Useful!!!

Many Thanks.

It works pretty good in Linux Fedora 10/11 with Openoffice 3.1.

For feedback: the extension does not work if the text is inside a table

It works!

1.1.1 release works for me (after some tries..) with JDK 1.6 (sudo apt-get install sun-java6-jdk) and OOo 3.1.0.

Chooose JDK 1.6 at Tools> Options > OpenOffice.org > Java.

Bye

Cannot install plugin on Ubuntu 8.10 java 1.6

I have OOo3 installed with java 1.6 and when i try to load the plugin it gives this error:

(com.sun.star.registry.CannotRegisterImplemenationException)
{{Message = "", Context = (com.sun.star.uno.Xinterface) @ 0 }}

I can install other plugins.

what am I missing?

I apologize in advance if this is a stupid question, but how do you get this to function? I've installed it, I can see it in the extension manager, but I see no added character styles. I see a "add on" menu item added to the tools menu, but it appears to do nothing.

Again, I apologize of this is just being stupid, but I really can't find a way to "turn on" this extension. Sounds cool, though.

Any suggestions?

(winXPSP3, OOO3.0.0 build 9358)

jima

Re: What am I missing?

Of course, mere minutes after posting, I find that OOO has a tooltray app open, thus the "restart the app" action that I thought I had taken was not performed. Once I closed the quickstart app and restarted, things worked. Sorry for the dumb question, and the rudeness of replying to my own question. :)

impress support?

nice extension!
It would be good to have it working even on Impress.
I have to show some examples of code (they are short, don't worry!) in python, and it is silly to have to switch between writer and impress.

freezing OOo

it happen also to me

in the same time i press ok OOo get freezed and i can only kill process from taskmanager

i'm on win xp and using OOo 3.0.0

hope a new update can solve this problem

Freezing on Windows

I can reproduce the problem myself on a windows machine. I'm working on the eclipse integration for OpenOffice.org when I have free time: that's why I still haven't fixed that freezing problem. It's on my todo task.

Small glitch in PHP highlighting

Thanks for the extension Cédric! It seems to have a small problem with PHP highlighting. The following code snippet:

$var = my_function(array('test'));

Doesn't highlight the parenthesis correctly. The second '(' gets colored blue like the quoted text for some reason. I'm using this with openoffice 3 by the way. Thanks again. Tom.

After more testing, it

After more testing, it appears to be specifically when a '(' is followed by a single quoted string. With double quoted strings it works correctly.
Definitely a very cool extension though!
Tom

not case-sensitive languages

Hello Cédric,
Thank you for this nice extension!
I'm trying to use it with StarBasic (ok VB is quite the same) but your engine recognizes only lower case words.
AFAIK almost all BASIC dialects aren't case sensitive so your extension should behave accordingly

Hi Paolo, Hum, I haven't

Hi Paolo,

Hum, I haven't checked all the languages. I'll have a look at this.
Thank you for your feedback

Cedric

OOo 3 and Java 1.6

Under OOo3 and Java 1.6 (OS=WinXP, but shouldn't matter) this extension makes OOo freeze completely after selecting a language in the dialog box: the cursors sets to the hourglass one and i just can't do anything but kill OOo.

Same here

It's freezing for me after selecting the language (in this case java). This is on OOo3/Vista HP

Same experience with esa

Same with you esa, I user OOo3 anda Java 1.6 and it always freeze after selecting language.

I tested this extension

I tested this extension under OOo 3 and Java 6 under Ubuntu 8.10 and it works fine for me. When you select the language it takes some seconds (5 - 10) to load the syntax library.

tested on XP SP3 and hava 1.6 and the application freezes

I'm having the same problem other users are facing.

When I try changing the programming language from the toolbar, the application completely hangs-up, freezes, kaboom and not for only 10 secs, I leaved the app open for way more than ten minutes and it was completely frozen.

I'm using Windows XP SP3 and JRE 1.6.

Error in syntax highlighting

Hello, when I try to highlight python code (selecting it and issuing the command) I get the following error in a panel:
«Error during syntax highlighting
For input string: "lack"»
But I still get some lines correctly highlighted (the first ones).

If I highlight an Objective-C file it works well.
I use Mac OS X 10.5.4 on an Intel MacBook. Version of OpenOffice.org: OOo 3.0.0 (build: 9350)
Maybe it's a problem of the OpenOffice beta.

Thanks in advance!

Pietrodn
http://meta.wikimedia.org/wiki/User:Pietrodn

Fixing a parsing problem

Hi Pietrodn,

Could you provide me a sample of non-working code in private ?

Thanks