Skip to content

#34, #110 - suppress Intellisense in strings and comments #339

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

Merged
merged 19 commits into from
Dec 5, 2017
Merged

#34, #110 - suppress Intellisense in strings and comments #339

merged 19 commits into from
Dec 5, 2017

Conversation

MikhailArkhipov
Copy link

@MikhailArkhipov MikhailArkhipov commented Dec 4, 2017

  • Basic tokenizer based on RTVS (comments and strings), can be extended as needed
  • Supporting classes
  • Tests

Closes #34 , #110

Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Please ensure all files end with blank line.
Please install the EditorConfig extension for vscode, that'll help.

Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Please ensure all files end with blank line.
Please install the EditorConfig extension for vscode, that'll help.

@DonJayamanne
Copy link

Tough to review in the phone, however I failed to notice any test for this feature. I.e. disable intellisense when inside a string. I think we'll need that.

Over all 👍

@MikhailArkhipov
Copy link
Author

Yes Will do

@brettcannon
Copy link
Member

Do we have an issue(s) tracking this change?

@MikhailArkhipov
Copy link
Author

#34, #110

@@ -0,0 +1,84 @@
'use strict';

Choose a reason for hiding this comment

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

Please rename file to types.ts (that'll be the standard going forward, documented in standards document)

Choose a reason for hiding this comment

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

Ensure types.ts only contain interfaces. I.e. please move TextRange out into septate file

Copy link
Author

Choose a reason for hiding this comment

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

Actually it is used as both interface and direct type (i.e. new TextRange). Types that are not normally used directly, are in separate files. So basically definitions is public surface.

@@ -0,0 +1,131 @@
'use strict';

Choose a reason for hiding this comment

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

Please add Microsoft license header to all new files.
Also please remove use strict (not necessary)

Copy link
Author

Choose a reason for hiding this comment

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

Can't find the license header sample, where is the template

Copy link
Author

Choose a reason for hiding this comment

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

NVM, found it

Copy link
Member

Choose a reason for hiding this comment

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

assert(vscode.window.activeTextEditor, 'No active editor');
textEditor = editor;
for (let i = 0; i < positions.length; i += 1) {
vscode.commands.executeCommand<vscode.CompletionList>('vscode.executeCompletionItemProvider',

Choose a reason for hiding this comment

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

I don't think the tests will work. Theoretically this should fail. Since this is an async operation, we have to wait for this to complete.
In line 211, we're basically saying we're all done, when in fact the code in line 204 is still running, i.e. tests won't/shouldn't work.

You'll have to wait for executeCommand to complete as done in line 117.

You could build a list of promises and then use Promise.all() or other mechanism.. But we need to wait for the completion of each.

Choose a reason for hiding this comment

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

@MikhailArkhipov this needs to be done.

@@ -8,6 +8,7 @@ testRunner.configure({
ui: 'tdd',
useColors: true,
timeout: 25000,
retries: 3
retries: 3,
grep: "Language.TextRangeCollection"

Choose a reason for hiding this comment

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

Oops, please remove this line.

Choose a reason for hiding this comment

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

@MikhailArkhipov this needs to be done

@MikhailArkhipov MikhailArkhipov merged commit 1150480 into microsoft:master Dec 5, 2017
@brettcannon
Copy link
Member

And with that, @MikhailArkhipov is now the 19th most prolific contributor to the extension! 😄

DonJayamanne added a commit that referenced this pull request Dec 14, 2017
* upstream/master:
  #34, #110 - suppress Intellisense in strings and comments (#339)
  Re-factor code python execution framework  (#345)
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocompletion triggered inside strings and comments
3 participants