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

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

ILanguage, ILanguageController and Language Support Infrastructure

From KDevelop

The language support infrastructure is designed to be similar to project management. Its goals are:

The language support infrastructure can be represented with following diagram (use fixed font to see it):

                                                      |------------------|
                                                |---->| ILanguageSupport |
                               |-----------|    |     |------------------|
                         |---->| ILanguage |----|
                         |     |-----------|    |     |------------------|
                         |                      |---->| BackgroundParser |
|---------------------|  |                            |------------------|
| ILanguageController |--|
|---------------------|  |                            |------------------|
                         |                      |---->| ILanguageSupport |
                         |     |-----------|    |     |------------------|
                         |---->| ILanguage |----|
                               |-----------|    |     |------------------|
                                                |---->| BackgroundParser |
                                                      |------------------|

LanguageController holds the set of already loaded languages and provides means to load more. For each language (defined by its "name") Language object exists. Each such language has a background parser and a actual support plugin that implements ILanguageSupport. This way the basic shell functionality (like language loading algorithm and background parser) is separated from language-specific stuff (like parsing).

Unlike KDevelop3, language support plugin is loaded not among with a project. Instead, when the source file is opened, the language controller asks plugin controller whether there are any language plugins (those that implement ILanguageSupport) that support a mime type of the file (those who set X-KDevelop-SupportedMimeTypes=...).

For each language support plugin found, the Language object (that implements ILanguage interface) is created and language support plugin is associated with it. Then each language is asked to return a ParseJob to process the file. This way several language supports are able to parse one file.

If Language object for given mimetype already exists, it is used and no plugin loading is performed.

Retrieved from "http://www.kdevelop.org/mediawiki/index.php/ILanguage%2C_ILanguageController_and_Language_Support_Infrastructure"

This page has been accessed 1,251 times. This page was last modified 16:27, 17 March 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