After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668730 - Query members of a struct does not always work as intended
Query members of a struct does not always work as intended
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: symbol-db
unspecified
Other Linux
: Urgent major
: ---
Assigned To: Massimo Cora'
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-26 11:13 UTC by Marco Diego Aurélio Mesquita
Modified: 2012-03-12 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that illustrates the described bug. (4.33 KB, patch)
2012-01-26 11:13 UTC, Marco Diego Aurélio Mesquita
none Details | Review
Patch that illustrates the described bug. (3.33 KB, patch)
2012-03-09 11:37 UTC, Marco Diego Aurélio Mesquita
none Details | Review
ajnuta-window (135.28 KB, image/png)
2012-03-10 15:25 UTC, Massimo Cora'
  Details

Description Marco Diego Aurélio Mesquita 2012-01-26 11:13:28 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.
Comment 1 Massimo Cora' 2012-03-08 23:14:05 UTC
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.
Comment 2 Marco Diego Aurélio Mesquita 2012-03-09 11:37:46 UTC
Created attachment 209310 [details] [review]
Patch that illustrates the described bug. 

Updated the patch to current master. Please re-test it.
Comment 3 Massimo Cora' 2012-03-10 15:25:14 UTC
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?
Comment 4 Marco Diego Aurélio Mesquita 2012-03-10 17:56:07 UTC
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?
Comment 5 Massimo Cora' 2012-03-11 10:15:23 UTC
(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.
Comment 6 Massimo Cora' 2012-03-11 10:28:15 UTC
ok I've seen that there's a problem.
Comment 7 Massimo Cora' 2012-03-11 12:07:38 UTC
Could you please test now?
I've just committed a patch on master.
Comment 8 Marco Diego Aurélio Mesquita 2012-03-12 13:09:15 UTC
I'd just tested anjuta master. The problem is gone.
Comment 9 Massimo Cora' 2012-03-12 16:10:51 UTC
Fine.
Closing this bug.