Syntax highlighting

Using the Java SDK with TextPad

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

Post Reply
Ted

Syntax highlighting

Post by Ted »

I would like to highlight an object as a keyword but also allow for a method call to be appended to the end of the keyword (using the dot notation). I got this to work for my Java documents, but I don't know how I did it.

eg. The keyword "System" to remains highlighted in:
System.out.println("Hello world");

I want to know how I got this to work before (in Java) so I can apply it to my other documents (VB).
HY

Re: Syntax highlighting

Post by HY »

Turn highlighting on:
Configure --> Preferences --> Document Classes --> Java --> Syntax --> Enable syntax highlighting.

If this doesn't answer your question, then what's the problem (try to be more specific)?

Regards,
HY
Ondrej Jirsak

Syntax highlighting...

Post by Ondrej Jirsak »

Hi folks,

I have one problem... I would like to have highlighted everything between <% and %> JSP symbols. It is possible to do that?
Ted

Re: Syntax highlighting...

Post by Ted »

Configure --> Preferences --> Document Classes --> Java --> Syntax --> Enable syntax highlighting

Click OPEN to open the java SYN file you want to modify.

You can include the following two lines in the beginning of your SYN file:

SyntaxStart = <%
SyntaxEnd = %>

This will allow for highlighting of keywords only between these symbols. Otherwise, if you want to blanket highlight, try including:

CommentStartAlt = <%
CommentEndAlt = %>

Good Luck.
Jason

Re: Syntax highlighting...

Post by Jason »

I'd like to do syntax highlighting for just .JSP files. I've already added the JSP document class for the jsp5.zip .syn file. I've also enabled the systax highlighting by doing the following:
Configure --> Preferences --> Document Classes --> JSP --> Syntax --> Enable syntax highlighting

When I open an existing JSP file, I don't get the highlights.

What am I missing?
Post Reply