GNOME Bugzilla – Bug 680466
Merge AnjutaLanguageProvider in language-support-vala
Last modified: 2020-11-06 20:21:56 UTC
Created attachment 219510 [details] [review] Add new the interface IAnjutaLanguageProvider and extend IAnjutaEditorAssist I divided it into eight patches to make it more clear.
Created attachment 219511 [details] [review] Adapt the sourceview plugin to the new IAnjutaEditorAssist API
Created attachment 219512 [details] [review] Adapt the snippets-manager plugin to the new IAnjutaEditorAssist API
Created attachment 219513 [details] [review] Adapt the language-support-vala plugin to the new IAnjutaEditorAssist API
Created attachment 219514 [details] [review] Adapt the language-support-python plugin to the new interface IAnjutaLanguageProvider
Created attachment 219515 [details] [review] Adapt the language-support-js plugin to the new interface IAnjutaLanguageProvider
Created attachment 219516 [details] [review] Adapt the parser-cxx plugin to the new interface IAnjutaLanguageProvider
Created attachment 219517 [details] Move parser part from the language-support-cpp-java to the new parser-cxx plugin
Review of attachment 219510 [details] [review]: Looks good so far.
Review of attachment 219511 [details] [review]: OK
Review of attachment 219512 [details] [review]: OK
Review of attachment 219513 [details] [review]: OK, so what's the problem here for the vapi file - it doesn't seem you use any of the new methods.
Review of attachment 219514 [details] [review]: OK, removing duplicate code is always good - thanks
Review of attachment 219515 [details] [review]: You said something about broken js preferences - is this fixed by the patch?
Review of attachment 219516 [details] [review]: Looks good codewise - have to test though...
Review of attachment 219515 [details] [review]: I tried to fix this, but I couldn't find the problem. So it's just as broke as before.
Review of attachment 219513 [details] [review]: No, because I couldn't execute the support methods of AnjutaLanguageProvider.
(In reply to comment #16) > Review of attachment 219513 [details] [review]: > > No, because I couldn't execute the support methods of AnjutaLanguageProvider. The problem is that we end up with circular dependency between the Anjuta and IAnjuta namespaces. The solution I see is not to declare the types of the objects passed to those methods, i.e. just declare them as GObject. This could be done through gobject-introspection comments so as not to affect C code. This won't be a problem for dynamic languages, but it could be annoying for Vala (but not much, you may just need an extra cast). The g-i annotation for this is: (type GObject):
Review of attachment 219510 [details] [review]: A couple things I noticed, looks good otherwise. It would be nice if you could document how this is supposed to be used (in a doc comment for the class), but that can wait for another patch. ::: libanjuta/interfaces/libanjuta.idl @@ +2728,3 @@ + * @type: Type of the object + */ + struct ProposalData I think this shouldn't be here. It is only used in anjuta-language-provider.c AFAICT, so it should be declared in the corresponding .h file @@ +2786,3 @@ + * has to be completely renewed. + * + * Returns: (transfer full): the iter where the provider populated, NULL otherwise add an (allow-none) annotation as it can return NULL @@ +2788,3 @@ + * Returns: (transfer full): the iter where the provider populated, NULL otherwise + */ + IAnjutaIterable* populate_language (IAnjutaIterable* iter); I think populate_language isn't a good name for this, maybe populate_completions?
OK, I pushed all this and fixed the things that Abderrahim commented. Changing the bug title, so please somebody fix that for language-support-vala ;)
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/anjuta/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.