Re: [anjuta-devel] The new parser-engine Plugin



Hi Moritz!

The language support plugin cannot control the methods, which are
implemented with IAnjutaProvider. For example
sourceview_provider_activate_proposal() [1] calls
ianjuta_provider_activate(). If only IAnjutaProvider is implemented,
then the method is realize in the class, which implements
IAnjutaProvider (i.e. the sippets-manager plugin). But if
IAnjutaLanguageProvider is implemented, then
sourceview_provider_activate_proposal() should calls the
ianjuta_provider_activate() method, which is realize in the sourceview
plugin [2].

The language support plugins don't need to implement IAnjutaProvider,
because populate(), get_start_iter() and activate() are already
implemented. [3] Only get_name() will remain unaffected.

Sorry, actually what I told you was wrong because I wasn't getting the
point what you wanted to do. As you only want to merge the code that the
different language plugins do in their IAnjutaProvider implementation,
creating a new interface is the wrong way.

Instead you would want to create some util class (probably in libanjuta)
that bundles this code. You can than call the util class code from the
IAnjutaProvider implementation of the respective language plugins. Code
that handles braces and stuff like that definitly doesn't belong in the
editor plugin.

Sorry for misunderstanding you before,

Johannes




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]