Steven Allen
d198465522
Add an intention to simplify negated binary expressions
...
Given an expression of the form `!(a op b)`, replace it with `a !op b`.
For example:
!(a < b) -> a >= b
!(a is Int) -> a !is int
2014-03-19 12:10:28 -04:00
Mikhael Bogdanov
86a02b54fa
Fix for debugger to support inlined lambdas
2014-03-19 19:20:36 +04:00
Nikolay Krasko
3b60dfa45b
Refactoring: rename weight result enums
2014-03-19 17:59:43 +04:00
Nikolay Krasko
607314989c
KT-1633 support completion of named function parameters
2014-03-19 17:59:41 +04:00
Alexey Sedunov
482d228253
Allow to move Kotlin file if it contains single top-level class/object
2014-03-19 15:31:30 +04:00
Alexey Sedunov
2f0d0c4d26
Move top-level declarations: Refactoring UI
2014-03-19 15:31:30 +04:00
Alexey Sedunov
abcba89ad3
Move top-level declarations: Implement refactoring processor
2014-03-19 15:31:29 +04:00
Alexey Sedunov
5836bb41b6
Move file/directory-related refactorings to separate package
2014-03-19 15:31:27 +04:00
Alexey Sedunov
1772e453e5
Unwrap light elements before filtering out non-source search targets
2014-03-19 15:31:26 +04:00
Alexey Sedunov
05d93df8b8
Unwrap light elements before getting FqName
2014-03-19 15:31:26 +04:00
Alexey Sedunov
acaa900ee9
Introduce reference shortening mode
2014-03-19 15:31:25 +04:00
Alexey Sedunov
a0ab7f6f22
Add utility function for Kotlin file creation
2014-03-19 15:31:24 +04:00
Alexey Sedunov
e2d0ecc437
Extract utility function
2014-03-19 15:31:23 +04:00
Alexey Sedunov
a094ea6550
Rename class
2014-03-19 15:31:22 +04:00
Tal Man
baac1b9b0b
Fix to a bug in the intention to move lambda expressions inside parentheses, type arguments were being deleted
2014-03-18 19:25:50 +04:00
Nikolay Krasko
5362b81ea5
Don't search in random directories for existent libraries
...
#KT-4644 In Progress
2014-03-18 16:16:24 +04:00
Nikolay Krasko
3911a6f54b
Search library kinds
...
#KT-4644 In Progress
2014-03-18 16:16:24 +04:00
Nikolay Krasko
6b0298b933
Silently disable other incompatible framework
...
#KT-4644 In Progress
2014-03-18 16:16:23 +04:00
Nikolay Krasko
8ddbdab8c8
Support library create with relative paths
...
#KT-4644 In Progress
2014-03-18 16:16:22 +04:00
Nikolay Krasko
16018ccfe8
Minor: add @TestOnly annotation
2014-03-18 16:16:22 +04:00
Andrey Breslav
f7c5dc179c
Eager resolve does not record class object bounds (which are unsupported anyways)
2014-03-17 21:55:17 +04:00
Andrey Breslav
8be40c29cf
CYCLIC_INHERITANCE_HIERARCHY reworked
...
We do not try to recover too gracefully from a cyclic hierarchy any more:
we simply remove all the edges that belong to a cycle instead of intelligently finding one most convenient edge to cut.
This is done in both lazy and eager resolve to keep tests passing.
2014-03-17 21:55:15 +04:00
Andrey Breslav
131d6ddd3d
DelegatingType extracted
2014-03-17 21:40:17 +04:00
Alexander Udalov
8b18309b01
Don't write "ResolvedCall<? extends CallableDescriptor>"
...
ResolvedCall has a type parameter D which extends CallableDescriptor.
Hence in Java "ResolvedCall<? extends CallableDescriptor>" = "ResolvedCall<?>"
The same story with these classes:
- ResolutionTask
- CallCandidateResolutionContext
- OverloadResolutionResults
2014-03-17 19:09:09 +04:00
Natalia Ukhorskaya
a9d3543967
Gradle: do not add ext prefix for kotlin_version property
...
#KT-4690 Fixed
2014-03-17 16:30:25 +04:00
asedunov
85dbd8cf49
Merge pull request #410 from kuity/unnecessaryParensInWhenToIf
...
Fix KT-4385 "Unnecessary parentheses in "replace when with if"
2014-03-17 13:00:10 +01:00
Alexander Udalov
307f52895a
Refactor KotlinJvmBinaryClass, VirtualFileKotlinClass, etc.
...
VirtualFileKotlinClass now reads its header and name on creation. This is not
lazy enough and may be slower in some circumstances, but has the following
advantage: if anything is wrong in the header, a VirtualFileKotlinClass
instance will not be created at all, making it nearly impossible for the client
code to operate on invalid data causing all kinds of exceptions
2014-03-14 16:00:20 +04:00
Lingzhang
877b9f2d99
KT4385 Bug Fix for Unnecessary Parentheses in WhenToIfIntention
2014-03-13 21:26:03 -04:00
Mikhael Bogdanov
f475f3ba31
Inline checkbox in BytecodeToolWindow
2014-03-13 14:06:57 +04:00
Natalia Ukhorskaya
000dd4478a
Rename
2014-03-13 10:07:13 +04:00
Natalia Ukhorskaya
a2879f229a
Add serializer for compile-time constant initializer
2014-03-13 10:07:05 +04:00
Natalia Ukhorskaya
073d345841
Extract BaseDeserializer from AnnotationDeserializer. Move storage to separate class
2014-03-13 10:07:04 +04:00
Nikolay Krasko
569f139d8a
Update to idea 135.406, support 135 and 136 branch
2014-03-12 18:39:32 +04:00
Zack Grannan
6156a56a4b
Generated tests
2014-03-12 16:02:57 +04:00
Zack Grannan
3862a3b5bc
Added ifThenToSafeAccessIntention
2014-03-12 16:02:56 +04:00
Zack Grannan
1f720c8559
Added safeAccessToIfThen intention
2014-03-12 16:02:55 +04:00
Zack Grannan
1ca4bb0e79
Added ifThenToElvisIntention
2014-03-12 16:02:55 +04:00
Zack Grannan
673369affe
Added elvisToIfThenIntention
2014-03-12 16:02:54 +04:00
Zack Grannan
6b5e46da50
Added IfThenUtils
2014-03-12 16:02:53 +04:00
Zack Grannan
fcbd7b357a
Modified doRefactoring to allow occurrences to be specified
2014-03-12 14:43:08 +04:00
Zalim Bashorov
33360c2528
Dropped some TODOs
...
#KT-2564 Obsolete. Looks like, it's fixed in dcddd04 .
2014-03-11 20:03:58 +04:00
Steven Allen
84a8911822
Add replacement intentions for operator functions
...
Add intentions for replacing attribute calls that correspond to
overloadable operators with their respective operators.
This commit includes call replacements for:
* Binary Infix Operators: plus, minus, times, rangeTo, mod, div
* Unary Prefix Operators: plus, minus, not
* Array Index Operator: get
* In Operator: contains
2014-03-10 11:15:11 -04:00
Steven Allen
162ed64706
Add ability to test for expected intention text
...
If a testData file contains `// INTENTION_TEXT: ...`, the tested
intention's description must match `...`.
2014-03-10 10:46:28 -04:00
Steven Allen
8b88dff205
Add ability to test for expected errors in intentions
...
If an intention test contains `// SHOULD_FAIL_WITH: my_string`, the test
is expected to throw `IntentionTestException("my_string")`. This is
useful for testing whether or not a function that should be called, is
called (a pop-up dialog is displayed, etc.).
2014-03-10 10:46:28 -04:00
Nikolay Krasko
bbe9be5150
Fix 'No type in binding context for: <some class> from light class generation' exception
...
#KT-4668 Fixed
2014-03-08 02:55:29 +04:00
Alexey Sedunov
8b0e8ed398
Keep original expression when attempting to bind reference to empty FqName
2014-03-07 19:24:37 +04:00
Alexey Sedunov
ca65e27214
Minor refactoring
2014-03-07 19:24:36 +04:00
Alexey Sedunov
09574d72b8
Translate JetSimpleNameReference to Kotlin
2014-03-07 19:24:35 +04:00
Alexey Sedunov
c9d10cfcd3
Do not postpone reference lengthening
...
Do not shorten references located in import/package directives
2014-03-07 19:24:34 +04:00
Alexey Sedunov
5327031300
Update references when moving Kotlin file
...
#KT-1696 Fixed
2014-03-07 19:24:33 +04:00