Warning, /sdk/codevis/doc/xml-docbook/man-codevis_desktop.1.docbook is written in an unsupported language. File is not indexed.
0001 <?xml version="1.0" ?> 0002 <!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [ 0003 <!ENTITY codevis "<acronym>codevis</acronym>"> 0004 <!ENTITY Tomaz.Canabrava '<personname><firstname>Tomaz</firstname><surname>Canabrava</surname></personname>'> 0005 <!ENTITY Tomaz.Canabrava.mail '<email>tcanabrava@kde.org</email>'> 0006 <!ENTITY Tarcisio.Fischer '<personname><firstname>Tarcisio</firstname><surname>Fischer</surname></personname>'> 0007 <!ENTITY Tarcisio.Fischer.mail '<email>tarcisio.fischer@codethink.co.uk</email>'> 0008 <!ENTITY underApache "Apache 2.0 License"> 0009 <!ENTITY % English "INCLUDE"> 0010 ]> 0011 0012 <refentry lang="&language;"> 0013 <refentryinfo> 0014 <title>&codevis; User's Manual</title> 0015 <author>&Tomaz.Canabrava; &Tomaz.Canabrava.mail;</author> 0016 <date>2024-00-00</date> 0017 <author>&Tarcisio.Fischer; &Tarcisio.Fischer.mail;</author> 0018 <date>2023-10-19</date> 0019 <releaseinfo>KDE Gear 24.00</releaseinfo> 0020 <productname>KDE Gear</productname> 0021 </refentryinfo> 0022 0023 <refmeta> 0024 <refentrytitle><command>codevis_desktop</command></refentrytitle> 0025 <manvolnum>1</manvolnum> 0026 </refmeta> 0027 0028 <refnamediv> 0029 <refname><command>codevis_desktop</command></refname> 0030 <refpurpose>Large Scale Software Architectural Visualization by &kde;</refpurpose> 0031 </refnamediv> 0032 0033 <refsynopsisdiv> 0034 <cmdsynopsis> 0035 <!-- add a list of command line arguments here. --> 0036 <command>codevis_desktop</command> 0037 <group choice="opt"><option>--help</option></group> 0038 </cmdsynopsis> 0039 </refsynopsisdiv> 0040 0041 <refsect1> 0042 <title>Description</title> 0043 <para>&codevis; is the &kde; Large Scale Software Architectural analysis tool. </para> 0044 <para> 0045 Some of &codevis;'s many features includes software architecture visualization, 0046 manipulation, code generation from diagrams, diagrams generation from source code, 0047 plugins, static analysis, visual static analysis and much more. 0048 </para> 0049 0050 <para> 0051 But &codevis; is more than an architecture helper. Its ability to open 0052 several files at once makes it ideal for visualizing different architectures at once, 0053 and experimenting. Many architectural issues were found and fixed on &codevis; itself by 0054 analyzing it's source code. 0055 </para> 0056 </refsect1> 0057 0058 <refsect1> 0059 <title>Options</title> 0060 <variablelist> 0061 <!-- Add more entities here with longer explanations --> 0062 <varlistentry> 0063 <term><option>--help</option></term> 0064 <listitem><para>Shows the help and exits</para></listitem> 0065 </varlistentry> 0066 </variablelist> 0067 </refsect1> 0068 0069 <refsect1> 0070 <title>Plugins</title> 0071 <para> 0072 Codevis application supports plugins. It is possible to create plugins in C++, Python or mix the two languages. 0073 </para> 0074 <para> 0075 The plugin system works as follows: There's a set of places in the application code that call user-definable functions. 0076 Those functions are called "Hooks". Each hook receives a pointer to a "handler" that'll be provided by the application. 0077 So a "hook" is a "place" _where_ the function will be called and the handler is _what_ can be called back to change 0078 application behavior. 0079 </para> 0080 <para> 0081 All hooks are defined in the [hooks.py](../lvtplg/hooks.py) file. All handlers are defined in one of the handler files 0082 in the [handlers.py](../lvtplg/handlers.py) file. Handlers may return application data structures, such as an "Entity". 0083 Those are available in the [plugin data types file](../lvtplg/ct_lvtplg_plugindatatypes.h). 0084 </para> 0085 <para> 0086 In order for the application to recognize the plugins, they need to be in a specific place and they need to have a 0087 specific set of files. This is the file structure each plugin must have: 0088 </para> 0089 <para> 0090 $plugin_name/ 0091 + $plugin_name.[py|so] 0092 + metadata.json 0093 + README.md 0094 </para> 0095 <para> 0096 Where `$plugin_name` is the plugin's name. `metadata.json` file follows the [kcoreaddons](https://api.kde.org/frameworks/kcoreaddons/html/) 0097 specification (There's an example below). And the `README.md` file should contain a brief description, and 0098 possibly examples on how to use the plugin. 0099 </para> 0100 <para> 0101 The `$plugin_name` folder must be copied to one of those paths, so that the application can find the plugin: 0102 </para> 0103 <para> 0104 - `$user_home/lks-plugins/` (Preferred for local development) 0105 - `$app_installation_path/lks-plugins/` (Used for plugins that are bundled with the app) 0106 - `$app_local_data/plugins/` (Used for downloaded plugins) 0107 </para> 0108 <para> 0109 There are a few working examples in the [plugins folder](../plugins/). There's also some [plugins for integration test](../lvtplg/testplugins/) 0110 that may be useful as simple examples. But just to give the 0111 reader a more step-by-step explanation, this section will show a working plugin written in Python. 0112 There's also a [python template plugin](../plugins/python_template_plugin/) that may be used as starting point. 0113 </para> 0114 <para> 0115 **Step 1**: Create the following folder structure inside `$user_home/lks-plugins/` (example: `/home/tarcisio/lks-plugins/`): 0116 </para> 0117 <para> 0118 ``` 0119 myfirstplugin/ 0120 + myfirstplugin.py 0121 + metadata.json 0122 + README.md 0123 ``` 0124 </para> 0125 <para> 0126 **Step 2**: Populate the `metadata.json` file with the following contents: 0127 </para> 0128 <para> 0129 ``` 0130 { 0131 "KPlugin": { 0132 "Name": "My first plugin", 0133 "Description": "Example plugin", 0134 "Icon": "none", 0135 "Authors": [ { "Name": "YourName", "Email": "YourEmail" } ], 0136 "Category": "Codevis Plugins", 0137 "EnabledByDefault": true, 0138 "License": "YourLicense", 0139 "Id": "myfirstplugin", 0140 "Version": "0.1", 0141 "Website": "YourPluginWebsite" 0142 } 0143 } 0144 ``` 0145 </para> 0146 <para> 0147 **Step 3**: Populate the `myfirstplugin.py` file with the actual plugin code: 0148 </para> 0149 <para> 0150 ```python 0151 import pyLksPlugin as plg # Contains Codevis data structures 0152 0153 def hookSetupPlugin(handler): 0154 # This will be executed once when the application starts 0155 print("Hello world from Python plugin!") 0156 0157 0158 def hookTeardownPlugin(handler): 0159 # This will be executed once when the application closes 0160 print("Okay then. Bye!") 0161 ``` 0162 </para> 0163 <para> 0164 **Step 4**: Save all files and start the Codevis application using your terminal. You should see the messages in the 0165 console. 0166 </para> 0167 <para> 0168 Codevis comes with a builtin plugin editor that can be used for editing the plugins. To access it just click on 0169 `View > Plugin Editor`. 0170 </para> 0171 </refsect1> 0172 0173 <refsect1> 0174 <title>See Also</title> 0175 0176 <simplelist><member>More detailed user documentation is available from <ulink 0177 url="help:/codevis">help:/codevis</ulink> 0178 (either enter this &URL; into a web-browser;, or run 0179 <userinput><command>khelpcenter</command> 0180 <parameter>help:/codevis</parameter></userinput>).</member> 0181 <member>kf5options(7)</member> 0182 <member>qt5options(7)</member> 0183 <member>There is also further information available at the <ulink 0184 url="https://invent.kde.org/sdk/codevis/">&codevis; website</ulink>. 0185 </member> 0186 </simplelist> 0187 </refsect1> 0188 0189 </refentry>