Page 1 of 1

Lost text color when editing a java file.

Posted: Mon Jan 27, 2003 4:04 am
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

Re: Lost text color when editing a java file.

Posted: Fri Jan 31, 2003 8:33 pm
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

Re: Lost text color when editing a java file.

Posted: Fri Jan 31, 2003 9:20 pm
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"

Re: Lost text color when editing a java file.

Posted: Fri Jan 31, 2003 9:25 pm
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.

Re: Lost text color when editing a java file.

Posted: Fri Jan 31, 2003 9:29 pm
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

Posted: Sun Apr 06, 2003 10:30 pm
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

Posted: Mon Apr 07, 2003 7:59 am
by rejected_reject
If you go into: Configure->Preferences->File, you can then set default extension to whatever you wish.

Posted: Tue Apr 15, 2003 9:19 pm
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.

Posted: Tue Apr 15, 2003 9:21 pm
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