Code Colorizer-2.3.6

Extension:
Extension ID:
org.pitonyak.addon.MacroFormatterADP
Release date:
10/08/2009 - 21:05
Version:
2.3.6
Operating system:
System Independent
Compatibility:
3.1, 3.2, 3.3, 3.4
Binary type:
OOo extension (.oxt)
Release Notes: 

Version 2.3.6 supports BASIC, C++, Java, XML, PERL, and Python. PERL and Python are new. I have tested a bit of PERL, because I am working on an extensive PERL document that I will post when I have time. I have spent much time using PERL, so support is likely pretty good.

I received a special request for Python support. I spent about an hour adding support and I have only tested this on two samples.
Python, however, I added by special request, I have only spent about an hour working on the code. Also, I have not used Python, so I cannot easily test the code.

This extension provides the ability to colorize code segments. There are two modes of operation. The first mode (the least used mode for me) is to select the code that you want to colorize, and then use the menu options under: Tools > Add-Ons > MacroFormatterADP

I use a specific paragraph style for my code. I usually use _OOoComputerCodeLastLine for the last line of code in a segment, and _OOoComputerCode for the rest. So, for four lines of code, the first three use _OOoComputerCode and then the last line uses _OOoComputerCodeLastLine. This group then defines an entire code snippet.

Character styles are used for each portion of the code; for example, there is a character style for keywords, and another for literals. This is how color is assigned.

The code that identifies the specific portions is certainly not complete. In other words, I did not write a complete grammar interpreter for each supported language. My intention is to provide something that is "close enough" for regular use. That said, if you find glaring issues, be certain to let me know so that I can fix them. Also, if you fix errors, please share your solution. This latest version supports PERL. I use variable names such as "shall_print", and I noticed that "print" was colorized as a keyword. I corrected this for PERL. If you find something similar in another language, let me know and I will fix it.

When I say that I am only looking for "good enough" support, this means that I may fail under strange situations. An example of an untested, but expected failure is as follows:

Create a single line of code such as "a = 1; // line comment".

If you select the code inside the double quotes, I expect that the single line comment will continue to the end of the paragraph without verifying that this runs past the ends of the selected text. If this is tested and found to be in error, I will fix the problem.