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



Hello Abderrahim,

AFAICT, you've added two interfaces: IAnjutaProviderAssist and
IAnjutaCalltipProvider.

The first seems to me as just a wrapper to IAnjutaProvider, why? Why not
just modify IAnjutaProvider to do what you want?

Good question. When I started with my work on merging the language-support plugins I didn't understand the way of working of calltips and completions. So I just create a new plugin and learn the mechanism step by step. Perhaps I was too strongly fixed on the new plugin, so I forgot, that I can edit IAnjutaProvider instead to write a new plugin.

But this could solve the problem. In this way IAnjutaCalltipProvider is move to IAnjutaProvider and IAnjutaProviderAssist can realise through IAnjutaEditorAssist and IAnjutaEditorTip.

So the question is how a language support plugin is supposed to work
after your changes? And how are plugins are going to communicate?

If I move IAnjutaCalltipProvider to IAnjutaProvider, a language support plugins will work as before my changes. Only the IAnjutaProvider interface will change and integrate following methods:
 * populate: As before to show completion
 * get_context: Searches for a calltip context
 * get_boolean: Get setting like PREF_CALLTIP_ENABLE
* clear_context: Clears the calltip context and brings it back into a save state
 * query: Starts an async query for the calltip

An idea that just occurred to me is to have a
IAnjutaLanguageSupportManager that does the above for all language
plugins. This way, language support plugins don't need to add a watch on the current document: all they do is to register a provider, that is, an object implementing one or more language support interfaces (to provide
completion, calltips, etc.)

This is just an idea, and I hope other developers can provide more (and better) ideas. I just want to stress the fact that the architecture of
the new language support plugins should be discussed publicly.

Sure, but I hope that the discussion isn't taking too long. Because I've to write a clang plugin and I don't have much time. ;-)

Regards,
Moritz



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