Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tweak completion filtering behavior. #2 #16894

Merged
merged 14 commits into from
Feb 3, 2017

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Feb 2, 2017

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems?id=362890

This is a more extensive change thatn #16892. Here, we also remove the 'recheckCaretPosition' check since that can be inferred from a FilterReason of 'CaretPositionChanged'.

@CyrusNajmabadi CyrusNajmabadi added the PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it. label Feb 2, 2017
@CyrusNajmabadi CyrusNajmabadi changed the title Completion filtering2 Tweak completion filtering behavior. #2 Feb 2, 2017
/// Completion was triggered with a request to commit if a unique item would be selected
/// (ctrl-space in Visual Studio).
/// </summary>
InvokeAndCommitIfUnique
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback welcome on the names 'Invoke' and 'InvokeAndCommitIfUnique'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VS commands are called list members and complete word. I like complete word but not list members.

@CyrusNajmabadi
Copy link
Member Author

tagging @dotnet/roslyn-ide This simplifies some of our code around filtering completion lists, moving as much as possible to one location, and providing a very simple API with very few knobs for consumers to get wrong.

@CyrusNajmabadi CyrusNajmabadi removed the PR For Personal Review Only The PR doesn’t require anyone other than the developer to review it. label Feb 2, 2017
dismissIfEmptyAllowed: dismissIfEmptyAllowed);
}
}
//private void FilterToSomeOrAllItems(bool filterItems, bool dismissIfEmptyAllowed, CompletionFilterReason filterReason)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're looking at an old review :)

// moved out of bounds of the items, then we'll dismiss. Also queue up an insertion.
// that way we go and filter things properly to ensure that the list contains the
// appropriate items.
sessionOpt.FilterModel(CompletionFilterReason.CaretPositionChanged, filterState: null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, lots of cryptic flags removed.

@CyrusNajmabadi CyrusNajmabadi merged commit c734143 into dotnet:post-dev15 Feb 3, 2017
@CyrusNajmabadi CyrusNajmabadi deleted the completionFiltering2 branch February 3, 2017 22:34
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants