DekGenius.com
Previous Section  < Day Day Up >  Next Section

Recipe 3.1 Speeding Up the JDT Editor

3.1.1 Problem

As you enter code in the JDT editor, windows flash, wavy red lines appear under text, and red boxes appear in rulers, among other annoying distractions.

3.1.2 Solution

You can turn off many automatic syntax and problem-checking features to speed code entry.

3.1.3 Discussion

Although Eclipse provides a host of automatic syntax and problem-checking features, sometimes those features can be annoying. Fortunately, Eclipse is almost endlessly customizable. Here are some of the more common auto-checking features people find distracting, along with tips for dealing with them:


Problem indicators that appear while you're typing

Turn off by selecting Window Preferences Java Editor Annotations, and then uncheck all checkboxes.


The overview ruler

Hide by selecting Window Preferences Java Editor Appearance Show Overview Ruler, and then uncheck the appropriate checkbox.


Outline synchronization

Turn off by selecting Window Preferences Java Editor Appearance Synchronize Outline Selection on Cursor Move, and then uncheck the appropriate checkbox.

3.1.3.1 Eclipse 3.0

Smart insert mode is another automatic feature, new in Eclipse 3.0, which you can turn on and off. This is the mode in which Eclipse does things for you automatically as you type, such as adding a closing quote to strings, adding closing braces, and so on. You can toggle smart insert mode on and off in Eclipse 3.0 by pressing the Insert key, which cycles you through the overwrite and insert modes (which Eclipse 3.0 shares with Eclipse 2.x) as well as the Eclipse 3.0 smart insert mode. You can see the smart insert mode cursor, which looks like a left bracket, in the JDT editor in Figure 3-1.

Figure 3-1. Smart insert in Eclipse 3.0
figs/ecb_0301.gif


To configure whether the JDT editor closes strings for you, adds braces, and so on, as well as to configure smart insert mode in Eclipse 3.0, select Window Preferences Java Editor Typing.


    Previous Section  < Day Day Up >  Next Section