GNOME Bugzilla – Bug 668730
Query members of a struct does not always work as intended
Last modified: 2012-03-12 16:10:51 UTC
Created attachment 206166 [details] [review] Patch that illustrates the described bug. The test case is the patch inlined from http://mail.gnome.org/archives/anjuta-devel-list/2012-January/msg00018.html . There's also some interesting discussion on the corresponding thread and here: https://bugzilla.gnome.org/show_bug.cgi?id=668438 . Steps to reproduce it: * Apply the inlined patch * Create a new GtkApplication (using the "new project wizard") * Open the .ui file and the corresponding .c file, * Visualize the .c file (so that it becomes the "current document") * Add a member to the corresponding _*Private struct (eg: _ApplicationPrivate) * Save the .c file * Double click a widget in the glade inspector. The patch generates some output to check the members for the corresponding _*Private struct members. Even when there are members, the output says it has no members. This indicates that ianjuta_symbol_query_search_members is returning NULL when it should not. Patch is attached to simplify testing.
pescio@tal:~/gitroot/anjuta$ git apply bug-668730.diff bug-668730.diff:58: trailing whitespace. error: patch failed: plugins/language-support-cpp-java/plugin.c:827 error: plugins/language-support-cpp-java/plugin.c: patch does not apply I cannot apply the patch. Could you please check it? I'm trying with current master. Thanks.
Created attachment 209310 [details] [review] Patch that illustrates the described bug. Updated the patch to current master. Please re-test it.
Created attachment 209392 [details] ajnuta-window It doesn't output anything here. As you can see from the screenshot, the caret is placed in the _Gtkfoobar2Private struct (which I had to create manually) and I double clicked the 'window GtkWindow' on the up-right side. Nothing happened. Am I missing something?
There's something wrong with the test case: the private struct is missing the marker comment: /* ANJUTA: Widgets declaration for [+NameHLower+].ui - DO NOT REMOVE */. That's probably the reason it is not generating any output. Did you remove the marker comment?
(In reply to comment #4) > There's something wrong with the test case: the private struct is missing the > marker comment: /* ANJUTA: Widgets declaration for [+NameHLower+].ui - DO NOT > REMOVE */. > > That's probably the reason it is not generating any output. > > Did you remove the marker comment? No, I didn't remove it, nor I get it autogenerated. There should be some problems in the template generation. Adding /* ANJUTA: Widgets declaration for gtk_foobar1.ui - DO NOT REMOVE */ and clicking the list works.
ok I've seen that there's a problem.
Could you please test now? I've just committed a patch on master.
I'd just tested anjuta master. The problem is gone.
Fine. Closing this bug.