Lost text color when editing a java file.

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
John Milner

Lost text color when editing a java file.

Post by John Milner »

I just downloaded version 4.6 and can not get the text coloring to work. I ran a search on this topic and it seems to be wide spread. I have done the following:

go to configure --> Preference --> click on the + sign next to the document class ---> click on + sign of java ---> enable the syntax highlight, and under syntax definition, choice java.syn ---> click apply.

I still do not have any color text. I have reinstalled this product several times without any luck.

I am runing an xp windows environment.

I would appreciate any help.

Thanks

john
D Duddles

Re: Lost text color when editing a java file.

Post by D Duddles »

I'm having the same problem. Tries all the same things, and it doesn't work. It seems to be treating java source files as regular text files. If I try to change the text colors of the "Text" document class, it changes in the editor, so it seems as though it's not recognizing my .java files as java files...this sucks!

I'm running Win2000, btw.

-Doug
John Milner

Re: Lost text color when editing a java file.

Post by John Milner »

I found out the a solutions. Its two parts: click on preferences; +Document Classes; and the tab Java

make sure you have *.java is typed in the "Files in class Java" textbox. then ...

click on +Java; and the tab syntax

make sure the "Enable syntax highlighting" is checked and the "Syntax definition file" is "java.syn"
D Duddles

Re: Lost text color when editing a java file.

Post by D Duddles »

Well, I've found a temporarly work-around, at least. If you open the file you want to work on, then right-click in the editor window, then select "Properties", and click on the "Syntax" tab. Then select "Enable Syntax Highlighting" and choose the java.syn file from the drop down menu. Once you click Apply or OK, the text coloring will work. Unfortunately, if you close the file and reopen it, you'll have to do the same thing again.

This must be a new "feature" of v4.6. It worked fine in 4.4. I never had to do anything, the text coloring just automatically turned on depending on what type of file you opened.
D Duddles

Re: Lost text color when editing a java file.

Post by D Duddles »

Oops, just saw your previous reply right after I submitted my "work-around" answer. Anyway, I just tried your solution, and it works!!! Thanks a TON!

-Doug
Guest

Post by Guest »

DDudles, you're WORKAROUND is the only thing working for me so far. I'm running XP Pro, TextPad 4.6.2 and the check box for "Enable syntax hightlighting" is checked and .java is in the list for "files in class". Still no colors on new files, if I save a new file first as a .java file the association then works, but is there a way to have Textpad default to .java files with out saving it first? B
rejected_reject
Posts: 2
Joined: Fri Apr 04, 2003 8:04 am

Post by rejected_reject »

If you go into: Configure->Preferences->File, you can then set default extension to whatever you wish.
garrettj

Post by garrettj »

TextPad seeks out the first available match for determining the document class of a particular file. That means if you have anything that might match *.java already in any of your classes, with the exception of *.* in the default class, you won't get your java highlighting.
garrettj

Post by garrettj »

Also, you need to make sure that the wildcards in the "Files in class" box include *.

That is to say:

.java
.jav

is not right. It's:

*.java
*.jav
Post Reply