~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to doc/kdevelop3_outdated/plugin-tools.docbook

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<appendix id="plugin-tools">
 
2
<title>Plugin Tools</title>
 
3
 
 
4
<indexterm zone="plugin-tools">
 
5
  <primary>plugins</primary></indexterm>
 
6
 
 
7
<para>
 
8
&kdevelop; contains a large number of little tools that help you to perform
 
9
certain task. Most of them are realized as plugins. That means, if you do not
 
10
need a plugin, you can disable it.</para>
 
11
<para>That also means, if you are looking for a functionality that should be there
 
12
and isn't, then maybe it's implemented in a plugin and that plugin is disabled.
 
13
For example, in the file menu there is a Quick Open feature, but only if
 
14
it's enabled in the Project - Project Options dialog.
 
15
</para>
 
16
 
 
17
<para>Technically, plugins are based on the KDevPlugin class defined in 
 
18
lib/interfaces/kdevplugin.h. The following is taken from a comment from there.</para>
 
19
 
 
20
<para> 
 
21
KDevPlugin is the base class for all KDevelop plugins.
 
22
A plugin is a component which is loaded into KDevelop shell at startup or by request.
 
23
A plugin has a scope that can be either:
 
24
<itemizedlist>
 
25
<listitem><simpara>Core</simpara></listitem>
 
26
<listitem><simpara>Global</simpara></listitem>
 
27
<listitem><simpara>Project</simpara></listitem>
 
28
</itemizedlist>
 
29
</para>
 
30
 
 
31
<para>Core plugins are global plugins which offer some important "core" functionality and thus
 
32
are not selectable by user in plugin configuration pages.</para>
 
33
 
 
34
<para>Global plugins are plugins which require only shell to be loaded and do not operate on 
 
35
KDevProject interface and/or do not use project wide information.
 
36
For example, the uimode plugin allows a developer to select which user interface they wish to use. 
 
37
</para>
 
38
 
 
39
<para>Project plugins require a project to be loaded and are usually loaded/unloaded along with the project.
 
40
If a plugin operates on project-related information then it is a project plugin.
 
41
The Automake Manager, for example, only needs to be active when an Automake based project is currently loaded. 
 
42
</para>
 
43
 
 
44
<para>As stated above, core plugins cannot be disabled. Global plugins can be
 
45
enabled/disabled in <menuchoice><guimenu>Settings</guimenu>
 
46
<guimenuitem>Configure KDevelop...</guimenuitem></menuchoice>
 
47
under <guibutton>Plugins</guibutton>.
 
48
Project plugins can be
 
49
enabled/disabled in <menuchoice><guimenu>Project</guimenu>
 
50
<guimenuitem>Project Options...</guimenuitem></menuchoice>
 
51
under <guibutton>Plugins</guibutton>.
 
52
Active plugins can have many effects on KDevelop. 
 
53
Depending on their function, they may add extra menus, extra menu items, extra tool buttons, etc. 
 
54
</para>
 
55
 
 
56
<para>Plugins which are disabled do not clutter your menus and are not loaded
 
57
into memory.
 
58
</para>
 
59
 
 
60
 
 
61
<para>The following plugin list is generated by a small script
 
62
(listplugins.sh) written by Volker Paul. All plugins have a .desktop file
 
63
where information such as name and comments are written.
 
64
If in the following these comments are not very useful,
 
65
it is because the plugin authors made them this way.</para>
 
66
<para>The plugins are grouped by scope (Core, Global, Project).</para>
 
67
 
 
68
<para>Scope: Core</para>
 
69
<itemizedlist>
 
70
<listitem><formalpara id="KDevAppWizard">
 
71
<title>Application Wizard</title>
 
72
<para>Application Wizard</para></formalpara></listitem>
 
73
<listitem><formalpara id="KDevDiff">
 
74
<title>Difference Viewer</title>
 
75
<para>Difference Viewer</para></formalpara></listitem>
 
76
<listitem><formalpara id="KDevFileCreate">
 
77
<title>FileCreate</title>
 
78
<para>FileCreate</para></formalpara></listitem>
 
79
<listitem><formalpara id="KDevFullScreen">
 
80
<title>FullScreen</title>
 
81
<para>FullScreen</para></formalpara></listitem>
 
82
<listitem><formalpara id="KDevTipOfDay">
 
83
<title>Tip of the Day</title>
 
84
<para>Tip of the Day</para></formalpara></listitem>
 
85
<listitem><formalpara id="KDevUIChooser">
 
86
<title>User-Interface Selection</title>
 
87
<para>Provides a dialog for UI-mode selection.</para></formalpara></listitem>
 
88
<listitem><formalpara id="KDevVCSManager">
 
89
<title>VCSManager</title>
 
90
<para>Version Control System Manager </para></formalpara></listitem>
 
91
</itemizedlist>
 
92
 
 
93
<para>Scope: Global</para>
 
94
<itemizedlist>
 
95
<listitem><formalpara id="KDevAbbrev">
 
96
<title>Abbreviation Expansion</title>
 
97
<para>Provides support for customizable abbreviations - short words which expand into commonly needed code structures.</para></formalpara></listitem>
 
98
<listitem><formalpara id="KDevDocumentation">
 
99
<title>Documentation</title>
 
100
<para>The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems.</para></formalpara></listitem>
 
101
<listitem><formalpara id="KDevfilelist">
 
102
<title>FileList</title>
 
103
<para>Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.)</para></formalpara></listitem>
 
104
<listitem><formalpara id="KDevFileSelector">
 
105
<title>File Selector</title>
 
106
<para>Powerful network transparent file browser utility.</para></formalpara></listitem>
 
107
<listitem><formalpara>
 
108
<title>Shell Filtering and Insertion</title>
 
109
<para>Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu.</para></formalpara></listitem>
 
110
<listitem><formalpara id="KDevGrepView">
 
111
<title>Grep Frontend</title>
 
112
<para>Integrates "find|grep" in KDevelop - allows fast searching of multiple files using patterns or regular expressions.</para></formalpara></listitem>
 
113
<listitem><formalpara id="KDevKonsoleView">
 
114
<title>Embedded Konsole</title>
 
115
<para>This plugin gives KDevelop an embedded konsole for quick and easy command line access.</para></formalpara></listitem>
 
116
<listitem><formalpara id="KDevOpenWith">
 
117
<title>"Open with" Menu Addon</title>
 
118
<para>This plugin provides additional "open" alternatives for various context menus in KDevelop.</para></formalpara></listitem>
 
119
<listitem><formalpara id="KDevPartExplorer">
 
120
<title>Part Explorer Tool</title>
 
121
<para>A Graphical tool for performing KTrader-like queries about registered services</para></formalpara></listitem>
 
122
<listitem><formalpara id="KDevRegexpTest">
 
123
<title>Regular Expression Tester</title>
 
124
<para>Tool to design and test regular expressions against common regexp syntaxes.</para></formalpara></listitem>
 
125
<listitem><formalpara id="KDevReplace">
 
126
<title>Replace Part</title>
 
127
<para>This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu.</para></formalpara></listitem>
 
128
<listitem><formalpara id="KDevscripting">
 
129
<title>Scripting</title>
 
130
<para>The Scripting plugin offers KScript based scripting of the KDevelop application</para></formalpara></listitem>
 
131
<listitem><formalpara id="Code_Snippets">
 
132
<title>Code Snippets</title>
 
133
<para>This plugin allows you to store code snippets and add them to your code</para></formalpara></listitem>
 
134
<listitem><formalpara id="KDevTextTools">
 
135
<title>Text Structure</title>
 
136
<para>Provides a structure overview and navigation for HTML and TEX files</para></formalpara></listitem>
 
137
<listitem><formalpara id="KDevTools">
 
138
<title>Tools Menu Addition</title>
 
139
<para>This plugin provides an easy way to add external applications to the Tools menu and toolbar.</para></formalpara></listitem>
 
140
<listitem><formalpara id="KDevvalgrind">
 
141
<title>Valgrind Frontend</title>
 
142
<para>Valgrind is a tool that helps you find memory management problems in programs. http://developer.kde.org/~sewardj/</para></formalpara></listitem>
 
143
</itemizedlist>
 
144
 
 
145
<para>Scope: Project</para>
 
146
<itemizedlist>
 
147
<listitem><formalpara id="KDevannotation">
 
148
<title>annotation Plugin</title>
 
149
<para>annotation Description</para></formalpara></listitem>
 
150
<listitem><formalpara id="KDevAStyle">
 
151
<title>Source Code Formatter</title>
 
152
<para>A plugin for formatting of sourcecode according to a specified set of rules. When loaded it is found in the Tools menu.</para></formalpara></listitem>
 
153
<listitem><formalpara id="KDevBookmarks">
 
154
<title>Bookmarks</title>
 
155
<para>Plugin that provides navigation and overview of active source bookmarks and persists them between sessions.</para></formalpara></listitem>
 
156
<listitem><formalpara id="KDevClassView">
 
157
<title>Class View</title>
 
158
<para>This plugin displays a graphical view of all the classes in the project, complete with methods and attributes, and provides a way of direct source navigation.</para></formalpara></listitem>
 
159
<listitem><formalpara id="KDevcopyto">
 
160
<title>CopyTo</title>
 
161
<para>Simple file uploader plugin. It does a file copy over any KIO supported protocol.</para></formalpara></listitem>
 
162
<listitem><formalpara id="KDevCTags2">
 
163
<title>CTags Frontend</title>
 
164
<para>CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialog. http://ctags.sourceforge.net/</para></formalpara></listitem>
 
165
<listitem><formalpara id="KDevdistpart">
 
166
<title>Final Packaging Support</title>
 
167
<para>Aids in building and publishing the final project. Only RPM package format is supported for now.</para></formalpara></listitem>
 
168
<listitem><formalpara id="KDevDoxygen">
 
169
<title>Doxygen Support</title>
 
170
<para>The doxygen plugin provides a way to specify and control generation of documentation for a project, based on source code content. You need to have doxygen installed to be able to use this. For more info goto http://www.doxygen.org</para></formalpara></listitem>
 
171
<listitem><formalpara id="KDevQuickOpen">
 
172
<title>QuickOpen</title>
 
173
<para>Provides an efficient way of finding/opening files, classes and methods in a large project. Appears in the File and Tools menus when loaded.</para></formalpara></listitem>
 
174
<listitem><formalpara id="KDevSecurity">
 
175
<title>Security Checker</title>
 
176
<para>Code security checker</para></formalpara></listitem>
 
177
</itemizedlist>
 
178
<para>So far the generated plugin list.</para>
 
179
 
 
180
 
 
181
<table id="table-project-parts">
 
182
<title>Project Management Plugins in &kdevelop;</title>
 
183
<tgroup cols="2"><tbody>
 
184
<row>
 
185
  <entry>antproject</entry>
 
186
  <entry>ANT Project Manager (&Java; applications)</entry>
 
187
</row>
 
188
<row>
 
189
  <entry>autoproject</entry>
 
190
  <entry>Automake Project Manager</entry>
 
191
</row>
 
192
<row>
 
193
  <entry>customproject</entry>
 
194
  <entry>Custom Project Manager</entry>
 
195
</row>
 
196
<row>
 
197
  <entry>trollproject</entry>
 
198
  <entry>QMake based Project Manager</entry>
 
199
</row>
 
200
</tbody></tgroup>
 
201
</table>
 
202
<para>The above plugins are currently (May 2005) empty. Maybe 
 
203
project management support will be implemented as plugins
 
204
in the future.</para>
 
205
 
 
206
 
 
207
<table>
 
208
<title>Language Support Plugins in &kdevelop;</title>
 
209
<tgroup cols="2">
 
210
<tbody>
 
211
<row><entry>cppsupport</entry><entry>Support for C/C++</entry></row>
 
212
<row><entry>fortransupport</entry><entry>Support for Fortran</entry></row>
 
213
<row><entry>javasupport</entry><entry>Support for &Java;</entry></row>
 
214
<row><entry>perlsupport</entry><entry>Support for Perl</entry></row>
 
215
<row><entry>phpsupport</entry><entry>Support for PHP</entry></row>
 
216
<row><entry>pythonsupport</entry><entry>Support for Python</entry></row>
 
217
</tbody></tgroup>
 
218
</table>
 
219
 
 
220
 
 
221
<para>In the following, some of the plugins will be discussed in detail.</para>
 
222
 
 
223
<itemizedlist>
 
224
<listitem>
 
225
<formalpara>
 
226
<title>The <command>abbrev</command> Plugin</title>
 
227
<indexterm zone="plugin-tools"><primary><command>abbrev</command></primary></indexterm>
 
228
 
 
229
<para>
 
230
This plugin expands abbreviations into frequently used code snippets. It is
 
231
activated by pressing <keycombo action="simul">&Ctrl;
 
232
<keycap>Space</keycap></keycombo>. For example, when you enter
 
233
<literal>"ife"</literal> into a C++ in the editor and press
 
234
<keycombo action="simul">&Ctrl;<keycap>Space</keycap></keycombo>, you obtain
 
235
an <literal>if-else</literal> code template and save some key strokes. The set
 
236
of supported abbreviations depends on the programming language of the edited
 
237
file. For example, for PHP you will obviously be interested in other code
 
238
templates than for &Java;.
 
239
</para>
 
240
</formalpara>
 
241
 
 
242
<para>
 
243
The set of code templates is configurable. If the plugin is enabled, you can see
 
244
which ones are available in the <menuchoice><guimenu>Settings</guimenu>
 
245
<guimenuitem>Configure KDevelop...</guimenuitem></menuchoice>
 
246
dialog under <guibutton>Abbreviations</guibutton>.
 
247
</para>
 
248
</listitem>
 
249
 
 
250
<listitem>
 
251
<formalpara id="KDevFilter">
 
252
<title>The <command>filter</command> Plugin</title>
 
253
<indexterm zone="plugin-tools"><primary><command>filter</command></primary></indexterm>
 
254
 
 
255
<para>
 
256
This offers two features. If you select <menuchoice><guimenu>Tools</guimenu>
 
257
<guimenuitem>Execute command</guimenuitem></menuchoice>, you can enter a shell
 
258
command. The output of this command is inserted into the editor buffer when
 
259
you hit the <guibutton>Start</guibutton> button.
 
260
</para>
 
261
</formalpara>
 
262
 
 
263
<para>
 
264
A related feature is available under
 
265
<menuchoice><guimenu>Tools</guimenu><guimenuitem>Filter selection through
 
266
command...</guimenuitem></menuchoice>.  In order to use this, you must
 
267
select a text area in the editor. If you now enter a shell command and hit
 
268
the <guibutton>Start</guibutton> button, the command is started and the
 
269
selection used as the standard input for it. The standard output of the
 
270
command is then inserted into the editor, replacing the selection.
 
271
</para>
 
272
 
 
273
<para>
 
274
For example, if you write documentation, you frequently have to refer
 
275
to menu items. To do this correctly for e.g. the Copy command in the 
 
276
Edit menu, you have to write:
 
277
<programlisting>&lt;menuchoice&gt;&lt;guimenu&gt;Edit&lt;/guimenu&gt;&lt;guimenuitem&gt;Copy&lt;/guimenuitem&gt;&lt;/menuchoice&gt;</programlisting>
 
278
This is cumbersome, so you'd rather just write "Edit - Copy"
 
279
and let the computer do the tagging.
 
280
Here is how you can do it.
 
281
You write a little shell script called mef you put e.g. in your home's bin directory:
 
282
<programlisting>sed s/"^\(.*\) - \(.*\)\$"/"&lt;menuchoice&gt;&lt;guimenu&gt;\1&lt;\/guimenu&gt;&lt;guimenuitem&gt;\2&lt;\/guimenuitem&gt;&lt;\/menuchoice&gt;"/</programlisting>
 
283
Don't forget to make it executable.
 
284
That's all. Now, in your documentation .docbook source, you write "Edit - Copy".
 
285
You select this text you just wrote, choose
 
286
<menuchoice><guimenu>Tools</guimenu><guimenuitem>Filter selection through
 
287
command...</guimenuitem></menuchoice> and call ~/bin/mef.
 
288
Instantly "Edit - Copy" is replaced by
 
289
<programlisting>&lt;menuchoice&gt;&lt;guimenu&gt;Edit&lt;/guimenu&gt;&lt;guimenuitem&gt;Copy&lt;/guimenuitem&gt;&lt;/menuchoice&gt;</programlisting>
 
290
</para>
 
291
 
 
292
 
 
293
</listitem>
 
294
 
 
295
<listitem>
 
296
<formalpara>
 
297
<title>The &doxygen; Plugin</title>
 
298
<indexterm zone="plugin-tools"><primary>&doxygen;</primary></indexterm>
 
299
<indexterm zone="plugin-tools"><primary>documentation tool</primary></indexterm>
 
300
<indexterm zone="plugin-tools"><primary>API documentation</primary></indexterm>
 
301
 
 
302
<para>
 
303
This one helps you to use the &doxygen; API documentation tool
 
304
(<ulink url="http://www.doxygen.org"/>). You can select
 
305
<menuchoice><guimenu>Project</guimenu>
 
306
<guimenuitem>Run Doxygen</guimenuitem></menuchoice> to generate API
 
307
documentation for your current project, based on the configuration given by
 
308
the file <filename>Doxyfile</filename> in your project directory.
 
309
</para>
 
310
</formalpara>
 
311
 
 
312
<para>
 
313
Furthermore, you can configure &doxygen; in the
 
314
<menuchoice><guimenu>Project</guimenu>
 
315
<guimenuitem>Project options...</guimenuitem></menuchoice> dialog. This dialog
 
316
is very similar to the &doxywizard; tool.
 
317
</para>
 
318
</listitem>
 
319
 
 
320
<listitem>
 
321
<formalpara>
 
322
<title>The &ctags; Plugin</title>
 
323
<indexterm zone="plugin-tools"><primary>&ctags;</primary></indexterm>
 
324
 
 
325
<para>
 
326
Although the class browser gives you extensive insight into the symbols and
 
327
classes of your project, you may also want to use the ctags tool. In particular,
 
328
this one supports a lot more language than the class browser.
 
329
</para>
 
330
</formalpara>
 
331
 
 
332
<para>
 
333
You activate this plugin under <menuchoice><guimenu>Tools</guimenu>
 
334
<guimenuitem>CTags...</guimenuitem></menuchoice>. When you start it the first
 
335
time, you will be asked to generate a search database first. When you accept
 
336
this, the &ctags; program will be started and will create a file named
 
337
<filename>tags</filename> in your project directory. This is a text file containing
 
338
all symbols of your source files.
 
339
</para>
 
340
 
 
341
<para>
 
342
You can search in the symbol database in two ways: when the
 
343
<guilabel>Regular expression match</guilabel> box is checked, the text you
 
344
enter will be interpreted as a regular expression (POSIX flavor) and matched
 
345
with the existing symbols. For example, the text <literal>.*Widget</literal>
 
346
will search for all symbols ending with <literal>Widget</literal>. If the
 
347
box is not checked, the search will be verbatim.
 
348
</para>
 
349
 
 
350
<para>
 
351
When searching, you will get a list of the matched symbols, accompanied with
 
352
the line numbers where they are defined. You jump to the respective point by
 
353
clicking on the list.
 
354
</para>
 
355
 
 
356
<para>
 
357
For some languages, &ctags; distinguishes different kinds of symbols. For
 
358
example, Python has classes and functions. You can selectively search only
 
359
for classes by checking the respecting kinds in the dialog.
 
360
</para>
 
361
 
 
362
<para>
 
363
The symbol database is normally not updated when your sources change.
 
364
Consequently, after a while the line numbers will not be correct anymore
 
365
and newly added classes and functions will be missing. Therefore you should
 
366
update the <filename>tags</filename> file in regular intervals by pressing
 
367
the button <guibutton>Regenerate</guibutton>.
 
368
</para>
 
369
</listitem>
 
370
 
 
371
<listitem>
 
372
<formalpara>
 
373
<title>The <command>astyle</command> Plugin</title>
 
374
<indexterm zone="plugin-tools"><primary><command>astyle</command></primary></indexterm>
 
375
<indexterm zone="plugin-tools"><primary><application>Artistic Style</application></primary></indexterm>
 
376
<indexterm zone="plugin-tools"><primary>indentation</primary></indexterm>
 
377
 
 
378
<para>
 
379
Astyle is a plugin for formatting of sourcecode according to a specified set of rules.
 
380
</para>
 
381
</formalpara>
 
382
</listitem>
 
383
 
 
384
<listitem>
 
385
<formalpara>
 
386
<title>The <command>regexptest</command> Plugin</title>
 
387
<indexterm zone="plugin-tools"><primary><command>regexptest</command></primary></indexterm>
 
388
<indexterm zone="plugin-tools"><primary>debugging</primary><secondary>regular expressions</secondary></indexterm>
 
389
<indexterm zone="plugin-tools"><primary>regular expressions</primary><secondary>debugging</secondary></indexterm>
 
390
 
 
391
<para>
 
392
Designing with regular expressions can be hard work. Often the first try at an
 
393
expression matches too many strings. In particular, when working with a
 
394
compiled language, the turnaround times when debugging a regular expression
 
395
can be awkward. The regexptest plugin allows you to directly explore the
 
396
changes in a regular expression. It is activated by choosing
 
397
<menuchoice><guimenu>Tools</guimenu>
 
398
<guimenuitem>Debug Regular Expression...</guimenuitem></menuchoice>.
 
399
</para>
 
400
</formalpara>
 
401
 
 
402
<para>
 
403
In the flavor group box, you can choose the flavor of the regular expression
 
404
engine used. Currently supported is the flavor defined in the POSIX standard,
 
405
which is used by the &grep; program, and the extended POSIX syntax used by the
 
406
program &egrep;.
 
407
</para>
 
408
 
 
409
<para>
 
410
When you enter an expression, you get immediate feedback about any syntax
 
411
errors in it. By entering a text under <guilabel>Test string</guilabel>,
 
412
you can see whether the expression matches this string. In particular, if
 
413
your regular expression includes groups, such as <literal>([a-z])</literal>,
 
414
the content of the matched subgroups will be shown in a list box.
 
415
</para>
 
416
</listitem>
 
417
 
 
418
<!--
 
419
<listitem>
 
420
<formalpara>
 
421
<title>The <command>konsole</command> Plugin</title>
 
422
<indexterm zone="plugin-tools"><primary><command>konsole</command></primary></indexterm>
 
423
<indexterm zone="plugin-tools"><primary>terminal</primary><secondary>embedded</secondary></indexterm>
 
424
<para></para>
 
425
</formalpara>
 
426
</listitem>
 
427
-->
 
428
 
 
429
</itemizedlist>
 
430
 
 
431
</appendix> <!-- plugin-tools -->
 
432
 
 
433
<!-- ====================================================================== -->