Ola Eldøy
Ola Eldøy

Reputation: 5936

Is it possible in Eclipse to define syntax highlighting for a language without resorting to Java programming?

I am looking for a way to define some syntax coloring for a language in Eclipse. I only need to highlight certain sets of keywords, so the logic is trivial. So I would like to be able to define these in a plain definition file. Is there perhaps some Eclipse plugin which allows this, or is it possible out of the box?

Upvotes: 7

Views: 6493

Answers (3)

tvStatic
tvStatic

Reputation: 966

It's a bit fiddly, but try http://gstaff.org/colorEditor/.

It uses the jEdit syntax highlighting files. So you need to create your highlighting file and add it to the jar in the plugin, as well as editing the catalog file in there to include it.

I used jEdit itself to test and debug my custom highlighting, rather than having to exit Eclipse, make the change and reload it each time.

Upvotes: 1

VonC
VonC

Reputation: 1325017

XText is a more generic and complex solution, which will generate for you the code for a custom Editor able to offer the usual IDE features, that are derived from a grammar (your "plain definition file"), including.

  • syntax coloring, but also
  • model navigation (F3, etc.),
  • code completion,
  • outline view, and
  • code templates.

Upvotes: 8

Ola Eldøy
Ola Eldøy

Reputation: 5936

The EclipseColorer plugin may fit the bill!

Upvotes: 1

Related Questions