blob: f752c5b01071371973223425ea2164da81b35296 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//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">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<title>Customizing Java editors</title>
<link rel="stylesheet" type="text/css" href="../book.css">
</head>
<body>
<h2> Customizing Java editors</h2>
<p>The JDT tools implement a fully-functioning Java editor.&nbsp; They also
define API so you can assign Java text editing features to your own editors or
enhance the Java editor with your plug-in specific features.</p>
<h3> Java text editing</h3>
<p><a href="../reference/api/org/eclipse/jdt/ui/text/JavaSourceViewerConfiguration.html"><b>JavaSourceViewerConfiguration</b></a>
describes the configuration for a viewer that displays Java code.&nbsp; Given a
source code viewer, this class provides access to the instances of the utility
classes that add Java specific behavior to the viewer, such as coloring,
scanning of tokens, content assist, etc.&nbsp; The viewer configuration depends
on <a href="../reference/api/org/eclipse/jdt/ui/text/JavaTextTools.html"><b>
JavaTextTools</b></a> to provide this information.&nbsp;&nbsp; <a href="../reference/api/org/eclipse/jdt/ui/text/JavaTextTools.html"><b>JavaTextTools</b></a>
is a utility class that provides the scanners and managers for Java text and
ensures that these classes are configured appropriately when the Java editor
preferences change.</p>
<h3> Java text hovers</h3>
<p>When you implement a plug-in that provides additional capabilities associated
with Java code, you may want to implement new hover behavior in the editor, so
that information about your model elements will be shown as the user hovers over
Java code.&nbsp; For example, the debugger uses a customized hover to show
variable values when the user hovers over variable names in the editor.</p>
<p>The extension point <a href="../reference/extension-points/org_eclipse_jdt_ui_javaEditorTextHovers.html">
<b>
org.eclipse.jdt.ui.javaEditorTextHovers</b></a> allows you to register your
own hover implementation.&nbsp; You are responsible for implementing the <a href="../reference/api/org/eclipse/jdt/ui/text/java/hover/IJavaEditorTextHover.html"><b>IJavaEditorTextHover</b></a>
and registering your implementation class in the extension definition.&nbsp; You
also provide a label for your hover type so that the user can enable and disable
the different types of hovers from the editor preferences page.</p>
</body>
</html>