AvalonEdit icon indicating copy to clipboard operation
AvalonEdit copied to clipboard

AutomationPeer editor extension

Open sloutsky opened this issue 4 years ago • 6 comments

Add extension to text editor that allows to inject automation peer that represents IntelliSense suggestion list and the currently selected suggestion - to allow screen narrators to read the suggestion.

sloutsky avatar Dec 27 '21 08:12 sloutsky

Thank you very much for your pull request! The changes are looking good, just a few remarks:

  1. Can you please clean up the commits? 3 of the 4 commits in this pull request are not related to the actual change.
  2. Can you please rename/remove all references to "IntelliSense"... AvalonEdit uses the word "CodeCompletion", we want to prevent any confusion.

If you don't have time to apply these changes, I can do that for you once we merge this.

I will have to take a closer look and test how Narrator behaves now.

siegfriedpammer avatar Dec 27 '21 12:12 siegfriedpammer

I have renamed the property. Now I need to figure how to get rid of the "bad commits"

sloutsky avatar Dec 27 '21 13:12 sloutsky

I normally use the gitk UI tool for this as it's more convenient and you don't have to remember commit hashes. Also the command-line instructions might not use the minimal amount of commands.

Assuming you are on the correct branch:

use git log to find the commit hashes of all the commits you want to keep.

If you want to merge the "Renaming property name" commit and the first commit into one, you can use steps in 4, otherwise just skip those.

  1. git reset --hard origin/master resets everything to the original state (this is a destructive action for all code that is not committed!)
  2. git pull --rebase https://github.com/icsharpcode/AvalonEdit.git master gets the latest code from our repo (if your origin/master already has the latest revision, you can omit this)
  3. git cherry-pick <commit-hash> for every commit you want to add
  4. If you want to merge two commits you can do (assuming HEAD points to commit-hash1 now):
  • git cherry-pick <commit-hash2>
  • git reset --mixed <commit-hash1>
  • git commit --amend
  1. git push --force to reset the pull request branch and remove the unwanted commits.

Hope this helps!

siegfriedpammer avatar Dec 27 '21 14:12 siegfriedpammer

Looks like this didn't work out as expected. If you want, I can just clean it up manually before merge.

siegfriedpammer avatar Dec 27 '21 14:12 siegfriedpammer

Yep, indeed - it looks I've messed this up. If you can handle this upon merge - this would be great!

sloutsky avatar Dec 27 '21 14:12 sloutsky

Hmmm, it seems, this change currently does not provide a out-of-the-box solution for users of AvalonEdit. I would have expected Narrator to properly work out-of-the-box with how we currently use/instantiate the CompletionWindow in the sample application:

https://github.com/icsharpcode/AvalonEdit/blob/395ef8166870e2c6e1f63a7d97ac22e5e646e790/ICSharpCode.AvalonEdit.Sample/Window1.xaml.cs#L124-L154

Seems like I will have to dig around to get this to work properly like in VS. Thanks anyway for the starting point.

siegfriedpammer avatar Dec 28 '21 21:12 siegfriedpammer