Commit graph

6 commits

Author SHA1 Message Date
Andrew Casey 2ea4cfe23b Insert a line break before a function at EOF if needed
This is a pre-existing issue that became more obvious after refining
trivia handling.
2017-10-12 14:19:36 -07:00
Andrew Casey 3eea1a9e9a Generalize extract method to handle constants as well
Major changes:

1) Instead of skipping undesirable scopes, include them and mark them
with errors.  Constants can be extracted into more scopes.

2) Update the tests to call through the "public" API.  This caused some
baseline changes.

3) Rename refactoring to "Extract Symbol" for generality.

4) Return a second ApplicableRefactorInfo for constants.  Distinguish
the two by splitting the action name.
2017-09-26 17:29:34 -07:00
Andy c3199c7772 extractMethod: Support renameLocation (#18050)
* extractMethod: Support renameLocation

* Add tslint disable

* Properly analyze list of changes to always get a correct rename location

* Update test

* Ensure name is really unique

* Improvements to test code

* Respond to PR comments
2017-09-13 09:02:10 -07:00
Andy e51e91dd2c Change wording of scope description (#18342) 2017-09-09 05:52:52 -07:00
Andy 3a0ab74ed6 Test for action description of code actions, and simplify description for extracting method to file (#18030)
* Test for action description of code actions, and simplify description for extracting method to file

* Add unit test file missing from tsconfig.json (only affects gulp) and update tests

* Use the actual number

* Use "module scope" or "global scope" instead of "this file"
2017-08-25 09:53:28 -07:00
Ryan Cavanaugh c7f665faa1 Extract Method (squash) 2017-08-04 16:10:33 -07:00