GNOME Bugzilla – Bug 618142
Anjuta Snippets Plug-in
Last modified: 2011-01-14 19:16:10 UTC
As suggested by jhs, I opened this bug report for my GSoC project: an Anjuta Snippet Manager plug-in. I will attach the patches for my plug-in here until it's final version.
Created attachment 160617 [details] [review] IAnjutaMacro to IAnjutaSnippetManager Changed the name of IAnjutaMacro to IAnjutaSnippetManager. Now, the macro and file-wizard plugins should make use of the IAnjutaSnippetManager interface. If needed, additional methods will be added to IAnjutaSnippetManager later.
Review of attachment 160617 [details] [review]: I don't see much benefit in applying this patch now as the backend of the SnippetManager isn't ready yet and as such only the interface names are changed. In addition, I would like that the interface covers the cases discussed in the mail from the beginning when it's changed.
Created attachment 167548 [details] [review] The patch with the plugin
Review of attachment 167548 [details] [review]: Looks very good overall, nice cooding style! I made some minor comments (see below). It would be nice to have the import/export feature (at least for anjuta-snippets) in so we don't need to announce another string change. Thanks a lot! ::: plugins/sourceview/sourceview.c @@ -1191,3 @@ sourceview_cell_get_iter (cell, &iter); - g_signal_handlers_block_by_func (sv->priv->document, Have you checked that auto-indentation still works when you remove that? ::: plugins/snippets-manager/Makefile.am @@ +69,3 @@ + snippets-import-export.c\ + snippets-import-export.h + You need to add the rules for schema generation here. See the Makefiles from other plugins with preferences. ::: plugins/snippets-manager/plugin.c @@ +294,3 @@ + ANJUTA_SHELL_PLACEMENT_LEFT, + NULL); + snippets_manager_plugin->browser_maximized = FALSE; indentation... @@ +352,3 @@ + if (snippets_manager_plugin->browser_maximized) + on_snippets_browser_unmaximize_request (snippets_manager_plugin->snippets_browser, + snippets_manager_plugin); dito @@ +419,3 @@ + snippets_manager->snippets_provider = + snippets_provider_new (snippets_manager->snippets_db, + snippets_manager->snippets_interaction); dito ::: plugins/snippets-manager/snippets-global-variables.xml @@ +10,3 @@ + <global-variable name="year" is_command="true" ><![CDATA[date +%Y]]></global-variable> + + <global-variable name="email" is_command="false"><![CDATA[user@host]]></global-variable> This looks wrong. You can receive the mail from the preferences (as well as the user name) ::: plugins/language-manager/languages.xml @@ +10,3 @@ <language id="6" name="Vala" strings="vala" mime-types="text/x-vala" make-target=".o"/> <language id="7" name="JavaScript" strings="js,javascript" mime-types="application/javascript"/> + <language id="8" name="Perl" strings="perl" mime-types="application/x-perl"/> Have you checked these strings with scintilla, too?
Created attachment 167849 [details] [review] New version. A basic import/export feature added and also some bugs fixed.
Review of attachment 167849 [details] [review]: Looks good!
Review of attachment 167849 [details] [review]: OK, I found too many things that are not working to apply that now: * when inserting using autocompletion and you have fo<trigger autocopmletion here> you get "fofor (...)" * the language column isn't disabled when a file is in the editor * The interactive variables didn't work at all for me (or I wasn't aware how the should). When I inserted a for loop I should go the default values * Import/Export menu items do nothing * We need to rename "Snippets Browser" to "Snippets" because it wastes to much space otherwise * Would be cool to have the snippets icon instead of GTK_STOCK_FILE for the snippets browser * We really need far more snippets but that can wait for later
(In reply to comment #7) > Review of attachment 167849 [details] [review]: > > OK, I found too many things that are not working to apply that now: Wow ... looking now what's wrong. Except for the last 2 things, everything worked for me.
OK, sorry, I did something wrong while patching, anyway, these points are left: > * when inserting using autocompletion and you have fo<trigger autocopmletion > here> you get "fofor (...)" > * Would be cool to have the snippets icon instead of GTK_STOCK_FILE for the > snippets browser > * We really need far more snippets but that can wait for later Patch is applied in master though.
Review of attachment 167849 [details] [review]: Applied to master with some changes to the buttons.
> > * when inserting using autocompletion and you have fo<trigger autocopmletion > > here> you get "fofor (...)" Hmmmm, can't reproduce it. Does it happen all the time? Could you file a bug about it?
Closing as SoC is long over.