Page 1 of 1

Color coding of keywords/comments/brackets/strings/etc.

Posted: Mon May 10, 2010 1:06 am
by mcarney
I just downloaded TextPad 5.3.1 and I noticed that a java file that compiles and executes correctly did NOT have keywords/comments/brackets/strings/etc. color coded as specified in Configure/Preferences/Document Classes/Java/Colors. I followed Bob Hansen's advice below:

When making configuration changes I find it best to follow these steps, especially for any changes in Classes:

1. Close all other copies of TextPad.
2. Close all open documents, INCLUDING THE DEFAULT NEW BLANK DOCUMENT.
3. Make the changes you want: Configure/Preferences/......
4. Apply and OK your way out the configurations.
5. Close TextPad.
6. Open TextPad again, and your changes should be good.

However, all of my text in the *.java file is just black and white.

Any suggestions?

Michael Carney

Posted: Mon May 10, 2010 10:31 am
by helios
In order to enable the syntax highlighting, you will need to implement the following procedure for each document class, as in the example below:

Click on:

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Plus sign next to "Java"
5. Syntax
6. Check the "Enable syntax highlighting" box.
7. Under the heading "Syntax definition file" Select
"java.syn".
8. Click Apply / OK

Please ensure that *.java is a member of the Files in class as follows:

1. Configure
2. Preferences
3. Plus sign next to Document Classes
4. Java
5. Under the heading "Files in class", make sure that *.java is in the list. If it is not there, then you will need to add it to the list, along with any other file extensions that you are using for Java files.
6.Click Apply / OK

New documents must be saved with the relevant extension, in order for the syntax highlighting to be activated.

I hope this helps.