Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Completion API Options #4933

Merged
merged 5 commits into from
Sep 2, 2015

Conversation

DustinCampbell
Copy link
Member

Makes progress on #3538.

This change threads an OptionSet through the completion API and removes the smelly "IsDebugger" and "IsImmediateWindow" properties from CompletionTriggerInfo

Reviewers: @rchande, @dpoeschl, @CyrusNajmabadi, @balajikris, @brettfo, @Pilchie, @jasonmalinowski, @davkean, @jmarolf

Additionally, the IsDebugger and IsImmediateWindow properties have been removed from CompletionTriggerInfo. Any code that was checking these properties now checks for options that are set by the Controller in debugger scenarios.
}
else
{
return null;
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason we return null here instead of an empty CompletionList value (if that's even possible)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion. I'll return an empty CompletionList here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or rather an empty Task<CompletionList>

@CyrusNajmabadi
Copy link
Member

Overall I love this. My feedback is just nits.

@DustinCampbell DustinCampbell added this to the 1.1 milestone Sep 1, 2015
@DustinCampbell
Copy link
Member Author

retest this please

DustinCampbell added a commit that referenced this pull request Sep 2, 2015
@DustinCampbell DustinCampbell merged commit 6e5e9db into dotnet:master Sep 2, 2015
if (options.GetOption(CompletionOptions.AlwaysShowBuilder))
{
var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
builder = this.CreateEmptyBuilder(text, position);
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Should you show the specific builder with it's text if there is one, even if the option is true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that seems a good idea. This is consistent with our existing behavior, but that's better behavior. 😄 I'll file a bug.

@Pilchie
Copy link
Member

Pilchie commented Sep 4, 2015

Late to the party, but this looks great.

@DustinCampbell DustinCampbell deleted the completion-options branch October 13, 2015 16:08
@DustinCampbell DustinCampbell restored the completion-options branch October 13, 2015 16:09
@DustinCampbell DustinCampbell deleted the completion-options branch October 13, 2015 16:09
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