Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Plugin Profiles for KDevelop Platform

From KDevelop

Plugin Profiles for KDevelop Platform

1. How profiles are implemented in KDevelop platform

Plugin profiles form a tree-like hierarchy:

KDevelop                                     this keeps a list of enabled plugins for a kdevelop ide which loads w/o profiles
|                                            only global profiles are listed here; this list keeps minumum number of plugins necessary
|
|--Compiled Language Development             this keeps a list of enabled and disabled global and a list of enabled project plugins
|  |                                         for all compiled language 
|  |
|  |--C&C++ Development                      this keeps a list of enabled and disabled global and a list of enabled project plugins
|  |                                         used for c/c++ projects
|  |--Java Development
|  |--etc.
|
|--Scripting Language Development
|  |--Python Development
|  |--etc.
|
|--Full IDE                                  this is a virtual profile - everything is enabled (not currently implemented)

Profiles inherit settings from their parents but can override them.




2. What is the profile
- Profile is a directory somewhere in $KDEDIR/share/apps/kdevelop/profiles
    example: "Compiled Language Development" profile would reside in $KDEDIR/share/apps/kdevelop/profiles/compileddev

- That directory contains profile.config which is ini-like file which looks like:
[Disable]
List=

[Enable]
List=

[Information]
Description=Some description
GenericName=Profile full name

[Properties]
List=Property1,Property2

[Disable] group keeps the list of explicitly disabled plugins.
[Enable] group keeps the list of explicitly enabled plugins.
[Information] contains description and full name of the profile.
[Properties] group keeps the list of platform profile properties.

- Plugin is considered as disabled by default. I.e. if for given profile and all its parents there are no explicit or implicit setting 
which enables the plugin then it is disabled for the profile.



3. What are properties and how to use them
Property is a "capability" of the profile. Profile defines properties and all plugins are checked to support those properties.
Plugins which support one of those properties will be loaded (unless they are not explicitly disabled).
The current list of properties defined by various KDevelop plugins is kept in "KDevelop Platform Properties Assignment" (KPPA) document.



4. Why profile is not only an ini-like file (NOT CURRENTLY IMPLEMENTED)
We need to provide a way for plugin developers to specify which profile this plugin fits to. 
And this would be a matter of installing file <plugin_name>.enable into the profile dir.
For example KDevDocumentation.enable could go to $KDEDIR/share/kdevelop/profiles/compileddev during installation of documentation plugin.



5. How to run KDevelop with a profile.
5.1 at startup: kdevelop --profile=... and plugin controller will take care about loading necessary plugins.
5.2 at project startup: project has it's own setting for a profile and kdevelop will unload disabled global 
plugins for the profile and load enabled global plugins for the profile;
project loader will load only plugins in profile;
_additionally_: signals unloadedProfile(name) and loadedProfile(name) would be emitted



6. How to deal with plugins which need to react to the profile change
- application wizard (limit the number of app templates in the list)
- documentation plugin (limit the number of doc plugins loaded and/or limit a number of documentation catalog)
- etc.

Solution: plugin will react on unloadedProfile(name) and loadedProfile(name) and perform necessary operations



7. How to edit profiles
Run kdevprofileeditor application and enjoy ;)


Retrieved from "http://kdevelop.org/mediawiki/index.php/Plugin_Profiles_for_KDevelop_Platform"

This page has been accessed 13,290 times. This page was last modified 22:21, 13 October 2007. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Help
Donations

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports