Commit graph

7 commits

Author SHA1 Message Date
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 ed4e2e6e3b Ensure that emitter calls callbacks (#18284)
* Ensure that emitter calls calbacks

* Move new parameter to end of parameters

* Fix for ConditionalExpression

* Make suggested changes to emitter

* Fix parameter ordering

* Respond to minor comments

* Remove potentially expensive assertion

* More emitter cleanup
2017-09-07 14:30:19 -07:00
Andy b533b24686 extractMethod: Don't try to extract a single token (#18090)
* extractMethod: Don't try to extract a single token

* Update tests
2017-09-07 07:28:12 -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