blob: e8cc38c8430ecf2b128756d2de4bde1894a95358 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<section id="tools_ldif_editor">
<title>LDIF editor</title>
<para>
The LDIF editor could be used to edit LDIF files.
It could handle LDIF content files as well as LDIF change files.
Files with appendix *.ldif are automatically handled by the LDIF editor.
</para>
<para>
Note:
The LDIF editor is still in development.
The handling of big LDIF files is a problem because the complete file
is loaded into memory which may cause an OutOfMemoryException.
The syntax check doesn't work correctly. The error annotations and
displayed messages are not very helpful at the moment.
Currently there is no URL support (jpegImage:&lt;file://)
</para>
<simplesect id="tools_ldif_editor_using">
<title>Using LDIF editor</title>
<para>
To create a new LDIF file choose <emphasis role="strong">File -> New </emphasis>,
expand <emphasis role="strong">LDIF Browser</emphasis>,
select
<emphasis role="strong">
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata fileref="icons/browser_ldifeditor.gif"
format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
LDIF File
</emphasis>
and press the Finish button.
</para>
<para>
To open an existing LDIF file choose <emphasis role="strong">File -> Open File</emphasis>,
that opens a file dialog where you could select the LDIF file.
Within Eclipse you could also open a LDIF file from Navigator view.
</para>
<para>
To save the modified LDIF choose <emphasis role="strong">File -> Save</emphasis>
or <emphasis role="strong">File -> Save as</emphasis> and select a save location
and enter the file name.
</para>
<para>
The LDIF editor also supports default editor functionality like Copy/Paste,
Undo/Redo and a Find/Replace dialog, see Edit menu.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_connect">
<title>Connect with directory and its schema</title>
<para>
The LDIF editor could be connected to a directory server and its schema.
A prerequirement is that the connection is defined in the
<link linkend="tools_connections_view">
Connections view
</link>.
Then you could select a connection from the drop-down list.
Doing this will provide you the following features:
<itemizedlist>
<listitem>
<para>
The Content Assistent will provide better attribute proposals.
</para>
</listitem>
<listitem>
<para>
The best value provider is choosen as default value editor.
</para>
</listitem>
<listitem>
<para>
The LDIF could be imported into the selected directory by invoking the
<emphasis role="strong">
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata fileref="icons/execute.gif"
format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</emphasis>
execute button.
</para>
</listitem>
</itemizedlist>
</para>
</simplesect>
<simplesect id="tools_ldif_editor_syntax_coloring">
<title>Syntax Coloring</title>
<para>
Syntax coloring helps you to distinguish the different elements of a LDIF file.
By default the following colors and fonts are used:
</para>
<informaltable frame="all">
<tgroup cols="3">
<colspec colname="Element" />
<colspec colname="Color" />
<colspec colname="Example" />
<thead>
<row>
<entry>Element</entry>
<entry>Color</entry>
<entry>Example</entry>
</row>
</thead>
<tbody>
<row>
<entry>distinguished name</entry>
<entry>black and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_1.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>attributes</entry>
<entry>violett and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_2.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>values</entry>
<entry>blue</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_3.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>changetype add</entry>
<entry>green and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_4.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>changetype modify</entry>
<entry>yellow and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_5.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>changetype delete</entry>
<entry>red and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_6.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>changetype moddn/modrdn</entry>
<entry>blue and bold</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_7.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>keywords</entry>
<entry>gray</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_8.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
<row>
<entry>comments</entry>
<entry>dark green</entry>
<entry>
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_9.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
These colors and fonts could be changed in the
<link linkend="preferences_ldif_editor">
LDIF Editor Syntax Coloring preferences
</link>.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_content_assistent">
<title>Content Assistent</title>
<para>
The LDIF editor provides a context-sensitive content assistent.
To start content assistence press
<emphasis role="strong">Ctrl+Space</emphasis>,
then a popup with proposals is shown.
You could select one using the cursur keys or the mouse, press
<emphasis role="strong">Enter</emphasis> to apply
the selected proposal. To close the popup press the
<emphasis role="strong">ESC</emphasis> key.
The following list shows the supported proposals:
</para>
<itemizedlist>
<listitem>
<para>
When starting a new record a popup with record templates is shown.
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_10.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</para>
</listitem>
<listitem>
<para>
When writing an attribute in a content or add record a popup with
a list with matching attributes is shown.
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_12.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</para>
</listitem>
<listitem>
<para>
In an modify record the popup lists possible modify item templates.
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_11.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</para>
</listitem>
</itemizedlist>
</simplesect>
<simplesect id="tools_ldif_editor_value_editors">
<title>Value Editors</title>
<para>
In LDIF values may only contain a subset of ASCII characters.
Values with other characters (like accent mark) and even asiatic characters
must be encoded using BASE-64. Also binary data like images or certificates
must be encoded.
</para>
<para>
To edit such values
<link linkend="tools_value_editors">
Value editors
</link>
could be used.
</para>
<para>
To start a Value editor move the cursor to the attribute or value and select
<emphasis role="strong">Edit Value</emphasis> from context menu or press
<emphasis role="strong">F7</emphasis>.
This opens the default value editor dialog.
You could also open a custom value editor by choosing one from
<emphasis role="strong">Edit Value With</emphasis> in context menu.
</para>
<para>
To apply a modified value press the <emphasis role="strong">OK</emphasis>
button in the value editor dialog, the previous value is replaced by the new value.
Of course in LDIF they are displayed BASE-64 encoded.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_record_editors">
<title>LDIF record editor</title>
<para>
It is possible to use the well-known Entry editor to edit content
records and add records. Move the cursor to the record and choose
<emphasis role="strong">Edit Record</emphasis> from context menu or
press <emphasis role="strong">F8</emphasis>.
This opens the LDIF record editor.
You can add, modify and delete attributes.
To apply the modification press <emphasis role="strong">OK</emphasis>,
the previous record is replaced by the new one.
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_13.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</para>
</simplesect>
<simplesect id="tools_ldif_editor_base64">
<title>Reading BASE-64 values</title>
<para>
There are two ways to make BASE-64 values human readable:
</para>
<itemizedlist>
<listitem>
<para>
Move the mouse over the value, a tooltip with the value is displayed.
This works only for text-based values, not for binary values.
<screenshot>
<mediaobject>
<imageobject>
<imagedata
fileref="images/tools_ldif_editor_14.png" format="PNG" />
</imageobject>
</mediaobject>
</screenshot>
</para>
</listitem>
<listitem>
<para>
Open the value editor.
</para>
</listitem>
</itemizedlist>
</simplesect>
<simplesect id="tools_ldif_editor_error_annotations">
<title>Error annotations</title>
<para>
Syntax errors are displayed using error annotations.
In the ruler the error icon
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/error.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
is displayed.
Additional the erroneous content is red squiggled.
</para>
<para>
Note: The support for error annotations is still in development and has to be improved.
The displayed messages are not very useful at the moment.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_outline">
<title>Outline</title>
<para>
The Outline view shows the distinguished names of all the records
in the LDIF file, the icon indicates the record type.
The following icons are used:
</para>
<informaltable frame="all">
<tgroup cols="2">
<colspec colname="Icon" />
<colspec colname="Description" />
<thead>
<row>
<entry>Icon</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/entry_default.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Content record</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_add.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Add record</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_modify.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Modify record</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_delete.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Delete record</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_rename.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Moddn/Modrdn record</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
When expanding the DNs the detail of a record are shown:
</para>
<informaltable frame="all">
<tgroup cols="2">
<colspec colname="Icon" />
<colspec colname="Description" />
<thead>
<row>
<entry>Icon</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_attribute.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Attribute</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_value.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Value</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_mod_add.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Changetype add</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_mod_replace.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Changetype modify</entry>
</row>
<row>
<entry>
<guiicon>
<inlinemediaobject>
<imageobject>
<imagedata
fileref="icons/ldif_mod_delete.gif" format="GIF" />
</imageobject>
</inlinemediaobject>
</guiicon>
</entry>
<entry>Changetype delete</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
When selecting an element in the Outline view the corresponding
element is selected in LDIF editor.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_formatting">
<title>Formatting</title>
<para>
To format the document or the selected record according the
<link linkend="preferences_ldif_editor">
LDIF Editor preferences
</link>
choose <emphasis role="strong">Format</emphasis> from context menu.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_folding">
<title>Folding</title>
<para>
Multi-lined comments, records and multi-lined values could be folded.
There is a <emphasis role="strong">(+)</emphasis> and
<emphasis role="strong">(-)</emphasis> in the left ruler to collapse
and expand these. By default multi-lined comments and multi-lined
values are folded. This behaviour could be changed in
<link linkend="preferences_ldif_editor">
LDIF Editor preferences
</link>.
</para>
</simplesect>
<simplesect id="tools_ldif_editor_line_numbers">
<title>Line numbers</title>
<para>
To show/hide line numbers toggle the
<emphasis role="strong">Show Line Number</emphasis>
in the context menu of the left ruler.
</para>
</simplesect>
</section>