Commit Graph

32 Commits

Author SHA1 Message Date
Toshiaki Kameyama 4973d3c359 "Create enum constant" quick fix: handle trailing comman correctly
#KT-36461 Fixed
#KT-36462 Fixed
2020-05-27 02:38:41 +09:00
Toshiaki Kameyama 0497f0cba4 "Create enum constant" quick fix: add before semicolon
#KT-33718 Fixed
2019-09-24 19:31:52 +07:00
Toshiaki Kameyama d9d04fc556 "Create enum constant" quick fix: do not add redundant empty line
#KT-32981 Fixed
2019-09-24 13:23:06 +07:00
Dmitry Gridin 220cb95b85 Move caret to class name after creating it from "CreateFromUsage" action
Relates to #KT-24631
2019-03-15 17:27:06 +07:00
Mikhail Glukhikh 152327d69d Fix erroneous full resolve cache filling
Before this commit, we could store partial resolve results in full
resolve cache (for some declarations, e.g. primary constructors).
This may be done iff current partial resolve mode provides all results
from full resolve mode (CFA results & diagnostics).
Otherwise we should not do it.

This fixes four quick-fix tests on CreateTypeParameter
So #KT-23860 Fixed
So #KT-22758 Fixed
2018-06-20 17:18:18 +03:00
Alexey Sedunov 97a3d343f7 Create Class from Usage: Support nested classes
This covers the case when original expression doesn't contains qualifier
Also for local or inner containing classes:
  - forbid nested objects
  - add 'inner' to nested class declaration

 #KT-16404 Fixed
2017-08-04 16:48:36 +03:00
Valentin Kipyatkov 1fe6886a33 Fixed error message to quote parameter name 2017-05-20 23:44:20 +03:00
Dmitry Jemerov e2f75463d7 Rewrite AbstractQuickFixTest based on light fixture test case
Don't reconfigure runtime before every test. For consistency,
mark tests that require the runtime with directives instead of relying
on test file names.
2017-03-27 19:48:43 +02:00
Alexey Sedunov 834cdd63ab Create from Usage: Support class generation by class literal expression
#KT-16188 Fixed
2017-03-19 17:19:48 +03:00
Simon Ogorodnik 98269c10d8 KT-15744 Intention to import sleep wrongly suggests Thread.sleep
#KT-15744 fixed
2017-02-06 14:56:18 +03:00
Valentin Kipyatkov 17edbac72b Fixed test data 2016-08-29 13:38:18 +03:00
Alexey Sedunov a1e86e8bfa Create from Usage: Show target class name in the text of "Create member" quick fix
(cherry picked from commit a51d3fc)
2016-07-20 15:39:19 +03:00
Alexey Sedunov 1a13c21377 Create from Usage: Show receiver type in the text of "Create extension" quick fix
(cherry picked from commit c0d5df1)
2016-07-20 15:39:13 +03:00
Alexey Sedunov aa4bfadfb1 Intentions: Implement "Introduce local variable" intention
#KT-11768 Fixed
2016-04-19 20:27:37 +03:00
Alexey Sedunov 99e4c8c06d Create from Usage: Add commas after enum entries
#KT-10800 Fixed
2016-02-01 13:18:43 +03:00
Alexey Sedunov e517cbcf78 Quick Fixes: Implement "Rename unresolved reference" fix
#KT-8795 Fixed
2015-12-08 16:20:56 +03:00
Mikhail Glukhikh 4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Alexey Sedunov 929d06c86f Create from Usage: Implement 'Create property as constructor parameter' quick-fix
#KT-8426 Fixed
2015-10-20 18:39:47 +03:00
Alexey Sedunov d18a9f6d8a Create From Usage: Fix StackOverflowException on recursive type parameter bounds
#EA-69240 Fixed
2015-08-19 23:29:55 +03:00
Mikhail Glukhikh 076ac4f5ee Create class from usage fix: enum entries are created with new constructor syntax 2015-08-10 16:24:01 +03:00
Valentin Kipyatkov 2bd1362be6 Create function/property from usage: added "member" when appropriate + changed order 2015-06-29 19:29:25 +03:00
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00
Valentin Kipyatkov 0dc92c3ee8 QuickFixMultiFileTestGenerated - shorter test data files names 2015-05-27 16:15:44 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Dmitry Jemerov 9975bb8935 replace 'trait' keyword with 'interface' in user-visible messages and code generation tools 2015-05-12 11:49:37 +02:00
Valentin Kipyatkov 837e46a9b8 Big change in quickfix tests: no stupid test data format with "before" and "after" file prefixes 2015-05-08 22:29:42 +03:00
Alexey Sedunov ab5a691612 Create From Usage: Place generated declarations next to original element container if they have common parent
#KT-6687 Fixed
2015-03-11 23:33:55 +03:00
Alexey Sedunov 2af83c58c9 Create from usage: Use separate editor for templates which should be placed in Java files 2015-02-20 19:08:14 +03:00
Alexey Sedunov 60d02dab0f Create from usage: Support generation of nested Java classes from usages in Kotlin code 2015-02-20 17:28:40 +03:00
Alexey Sedunov 97b0f50d35 Create from usage (function/property): Suggest separate actions for extensions and non-extension declarations
#KT-6023 Fixed
2015-02-20 17:28:36 +03:00
Alexey Sedunov c487cc7838 Create From Usage: Do not generate unnecessary/skip necessary empty lines 2014-11-13 17:27:24 +03:00
Alexey Sedunov b8f68acdbb Create From Usage: Create class by reference expression 2014-11-11 14:42:42 +03:00