Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Sccarda/loop range simplify code action #84

Merged

Conversation

ScottCarda
Copy link

This adds a code action that replaces range expressions in for loops with a call to IndexRange, if equivalent. It will also add the appropriate open directive if IndexRange is not known in the current namespace.
Based off of this Issue: #80

@bettinaheim bettinaheim changed the base branch from master to features/hackathon August 13, 2019 03:36
@bettinaheim bettinaheim reopened this Aug 16, 2019
@bettinaheim bettinaheim changed the base branch from features/hackathon to hackathon August 16, 2019 22:13
Copy link
Contributor

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

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

Merging this into a separate branch to make it easier to resolve conflicts.

@bettinaheim bettinaheim merged commit 52ba7bd into microsoft:hackathon Aug 19, 2019
rsoiffer pushed a commit that referenced this pull request Sep 3, 2019
* Updating QDK to latest version. (#53)

* Fixing doc gen call (#39)

* fixing doc gen call

* adding a test for docs generation

* need to generate docs for source files only such that we can build the docs for muliple dlls without interferences

* forgot to check if the dictionary exists before clearning it in test

* Updating qdk to latest version

* Fixing vs code extension build script on linux (#56)

* fixing a stackoverflow for large files (#55)

* Build VS Code dependencies from either pwsh or powershell. (#59)

* Add automatic indentation to Visual Studio extension (#60)

* Add automatic indentation to Visual Studio extension

* Find the indentation of the last non-empty line

The previous line can be empty, which would reset the indentation to 0 if e.g. you pressed enter twice in a row. Loop backwards to find the last non-empty line and use that line's indentation instead.

* Remove assumption from GetLastNonEmptyLine

* Move QsSmartIndentProvider to the top of the file

* Flip order of ternary operator in GetIndentation

* Add doc comment to GetDesiredIndentation

* Add note about nullable return type of GetDesiredIndentation

* Show signature help for the first argument (#63)

We also trigger signature help on "("

* Always log exceptions from file queries in debug mode (#70)

* Handling specialization redeclarations (#85)

* Add install template and new project commands to VS Code extension. (#79)

* Compile time errors for overflowing int and double literals (#87)

* Fixed type inference issues with ITuple active patterns (#95)

* Pack command line compiler as tool. (#96)

* fixing a bug that caused statements once excluded not to be reincluded into the compilation (#102)

* Correct range information upon type resolution (#104)

* removing required framework version from vs templates (#106)

* Ignore whitespace-only lines when determining indentation (#88)

* Support for conjugations as statements - Part1 (#99)

* Error handling for open-ended ranges (#111)

* adding missing cases to syntax extensions (#115)

* Support for Conjugations as Statements - Part II (#114)

* Fixed a bug that was causing namespaces to be printed incorrectly (#127)

* Merging in updates from master (#129)

* splitting out code actions and symbol info into their own files (#117)

*  Code Action for Replacing Deprecated Unit Type(#73) (#118)

* Code Actions for deprecated NOT, AND, and OR (#72) (#119)

* Add code action for updating deprecated operation characteristics syn… (#120)

* Code Action for Adding Doc Comments (#90) (#121)

* Adding simple array item update code action (#91) (#122)

* Code Action for Removing Unexecuted Code (#76) (#123)

* Code Action for IndexRange Suggestions (#84) (#124)

* giving an error for returning from apply-blocks (#134)

* avoid breaking a publicly accessible method (#137)

* Adding a folder with target examples for easy testing (#140)

* Show stack trace when logging exceptions in the language server (#142)

* Trim the syntax tree by default (#144)

* minor addition to the doc comment code action

* Naive fix for conjugations (#147)

* Publishing outdated header and semantic diagnostics until the updates have been computed (#151)

* two things I missed when merging
bamarsha pushed a commit that referenced this pull request Sep 3, 2019
* Updating QDK to latest version. (#53)

* Fixing doc gen call (#39)

* fixing doc gen call

* adding a test for docs generation

* need to generate docs for source files only such that we can build the docs for muliple dlls without interferences

* forgot to check if the dictionary exists before clearning it in test

* Updating qdk to latest version

* Fixing vs code extension build script on linux (#56)

* fixing a stackoverflow for large files (#55)

* Build VS Code dependencies from either pwsh or powershell. (#59)

* Add automatic indentation to Visual Studio extension (#60)

* Add automatic indentation to Visual Studio extension

* Find the indentation of the last non-empty line

The previous line can be empty, which would reset the indentation to 0 if e.g. you pressed enter twice in a row. Loop backwards to find the last non-empty line and use that line's indentation instead.

* Remove assumption from GetLastNonEmptyLine

* Move QsSmartIndentProvider to the top of the file

* Flip order of ternary operator in GetIndentation

* Add doc comment to GetDesiredIndentation

* Add note about nullable return type of GetDesiredIndentation

* Show signature help for the first argument (#63)

We also trigger signature help on "("

* Always log exceptions from file queries in debug mode (#70)

* Handling specialization redeclarations (#85)

* Add install template and new project commands to VS Code extension. (#79)

* Compile time errors for overflowing int and double literals (#87)

* Fixed type inference issues with ITuple active patterns (#95)

* Pack command line compiler as tool. (#96)

* fixing a bug that caused statements once excluded not to be reincluded into the compilation (#102)

* Correct range information upon type resolution (#104)

* removing required framework version from vs templates (#106)

* Ignore whitespace-only lines when determining indentation (#88)

* Support for conjugations as statements - Part1 (#99)

* Error handling for open-ended ranges (#111)

* adding missing cases to syntax extensions (#115)

* Support for Conjugations as Statements - Part II (#114)

* Fixed a bug that was causing namespaces to be printed incorrectly (#127)

* Merging in updates from master (#129)

* splitting out code actions and symbol info into their own files (#117)

*  Code Action for Replacing Deprecated Unit Type(#73) (#118)

* Code Actions for deprecated NOT, AND, and OR (#72) (#119)

* Add code action for updating deprecated operation characteristics syn… (#120)

* Code Action for Adding Doc Comments (#90) (#121)

* Adding simple array item update code action (#91) (#122)

* Code Action for Removing Unexecuted Code (#76) (#123)

* Code Action for IndexRange Suggestions (#84) (#124)

* giving an error for returning from apply-blocks (#134)

* avoid breaking a publicly accessible method (#137)

* Adding a folder with target examples for easy testing (#140)

* Show stack trace when logging exceptions in the language server (#142)

* Trim the syntax tree by default (#144)

* minor addition to the doc comment code action

* Naive fix for conjugations (#147)

* Publishing outdated header and semantic diagnostics until the updates have been computed (#151)
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.

3 participants