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 620018 - By reformatting a text or comment in eclipse, Orca speaks all the file contents
By reformatting a text or comment in eclipse, Orca speaks all the file contents
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: speech
2.30.x
Other All
: Normal normal
: 2.32.0
Assigned To: Jose Vilmar Estacio de Souza
Orca Maintainers
Depends on:
Blocks: 575776
 
 
Reported: 2010-05-29 11:21 UTC by Jose Vilmar Estacio de Souza
Modified: 2010-09-20 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
revision 1 (3.85 KB, patch)
2010-05-29 11:58 UTC, Jose Vilmar Estacio de Souza
reviewed Details | Review
revision 2 (1.50 KB, patch)
2010-06-21 19:57 UTC, Jose Vilmar Estacio de Souza
committed Details | Review

Description Jose Vilmar Estacio de Souza 2010-05-29 11:21:03 UTC
When I press ctrl+shift+f or ctrl+/ to comment or reformat a text in eclipse, orca reads all the content of the file.

This is because orca gets an object:text-changed:insert containing the entire content of the file and tries to speak it.
Comment 1 Jose Vilmar Estacio de Souza 2010-05-29 11:58:22 UTC
Created attachment 162265 [details] [review]
revision 1

Basically the patch ignores the text if ctrl+shift+f or ctrl+/ is pressed. Also included check to some duplicate events.
Something strange in my machine is that although I press ctrl+/, what appears in the debug output is (_), so I am checking if "_" wass pressed.
It is working.
Comment 2 Joanmarie Diggs (IRC: joanie) 2010-05-30 02:41:45 UTC
That's one approach for such a situation. Given how receptive the Eclipse folks are, let me toss out another for your consideration:

There's nothing preventing them from qualifying text changed events. Gecko does this, and it comes in handy. Capture a debug.out from Thunderbird when you reply to a message. The object:text-changed:insert event associated with the addition of the quoted message is actually an object:text-changed:insert:system event. The 'system' tells us that the app -- and not the user -- caused the text to get inserted.

Examples:
* You typed text: no system
* You pasted text: no system
* You replied to a message and the quoted message was added: system
* A live region added text to the web page: system

The sorts of places I'd like to see text-changed events be qualified with 'system' include:

* bullets and numbers auto-inserted by OOo Writer into your document
* autocompleted/suggested text inserted by Writer into your document
* this particular case -- and any similar cases in Eclipse

Note that if this change is made by the Eclipse developers, it would not break anything for us. Back when the Gecko guys did this (a couple of years ago I think), we went back and changed every single blessed instance in Orca of

    event.type == "foo:bar"

to

    event.type.startswith("foo:bar")

Since you are much more in contact with the Eclipse team than I, would you mind asking Silenio for his opinion on this? If he's willing to do it a) Thank him profusely for me and b) Check out this patch I created for Thunderbird [1]. I suspect you'd be able to do something very similar.

[1] http://bugzilla-attachments.gnome.org/attachment.cgi?id=161106
Comment 3 Jose Vilmar Estacio de Souza 2010-05-30 06:49:54 UTC
(In reply to comment #2)
> That's one approach for such a situation. Given how receptive the Eclipse folks
> are, let me toss out another for your consideration:
> 
> There's nothing preventing them from qualifying text changed events. Gecko does
> this, and it comes in handy. Capture a debug.out from Thunderbird when you
> reply to a message. The object:text-changed:insert event associated with the
> addition of the quoted message is actually an object:text-changed:insert:system
> event. The 'system' tells us that the app -- and not the user -- caused the
> text to get inserted.
> 
The following bug in eclipse with what you are suggesting was opened::
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314996

Since they are releasing a new version, I am not sure if this will be treated now.

Assuming that patch is ok, it could be commit and the ticket stays opened until a better solution appears.
Comment 4 Joanmarie Diggs (IRC: joanie) 2010-05-30 15:15:46 UTC
> The following bug in eclipse with what you are suggesting was opened::
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=314996

Awesome. Thanks so much!!

> Since they are releasing a new version, I am not sure if this will be treated
> now.

Understood.

> Assuming that patch is ok, it could be commit and the ticket stays opened until
> a better solution appears.

I'd prefer to just fix it right the first time. And it will be a simpler, more reliable, more comprehensive fix on our side if the Eclipse team is willing to make the proposed change on theirs.

And don't forget: While the Eclipse team might be approaching the end of their cycle, we're still early in the GNOME cycle. So we can wait for a while to see what happens on the Eclipse side of things. One way or the other, this will be fixed for GNOME 3.0. I promise.

Is that alright with you?
Comment 5 Jose Vilmar Estacio de Souza 2010-05-30 20:48:41 UTC
(In reply to comment #4)
> 
> > Assuming that patch is ok, it could be commit and the ticket stays opened until
> > a better solution appears.
> 
> I'd prefer to just fix it right the first time. And it will be a simpler, more
> reliable, more comprehensive fix on our side if the Eclipse team is willing to
> make the proposed change on theirs.
> 
> And don't forget: While the Eclipse team might be approaching the end of their
> cycle, we're still early in the GNOME cycle. So we can wait for a while to see
> what happens on the Eclipse side of things. One way or the other, this will be
> fixed for GNOME 3.0. I promise.
> 
> Is that alright with you?
Yes, thanks.
Comment 6 Joanmarie Diggs (IRC: joanie) 2010-06-12 19:35:07 UTC
Comment on attachment 162265 [details] [review]
revision 1

Sorry for the spam. Setting to 'reviewed' to get it off of the 'patches without a response' list.
Comment 7 Jose Vilmar Estacio de Souza 2010-06-21 19:57:23 UTC
Created attachment 164243 [details] [review]
revision 2

Seems that I found a simple solution, not based in events raised by the keybord.
Comment 8 Joanmarie Diggs (IRC: joanie) 2010-06-23 21:01:23 UTC
Review of attachment 164243 [details] [review]:

Nice! Much better solution. I've gone ahead and committed it to master. Feel free to close out this bug as FIXED if there's no more work to be done.