PageRenderTime 23ms CodeModel.GetById 9ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 1ms

/www/tags/NOV_07_2009/htdocs/42docs/news42/news.xml

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