Commit Graph

661 Commits

Author SHA1 Message Date
Mikhail Glukhikh 9c15db93d9 Inline: more accurate handling of type arguments
Partial revert of b8cc7c2ca6
Soften requirements in remove type arguments intention in this mode
So #KT-17622 Fixed
Related to KT-17623
2017-05-31 12:47:50 +03:00
Mikhail Glukhikh 38d6c597a3 Handle expected type more precisely in RemoveExplicitTypeArguments
So #KT-17623 Fixed
2017-05-31 12:46:59 +03:00
Valentin Kipyatkov c69375ebdc Remove redundant curly braces in string templates on inline 2017-05-26 16:37:37 +03:00
Valentin Kipyatkov ab1b985bac Inline Property supported for properties with setter
#KT-2638 Fixed
2017-05-26 16:37:36 +03:00
Valentin Kipyatkov e6bfa55534 Inline Property also supported for properties with getter 2017-05-26 16:37:36 +03:00
Valentin Kipyatkov 940ce27925 Inline val: more correct and simple detection of write usages
#KT-17489 Fixed
2017-05-26 16:37:35 +03:00
Valentin Kipyatkov 55979aca74 Drop result value if it's not needed 2017-05-26 16:37:35 +03:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 2017-05-26 13:58:46 +03:00
Alexey Sedunov 75b73ecbcb Copy: Disable CopyKotlinDeclarationsHandler on non-source files 2017-05-22 13:51:08 +03:00
Alexey Sedunov a80fb6f20f Copy: Report module accessibility conflicts 2017-05-18 14:22:39 +03:00
Alexey Sedunov 1072495001 Copy: Support top-level declarations 2017-05-16 13:10:41 +03:00
Alexey Sedunov 4c1c1a989a Copy: Support multiple classes in the same file 2017-05-16 13:10:40 +03:00
Alexey Sedunov 92446df14a Copy: Support class copying
#KT-8180 Fixed
 #KT-9054 Fixed
2017-05-16 13:10:39 +03:00
Alexey Sedunov f2bb6e4dac Rename: Support import aliases
#KT-4379 Fixed
2017-05-16 13:10:36 +03:00
Alexey Sedunov 3c94184de9 Rename: Support labeled expressions
#KT-7107 Fixed
2017-05-16 13:10:34 +03:00
Alexey Sedunov f70bac019a Change Signature: Fix TypeInfo comparison
#KT-13437 Fixed
2017-05-10 14:49:53 +03:00
Alexey Sedunov 8bbf8e185a Move: Filter out usages with visibility error before refactoring
If declaration is already invisible before move,
no visibility conflict should be reported

 #KT-17571 Fixed
2017-05-10 14:49:52 +03:00
Alexey Sedunov 0a5f9d8181 Move: Specify conflict containing declaration more precisely
Also do not render class fqname for member declarations

 #KT-17547 Fixed
2017-05-10 14:49:51 +03:00
Alexey Sedunov a8c57f11af Move: Implement more accurate 'protected' visibility check
#KT-17545 Fixed
2017-04-24 20:52:12 +03:00
Alexey Sedunov c690761715 Move: Do not process imported references when moving entire file
#KT-17538 Fixed
2017-04-24 20:52:10 +03:00
Alexey Sedunov f575e2710f Move: Fix processing of implicit extension 'invoke' calls
Also fix bogus "unused import" inspection reported on such calls

 #KT-17496 Fixed
2017-04-21 13:32:34 +03:00
Alexey Sedunov b80fbe1192 Change Signature: Avoid creating parameters from scratch
#KT-15519 Fixed
2017-04-21 13:32:32 +03:00
Mikhail Glukhikh 8fdb611e3b Do not try to inline properties from decompiled files
This removes GUI freeze for library properties #KT-17234 Fixed
2017-04-19 18:27:29 +03:00
Mikhail Glukhikh 6571a573f1 Use correct callElement for variable invoke in replacer
Check only 'status.isSuccess' before inlining, no descriptor check
Add two tests and fixes two other
2017-04-19 18:27:27 +03:00
Mikhail Glukhikh 4ef0096d46 Refactoring: inline val / fun now use the common inliner
This prevents their inconsistent work in some situations
NB: breaks three tests if used alone
2017-04-19 18:27:26 +03:00
Mikhail Glukhikh e6fa7356e1 Inline: support compound case without containing block #KT-17296 Fixed 2017-04-19 18:27:25 +03:00
Mikhail Glukhikh 91f7f19902 ExpressionReplacementPerformer: handle string templates accurately 2017-04-19 13:12:59 +03:00
Mikhail Glukhikh 815a367978 ReplacementPerformer: always copy statement to insert #KT-17273 Fixed 2017-04-19 13:12:58 +03:00
Mikhail Glukhikh 0f6b9473e9 Inliner: don't take into account nonexistent PSI to keep parameter
So #KT-17272 Fixed
2017-04-19 13:12:57 +03:00
Mikhail Glukhikh b8cc7c2ca6 Add type arguments more accurately during inlining 2017-04-19 13:12:56 +03:00
Mikhail Glukhikh f8e1f5e613 Inliner: specify explicit lambda signature for calls with lambdas
So #KT-17213 Fixed
So #KT-17395 Fixed
2017-04-19 13:12:55 +03:00
Mikhail Glukhikh 6453e10d44 If necessary, add parameter types while inlining lambda 2017-04-19 13:12:52 +03:00
Alexey Sedunov e79a7d3e94 Change Signature: Update test data 2017-04-17 23:00:20 +03:00
Alexey Sedunov b33b06722d Change Signature: Support header/impl declarations 2017-04-17 23:00:18 +03:00
Alexey Sedunov d78828001d Rename: Support header/impl declarations 2017-04-17 23:00:15 +03:00
Alexey Sedunov b65e082425 Test Framework: Fix module creation in multi-module tests 2017-04-17 23:00:12 +03:00
Alexey Sedunov 69ef8e89a9 Move: Fix NPE on moving file to non-source directory 2017-04-17 23:00:11 +03:00
Alexey Sedunov b229eeeb47 Move: Prevent running refactoring helpers on partial move
It may lead to some imports being wringly removed
due to their references being unresolved yet

Also fix NPE on package rename via directory move
2017-04-17 23:00:10 +03:00
Mikhail Zarechenskiy b17b3f4c63 Resolve local function parameters with function inner scope
This allows to use type parameters and value paramters in default value expressions

 #KT-7984 Fixed
 #KT-7985 Fixed
2017-04-17 16:21:06 +03:00
Alexey Sedunov 9979c6e361 Move: Fix processing of callable references to Java constructors 2017-04-11 12:11:51 +03:00
Alexey Sedunov 411a8dc206 Move: Remove duplicating conflict messages from test data 2017-04-11 11:45:13 +03:00
Alexey Sedunov cd6177534a Move: Add conflict checking for "Move packages" case 2017-04-11 11:45:12 +03:00
Alexey Sedunov e21ff23e26 Move: Add conflict checking for "Move directory with classes" case 2017-04-11 11:45:11 +03:00
Alexey Sedunov 87a12ee1c7 Move: Check for conflicts using entire collections of elements to move 2017-04-11 11:45:10 +03:00
Alexey Sedunov 358b5fe548 Move: Force package name change when moving Java files
Package statement in Java file is updated too late
when moving the entire containing directory, so we force it
with intercepting MoveFileHandler implementation
2017-04-11 11:45:08 +03:00
Alexey Sedunov c1066b98f0 Move: Fix warning on companion used as implicit dispatch receiver
Do not report conflict if target class is a sublcass of
companion object's containing class
2017-04-06 18:54:02 +03:00
Alexey Sedunov 5c35061afa Move: Make minor improvements and refactorings 2017-04-06 18:52:45 +03:00
Alexey Sedunov 4a168ff780 Move: Process internal usages after all declarations are moved 2017-04-06 18:18:33 +03:00
Alexey Sedunov 746ec48176 Move: Fix internal reference processing on moving multiple files
#KT-17211 Fixed
2017-04-04 14:35:10 +03:00
Alexey Sedunov 2eb912a30c Move: Convert AbstractMoveTest to light fixture test case
Extract multi-module move test to a separate class
2017-03-31 18:24:16 +03:00