0

As you type Java code in Eclipse, the Viewer colors, emboldens, italicizes, fades, and provides styles to the Java code as you type it, as seen in the picture:

Eclipse Formatting

What is actually implementing these effects?

Is it an Eclipse plugin? Can you identify which (and tell me how you identified it)? Furthermore can you narrow it down to a class?

2 Answers 2

2

Select "Peferences" from the Eclipse menu. Go to Java -> Code Style -> Formatter

Preferences can be set at project level.

Incase you are planning on writing your own formatting code, then take a look at "workspace mechanics" plugin.

Sign up to request clarification or add additional context in comments.

5 Comments

Where do I find that plugin?
code.google.com/a/eclipselabs.org/p/workspacemechanic update site is listed under the "Access" section and there are links at the bottom of the page on getting started and configuring it.
@dominatorX Formatter handles formatting, no? OP appears to be wanting to know about the syntax fonts and coloring, not code formatting.
For coloring from Eclipse menu Preferences/General/Appearence/Colors and Fonts
What I'm trying to do is use Eclipse's formatting when I present the code in my own viewer to my own specifications. I'd like it to appear the way Eclipse would represent it.
1

This functionality is part of the JDT project (Java Developer Tools). The actual code sits in org.eclipse.jdt.core (non-UI parts) and org.eclipse.jdt.ui (UI parts).

The viewer stuff is mostly in the UI plugin (sources). It's hard to give any more specifics as highlighting includes custom viewer, parser, extension mechanisms (for 3rd party plugins)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.