Skip to content

Conversation

@CyrusNajmabadi
Copy link
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Feb 2, 2017

@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
Copy link
Contributor Author

Tagging @dotnet/roslyn-ide .

@DustinCampbell
Copy link
Member

cc @mattwar for API changes

public override string ToString() => DisplayText;

internal bool ShouldBeFilteredOutOfCompletionList(
ImmutableDictionary<CompletionItemFilter, bool> filterState)
Copy link
Contributor

@mattwar mattwar Feb 2, 2017

Choose a reason for hiding this comment

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

Does this function belong on this type? It doesn't use any of the class's state. It seems to be an operation concerned with the behavior of filtering and not the representation of the data that is the completion item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll find a good home for it.

/// <summary>
/// The default <see cref="CompletionTrigger"/> when none is specified.
/// </summary>
[Obsolete("Do not use.", error: true)]
Copy link
Contributor

Choose a reason for hiding this comment

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

[Obsolete("Do not use.", error: true)] [](start = 8, length = 38)

It seems bizarre to have a Default that should not be used. Should the default just be changed to default to Invoke instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that. part o the reason i wanted to make this change was to force people to have to think about what they were doing. But i think it's acceptably reasonable to have hte 'Default' and having it be set to 'Invoke'.

@CyrusNajmabadi
Copy link
Contributor Author

Ok. Have responded to PR feedback.

@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
Deletion,
NonInsertionOrDeletion,
#if false
// If necessary, we could add additional filter reasons. For example, for the below items.
Copy link
Member

Choose a reason for hiding this comment

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

This comment feels much like "I'm commenting out code I thought I needed". Perhaps rewrite to more clear prose?

// 2. They brough up completion with ctrl-j or through deletion. In these
// cases we just always keep all the items in the list.

var wasTriggeredByDeleteOrSimpleInvoke =
Copy link
Member

Choose a reason for hiding this comment

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

Reorder these to match the cases above.

Copy link
Member

Choose a reason for hiding this comment

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

But massive thanks for actually explaining in English what the heck this is trying to do.

internal enum CompletionFilterReason
{
Insertion,
Deletion,
Copy link
Member

Choose a reason for hiding this comment

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

Please add a doc comment explaining this is either delete or backspace.

{
internal partial class Session
{
private struct FilterResult
Copy link
Member

Choose a reason for hiding this comment

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

File name here isn't matching the nesting structure.

@CyrusNajmabadi CyrusNajmabadi merged commit 4e39d36 into dotnet:post-dev15 Feb 3, 2017
@CyrusNajmabadi CyrusNajmabadi deleted the completionFiltering branch January 25, 2020 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants