Eclipse autocompletion support#9297
Conversation
* Rework of `EclipseTextArea.script_readDocumentation`. * Moved all cleaning code to `EclipseTextArea.event_suggestionsClosed`. * Revision of `SelectionItem.event_selection`. * Misc: Some detailed comments.
|
CC @LeonarddeR What do you think about trying this approach for Visual Studio? |
| if self.appModule.selectedItem and not self.appModule.selectedItem.name: | ||
| self.event_suggestionsClosed() | ||
| self.appModule.selectedItem = None | ||
| except: |
There was a problem hiding this comment.
What exceptions are likely here? Would logging something help when debugging this pathway?
| braille.handler.handleReviewMove() | ||
| sayAllHandler.readText(sayAllHandler.CURSOR_REVIEW) | ||
|
|
||
| while obj: |
There was a problem hiding this comment.
Could you put this loop in a function with a name that describes what it is doing? In general I would like to see obj renamed to be more descriptive (and split into separate references where the intent is different) to describe what each is supposed to be.
There was a problem hiding this comment.
This is the only place where this code is used, so I don't know why split this into another function.
There was a problem hiding this comment.
Re-use is one reason to split code up, another is to improve the readability. You can hide the details, and replace it with an expressive name. This reduces the number of variables a reader has to keep track of, and provides them with a higher level at which to read the code. This reduces the control flow in the function so the high level approach is more obvious.
|
|
||
| # Fixme: I picked up this from UIA SuggestionItem | ||
| braille.handler.message(braille.getBrailleTextForProperties(name=self.name, role=self.role, position=self.positionInfo)) | ||
| # Fixme: I picked up this from UIA SuggestionItem for rendering in braille. |
There was a problem hiding this comment.
Thanks for adding a description of what is wrong with the alternatives. Could you also add what is wrong with this approach? The "Fixme" text indicates that there is still a problem, but it is not clear what it is.
There was a problem hiding this comment.
Hello @feerrenrut,
No, I don't think that this is a problem. I just am unsure if this is the right way. If you consider this is the best and correct approach I can remove this comment.
I don't have a Braille display to test this.
Cheers,
Link to issue number:
Closes #5667
Summary of the issue:
The issue is that when writing code in the editor you need to focus the popup to know what items are on it. This aims to solve this particular problem.
Description of how this pull request fixes the issue:
It detects the popup and read the selected item as it changes.
This also includes a little script to read javadoc right from the editor.
I tried to avoid relations with the OS controls.
Testing performed:
I tested it against java and XML editors. It works well, but in XML it will not read any documentation.
Known issues with pull request:
Change log entry:
Section: New features