5
<author><firstname>Bernd</firstname><surname>Pol</surname></author>
6
<!-- TRANS:ROLES_OF_TRANSLATORS -->
10
<title>Configuring &kdevelop;</title>
13
&kdevelop; is a very powerful and flexible IDE which offers many ways to tailor it to your needs. To start configuration select <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure KDevelop...</guimenuitem></menuchoice>. This will cause the configuration dialog to pop up consisting of a selection window to the left and the configuration dialog on the right hand side whose contents will vary upon the configuration item you did select.
19
<imagedata fileref="configure-select.png" format="PNG"/>
22
<phrase>Select a configuration item</phrase>
25
Select a configuration item
31
We will discuss these configurations in a different order, split up into the main topics of <link linkend="setup-general">General Configuration</link>, <link linkend="setup-docu">Configuring the Documentation</link>, and <link linkend="setup-advanced">Advanced Configuration</link> which makes for a more intuitive reading.
34
If you want directly look up a certain configuration item use one of the following links.
37
<member><link linkend="setup-main">General</link></member>
38
<member><link linkend="setup-plugins">Plugins</link></member>
39
<member><link linkend="setup-format">Source Formatter</link></member>
40
<member><link linkend="setup-new-file-wizard">New File Wizard</link></member>
41
<member><link linkend="setup-ui">User Interface</link></member>
42
<member><link linkend="setup-editor">Editor</link></member>
43
<member><link linkend="setup-abbrev">Abbreviations</link></member>
44
<member><link linkend="setup-menu-standard">Tools Menu</link></member>
45
<member><link linkend="setup-menu-external">External Tools</link></member>
46
<member><link linkend="setup-docu">Documentation</link></member>
47
<member><link linkend="setup-snippets">Code Snippets</link></member>
48
<member><link linkend="setup-fileselector">File Selector</link></member>
51
<sect1 id="setup-general">
52
<title>General Configuration</title>
55
General configuration concerns the more common tasks of tailoring &kdevelop; as there are:
59
<link linkend="setup-main">General Setup</link>
62
<link linkend="setup-ui">Selecting the User Interface</link>
66
<title>Source Edit Tasks</title>
68
<link linkend="setup-editor">Selecting an Editor</link>
71
<link linkend="setup-format">Selecting a Source Format Style</link>
74
<link linkend="setup-snippets">Setting Up the Code Snippets Tool</link>
79
<link linkend="setup-fileselector">Configuring the File Selector</link>
83
<sect2 id="setup-main">
84
<title>General Setup</title>
87
The <guilabel>General</guilabel> configuration dialog allows you to define some basic &kdevelop; behaviour which seldom will change in everyday work. This concerns:
92
<term>General project options such as</term>
96
defining a <link linkend="setup-main-projects">default parent directory</link> &kdevelop; shall use for new projects.
99
deciding whether you want &kdevelop; to <link linkend="setup-main-preload">automatically load</link> the project you last worked on.
106
<term>Selecting a font for the most commonly used output view windows,
112
<para>the <link linkend="setup-main-messages-font">Messages Output
113
View</link> &kdevelop; uses to communicate ⪚ compilation progresses,
117
<para>the <link linkend="setup-main-applications-font">Application Output
118
View</link> which will show error and state information concerning a running
127
<term>Some common behaviour concerning the displayed lines in the
128
<guilabel>Messages Output View</guilabel> window, namely:</term>
132
<para>whether long lines will <link linkend="setup-main-wrap">wrap
133
around</link>, and </para>
136
<para>if <link linkend="setup-main-navigation">directory entry and exit
137
messages</link> issued by <command>make</command> will be shown.</para>
141
<para>The <link linkend="setup-main-compile">level of detail</link> of
142
messages concerning the compilation process shown in the
143
<guilabel>Messages Output View</guilabel> window.</para>
151
<imagedata fileref="configure-general.png" format="PNG"/>
154
The general configuration dialog
161
<term id="setup-main-preload"><guilabel>Load last project on
162
startup</guilabel></term>
165
Mark this checkbox if you want to continue to work with the last project you worked on. This will cause &kdevelop; to automatically load this project on start-up. It will usually be shown in the state you left work so you can readily proceed.
171
<term id="setup-main-projects">
172
<guilabel>Default projects directory:</guilabel></term>
175
By default, &kdevelop; uses a common parent directory for all new
176
projects. Enter the absolute path of this common directory in the box or
177
select it from your directory structure. &kdevelop; will place the any new
178
project here as a subdirectory.</para>
180
You may of course change the directory path of a new project at the time you set it up in the <link linkend="applicationwizard">&appwizard;</link>.
186
<term id="setup-main-messages-font"><guilabel>Window font:</guilabel></term>
189
To select a font suitable for the <guilabel>Messages Output View</guilabel> window click the <guilabel>Window Font</guilabel> button showing the currently selected font (it says <quote>Luxi Sans</quote> in the above illustration). The &kde; standard <guilabel>Select Font</guilabel> dialog will pop up from which you may select the font to be used.
192
On first start-up, &kdevelop; initializes this font setting to the standard font for which your &kde; user has been configured. <emphasis>This setting is fixed</emphasis>, so if you alter <menuchoice><guimenuitem>Preferences</guimenuitem><guimenuitem>Appearances & Themes</guimenuitem><guimenuitem>Fonts</guimenuitem></menuchoice> in the <guilabel>Control Center</guilabel>, this will not effect this &kdevelop; font selection. You will have to explicitly reselect the <guilabel>Messages Output View</guilabel> window font.
198
<term id="setup-main-wrap"><guilabel>Line wrapping</guilabel></term>
201
By default, &kdevelop; will wrap long lines around in the <guilabel>Messages Output View</guilabel> window so that valuable information will not be easily overlooked. In some cases this will clutter long message lists. Remove the checkbox mark if you do not want the lines wrap around.
204
There is an alternative way to switch the line wrapping. Just &RMB; click in the <guilabel>Messages Output View</guilabel> window and mark/unmark the <guimenuitem>Line Wrapping</guimenuitem> entry in the menu which will pop up.
210
<term id="setup-main-navigation"><guilabel>Directory navigation
211
messages</guilabel></term>
214
The <command>make</command> tool usually will display messages like <quote>Entering directory</quote>, or <quote>Leaving directory</quote> when it switches the directories it currently works in. As this clutters the messages list in the <guilabel>Messages Output View</guilabel> window, &kdevelop; suppresses those messages by default. Mark the checkbox if you want to protocol which directories <command>make</command> worked in.
217
Changes in this setting effect the processing of new messages only. Old directory navigation messages will be kept visible when you switch this feature off.
223
<term id="setup-main-compile"><guilabel>Compiler Output</guilabel></term>
226
&kdevelop; preprocesses the messages the <guilabel>Messages Output View</guilabel> window receives during the build processes in order to filter superfluous information. You can control the level of detail &kdevelop; will display using the radio buttons in this field.
230
<term><guilabel>Very Short</guilabel></term>
232
Displays only warnings, errors, and the filenames which are compiled.
236
<term><guilabel>Short</guilabel></term>
238
Suppresses all compiler flags and formats the output to be more readable.
242
<term><guilabel>Full</guilabel></term>
244
Displays all output messages unmodified.
250
There is an alternative way to switch the compiler output detail. Just right click in the <guilabel>Messages Output View</guilabel> window and select the according detail level from the popup menu.
256
<term id="setup-main-applications-font"><guilabel>Application Output
257
View</guilabel> <guilabel>Window font:</guilabel></term>
260
The <guilabel>Application Output View</guilabel> window is used to display error and state information from applications which are run from inside &kdevelop;. These are information the applications usually sends to the console when run stand-alone. So you do not need to leave the IDE when testing the application you currently work on.
264
To select a font suitable for the <guilabel>Application Output View</guilabel> window click the <guilabel>Window Font</guilabel> button showing the currently selected font (it says <quote>Luxi Sans</quote> in the above illustration). The &kde; standard <guilabel>Select Font</guilabel> dialog will pop up from which you may select the font to be used.
267
On first start-up, &kdevelop; initializes this font setting to the standard font for which your &kde; user has been configured. <emphasis>This setting is fixed</emphasis>, so if you alter <menuchoice><guimenuitem>Preferences</guimenuitem><guimenuitem>Appearances & Themes</guimenuitem><guimenuitem>Fonts</guimenuitem></menuchoice> in the <guilabel>Control Center</guilabel>, this will not effect this &kdevelop; font selection. You will have to explicitly reselect the <guilabel>Application Output View</guilabel> window font.
273
</sect2> <!-- setup-main -->
275
<sect2 id="setup-ui">
276
<title>Selecting the User Interface</title>
278
<indexterm zone="setup-ui">
279
<primary>user interface</primary>
280
<secondary>switch modes</secondary></indexterm>
281
<indexterm zone="setup-ui">
282
<primary>switch UI modes</primary></indexterm>
285
As already said in the <link linkend="uimodes-survey">Available User Interface Modes</link> chapter there are four different ways the &kdevelop; work area may be set up, namely:
289
<link linkend="ideal-desc">IDEAl Mode</link>
292
<link linkend="mdi-desc">Child Frame Windows Mode</link>
295
<link linkend="tabbed-desc">Tabbed Pages Mode</link>
298
<link linkend="toplevel-desc">Toplevel Windows Mode</link>
303
To switch the user interface mode select <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Configure KDevelop...</guimenuitem> </menuchoice> from the menus. The <guilabel>Customize KDevelop</guilabel> dialog will pop up, where you have to select <guilabel>User Interface</guilabel> in the left hand tree. This will display the following settings dialog to the right.</para>
308
<imagedata fileref="select-user-interface-0.png" format="PNG"/>
310
<textobject><phrase>Select a user interface mode</phrase></textobject>
312
Select a user interface mode
318
Select the radio button of the user interface mode you want to switch to, then click <guibutton>OK</guibutton>.
322
Do not forget to restart &kdevelop; in order to let any of these selections take effect.
326
When you selected either the <guilabel>IDEAl window mode</guilabel> or the <guilabel>Tabbed pages mode</guilabel> two more configuration sections will become available: <link linkend="setup-ui-tabs">Use Tabs</link> and <link linkend="setup-ui-hover">Use Close On Hover</link>. These allow to configure under which circumstances tabs will be shown on top of the document windows and whether you may close the document by a click on the tab icon.
330
In <guilabel>IDEAl window mode</guilabel> only yet another configuration section will be available, <link linkend="setup-ui-toolview">Toolview Tab Layout</link> which effectively allows to select between different sizes of the toolview tabs which surround the main working area in this mode.
335
<term id="setup-ui-tabs">Configuring the Documents Tab Bar Display</term>
338
In the IDEAl and tabbed pages modes there will be named tabs on top of the document windows by default, so you can easily select different documents with a &LMB; click. If you prefer to provide more space for the document windows in the &kdevelop; main work area, you may change to another behaviour in the <guilabel>Use Tabs</guilabel> configuration section.
343
<term><guilabel>Always</guilabel></term>
345
This is the default — show a tab comprising an icon and the document name on top of any document window in the &kdevelop; main area display.
349
<term><guilabel>When more than one</guilabel></term>
351
Do not show a tab when only one document is displayed. If there is more than one document, however, &kdevelop; will display an according tab bar as in the <guilabel>Always</guilabel> selection above. You may want to select this mode if you work on a single document most of the time as this provides more vertical space.
355
<term><guilabel>Never</guilabel></term>
357
Never show any document selection tab. You may prefer this mode if you seldom use the mouse to switch between documents. It provides more vertical space for all document windows. To select another the document window or to close any, use the &kdevelop; <guimenu>Window</guimenu> menu.
365
<term id="setup-ui-hover">Setting Up to Close a Document by a Click On Its
369
When you configured &kdevelop; to display the documents tab bar, either always or when more than one document is displayed in the main work area, you may add more functionality to the tabs beyond their document selection capability. Use the <guilabel>Use Close On Hover</guilabel> configuration section for this.
374
<term><guilabel>No</guilabel></term>
376
This is standard behaviour. No extra functionality is added to the tabs. They may be used only to select document windows on &LMB; clicks.
380
<term><guilabel>Yes</guilabel></term>
382
When you selected this radio button, &kdevelop; will allow to close a document window by a &LMB; click. Use the mouse to point at the small icon on the on the left tab border. It will change to a close symbol. Now click with the &LMB; on this changed symbol and &kdevelop; will close the according document window.
386
<term><guilabel>Yes, Delayed</guilabel></term>
388
After selecting this radio button, &kdevelop; will allow to close a document window as shown in the <guilabel>Yes</guilabel> case above. The icon will not change instantly, however, but there will be a short delay before the close icon shows up.
396
<term id="setup-ui-toolview">Configuring the Toolview Tab Layout</term>
399
The <guilabel>Toolview Tab Layout</guilabel> configuration section will be available in IDEAl mode only. Use these radio buttons to set up the look of the toolview tabs which surround the main working area in this mode.
404
<term><guilabel>Icons</guilabel></term>
407
Each tab will show an icon only. If the associated toolview is displayed, the tab will open and a descriptive text for this toolview be shown. You may want to use this mode if you work on a monitor with limited resolution.
410
The icons are not very descriptive, however. If you want to find out which toolview is assigned to a given tab, point at it with the mouse and wait a second. A short tooltip will then pop up with the toolview name.
415
<term><guilabel>Text</guilabel></term>
417
This is the default toolview tab display mode. Each tab displays the name of its associated toolview.
421
<term><guilabel>Text and Icons</guilabel></term>
423
If the standard text toolview display looks too flat to you and you are working on a high-resolution monitor you may want to select this radio button. It will cause the name of the associated toolview be displayed on each tab plus an icon to the left of it, making the tabs easier to distinguish. See the <link linkend="folded-toolview-tabs">Folded Toolview Tabs</link> illustration below for an example.
431
<term>Folded Toolview Tabs</term>
434
If you selected the IDEAl mode toolview tabs to display texts (with or without accompanying icons) you need not worry about them being hidden behind some toolview window. If one of the bottom toolview windows occupies more space than is available to display all (vertical) tabs, they will fold around as this illustration shows:
438
<mediaobject id="folded-toolview-tabs">
440
<imagedata fileref="folded-tabs.png" format="PNG"/>
442
<textobject><phrase>Toolview tabs fold to not be hidden behind another view window</phrase></textobject>
444
Toolview tabs fold to not be hidden behind another view window
450
The active toolview window must be shown fixed (non-overlap mode), sharing the work area with the other windows, to force such tab folding. Press the small square in the window border to accomplish this as shown in the example.
456
</sect2> <!-- setup-ui -->
458
<sect2 id="setup-editor">
459
<title>Selecting an Editor</title>
461
<para>&kdevelop; allows you to select your favorite text editor tool. Mark the <guilabel>Editor</guilabel> entry in the left hand side selections tree of the <guilabel>Configure KDevelop</guilabel> window. The following dialog will be displayed to the right.
467
<imagedata fileref="configure-editor.png" format="PNG"/>
469
<textobject><phrase>Select an editor</phrase></textobject>
477
To select a new editor, click on the arrow on the drop down list field. Depending on the editor parts interfaces your &kde; version has compiled in you will be provided with a list of editors you may select from (see the <link linkend="setup-editor-kparts">Important</link> note below for this). Click on the editor of your liking and click <guilabel>OK</guilabel>. Currently there are tree possibilities:
482
<term><guilabel>Embedded Advanced Text Editor</guilabel></term>
484
This is the &kde; standard <application>Kate</application> editor part.
488
<term><guilabel>Embedded Vim Component</guilabel></term>
491
This provides the look and feel of the base &Linux; <application>vi</application> editor.
495
You need to have a suitable <application>Vim</application> application installed. Have a look at the <ulink url="http://www.freehackers.org/kvim/">KVim</ulink> website for more information.
498
Furthermore you need to configure the KParts Vim component in the <guilabel>&kde; Control Center</guilabel> (<menuchoice><guimenuitem>KDE Components</guimenuitem><guimenuitem>Vim Component Configuration</guimenuitem></menuchoice>) before you can use it.
500
</itemizedlist></note>
504
<term><guilabel>Qt Designer Based Text Editor</guilabel></term>
506
This is the editor &Qt; provides in its <application>Designer</application> component.
512
These editor interfaces are fully integrated in the &kdevelop; IDE concept. Particularly the possibility to jump to the offending source code line by just clicking on an error message in the <guilabel>Messages Output View</guilabel> window has been provided.
516
Changing the editor will not effect already open files. There are two possibilities to proceed. Either close all open text windows and reopen them one by one. Or simply close the whole project and reopen it again. The windows will then automatically open under the new text editor interface.
519
<important id="setup-editor-kparts"><para>
520
KDevelop lets you use editor interfaces which have registered with &kde; and that provide a KatePart interface. If you miss one one of the selections shown above check your &kde; installation if the corresponding KPart was correctly installed.
522
</sect2> <!-- setup-editor -->
524
<sect2 id="setup-format">
525
<title>Selecting a Source Format Style</title>
528
&kdevelop; automatically formats a source text in a predefined style. This style is highly configurable.
532
The reformat source feature is currently available for C, C++, and &Java; only. Especially you cannot use it for scripting languages like ⪚ PHP. This is because &kdevelop; uses the <ulink url="http://astyle.sourceforge.net/">astyle</ulink> application to implement this feature.
536
To set up a specific format style, select <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Configure KDevelop...</guimenuitem> </menuchoice> from the menubar. The <guilabel>Customize KDevelop</guilabel> dialog will pop up, where you have to select <guilabel>Source Formatter</guilabel> in the left hand tree. This will display a series of three settings dialog tabs to the right, namely a <link linkend="setup-format-general">General Formatting Setup</link>, a <link linkend="setup-format-indent">Indentation Style Setup</link>, and a <link linkend="setup-format-other">Other Formatting Setup</link>.
540
Any style changes apply to newly entered text only. If you want to change the formatting style of an already existing source text you will have to explicitly use the <menuchoice><guimenu>Edit</guimenu><guimenuitem>Reformat Source</guimenuitem></menuchoice> command.
544
The exact outcome of these style formatting definitions depends on the <link linkend="setup-editor">editor</link> you use. Currently, most settings are tailored to the Kate editor part (the <quote>Embedded Advanced Text Editor</quote>). Some other editors (⪚ the Qt editor) may rely on their own configuration settings. You will have to experiment in this case to find out the exact effects of the style settings provided here.
548
There may be incompatibilities between the configuration style settings provided here and the editor you use up to the extent that in extreme cases it even might destroy your files. Make sure you have a backup of your source files before you try out these settings with an none KDE standard editor.
551
<sect3 id="setup-format-general">
552
<title>General Formatting Setup</title>
555
The <guilabel>General</guilabel> tab of the <guilabel>Source Formatter</guilabel> dialog allows you to select one out of five predefined source format styles.
561
<imagedata fileref="SF-general.png" format="PNG"/>
563
<textobject><phrase>Source format style general setup</phrase></textobject>
565
Source format style general setup
571
A formatted source example will be displayed in the field to the right. If none of the predefined styles is to your liking, you may click the top <guilabel>User defined</guilabel> radio button and define your own source formatting style preferences on the other two tabs which will become available then.
575
Currently only the predefined source formatting styles will be demonstrated by an example text. If you decide to define your own style, no example display will be available. You have to experiment on an actual source text to tailor the settings to your liking.
578
</sect3> <!-- setup-format-general -->
580
<sect3 id="setup-format-indent">
581
<title>Indentation Style Setup</title>
584
Proper indentation is the main means to enhance readability of a source text. I you selected the <guilabel>Indentation</guilabel> tab of the <guilabel>Source Formatter</guilabel> dialog you will be presented with a series of indentation formatting choices grouped into three boxes as following.
590
<imagedata fileref="SF-indent.png" format="PNG"/>
592
<textobject><phrase>Source format indentation style setup</phrase></textobject>
594
Source format indentation style setup
601
<term>Default Settings</term>
603
<para>The preset format choices will cause the source text to resemble the
604
ANSI formatting style:</para>
625
<term id="setup-format-indent-filling">Defining Indentation Width and Characters</term>
627
<para>The radio buttons grouped in the <guilabel>Filling</guilabel> group
628
define how indents in the source text will be drawn.</para>
632
<term><guilabel>Use tabs</guilabel></term>
635
This will cause the editor to insert a tab character for each
636
indentation level. The tab width is predefined in the editor settings (8 or
637
4 character columns usually). Use <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure Editor...</guimenuitem></menuchoice> to redefine it.
640
The actual tab width definition procedure depends on the editor you selected in the <link linkend="setup-editor">Selecting an Editor</link> configuration step. You will have to look up the corresponding editor help to find out.
645
<term><guilabel>Use spaces</guilabel></term>
647
If you select this radio button, the editor will enter a number of spaces for each indentation level. Change the number from the default 2 to the indentation width you prefer.
655
<term>Indented Entities</term>
657
<para>This defines which of the (C/C++) entities will be formatted with an
658
extra indent beyond the current indentation level.</para>
660
<para>By default only <guilabel>namespaces</guilabel> and
661
<guilabel>labels</guilabel> will be extra indented. You may want to
662
experiment with various settings to tailor those extra indents to your
668
<term>Continuation</term>
671
The settings grouped here apply to those cases where the source formatter automatically wraps around long source lines. It takes two special cases in account, namely that in deeply nested indents there should remain enough room for the source and that conditionals should get extra indent levels on continuation to make them stand out properly.
675
This applies to <emphasis>static word wrap cases</emphasis> only where a fixed maximum line width is used in the source text. If you set up your editor to dynamically wrap around long lines in display only (which is possible in the &kate; editor part) the effects of these settings usually will not show.
680
<term><guilabel>Maximum in statement</guilabel></term>
683
This setting limits the maximum possible indentation for the continuation lines so that enough space will remain to keep the text readable. No continuation line will ever be indented beyond the number of columns you selected in this field.
686
The default is set to 40 character columns (half a standard 80 column page). You may want to increase this value to account for wider paper (e.g if you use landscape printing for your sources). Or decrease the value accordingly to take larger margin settings of your printouts into account.
691
<term><guilabel>Minimum in conditional</guilabel></term>
694
Conditionals or source following ⪚ an assignment operator should usually get an extra indent on continuation lines in order to keep the text readable. The amount of this extra indent is defined here.
697
The default is set to <quote>Twice current</quote> which means that continued conditionals will get an extra indent level of the standard indentation size you selected in the <link linkend="setup-format-indent-filling">Filling</link> group. You may change this extra indent to another fixed width (including zero) using the arrows or by entering the value directly.
706
</sect3> <!-- setup-format-indent -->
708
<sect3 id="setup-format-other">
709
<title>Other Formatting Setup</title>
714
<imagedata fileref="SF-other.png" format="PNG"/>
716
<textobject><phrase>Other source format style settings</phrase></textobject>
718
Other source format style settings
725
<term>Controlling the position of braces</term>
727
<para>The radio buttons the (somewhat misnamed)
728
<guilabel>Brackets</guilabel> group control the position of block delimiting
729
braces in a (C/C++) source text. There are three possibilities from which
730
you can select.</para>
734
<term><guilabel>Break</guilabel></term>
736
<para>This inserts a line break before each opening brace. Both delimiting braces of any block will be put at the same indentation level as the block head statement.</para>
756
<term><guilabel>Attach</guilabel></term>
759
This will keep the opening brace of a block in line with the block head statement. Closing braces will be on the same indentation level as the block head statement. The <token>else</token> of an <token>if</token> statement will be kept in line with the closing brace of the preceding block.
775
<term><guilabel>Linux Style</guilabel></term>
778
This is a compromise of the above listed styles. Functional block delimiting braces will be put on extra lines. Braces opening a block in a conditional or loop statement will be kept in line.
800
<term>Controlling Extra Spaces</term>
803
By default &kdevelop; does minimize the use of spaces in source texts.
808
if (isBar(fooArg)==barValue)
811
<para>You may enhance readability if you force the source formatter to
812
insert extra spaces in special positions.</para>
816
<term><guilabel>Add spaces around parentheses</guilabel></term>
818
<para>In fact what is meant is to add spaces around the text put in parentheses. This enhances the readability of function arguments and conditionals.</para>
820
if ( isBar( fooArg )==barValue )
825
<term><guilabel>Add spaces around operators</guilabel></term>
827
<para>This will put spaces around assignment and comparison operators to enhance the readability.</para>
829
if (isBar(fooArg) == barValue)
838
<term>Controlling the formatting of one-line constructs</term>
840
<para>There are a few cases where you don't want the source formatter to
841
split a long line apart. For C/C++ code this can be controlled here.</para>
845
<term><guilabel>Keep one-line statements</guilabel></term>
847
This keeps single line statements together in some situations even if they exceed a fixed maximum line length.
851
<term><guilabel>Keep one-line blocks</guilabel></term>
853
This keeps single line blocks together in some situations even if they exceed a fixed maximum line length.
862
</sect3> <!-- setup-format-other -->
864
</sect2> <!-- setup-format -->
866
<sect2 id="setup-snippets">
867
<title>Setting Up the Code Snippets Tool</title>
870
When editing in &kdevelop; you can store often used parts of code as <link linkend="editing-snippets">Code Snippets</link>. To configure the capabilities of the code snippets part select <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Configure KDevelop...</guimenuitem> </menuchoice> from the menubar. The <guilabel>Customize KDevelop</guilabel> dialog will pop up, where you have to select <guilabel>Code Snippets</guilabel> in the left hand tree. This will show the following dialog in the right hand side.
876
<imagedata fileref="configure-snippets.png" format="PNG"/>
878
<textobject><phrase>Configuring the code snippets tool</phrase></textobject>
880
Configuring the Code Snippets tool
887
<term>Activate Snippet Preview</term>
889
<para>Mark the <guilabel>Show snippet's text in tooltip</guilabel> checkbox
890
if you want to view the stored text in a tooltip window whenever you keep
891
the mouse cursor over the title of that snippet.</para>
896
<term>Working with Snippet Variables</term>
898
<para>The <guilabel>Code Snippets</guilabel> tool allows for a variable text
899
in predefined places any time you insert a snippet into a file. To
900
accomplish this <guilabel>Code Snippets</guilabel> provides its own
901
variables' mechanism. You can set up its behaviour in the
902
<guilabel>Variables</guilabel> group.</para>
906
<term><guilabel>Delimiter</guilabel></term>
908
The <guilabel>Code Snippets</guilabel> tool distinguishes variables in the text by surrounding the variable name with special delimiter symbols. To use your own delimiter symbol, change the predefined <guilabel>$</guilabel> character in the <guilabel>Delimiter</guilabel> field.
912
<term><guilabel>Input method for variables</guilabel></term>
913
<listitem><itemizedlist>
915
<guilabel>Single dialog for each variable within a snippet</guilabel> – will in turn pop up a separate dialog for each variable which the tool finds when inserting the selected code snippet.
918
<guilabel>One dialog for all variables within a snippet</guilabel> – will pop up a common dialog where the user has to fill in the values of all variables before the snippet will be inserted
920
</itemizedlist></listitem>
927
</sect2> <!-- setup-snippets -->
929
<sect2 id="setup-fileselector">
930
<title>Configuring the File Selector</title>
933
&kdevelop; provides a <guilabel>File Selector</guilabel> plugin which, when
934
loaded at start-up, allows to navigate to any file or directory in the
938
<screenshot id="setup-fileselector-image">
941
<imagedata fileref="file-selector.png" format="PNG"/>
943
<textobject><phrase>The file selector in IDEAl mode</phrase></textobject>
945
The file selector (IDEAl mode)
950
<para>The behaviour of the <guilabel>File Selector</guilabel> can be highly
951
configured. Select <menuchoice> <guimenu>Settings</guimenu>
952
<guimenuitem>Configure KDevelop...</guimenuitem> </menuchoice> from the
953
menubar. The <guilabel>Customize KDevelop</guilabel> dialog will pop up,
954
where you have to select <guilabel>File Selector</guilabel> in the left hand
955
tree. This will show the following dialog in the right hand side.</para>
961
<imagedata fileref="configure-file-selector.png" format="PNG"/>
963
<textobject><phrase>Configuring the file selector</phrase></textobject>
965
Configuring the file selector
972
<term>Configuring the Toolbar</term>
974
<para>There is a toolbar on top of the <guilabel>File Selector</guilabel>
975
which can be configured as usual in the <guilabel>Toolbar</guilabel>
978
<procedure id="setup-fileselector-add-action">
979
<title>Add an Action to the Toolbar</title>
982
Select an item in the right hand <guilabel>Selected actions</guilabel> list after which the new action should be inserted.
987
Select the action to be inserted in the left hand <guilabel>Available actions</guilabel> list.
992
Click the right (upper) arrow between both lists.
994
<para>The action will be removed from the <guilabel>Available actions</guilabel> list and inserted into the <guilabel>Selected actions</guilabel> list below the selected item.
1000
<title>Remove an Action from the Toolbar</title>
1003
Select the item to be removed in the right hand <guilabel>Selected actions</guilabel> list.
1008
Click the left (lower) arrow between both lists.
1010
<para>The selected item will be removed from the <guilabel>Selected actions</guilabel> list and put back into the <guilabel>Available actions</guilabel> list.
1016
<title>Reorder the Actions on the Toolbar</title>
1019
Select the action to be moved in the right hand <guilabel>Selected actions</guilabel> list.
1024
Click the up or down arrow to the right of this list.
1026
<para>The selected item will be moved up or down the <guilabel>Selected actions</guilabel> list.
1034
<term id="setup-fileselector-autosync">Defining When the Contents Should
1038
Updating the contents in the <guilabel>File Selector</guilabel> window takes time and resources, esp. when changing to another directory. Therefore <guilabel>File Selector</guilabel> is set up by default in such a way that its contents change only on demand, &ie; when you select another directory or when you explicitly want to refresh its contents.
1042
Click the <guilabel>Reload</guilabel> button in the toolbar to update the contents of the <guilabel>File Selector</guilabel>. This toolbar button is not available by default, however. You must <link linkend="setup-fileselector-add-action">insert it there</link> first.
1046
You can configure the <guilabel>File Selector</guilabel> to immediately reflect certain changes in your work. The settings in the <guilabel>Auto Synchronization</guilabel> group of the configuration dialog are responsible for this.
1051
<term><guilabel>When a document becomes active</guilabel></term>
1053
If you select this checkbox, the contents in the <guilabel>File Selector</guilabel> window will be updated whenever you go to another already open document, ⪚ when you click on the tab of the according edit window in IDEAl mode. If necessary the <guilabel>File Selector</guilabel> will switch to the directory this file belongs to and update the display to show the actual contents in there.
1057
<term><guilabel>When a document is opened</guilabel></term>
1059
If you select this checkbox, the contents in the <guilabel>File Selector</guilabel> window will be updated whenever a document will be opened, ⪚ by the <menuchoice><guimenu>File</guimenu><guimenuitem>Open</guimenuitem></menuchoice> menu. If necessary the <guilabel>File Selector</guilabel> will switch to the directory this file belongs to and update the display to show the actual contents in there.
1063
<term><guilabel>When the file selector becomes visible</guilabel></term>
1065
If you select this checkbox, the contents in the <guilabel>File Selector</guilabel> window will be updated whenever it gets visible again. If necessary it will switch to the directory the actual document belongs to and update the display to show the actual contents in there.
1071
You may freely combine these settings to tailor the actualization behaviour of the <guilabel>File Selector</guilabel> to your liking.
1077
<term>Controlling the History in the Comboboxes</term>
1079
<para>There are two comboboxes on top and bottom of the <guilabel>File
1080
Selector</guilabel> contents window which control the directory to be
1081
displayed (top combobox) and the filters to be applied to the file display
1082
(bottom combobox). A history of the most recent settings is kept in the
1083
selection field of each combobox. You can configure the number of history
1084
entries as follows.</para>
1088
<term><guilabel>Remember locations</guilabel></term>
1090
Enter here the maximum number of directory selections the upper combobox shall remember.
1094
<term><guilabel>Remember filters</guilabel></term>
1096
Enter here the maximum number of filter definitions the lower combobox shall remember.
1101
<term>Controlling What Should be Remembered Between Sessions</term>
1104
By default the <guilabel>File Selector</guilabel> is set up so that it shows the display of the most recent session again at the next &kdevelop; start-up. You may change this behaviour in the <guilabel>Session</guilabel> configuration group.
1108
If &kdevelop; was automatically restarted by the &kde; session manager the changes in these settings will have no effect. In this case location and filter settings of the most recent &kde; session will always be restored.
1114
<term><guilabel>Restore location</guilabel></term>
1117
Remove the checkbox mark here if you don't want the displayed location be remembered between sessions.
1120
If you selected one of the <link linkend="setup-fileselector-autosync">automatic update</link> settings the displayed location might automatically change regardless what has been remembered from the recent session.
1125
<term><guilabel>Restore filters</guilabel></term>
1128
Remove the checkbox mark here if you don't want the filters applied to the display be remembered between sessions.
1137
</sect2> <!-- setup-fileselector -->
1139
<sect2 id="setup-new-file-wizard">
1140
<title>Configuring the New File Wizard</title>
1143
(... to be written ...)
1146
</sect2> <!-- setup-new-file-wizard -->
1148
</sect1> <!-- setup-general -->
1150
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
1152
<sect1 id="setup-docu">
1153
<title>Configuring the Documentation</title>
1156
&kdevelop; contains a very powerful documentation facility which provides access to several kinds of extensive documentation. In ⪚ IDEAl mode you find a <guilabel>Documentation</guilabel> tab at the right border of the work area.
1162
<imagedata fileref="documents-contents.png" format="PNG"/>
1164
<textobject><phrase>The &kdevelop; documentation window in IDEAl mode</phrase></textobject>
1166
The &kdevelop; documentation window (IDEAl mode)
1172
&kdevelop; must have loaded the <guilabel>Documentation</guilabel> plugin in order to view the documentation tree. See the <link linkend="setup-plugins">Plugin Tools</link> section for more info.
1176
You may set up contents and behaviour of the various parts of this documentation window if you select <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Configure KDevelop...</guimenuitem> </menuchoice> from the menubar. The <guilabel>Customize KDevelop</guilabel> dialog will pop up, where you have to select <guilabel>Documentation</guilabel> in the left hand window.
1180
The thus displayed <link linkend="configure-docu-general">configuration page</link> shows three tabbed configuration dialog pages, namely:
1184
<member><link linkend="setup-docu-general">Documentation Collections</link></member>
1185
<member><link linkend="setup-docu-textsearch">Full Text Search</link></member>
1186
<member><link linkend="setup-docu-other">Other</link></member>
1189
<sect2 id="setup-docu-general">
1190
<title>Setting Up Documentation Collections</title>
1193
The documentation configuration settings have been divided into a series of documentation collections, each providing access to documentation files of some unique format and content type. These setups control which documentation items will be listed on the <guilabel>Contents</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility, and how the user may access documentation details by indexed and full text searches.
1196
The <guilabel>Documentation</guilabel> tab provides a series of configuration pages which are ordered vertically like a stack of index cards. One page at a time will open after a click on its index card title:
1199
<member><link linkend="setup-docu-general-qt">&Qt; Documentation Collection</link></member>
1200
<member><link linkend="setup-docu-general-chm">CHM Documentation Collection</link></member>
1201
<member><link linkend="setup-docu-general-dox">Doxygen Documentation Collection</link></member>
1202
<member><link linkend="setup-docu-general-toc">&kdevelop; TOC Documentation Collection</link></member>
1203
<member><link linkend="setup-docu-general-devhelp">Devhelp Documentation Collection</link></member>
1204
<member><link linkend="setup-docu-general-custom">Custom Documentation Collection</link></member>
1207
<para id="configure-docu-general">
1211
<imagedata fileref="configure-docu-general.png" format="PNG"/>
1213
<textobject><phrase>Setting up documentation collections</phrase></textobject>
1215
Setting up documentation collections
1221
<sect3 id="setup-docu-general-common">
1222
<title>Common Documentation Setup Structure</title>
1225
All configurations pages on the <guilabel>Documentation</guilabel> tab use a common layout. You will find the currently available documentation items of this type listed on the open page to the left and a set of buttons to the right.
1230
<term id="setup-docu-buttons">Buttons to Maintain Documentation List Contents</term>
1233
There are three buttons available to maintain the contents of the documentation setup pages:
1238
<term><guibutton>Add</guibutton></term>
1240
<para>Opens a <guilabel>Documentation Catalog Properties</guilabel> dialog as shown below where you can select the source location of the documentation item to be added and name it.</para>
1244
<term><guibutton>Edit</guibutton></term>
1246
<para>Opens a <guilabel>Documentation Catalog Properties</guilabel> dialog as shown below where you can change the source location of the documentation item previously selected in the list and rename it.</para>
1250
<term><guibutton>Remove</guibutton></term>
1252
<para>Removes the selected documentation entry from the list.</para>
1254
The entry will be removed from the list only. Actual documentation sources remain untouched. You will have to remove them explicitly by other means.
1263
<imagedata fileref="configure-docu-edit.png" format="PNG"/>
1266
Add or change a documentation item
1272
The button to the right of the <guilabel>Location</guilabel> field opens a directory dialog whose entries usually will be filtered according to the file type of the selected configuration page.
1275
The <guilabel>Title</guilabel> field may not be accessible, depending on the documentation type to be maintained.
1280
<term id="setup-docu-columns">Documentation List Structure</term>
1283
Every documentation setup page shows the listed documentation items in a table with four columns:
1288
<term><guilabel>TOC</guilabel></term>
1291
If this check box is marked, this documentation item will show up on the <guilabel>Contents</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility.
1294
Unchecking the <guilabel>TOC</guilabel> check box will in turn disable the <guilabel>Index</guilabel> and <guilabel>Search</guilabel> check boxes (see below). Thus you cannot have documentation collection items indexed but not shown in the contents.
1299
<term><guilabel>Index</guilabel></term>
1302
If this check box is marked, an internal index will be built of this documentation item. This provides fast access to the documentation by the use of the <guilabel>Index</guilabel> and (optionally) <guilabel>Finder</guilabel> pages of the &kdevelop; <guilabel>Documentation</guilabel> facility.
1306
The internal index will be built the first time the user selects the <guilabel>Index</guilabel> page. This will delay the first access noticeably, because the index will be read from disk and then cached.
1309
All subsequent indexed searches will however use this chache and thus work significantly faster.
1315
<term><guilabel>Search</guilabel></term>
1318
If this check box is marked, the contents of this documentation item will be included in the full text search path of the <guilabel>Search</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility.
1322
&kdevelop; utilizes the htdig application collection to perform full text searches. This search is done over an internal index, the htdig machinery has to build before it can be used.
1325
Any change of the <guilabel>Search</guilabel> check box marks will thus effect the search runs only after you rebuilt the index on the <guilabel>Search</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility.
1331
<term><guilabel>Title</guilabel></term>
1333
This is the name of the Documentation item as it will be shown on the <guilabel>Contents</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility.
1339
Former &kdevelop; versions allowed to select the documentation items to be displayed on a per-project basis. This is not available any more.
1345
</sect3> <!-- setup-docu-general-common -->
1347
<sect3 id="setup-docu-general-qt">
1348
<title>&Qt; Documentation Collections</title>
1351
On this configuration page all &Qt; documentation is set up.
1357
<imagedata fileref="configure-docu-general.png" format="PNG"/>
1359
<textobject><phrase>Setting up the &Qt; documentation collection</phrase></textobject>
1361
Setting up the &Qt; documentation collection
1367
Normally &kdevelop; will fill this in on its first start-up. It looks for standard <filename>*.xml</filename>, or <filename>*.dcf</filename> documentation files in the &Qt; installation directory. The table to the left lists the files &kdevelop; found by their standard titles.
1371
If you have a non-standard installation, either there will be no information listed at all or the entries will possibly refer to improper locations (⪚ to another &Qt; installation available in your system). You may adjust the entries using the <link linkend="setup-docu-buttons">buttons</link> to the right of the list field.
1375
&kdevelop; will use the titles already provided by the installed &Qt; documentation. Hence the <guilabel>Title</guilabel> field in the <guilabel>Documentation Catalog Properties</guilabel> dialog is inaccessible.
1379
By default, not all &Qt; documentation will be shown on the <guilabel>Contents</guilabel> page of the &kdevelop; <guilabel>Documentation</guilabel> facility. Use the <guilabel>TOC</guilabel> check box in the <link linkend="setup-docu-columns">setup table</link> to select the documentation to be shown.
1383
If you want to have some specific &Qt; documentation included in the search indexes or full text search use the <guilabel>Index</guilabel> and <guilabel>Search</guilabel>check boxes in the <link linkend="setup-docu-columns">setup table</link>.
1386
</sect3> <!-- setup-docu-general-qt -->
1388
<sect3 id="setup-docu-general-chm">
1389
<title>Setting Up the CHM Documentation Collection</title>
1392
On this configuration page you may collect documentation according to the &Microsoft; CHM help file standard.
1398
<imagedata fileref="configure-docu-chm.png" format="PNG"/>
1400
<textobject><phrase>Setting up &Microsoft; CHM standard documentation files</phrase></textobject>
1402
Setting up &Microsoft; CHM standard documentation files
1408
By default, this configuration page will be empty (as shown above). You may add new entries using the <link linkend="setup-docu-buttons">buttons</link> to the right of the list field. &kdevelop; will filter <filename>*.chm</filename> files in the directory dialog associated to the <guibutton>Add</guibutton> and <guibutton>Edit</guibutton> buttons.
1412
For more information on the format of &Microsoft; <filename>*.chm</filename> files see ⪚ PHP: Documentation - Extended CHM Format at <ulink url="http://de2.php.net/docs-echm.php">http://de2.php.net/docs-echm.php</ulink>.
1415
</sect3> <!-- setup-docu-general-chm -->
1417
<sect3 id="setup-docu-general-dox">
1418
<title>Documentation Generated by Doxygen</title>
1421
On this configuration page all &API; documentation generated by &doxygen; is set up.
1427
<imagedata fileref="configure-docu-dox.png" format="PNG"/>
1429
<textobject><phrase>Setting up Doxygen generated &API; documentation</phrase></textobject>
1431
Setting up Doxygen generated &API; documentation
1437
In short, such an &API; documents the interface to certain library functions. The &API; documentation on this page should be produced by the externally provided <ulink url="http://www.stack.nl/~dimitri/doxygen/">&doxygen;</ulink> tool.
1440
&doxygen; generated &API; documentationconsists of a series of <filename>html</filename> files, starting with <filename>index.html</filename>. Additionally there may exist <filename>tag</filename> files which contain information to link to already existing &API; documentations. Thus &kdevelop; will look for <filename>index.html</filename> and <filename>*.tag</filename> files when searching for &doxygen; generated &API; documentation.
1443
There are some structural constraints assumed when searching for &doxygen; generated &API; documentation. The directory in which the <filename>index.html</filename> file resides should contain subdirectories with separate documentation collections. Each of these subdirectories is assumed to contain a <filename>.tag</filename> file and a <filename class="directory">html/</filename> subdirectory.
1446
You may have a look at <filename class="directory">$<envar>KDEDIR</envar>/share/doc/HTML/en/kdelibs-apidocs</filename> for an example of such a &doxygen; &API; documentation layout.
1450
The older &kde; <ulink url="http://sirtaj.net/projects/kdoc/">KDoc</ulink> generated &API; format is not directly supported any more. If you still want to use such documentation, you may add it on the <link linkend="setup-docu-general-custom">Custom Documentation Collection</link> page.
1454
&kdevelop; will have filled in a link to the current &kde; Libraries &API;, provided it found one. There are several ways for &kdevelop; to find out:
1459
Either you provided the <command>configure</command> command with the
1460
<option>--with-kdelibsdoxy-dir</option> option when you compiled
1461
&kdevelop; (see the <link linkend="make-api">How to Obtain a &kdevelop; &API; Documentation</link> chapter).
1464
Or the <command>configure</command> command did automatically find a &doxygen; generated &kde; Libraries &API; in one of several standard locations it knows of.
1467
Or as a last resort the <filename class="directory">$<envar>KDEDIR</envar>/share/doc/HTML/en/kdelibs-apidocs/</filename> was found at the first &kdevelop; startup.
1472
If &kdevelop; did not find a valid &doxygen; generated &kde; Libraries &API; at its first start-up the <guilabel>Doxygen Documentation Collection</guilabel> list will be empty.
1476
You may add your own &API; documentation entries (⪚ from your current projects) by using the <link linkend="setup-docu-buttons">buttons</link> to the right. If you want to have them included in the indexed and/or full text search mark the <guilabel>Index</guilabel> or <guilabel>Search</guilabel> check boxes in the <link linkend="setup-docu-columns">setup table</link>.
1480
&kdevelop; uses the title information from the <filename>index.html</filename>. Hence the <guilabel>Title</guilabel> field in the <guilabel>Documentation Catalog Properties</guilabel> dialog is inaccessible.
1485
The &kde; system provides more &API; documentation than the &kde; Libraries &API; only. You will need additional interfaces information if you want to ⪚ include the &kate; part into you programs. For this &kate; part &API; for example you should compile and install the &kde; Base Libraries &API; from the <ulink url="http://developer.kde.org/source/index.html">sources</ulink> (using the <command>make apidox</command> and <command>make install</command> commands on the <filename class="directory">kdebase</filename> sources) and then add an entry to the <guilabel>Doxygen Documentation Collection</guilabel> list like this:
1487
<screenshot><mediaobject>
1489
<imagedata fileref="configure-adddialog-baselibs.png" format="PNG"/>
1491
<textobject><phrase>Adding a &kde; base &API; to the list</phrase></textobject>
1493
Adding a &kde; Base &API; to the list
1495
</mediaobject></screenshot>
1497
(Of course you should replace the <filename class="directory">/home/dev/mykde-system/</filename> directory in the <guilabel>Location</guilabel> field example with the path to your &kde; installation.)
1502
You must put the &API; of your current project into this <guilabel>Doxygen Documentation Collection</guilabel> as well. Former &kdevelop; versions did put it into the documentation tree on a per-project basis. This is not provided any more.
1505
</sect3> <!-- setup-docu-general-dox -->
1507
<sect3 id="setup-docu-general-toc">
1508
<title>Handling Structured Documentation (KDevelopTOC Files)</title>
1511
The main bulk of the &kdevelop; documentation facility provides immediate access to structured documentation, local as well as remote ones. You can configure this on the <guilabel>KDevelopTOC Documentation Collection</guilabel> page.
1517
<imagedata fileref="configure-docu-toc.png" format="PNG"/>
1520
Providing KDevelopTOC structured documentation access
1526
&kdevelop; comes with a bunch of predefined KDevelopTOC files which are automatically entered in the table at installation time. To keep the display manageable only the most often used will initially be marked for display. If you want to see another documentation, mark the <guilabel>TOC</guilabel> check box in the <link linkend="setup-docu-columns">setup table</link>.
1530
KDevelopTOC files cannot be indexed to perform a full text search because they usually point to a remote location. On the other hand, such a <filename>.toc</filename> file can have an index manually defined, using the <computeroutput><index></computeroutput> tag. Thus the <guilabel>Index</guilabel> check box will be enabled ony when &kdevelop; finds an <computeroutput><index></computeroutput> tag in the <filename>.toc</filename> file. (For more detail see the description below in the <link linkend="setup-docu-general-toc-files">&kdevelop; TOC Files</link> section.)
1533
The <guilabel>Search</guilabel> check box in the <link linkend="setup-docu-columns">setup table</link> will always be disabled.
1537
You may add new entries using the <link linkend="setup-docu-buttons">buttons</link> to the right of the list field. &kdevelop; will filter <filename>*.toc</filename> files in the directory dialog associated to the <guibutton>Add</guibutton> and <guibutton>Edit</guibutton> buttons.
1541
Other than former &kdevelop; versions will the <guibutton>Remove</guibutton> button not change the <filename>*.toc</filename> files on disk, so the remove operation is safe now.
1544
</sect3> <!-- setup-docu-general-toc -->
1546
<sect3 id="setup-docu-general-toc-files">
1547
<title>&kdevelop; TOC Files</title>
1550
There is a special feature associated with this. To illustrate, follow these steps: In the documentation tree find an entry shortly below the &Qt;/&kde; documentation (⪚ <quote>KDE2 Development Book (kde.org)</quote>). Click on the plus sign next to it. A tree will open where you can quickly navigate to subsequent chapters nested several levels deep, all offline. But if you finally select one of the chapters, &kdevelop; will in many cases try to access a <emphasis>remote</emphasis> documentation file.
1554
The rationale behind this is not only to locally navigate remote documentation without wasting net access resources, but to provide the developer with easy, structured access to the documentation he/she needs. Using these tools one can access almost any local or remote documentation in a structured fashion even if the original is laid out flat or structured in another way. All that is needed is access to files and/or parts of files which are displayable by the Konqueror.
1558
Such structured access is made possible through the use of special <quote>table of content</quote> files, which are denoted by <filename>.toc</filename> filename extensions. Any such &kdevelop; TOC file contains an &XML; structured description of the document to be accessed.
1563
<term>Standard Directory of &kdevelop; TOC Files</term>
1566
When &kdevelop; was installed usually a series of predefined <filename>.toc</filename> files has been put into the <filename class="directory">$KDEDIR/share/apps/kdevdocumentation/tocs</filename> directory. These are fairly simple, structured text files. You may look at them using a text editor or other text display facility.
1569
</varlistentry></variablelist>
1571
<!-- FIXME: Lauri Watts (2005-05-03) This could be marked up a whole lot -->
1572
<!-- more clearly with the sgmltags stuff. Making a note to do that once -->
1573
<!-- this first revision is done. -->
1575
<variablelist id="toc-file-structure">
1576
<title>Basic Structure of &kdevelop; TOC Files</title>
1582
<computeroutput><!DOCTYPE kdeveloptoc></computeroutput>
1585
<computeroutput><kdeveloptoc></computeroutput>
1588
<emphasis>(title)</emphasis>
1591
<emphasis>(base address)</emphasis>
1594
<emphasis>(content structure)</emphasis>
1597
<emphasis>(index structure)</emphasis>
1600
<computeroutput></kdeveloptoc></computeroutput>
1604
This &XML; structure will be parsed by the &kdevelop; <guilabel>Documentation</guilabel> plugin to set up the documentation tree contents and to guide the user in navigating the documentation. It contains all information necessary to display titles and access the documentation file contents.
1613
<computeroutput><title></computeroutput>
1614
<emphasis>(some title string)</emphasis>
1615
<computeroutput></title></computeroutput>
1619
This is the title &kdevelop; will display at the basic levels in the documentation tree.
1622
This displayed title cannot be changed by the user. If you want another text be displayed, you must manually change the <computeroutput><title></computeroutput> entry in the <filename>.toc</filename> file.
1627
<term>base address</term>
1631
<computeroutput><base href="</computeroutput>
1632
<emphasis>(base document &URL;)</emphasis>
1633
<computeroutput>"/></computeroutput>
1637
This &URL; points to the location where all files of this documentation are located. It will be prepended before each section &URL; in the following content structure list. So, if you ⪚ downloaded a documentation from a remote server, all you need to display the files from this new location is to change its <computeroutput><base></computeroutput> &URL;.
1642
<term>content structure</term>
1646
<computeroutput><tocsect1 name="</computeroutput>
1647
<emphasis>(section title)</emphasis>
1648
<computeroutput>" url="</computeroutput>
1649
<emphasis>(section &URL;)</emphasis>
1650
<computeroutput>"></computeroutput>
1652
<member>...</member>
1654
<computeroutput><tocsectn name="</computeroutput>
1655
<emphasis>(section title)</emphasis>
1656
<computeroutput>" url="</computeroutput>
1657
<emphasis>(section &URL;)</emphasis>
1658
<computeroutput>"/></computeroutput>
1660
<member>...</member>
1662
<computeroutput></tocsect1></computeroutput>
1666
All remaining navigation and access information is stored in a series of nested <computeroutput><tocsecti></computeroutput> ... <computeroutput></tocsecti></computeroutput> pairs. Each <emphasis>i</emphasis> denotes a consecutive nesting level down to number <emphasis>n</emphasis> which will correspond to the finally displayed documentation section.
1669
Any <computeroutput><tocsecti></computeroutput> entry must have a <computeroutput>name="xxx"</computeroutput> attribute associated with it (the "xxx" denotes the actual title string). This name will be displayed as level title in the documentation tree. It should correspond to an actual documentation section.
1672
There may be an <computeroutput>url=""</computeroutput> attribute associated with any <emphasis>i</emphasis> nesting level. When the user clicks on a section title in the documentation tree &kdevelop; will try to access the file at the location pointed to by the combined base and section &URL;.
1675
The <computeroutput><tocsectn/></computeroutput> entry must have an <computeroutput>url=""</computeroutput> attribute whatsoever.
1676
This final nested <computeroutput><tocsectn/></computeroutput> does not come in pairs but will immediately be closed by a <computeroutput>/</computeroutput> before the <computeroutput>></computeroutput> bracket.
1679
Any address combined of base and section &URL; must point to some displayable text file. Usually this will be an HTML-structured file. It is possible to link to anchor marks within such an HTML file using the standard # notation of the format: <filename>/base-url/section-url#anchor-mark</filename>.
1684
<term>index structure</term>
1688
<computeroutput><index></computeroutput>
1691
<computeroutput><entry name="</computeroutput>
1692
<emphasis>(index entry title)</emphasis>
1693
<computeroutput>" url="</computeroutput>
1694
<emphasis>(index section &URL;)</emphasis>
1695
<computeroutput>"/></computeroutput>
1698
<computeroutput></index></computeroutput>
1702
Index is a plain list of index entries - pairs of title and &URL;. Index is not mandatory.
1709
</sect3> <!-- setup-docu-general-toc-files -->
1711
<sect3 id="setup-docu-general-devhelp">
1712
<title>DevHelp Documentation</title>
1715
DevHelp documentation is another means of structured documentation access. It uses structured table of content files denoted by a <filename>.devhelp</filename> extension similar to <link linkend="setup-docu-general-toc-files">&kdevelop; TOC files</link> to access documentation for the GNOME 2 desktop.
1718
You can control which DevHelp files should be accessible on the <guilabel>DevHelp Documentation Collection</guilabel> configuration page.
1724
<imagedata fileref="configure-docu-devhelp.png" format="PNG"/>
1727
Providing DevHelp documentation
1733
DevHelp files originally were accessible on the <ulink url="http://lidn.sourceforge.net/">LiDN</ulink> website, but this seems to be not maintained for some time now. More recent DevHelp documentation is available at the <ulink url="http://htmlhelp.berlios.de/books/devhelp.php">DevHelp Books Download</ulink> web page.
1737
When &kdevelop; is installed it will attempt to find all <filename>.devhelp</filename> files in some standard places in the system, ⪚ in the subdirectories of <filename class="directory">/opt/gnome/share/</filename>. Initially these files will not be marked for display. If you want to see another documentation, mark the <guilabel>TOC</guilabel> check box in the <link linkend="setup-docu-columns">setup table</link>.
1741
You may add new entries using the <link linkend="setup-docu-buttons">buttons</link> to the right of the list field. &kdevelop; will filter <filename>*.toc</filename> files in the directory dialog associated to the <guibutton>Add</guibutton> and <guibutton>Edit</guibutton> buttons.
1744
</sect3> <!-- setup-docu-general-devhelp -->
1746
<sect3 id="setup-docu-general-custom">
1747
<title>Setting Up Custom Documentation Collections</title>
1750
This is for your own purpose. You may add almost any documentation files here, provided they can be displayed by the &konqueror; plugins.
1756
<imagedata fileref="configure-docu-custom.png" format="PNG"/>
1759
Providing custom documentation
1765
Usually this collection will be empty at first &kdevelop; startup. We have filled in a deliberate item to show the entry structure.
1768
Handling is straightforward here. Use the <link linkend="setup-docu-buttons">buttons</link> to the right of the list field to add, edit or remove the document items. &kdevelop; will not filter anything in the directory dialog associated to the <guibutton>Add</guibutton> and <guibutton>Edit</guibutton> buttons.
1772
You will have to explicitly select the items for display in the &kdevelop; documentation facility. Mark the <guilabel>TOC</guilabel> check box of the entry in the <link linkend="setup-docu-columns">setup table</link>.
1776
Custom documentation cannot be indexed or searched. Thus the <guilabel>Index</guilabel> and <guilabel>Search</guilabel> check boxes have no effect here as shown above.
1779
</sect3> <!--- setup-docu-general-custom -->
1781
</sect2> <!-- setup-docu-general -->
1783
<sect2 id="setup-docu-textsearch">
1784
<title>Setting Up Text Search Indexes</title>
1787
(... to be written ...)
1793
<imagedata fileref="configure-doctree-textsearch.png" format="PNG"/>
1796
Setting up text search indexes
1801
</sect2> <!-- setup-docu-textsearch -->
1803
<sect2 id="setup-docu-other">
1804
<title>Other Documentation Configuration Settings</title>
1807
(... to be written ...)
1810
</sect2> <!-- setup-docu-other -->
1812
</sect1> <!-- setup-docu -->
1814
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
1816
<sect1 id="setup-advanced">
1817
<title>Advanced Configuration</title>
1820
(... to be written ...)
1823
<sect2 id="setup-plugins">
1824
<title>Plugin Tools</title>
1827
(... to be written ...)
1829
</sect2> <!-- setup-plugins -->
1831
<sect2 id="setup-abbrev">
1832
<title>Abbreviations for the Word Completion</title>
1835
(... to be written ...)
1837
</sect2> <!-- setup-abbrev -->
1839
<sect2 id="setup-menu-standard">
1840
<title>Adding &kde; Standard Applications to the Tools Menu</title>
1843
(... to be written ...)
1845
</sect2> <!-- setup-menu-standard -->
1848
<sect2 id="setup-menu-external">
1849
<title>Adding External Applications to Menus</title>
1852
(... to be written ...)
1855
<sect3 id="setup-menu-external-tools">
1856
<title>Adding to the Tools Menu</title>
1859
(... to be written ...)
1861
</sect3> <!-- setup-menu-external-tools -->
1863
<sect3 id="setup-menu-external-filecontext">
1864
<title>Adding to the File Context Menu</title>
1867
(... to be written ...)
1869
</sect3> <!-- setup-menu-external-filecontext -->
1871
<sect3 id="setup-menu-external-dircontext">
1872
<title>Adding to the Directory Context Menu</title>
1875
(... to be written ...)
1877
</sect3> <!-- setup-menu-external-dircontext -->
1879
</sect2> <!-- setup-menu-external -->
1881
</sect1> <!-- setup-advanced -->
1883
</chapter> <!-- setup -->