PageRenderTime 252ms CodeModel.GetById 242ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre14/doc/news42/news.xml

#
XML | 792 lines | 642 code | 148 blank | 2 comment | 0 complexity | fb249c0d5b5f28eb540d25ecd4f6858e MD5 | raw file
  1<?xml version="1.0" encoding="UTF-8" ?>
  2
  3<!-- :folding=sidekick: -->
  4
  5<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  6		"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  7
  8<book>
  9	<bookinfo>
 10		<author>
 11			<firstname>Slava</firstname><surname>Pestov</surname>
 12		</author>
 13		<copyright><year>2003</year><holder>Slava Pestov</holder></copyright>
 14		<legalnotice><title>Legal Notice</title>
 15			<para>
 16				Permission is granted to copy, distribute and/or modify this document
 17				under the terms of the GNU Free Documentation License, Version 1.1 or
 18				any later version published by the Free Software Foundation; with no
 19				<quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
 20				<quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
 21				the license is included in the file <filename>COPYING.DOC.txt</filename>
 22				included with the jEdit distribution.
 23			</para>
 24		</legalnotice>
 25		<title>What's New in jEdit 4.2</title>
 26	</bookinfo>
 27
 28	<chapter id="user-changes"><title>User-Visible Changes</title>
 29	
 30	<sect1 id="incompatible"><title>Incompatible Changes</title>
 31	
 32	<para>
 33	 Soft wrapping to the text area width (by setting the wrap width to zero) is no longer supported.
 34	</para>
 35
 36	<para>
 37	 The <guimenu>View</guimenu>&gt;<guisubmenu>Scrolling</guisubmenu>&gt;<guimenuitem>Synchronized Scrolling</guimenuitem> command has been removed.
 38	</para>
 39
 40	</sect1>
 41
 42	<sect1 id="plugin-manager"><title>Plugin Manager</title>
 43	
 44	<para>
 45	 A new plugin API has been added that allows plugins to be loaded and unloaded while jEdit is running. The plugin manager's user interface has also been overhauled to be more intuitive and powerful.
 46	</para>
 47
 48	<para>
 49	 While the new API is mostly backwards compatible, some plugins will no longer work. The best way to upgrade from 4.1 to 4.2 is to completely remove any existing plugins, and re-install a new set from scratch.
 50	</para>
 51	
 52	<para>
 53	 Plugin options have been moved from the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box to a new <guimenu>Plugins</guimenu>&gt;<guimenuitem>Plugin Options</guimenuitem> dialog box.
 54	</para>
 55
 56	<para>
 57	 If you are a plugin developer, see <xref linkend="api-changes"/>.
 58	</para>
 59
 60	</sect1>
 61
 62	<sect1 id="interface"><title>User Interface</title>
 63	
 64	<para>
 65	 jEdit now saves the configuration of open views between sessions; this includes including their position, size and any splits. This information is stored in the <filename>perspective.xml</filename> file in the settings directory.
 66	</para>
 67
 68	<para>
 69	 Dockable windows can now be moved between panes without having to open the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box. Just right-click on the dockable window's button, or for floating windows, click the small triangle in the top left corner of the window. In both cases this displays a menu where you can pick a new docking location for the window.
 70	</para>
 71
 72	<para>
 73	 A new <guimenu>Utilities</guimenu>&gt;<guimenuitem>Repeat Last Action</guimenuitem> command (shortcut: <keycombo><keycap>Control</keycap><keycap>Space</keycap></keycombo>) repeats the most recently invoked command.
 74	</para>
 75
 76	<para>
 77	 The status bar can now optionally display a simple 24-hour clock. This can be enabled in the <guilabel>Status Bar</guilabel> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box
 78	</para>
 79
 80	</sect1>
 81	
 82	<sect1 id="editing"><title>Text Editing</title>
 83	
 84	<para>
 85	 Drag and drop of text is now supported in the text area; it can be disabled in the <guimenuitem>Mouse</guimenuitem> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box.
 86	</para>
 87
 88	<para>
 89	 The <guimenu>Edit</guimenu>&gt;<guimenuitem>Complete Word</guimenuitem> command (shortcut:  <keycombo><keycap>Control</keycap><keycap>B</keycap></keycombo>) now looks in all visible buffers for completions.
 90	</para>
 91
 92	<para>
 93	 <guimenu>Edit</guimenu>&gt;<guimenuitem>More Clipboard</guimenuitem>&gt;<guimenuitem>Vertical Paste</guimenuitem> command (shortcut: <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
 94	 <keycombo><keycap>Control</keycap><keycap>P</keycap></keycombo>) behaves in a more intelligent manner. Entering characters while a rectangular selection is active inserts into each row of the selection, thus a zero-width rectangular selection can now act like a <quote>tall caret</quote>.
 95	</para>
 96	
 97	<para>
 98	 The new <guimenu>Edit</guimenu>&gt;<guimenuitem>More Selection</guimenuitem>&gt;<guimenuitem>Rectangular Selection</guimenuitem> command (shortcut: <keycombo><keycap>Alt</keycap><keycap>\</keycap></keycombo>) permits rectangular selections to be created using the keyboard. A static bar indicator is shown when rectangular selection mode is active. Clicking beyond the end of a line in rectangular selection mode (or <keycap>Control</keycap>-clicking otherwise) inserts the appropriate amount of whitespace and moves the caret to the clicked location.
 99	</para>
100
101	<para>
102	 The new <guimenu>Edit</guimenu>&gt;<guimenuitem>More Clipboard</guimenuitem>&gt;<guimenuitem>Paste Deleted</guimenuitem> command (shortcut: <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo>
103	 <keycombo><keycap>Control</keycap><keycap>Y</keycap></keycombo>) lists the 20 most recently deleted strings of text. This list of deleted strings is also persistent.
104	</para>
105	
106	<para>
107	 Register contents are now saved between editing sessions.
108	</para>
109
110	<para>
111	 The limit of 8 text areas editing a single buffer has been removed.
112	</para>
113
114	<para>
115	 Fold start lines are now colored according to their nesting level in the text area. The colors can be customized in the <guilabel>Syntax Highlighting</guilabel> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box. <keycap>Alt</keycap>-clicking on a fold in the gutter (or clicking with the middle mouse button) now narrows to that fold.
116	</para>
117
118	<para>
119	 When soft wrap is on, the text area now scrolls by screen lines, instead of scrolling by physical lines.
120	</para>
121	
122	</sect1>
123
124	<sect1 id="syntax"><title>Syntax Highlighting</title>
125	 <para>
126	 <!-- as of pre9, -->
127	  27 new syntax highlighting modes were added, and many existing ones were enhanced. jEdit now supports syntax highlighting for 118 languages.
128	 </para>
129	 <para>
130	  The following new token types were added:
131	 </para>
132	 <itemizedlist>
133	 <listitem><para>COMMENT3</para></listitem>
134	 <listitem><para>COMMENT4</para></listitem>
135	 <listitem><para>LITERAL3</para></listitem>
136	 <listitem><para>LITERAL4</para></listitem>
137	 <listitem><para>KEYWORD4</para></listitem>
138	 </itemizedlist>
139	 <para>
140	  Any capture groups defined in the <literal>SPAN_REGEXP</literal>
141	  element's <literal>BEGIN</literal> child are now substituted into the <literal>END</literal> child for matching purposes. This allows here-docs in languages such as Perl to be highlighted correctly.
142	 </para>
143	 <para>
144	  A new <literal>NO_ESCAPE</literal> attribute has been added to the <literal>SPAN</literal> and <literal>SPAN_REGEXP</literal> elements.
145	 </para>
146	 <para>
147	  A new <literal>IMPORT</literal> rule causes the current ruleset to inherit the rules from the given ruleset.
148	 </para>
149	 <para>
150	  A background color defined for a ruleset's default token type now takes effect on tokens that appear inside this ruleset for which no explicit background color is defined.
151	 </para>
152	</sect1>
153
154	<sect1 id="search"><title>Search and Replace</title>
155	
156	<para>
157	 Added <guimenuitem>Ignore Case</guimenuitem> (shortcut: <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo> <keycombo><keycap>Control</keycap><keycap>I</keycap></keycombo>) and <guimenuitem>Regular Expressions</guimenuitem> (shortcut: <keycombo><keycap>Control</keycap><keycap>E</keycap></keycombo> <keycombo><keycap>Control</keycap><keycap>X</keycap></keycombo>) commands for toggling search bar settings from the keyboard.
158	</para>
159
160	<para>
161	 The <guimenuitem>Incremental Search Bar</guimenuitem> and <guimenuitem>HyperSearch Bar</guimenuitem> commands in the <guimenu>Search</guimenu> menu no longer insert the currently selected text into the search bar. If you prefer this behavior, use <guimenuitem>Incremental Search for Word</guimenuitem> and <guimenuitem>HyperSearch for Word</guimenuitem> instead.
162	</para>
163
164	<para>
165	 Clicking on a line in the <guimenuitem>HyperSearch Results</guimenuitem> window now selects all ocurrences of the search string in that line, not just the first occurrence.
166	</para>
167
168	</sect1>
169
170	<sect1 id="files"><title>File Management</title>
171	
172	<para>
173	 The handling of files that are changed on disk by another program is now more flexible. There are three possible behaviors that can be specified in the <guibutton>General</guibutton> pane of the <guimenu>Utilities</guimenu>&gt;<guimenuitem>Global Options</guimenuitem> dialog box:
174	</para>
175
176	<itemizedlist>
177	 <listitem><para><guilabel>Do nothing</guilabel> - jEdit will not check if files are modified on disk by another program.</para></listitem>
178	 <listitem><para><guilabel>Prompt</guilabel> - a dialog box will be shown listing all changed files, offering to reload them.</para></listitem>
179	 <listitem><para><guilabel>Automatically reload</guilabel> - a dialog box will be shown listing all changed files, and they are all automatically reloaded.</para></listitem>
180	</itemizedlist>
181
182	<para>
183	 A full list of encodings is now shown in the file system browser's <guimenu>Commands</guimenu>&gt;<guimenuitem>Encoding</guimenuitem> menu and other places. The encoding declaration of XML files is now honoured when loading and saving buffers.
184	</para>
185
186	<para>
187	 When opening a symbolic link on Unix, the opened buffer has the path name of the link itself, not the file pointed by the link. However, it is still not possible to open the same buffer twice by opening two links to the same file.
188	</para>
189
190	</sect1>
191
192	<sect1 id="vfs.browser"><title>File System Browser</title>
193	
194	<para>
195	 The file system browser now shows file details such as size, type, modification time and access permissions. Virtual file systems provided by plugins can add their own columns to the view.
196	</para>
197
198	<para>
199	 The favorites list can now contain files, and a new <guimenu>Utilities</guimenu>&gt;<guisubmenu>Favorites</guisubmenu> menu allows accessing favorites without having to open the file system browser first.
200	</para>
201
202	<para>
203	 File name completion in file dialog boxes has been greatly improved. It is now possible to navigate around the file system quite comfortably without using the mouse.
204	</para>
205
206	</sect1>
207
208	</chapter>
209	
210	<chapter id="api-changes"><title>API Changes</title>
211	
212	<sect1 id="beanshell"><title>BeanShell</title>
213
214	<para>
215		BeanShell has been updated from version 1.2b7 to 2.0b1. The
216		new release of BeanShell brings support for scripted
217		classes, static imports, mixins, better
218		error reporting, improved performance, and various fixes.
219	</para>
220c
221	<para>
222		A number of jEdit-specific changes are also present in this
223		BeanShell version; they will eventually be merged back into
224		the main BeanShell source tree.
225	</para>
226
227	<para>
228		A new preset BeanShell variable, <varname>wm</varname> is set to the
229		<function>view.getDockableWindowManager()</function>.
230	</para>
231
232
233	<para>
234		Previously plugins that wanted to provide BeanShell scripting
235		commands had to source a BeanShell script on startup. This was
236		slow. Now, BeanShell supports a <quote>command path</quote>.
237		When an unresolved method name is entered, the command path is
238		consulted for the method definition. Entries are added to the
239		command path using the following method of the
240		<ulink
241		url="../api/org/gjt/sp/jedit/NameSpace.html">NameSpace</ulink>
242		class:
243	</para>
244
245	<para>
246		<funcsynopsis>
247		<funcprototype>
248		<funcdef>void <function>addCommandPath</function></funcdef>
249		<paramdef>String <parameter>path</parameter></paramdef>
250		<paramdef>Class <parameter>clas</parameter></paramdef>
251		</funcprototype>
252		</funcsynopsis>
253	</para>
254
255	<para>
256		For example, if your plugin provides commands in the
257		<filename>commands</filename> directory of the JAR file, you
258		could call something like this:
259	</para>
260
261	<programlisting>BeanShell.getNameSpace().addCommandPath("/commands/",
262    MyPlugin.class);</programlisting>
263
264	</sect1>
265	
266	<sect1 id="plugin-api"><title>Dynamic Plugin Loading</title>
267
268	<para>
269		In jEdit 4.1 and earlier, plugins are always fully loaded at program
270		startup, and unloaded at program shutdown. While the plugin loader and
271		API was very simple as a result, this scheme had two main
272		disadvantages:
273	</para>
274
275	<itemizedlist>
276		<listitem><para>Having a large number of plugins generally slowed down
277		jEdit startup, since many plugins performed a lot of lengthy
278		initialization.
279		Even if all plugins made their <function>start()</function>
280		methods as quick as possible, there would still be the overhead of
281		scanning the JAR files, loading the plugin classes, and so on.</para>
282		</listitem>
283		<listitem><para>There was no way to reload plugins in a running jEdit
284		instance. This made plugin development and use of the plugin manager
285		a bit cumbersome.</para>
286		</listitem>
287	</itemizedlist>
288
289	<para>
290		Through a stroke of insight, one notices that the only
291		functions called from most plugins' <function>start()</function>
292		methods fall into two categories:
293	</para>
294
295	<itemizedlist>
296		<listitem><para>Registration of virtual file systems, fold handlers,
297		macro handlers, Console shells, SideKick parsers, ...</para>
298		</listitem>
299		<listitem><para>Arbitriary initialization that only needs to be
300		done when the plugin is first invoked by the user, and not at
301		program startup.</para></listitem>
302	</itemizedlist>
303	
304	<para>
305		jEdit 4.2 moves the former task out of the <function>start()</function>
306		method and into a file within the JAR that can be parsed quickly. This
307		allows the plugin core class to only be loaded, and its
308		<function>start()</function> method called, only when
309		the plugin is first invoked. Note that the <function>start()</function>
310		method is always called from the event dispatch thread (or from
311		the main thread if the GUI has not yet been loaded). Therefore you
312		do not need to worry about thread-safety issues.
313	</para>
314	
315	<para>
316		Also, plugins can now be loaded and unloaded at runtime.
317	</para>
318	
319	</sect1>
320
321	<sect1 id="class-editplugin"><title>EditPlugin Class Changes</title>
322	
323	<para>
324		Documentation for the properties mentioned below, and their possible values,
325		can be found in the
326		documentation for the <ulink
327		url="../api/org/gjt/sp/jedit/EditPlugin.html">EditPlugin</ulink> class.
328	</para>
329
330	<para>
331		jEdit distinguishes between jEdit 4.1 and 4.2-style plugins by checking
332		for the presence of a single property,
333		<property>plugin.<replaceable>class
334		name</replaceable>.activate</property>. If this property is present, the
335		plugin is loaded using the new API.
336	</para>
337
338	<para>
339		Since the plugin's menu might need to be displayed before its core class
340		is fully loaded, there is a new way of specifying the plugin menu using
341		properties; the <function>createMenuItems()</function> method of the
342		<ulink
343		url="../api/org/gjt/sp/jedit/EditPlugin.html">EditPlugin</ulink>
344		class has been deprecated.
345	</para>
346
347	<para>
348		For example, the jEdit 4.1 version of the QuickNotepad plugin had the
349		following <function>createMenuItems()</function> method:
350	</para>
351
352	<programlisting>public void createMenuItems(Vector menuItems)
353{
354    menuItems.addElement(GUIUtilities.loadMenu("quicknotepad.menu"));
355}</programlisting>
356
357	<para>
358		Additionally, the following two properties were defined in
359		<filename>QuickNotepad.props</filename>:
360	</para>
361
362	<programlisting>quicknotepad.menu.label=QuickNotepad
363quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
364    quicknotepad.save-file quicknotepad.copy-to-buffer</programlisting>
365
366	<para>
367		The jEdit 4.2 version of this plugin no longer has a
368		<function>createMenuItems()</function> method, and instead defines the
369		following property:
370	</para>
371
372	<programlisting>plugin.QuickNotepadPlugin.menu=quicknotepad \
373    - \
374    quicknotepad.choose-file \
375    quicknotepad.save-file \
376    quicknotepad.copy-to-buffer</programlisting>
377
378	<para>
379		Note that specifying a <property>.label</property> property for the menu
380		is no longer necessary, as the label becomes the name of the plugin.
381	</para>
382
383	<para>
384		If the content of your plugin's menu is determined at runtime, you must
385		use the new dynamic menu API by defining a property like so:
386	</para>
387
388	<programlisting>plugin.MyPlugin.menu.code=new MyPluginMenuProvider();</programlisting>
389
390	<para>
391		The value of the property is a BeanShell snippet that should evaluate to a
392		<ulink
393		url="../api/org/gjt/sp/jedit/menu/DynamicMenuProvider.html">DynamicMenuProvider</ulink>
394		instance.
395	</para>
396
397	<para>
398		Similarly, option panes should are now specified using properties, and
399		the <function>createOptionPanes()</function> method of the
400		<ulink
401		url="../api/org/gjt/sp/jedit/EditPlugin.html">EditPlugin</ulink>
402		class has been deprecated.
403	</para>
404
405	<para>
406		In QuickNotepad's case, the <function>createOptionPanes()</function>
407		method has been removed:
408	</para>
409
410	<programlisting>public void createOptionPanes(OptionsDialog od)
411    {
412        od.addOptionPane(new QuickNotepadOptionPane());
413    }</programlisting>
414
415	<para>
416		The new properties look like this:
417	</para>
418
419	<programlisting>plugin.QuickNotepadPlugin.option-pane=quicknotepad
420options.quicknotepad.code=new QuickNotepadOptionPane();</programlisting>
421
422	</sect1>
423
424	<sect1 id="actions"><title>Actions</title>
425	
426	<para>
427		The syntax of the <filename>actions.xml</filename> file has not changed.
428	</para>
429
430	<para>
431		A few methods of the <ulink
432		url="../api/org/gjt/sp/jedit/EditAction.html">EditAction</ulink>
433		class were made
434		final, since these three values must be known even if the action
435		instance in question has not been loaded:
436	</para>
437	
438	<itemizedlist>
439		<listitem><para><function>getLabel()</function></para></listitem>
440		<listitem><para><function>isToggle()</function></para></listitem>
441		<listitem><para><function>getMouseOverText()</function></para></listitem>
442	</itemizedlist>
443	
444	<para>
445		This change does not affect plugins that define actions using an
446		<filename>actions.xml</filename> file. However, if your plugin creates
447		action instances dynamically, you will need to make calls like the
448		following instead of overriding these methods:
449	</para>
450
451	<programlisting>jEdit.setTemporaryProperty("<replaceable>action name</replaceable>.label",
452    "<replaceable>Hello World</replaceable>");
453jEdit.setTemporaryProperty("<replaceable>action name</replaceable>.toggle",
454    "<replaceable>true or false</replaceable>");
455jEdit.setTemporaryProperty("<replaceable>action name</replaceable>.mouse-over",
456    "<replaceable>some string</replaceable>");</programlisting>
457
458	<para>
459		Make sure to use <function>jEdit.setTemporaryProperty()</function> and
460		not <function>jEdit.setProperty()</function> since the latter will save
461		the values to the user properties file, which is probably not what you
462		want.
463	</para>
464
465	<para>
466		The <function>jEdit.getActions()</function> method has been
467		deprecated, since it must load all plugin <filename>actions.xml</filename>
468		files in order to return an array of <ulink
469		url="../api/org/gjt/sp/jedit/EditAction.html">EditAction</ulink>
470		instances. Use <function>jEdit.getActionNames()</function> instead,
471		which returns an array of strings.
472	</para>
473
474	<para>
475		A new abstract method was added to the <ulink
476		url="../api/org/gjt/sp/jedit/gui/InputHandler.html">InputHandler</ulink>
477		class:
478	</para>
479	
480	<para>
481		<funcsynopsis>
482		<funcprototype>
483		<funcdef>void <function>addKeyBinding</function></funcdef>
484		<paramdef>String <parameter>keyBinding</parameter></paramdef>
485		<paramdef>String <parameter>action</parameter></paramdef>
486		</funcprototype>
487		</funcsynopsis>
488	</para>
489
490	<para>
491		The <function>removeKeyBinding()</function> method of the <ulink
492		url="../api/org/gjt/sp/jedit/gui/DefaultInputHandler.html">DefaultInputHandler</ulink>
493		class has finally been implemented. Previously it always threw
494		an <classname>InternalError</classname> when invoked.
495	</para>
496
497	</sect1>
498
499	<sect1 id="dockables"><title>Dockable Windows</title>
500	
501	<para>
502		The syntax of the <filename>dockables.xml</filename> file has not changed.
503	</para>
504
505	<para>
506		Instead of overriding the deprecated
507		<function>JComponent.requestDefaultFocus()</function> method,
508		dockable windows can now implement the new <ulink
509		url="../api/org/gjt/sp/jedit/gui/DefaultFocusComponent.html">DefaultFocusComponent</ulink>
510		interface and its
511		<function>focusOnDefaultComponent()</function> method.
512	</para>
513
514	</sect1>
515
516	<sect1 id="services"><title>Services</title>
517	
518	<para>
519		A new <filename>services.xml</filename> file can be provided in the
520		plugin JAR file. The preferred way of adding virtual file systems, fold
521		handlers and many other types of extensions is through this file. Its
522		syntax is described in the documentation for the <ulink
523		url="../api/org/gjt/sp/jedit/ServiceManager.html">ServiceManager</ulink>
524		class.
525	</para>
526
527	</sect1>
528
529	<sect1 id="vfs"><title>Virtual File Systems</title>
530	
531	<para>
532		Instead of calling <function>VFSManager.registerVFS()</function> in your
533		plugin's <function>start()</function> method, add entries in the
534		<filename>services.xml</filename> file that look like so:
535	</para>
536
537	<programlisting><![CDATA[<SERVICE CLASS="org.gjt.sp.jedit.io.VFS" NAME="ftp">
538    new ftp.FtpVFS(false);
539</SERVICE>]]></programlisting>
540
541	<para>
542		A new  <ulink
543		url="../api/org/gjt/sp/jedit/io/VFS.DirectoryEntryCompare.html">VFS.DirectoryEntryCompare</ulink>
544		class was added,
545		for sorting lists of VFS directory entries.
546	</para>
547
548	<para>
549		Fields named <varname>canRead</varname> and <varname>canWrite</varname>
550		were added to the <ulink
551		url="../api/org/gjt/sp/jedit/io/VFS.DirectoryEntry.html">VFS.DirectoryEntry</ulink>
552		class.
553	</para>
554
555	<para>
556		There is a new extended attribute API to go with the details view in the
557		file system browser. Pass an array of extended attribute names to the
558		<ulink
559		url="../api/org/gjt/sp/jedit/io/VFS.html">VFS</ulink> constructor, then
560		provide an implementation
561		of the <function>getExtendedAttribute()</function> method in your
562		subclass of <ulink
563		url="../api/org/gjt/sp/jedit/io/VFS.DirectoryEntry.html">VFS.DirectoryEntry</ulink>.
564	</para>
565
566	<para>
567		The following two methods in the <ulink
568		url="../api/org/gjt/sp/jedit/io/VFSManager.html">VFSManager</ulink>
569		class have been deprecated since they can no longer be implemented for
570		file systems using the deferred loading API
571	</para>
572
573	<itemizedlist>
574		<listitem><para><function>getVFSByName()</function> - use
575		<function>getVFSForProtocol()</function>
576		instead.</para></listitem>
577		<listitem><para><function>getFilesystems()</function> - use
578		<function>getVFSs()</function>, which returns a string array,
579		instead.</para></listitem>
580	</itemizedlist>
581
582	</sect1>
583
584	<sect1 id="extensions"><title>Text Area Extensions</title>
585
586	<para>
587		The API for text area extensions is still the same, however you
588		must make sure your plugin correctly adds itself to existing
589		text areas when it is loaded after jEdit startup, and that it
590		removes itself from open views if it is unloaded before jEdit
591		exits.
592	</para>
593
594	<para>
595		A new method was added to the <ulink
596		url="../api/org/gjt/sp/jedit/textarea/TextAreaExtension.html">TextAreaExtension</ulink>
597		class:
598	</para>
599
600	<para>
601		<funcsynopsis>
602		<funcprototype>
603		<funcdef>void <function>paintScreenLineRange</function></funcdef>
604		<paramdef>Graphics2D <parameter>gfx</parameter></paramdef>
605		<paramdef>int <parameter>firstLine</parameter></paramdef>
606		<paramdef>int <parameter>lastLine</parameter></paramdef>
607		<paramdef>int[] <parameter>physicalLines</parameter></paramdef>
608		<paramdef>int[] <parameter>start</parameter></paramdef>
609		<paramdef>int[] <parameter>end</parameter></paramdef>
610		<paramdef>int <parameter>y</parameter></paramdef>
611		<paramdef>int <parameter>lineHeight</parameter></paramdef>
612		</funcprototype>
613		</funcsynopsis>
614	</para>
615
616	<para>
617		See the class documentation for information on each parameter.
618	</para>
619
620	<para>
621		You can override this method to paint a range of
622		lines at once, instead of having to respond to each individual
623		<function>paintValidLine()</function> and
624		<function>paintInvalidLine</function> call.
625	</para>
626
627	<para>
628		While for many text area extensions using this method will result
629		in no speedup, some like the error highlight in the ErrorList
630		plugin become more efficient. The error highlight searches an
631		array each time it has to paint a line. Previously the array
632		was searched for each line painted in screen. Using this method,
633		it is possible to search the array only once when painting a
634		range of lines.
635	</para>
636
637	</sect1>
638
639	<sect1 id="syntax-api"><title>Syntax Highlighting</title>
640	
641	<para>
642		The <classname>org.gjt.sp.jedit.syntax</classname> package can now
643		be used in other programs.
644		All you need to provide is error handling and logic for locating
645		the XML mode files. See the
646		<ulink url="../api/org/gjt/sp/jedit/syntax/package-summary.html">package
647		documentation</ulink> for details.
648	</para>
649
650	</sect1>
651
652	<sect1 id="textarea-api"><title>Text Area and Folding</title>
653
654	<para>The
655		<ulink
656		url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
657		class has a new <function>addToLeftOfScrollBar()</function> method that
658		adds a component to the left of the scroll bar. Previously plugins like
659		JDiff had to resort to undocumented hacks to do this.
660	</para>
661
662	<para>
663		The code that displays lines of text on screen has been overhauled for
664		improved performance and correctness. As a result, two methods in
665		<ulink
666		url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
667		that have been deprecated since jEdit 4.0 were removed:
668	</para>
669
670	<itemizedlist>
671		<listitem><para><function>xToOffset()</function></para>
672		</listitem>
673		<listitem><para><function>offsetToX()</function></para>
674		</listitem>
675	</itemizedlist>
676
677	<para>
678		As in jEdit 4.0 and 4.1, the <function>xyToOffset()</function> and
679		<function>offseToXY()</function> methods replace these two.
680	</para>
681
682	<para>
683		Also, the way folds are handled has changed. The
684		<classname>FoldVisibilityManager</classname> class has been removed,
685		and a number of methods in the <ulink
686		url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
687		class have been removed also:
688	</para>
689
690	<itemizedlist>
691		<listitem><para><function>virtualToPhysical()</function></para>
692		</listitem>
693		<listitem><para><function>physicalToVirtual()</function></para>
694		</listitem>
695		<listitem><para><function>getVirtualLineCount()</function></para>
696		</listitem>
697	</itemizedlist>
698
699	<para>
700		The replacement for the <classname>FoldVisibilityManager</classname>
701		class is a class named <ulink
702		url="../api/org/gjt/sp/jedit/io/DisplayManager.html">DisplayManager</ulink>,
703		with a similar but not identical API.
704	</para>
705
706	<para>
707		Previously, a <quote>virtual line number</quote> was a line number such
708		that each physical line (delimited by <literal>\n</literal>) counted
709		as 1 if it was visible, and 0 if it was not. They did not take into
710		account lines that were split on screen as a result of soft wrap, and
711		this made the soft wrap scrolling code rather complicated.
712	</para>
713
714	<para>
715		In jEdit 4.2, virtual line numbers are no longer used internally; now,
716		similar <quote>scroll line numbers</quote> are used. Scroll line numbers
717		take both hidden lines and soft wrap into account. The
718		<function>getFirstLine()</function> and
719		<function>setFirstLine()</function> methods of the
720		<ulink
721		url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
722		class now work with
723		scroll line numbers.
724	</para>
725
726	<para>
727		An internal API for converting between scroll line numbers and physical
728		line numbers exists, but it is rather complicated and it will not be
729		made public. Instead, if you want the text area to scroll to a given
730		physical line number, use the new
731		<function>setFirstPhysicalLine()</function> method in the
732		<ulink
733		url="../api/org/gjt/sp/jedit/textarea/JEditTextArea.html">JEditTextArea</ulink>
734		class.
735	</para>
736
737	<para>
738		Instead of calling <function>FoldHandler.registerFoldHandler()</function>
739		in your
740		plugin's <function>start()</function> method, add entries in the
741		<filename>services.xml</filename> file that look like so:
742	</para>
743
744	<programlisting><![CDATA[<SERVICE CLASS="org.gjt.sp.jedit.buffer.FoldHandler" NAME="sidekick">
745    new sidekick.SideKickFoldHandler()
746</SERVICE>]]></programlisting>
747
748	</sect1>
749
750	<sect1 id="misc-api-changes"><title>Miscellaneous API Changes</title>
751	
752	<para>
753		A new <function>View.goToBuffer()</function> method has been added.
754		If the specified buffer is already
755		visible in one of the view's edit panes, it sends focus to that edit
756		pane. Otherwise, it calls <function>setBuffer()</function>
757		on the current edit pane.
758	</para>
759
760	<para>
761		The constructor of the <ulink
762		url="../api/org/gjt/sp/jedit/io/EBMessage.html">EBMessage</ulink> class
763		now takes
764		an <classname>Object</classname>, as opposed to an
765		<ulink
766		url="../api/org/gjt/sp/jedit/io/EBComponent.html">EBComponent</ulink>.
767		Plugins that provide custom message
768		types will need to be recompiled.
769	</para>
770	
771	<para>
772		The following deprecated method was removed from the
773		<ulink
774		url="../api/org/gjt/sp/jedit/io/GUIUtilities.html">GUIUtilities</ulink>
775		class:
776	</para>
777	
778	<para>
779		<funcsynopsis>
780		<funcprototype>
781		<funcdef>void <function>loadMenu</function></funcdef>
782		<paramdef>View <parameter>view</parameter></paramdef>
783		<paramdef>String <parameter>name</parameter></paramdef>
784		</funcprototype>
785		</funcsynopsis>
786	</para>
787
788	</sect1>
789
790	</chapter>
791	
792</book>