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 750703 - JNI: jaw_object_peek_parent is missing.
JNI: jaw_object_peek_parent is missing.
Status: RESOLVED FIXED
Product: java-atk-wrapper
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Magdalen Berns (irc magpie)
java-atk-wrapper maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-10 13:04 UTC by Magdalen Berns (irc magpie)
Modified: 2015-06-21 23:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to address problem (1.66 KB, patch)
2015-06-10 13:06 UTC, Magdalen Berns (irc magpie)
committed Details | Review

Description Magdalen Berns (irc magpie) 2015-06-10 13:04:50 UTC
The AtkObject class doesn't have a pointer to peek_parent but there is a public method atk_object_peek_parent. jaw_object_peek_parent can be implemented without wrapping a specific java method
Comment 1 Magdalen Berns (irc magpie) 2015-06-10 13:06:21 UTC
Created attachment 304968 [details] [review]
Patch to address problem
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2015-06-10 17:07:54 UTC
(In reply to Magdalen Berns (irc magpie) from comment #0)
> The AtkObject class doesn't have a pointer to peek_parent but there is a
> public method atk_object_peek_parent. jaw_object_peek_parent can be
> implemented without wrapping a specific java method

atk_object_peek_parent is not intended to be implemented by ATK implementors (like JAW in this case). Take a look to atk_object_peek_parent:

 * This method is intended as an utility for ATK implementors, and not
 * to be exposed to accessible tools. See atk_object_get_parent() for
 * further reference.

So it is a way to say that atk_object_peek_parent is intended to be used by JAW if needed, but not reimplemented by JAW itself.

(In reply to Magdalen Berns (irc magpie) from comment #1)
> Created attachment 304968 [details] [review] [review]
> Patch to address problem

And this implementation is wrong. It returns the parent as returned by jaw_object_get_parent. Take a look to atk_object_peek_parent documentation:

 * Gets the accessible parent of the accessible, if it has been
 * manually assigned with atk_object_set_parent. Otherwise, this
 * function returns %NULL.

You can find more details on why and how this method was added on bug 720095.
Comment 3 Magdalen Berns (irc magpie) 2015-06-21 23:18:55 UTC
Thanks, this is really useful.

(In reply to Alejandro Piñeiro Iglesias (IRC: infapi00) from comment #2)
> (In reply to Magdalen Berns (irc magpie) from comment #0)
> > The AtkObject class doesn't have a pointer to peek_parent but there is a
> > public method atk_object_peek_parent. jaw_object_peek_parent can be
> > implemented without wrapping a specific java method
> 
> atk_object_peek_parent is not intended to be implemented by ATK implementors
> (like JAW in this case). Take a look to atk_object_peek_parent:
> 
>  * This method is intended as an utility for ATK implementors, and not
>  * to be exposed to accessible tools. See atk_object_get_parent() for
>  * further reference.
> 
> So it is a way to say that atk_object_peek_parent is intended to be used by
> JAW if needed, but not reimplemented by JAW itself.

I was thinking something this might well be the case since reading your comments on bug 750587.

I think given this advice, I should probably revise my list so it is only concerned about creating implementers from function pointers because at the moment it seems to have a lot of functions which are from the public API listed (as long as this makes sense to you too).
  
> (In reply to Magdalen Berns (irc magpie) from comment #1)
> > Created attachment 304968 [details] [review] [review] [review]
> > Patch to address problem
> 
> And this implementation is wrong.

Just as well I reverted it earlier today :/ thanks for the review.

> It returns the parent as returned by
> jaw_object_get_parent. Take a look to atk_object_peek_parent documentation:
> 
>  * Gets the accessible parent of the accessible, if it has been
>  * manually assigned with atk_object_set_parent. Otherwise, this
>  * function returns %NULL.
> 
> You can find more details on why and how this method was added on bug 720095.

OK Thanks again, I will take a look!