blob: 00997226188af2ae860a696dc1fe69e0f8c7ab06 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
Java editor
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
</head>
<body>
<h1>
Java editor
</h1>
<p>
The following Java editor preferences can be set on the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.JavaEditorPreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<b>Java &gt; Editor</b></a> preference page
and its sub-pages.
</p>
<ul>
<li><a href="#appearance">Appearance and Navigation</a></li>
<li><a href="#codeassist">Code Assist</a></li>
<li><a href="#syntaxcoloring">Syntax Coloring</a></li>
</ul>
<p>
Note that some options that are generally applicable to text editors can be configured on the text editor preference page.
</p>
<h2 class="Head">
<a name="appearance">Appearance and Navigation</a>
</h2>
<p>
Java editor appearance and navigation options.
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<caption>
Appearance and Navigation
</caption>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
Smart caret positioning at line start and end
</td>
<td valign="top">
<p>
If enabled, the <strong>Home</strong> and <strong>End</strong> commands jump to the first and last non whitespace character on a line.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Smart caret positioning in Java names (overrides platform behavior)
</td>
<td valign="top">
<p>
If enabled, there are additional word boundaries inside <tt>|Camel|Case|</tt> Java names.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Report problems as you type
</td>
<td valign="top">
<p>
If enabled, the editor marks errors and warnings as you type, even if you do not save the editor contents. The problems are updated after a short delay.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Highlight matching brackets
</td>
<td valign="top">
<p>
If enabled, whenever the cursor is next to a parenthesis, bracket or curly braces, its opening or closing counter part is highlighted.
</p>
<p>
The color of the bracket highlight is specified with <strong>Appearance color options</strong>.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Light bulb for quick assists
</td>
<td valign="top">
<p>
If enabled, a <img src="../images/org.eclipse.jdt.ui/obj16/quickassist_obj.png" alt="light bulb"> shows up in the vertical ruler whenever a <strong>quick assist</strong> is available. See the <a href="../concepts/cquickassists.htm">quick assist section</a> for a list of the available assists.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Appearance color options
</td>
<td valign="top">
<p>
The colors of various Java editor appearance features are specified here.
</p>
<dl>
<dt>Matching brackets highlight</dt>
<dd>The color of brackets highlight.</dd>
<dt>Find scope</dt>
<dd>The color of find scope.</dd>
<dt>Completion proposal background</dt>
<dd>The background color of the completion proposal window</dd>
<dt>Completion proposal foreground</dt>
<dd>The foreground color of the completion proposal window</dd>
<dt>Method parameter background</dt>
<dd>The background color of the parameter window</dd>
<dt>Method parameter foreground</dt>
<dd>The foreground color of the parameter window</dd>
<dt>Completion overwrite background</dt>
<dd>The background color of the completion overwrite window</dd>
<dt>Completion overwrite foreground</dt>
<dd>The foreground color of the completion overwrite window</dd>
</dl>
</td>
<td valign="top">
<p>
default colors
</p>
</td>
</tr>
</tbody>
</table>
<h2 class="Head">
<a name="codeassist">Code assist</a>
</h2>
<p>
Configures <strong>Code Assist</strong> behavior.
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<caption>
Code Assist
</caption>
<thead>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
<th>
<p>
Default
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
Completion inserts/Completion overwrites
</td>
<td valign="top">
<p>
If <strong>Completion inserts</strong> is on, the completion text is inserted at the caret position,
so it never overwrites any existing text.
<br>
If <strong>Completion overwrites</strong> is on, the completion text replaces the characters
following the caret position until the end of the word.
</p>
<p>
Note that pressing <strong>Ctrl</strong> when applying a completion proposal toggles between
the two insertion modes.
</p>
</td>
<td valign="top">
<p>
Completion inserts
</p>
</td>
</tr>
<tr>
<td valign="top">
Insert single proposals automatically
</td>
<td valign="top">
<p>
If enabled, code assist will choose and insert automatically single proposals.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Insert common prefixes automatically
</td>
<td valign="top">
<p>
If enabled, code assist will automatically insert the common prefix of all possible completions similar
to unix shell expansion. This can be used repeatedly, even while the code assist window is being
displayed.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Automatically add import instead of qualified name
</td>
<td valign="top">
<p>
If enabled, type proposals which are in other packages will invoke the addition of the corresponding import declaration. Otherwise, the type will be inserted fully
qualified.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Fill argument names on completion
</td>
<td valign="top">
<p>
If enabled, code assist will add the argument names when completing a method or generic type.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Guess filled method arguments
</td>
<td valign="top">
<p>
If enabled, code assist will try to guess method parameters from the context where a method proposal is inserted.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Present proposals in alphabetical order
</td>
<td valign="top">
<p>
If enabled, the proposals are sorted in alphabetical order.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Hide proposals not visible in the invocation context
</td>
<td valign="top">
<p>
If enabled, the Java element proposals are limited by the rules of visibility. For example, private field proposals of other classes would not be displayed.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Hide forbidden references
</td>
<td valign="top">
<p>
If enabled, references to Java elements forbidden by access rules are not displayed.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Hide discouraged references
</td>
<td valign="top">
<p>
If enabled, references to Java elements discouraged by access rules are not displayed.
</p>
</td>
<td valign="top">
<p>
Off
</p>
</td>
</tr>
<tr>
<td valign="top">
Enable auto activation
</td>
<td valign="top">
<p>
If enabled, code assist can be invoked automatically.
</p>
<p>
The condition for automatic invocation is specified with the preferences <strong>Auto activation delay</strong>, <strong>Auto activation triggers for Java</strong>
and <strong>Auto activation triggers for Javadoc</strong>.
</p>
</td>
<td valign="top">
<p>
On
</p>
</td>
</tr>
<tr>
<td valign="top">
Auto activation delay
</td>
<td valign="top">
<p>
If the time starting when an auto activation trigger character is encountered until a new character is typed exceeds the auto activation delay, code assist is
invoked.
</p>
</td>
<td valign="top">
200
</td>
</tr>
<tr>
<td valign="top">
Auto activation triggers for Java
</td>
<td valign="top">
<p>
If one of the trigger characters is typed inside Java source code (but not inside a Javadoc comment) and no other character is typed before the auto activation delay
times out, the code assist is invoked.
</p>
</td>
<td valign="top">
<p>
'.'
</p>
</td>
</tr>
<tr>
<td valign="top">
Auto activation triggers for Javadoc
</td>
<td valign="top">
<p>
If one of the trigger characters is typed inside a Java doc and no other character is typed before the auto activation delay times out, the code assist is invoked.
</p>
</td>
<td valign="top">
<p>
'@#'
</p>
</td>
</tr>
</tbody>
</table>
<h2 class="Head">
<a name="syntaxcoloring">Syntax Coloring</a>
</h2>
<p>
<strong>Syntax Coloring</strong> specifies how Java source code is rendered. Note that general
text editor settings such as the background color can be configured on the general 'Text Editors' preference pages. Fonts
may be configured on the general 'Colors and Fonts' preference page.
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<caption>
Syntax Coloring
</caption>
<thead>
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
<th>
<p>
Default
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">
Element
</td>
<td valign="top">
<p>
Each category (<strong>Java</strong>, <strong>Javadoc</strong> and <strong>Comments</strong>)
contains a list of language elements that may be rendered with its own color and style.
</p>
<p>
Note that some semantic highlighting options can be disabled by the user in order to
ensure editor performance on low-end systems.
</p>
</td>
<td valign="top">
<p>
default colors and styles
</p>
</td>
</tr>
<tr>
<td valign="top">
Preview
</td>
<td valign="top">
<p>
Displays the preview of a Java source code respecting the current colors and styles.
</p>
</td>
<td valign="top">
<p>
n/a
</p>
</td>
</tr>
</tbody>
</table>
<p>
<img src="../images/ngrelc.png" alt="Related concepts" border="0" >
</p>
<p>
<a href="../concepts/concepts-7.htm">Java Editor</a>
</p>
<p>
<img src="../images/ngrelt.png" alt="Related tasks" border="0" >
</p>
<p>
<a href="../tasks/tasks-54.htm">Using the Java editor</a>
</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" >
</p>
<p>
<a href="../reference/ref-java-editor.htm">Java editor</a><br>
<a href="../reference/ref-17.htm">Code Formatter preferences</a><br>
<a href="../reference/ref-view-outline.htm">Java outline</a><br>
<a href="../reference/ref-143.htm">Java Content Assist</a><br>
<a href="../reference/ref-java-editor-quickfix.htm">Quick Fix</a>
</p>
</body>
</html>