Commit Graph

10894 Commits

Author SHA1 Message Date
Mikhail Glukhikh 8edf8b9e4d MemberInfoUtils: when no facade is available, use resolutionApi methods 2018-02-08 13:03:41 +03:00
Alexander Podkhalyuzin 09d167eafb Ask just extensions, not in some area #KT-21978 Fixed 2018-02-06 14:58:18 +03:00
Alexey Sedunov adca8eb7f1 Rename: Substitute synthetic expression parent before analysis
This fixes rename conflicts test
2018-02-06 14:23:20 +03:00
Mikhail Glukhikh 7995ae05c5 Introduce inspection for redundant not-null extension receiver of inline
Related to KT-22303
2018-02-06 14:17:01 +03:00
Mikhail Glukhikh c90056f8c4 Introduce inspection for nullable extension receiver of inline function
So #KT-22303 Fixed
2018-02-06 09:50:09 +03:00
Mikhail Glukhikh 3ba6b70f73 Show expect / actual gutter even for incomplete compatibility
So #KT-18445 Fixed
So #KT-21115 Fixed
2018-02-06 09:50:00 +03:00
Pavel V. Talanov 7b8d501670 Dsl highlighting: Provide gutter for marker annotation definition
Allows to jump to corresponding page in 'color and font' settings
2018-02-05 16:22:23 +01:00
Pavel V. Talanov 0d5d826bc5 Dsl highlighting: reasonable default colors 2018-02-05 16:22:22 +01:00
Pavel V. Talanov b9c832a952 Implement custom highlighting for dsls
A declaration is considered a part of dsl if it's marked with
    a marker annotation (which is in turn must be marked as @DslMarker)
Highlighting attributes are then chosen randomly from a preset list
    based on marker annotation fqname
2018-02-05 16:22:20 +01:00
kenji tomita 1875d129ea Inspection to get rid of unnecessary ticks in references #KT-18124 Fixed 2018-02-05 17:31:08 +03:00
Alexander Udalov db4ce703a6 Support default arguments for expected declarations
#KT-21913 Fixed
2018-02-05 13:38:05 +01:00
Alexander Udalov d465f5fd8e Extract ExpectedActualResolver out of ExpectedActualDeclarationChecker
The point is that it's placed in module 'resolution' where it can be
accessed for example in ArgumentsToParametersMapper to load default
argument values from expected function
2018-02-05 13:38:05 +01:00
Alexander Udalov ac5444ef7c Add declaresOrInheritsDefaultValue, move hasDefaultValue to 'resolution'
'hasDefaultValue' needs to be adapted to support locating default values
in 'expect' functions, and this is not possible in module 'descriptors',
where it was originally declared. Therefore, move it to module
'resolution' and copy its current logic to a separate function
'declaresOrInheritsDefaultValue' which is used in 5 places.
'hasDefaultValue' itself is updated in subsequent commits.

Besides changing imports, also use a simpler declaresDefaultValue in
some places, which does not include default values inherited from
supertypes: this is OK for constructors, and in LazyJavaClassMemberScope
for functions from built-ins which do not have default argument values
at all
2018-02-05 13:38:04 +01:00
Nikolay Krasko 5a9ea89e9c Collect statistics about used Kotlin formatter 2018-02-03 00:15:45 +03:00
Alexey Sedunov 58bf42c1dd Rename: Support KtTypeAlias in RenameKotlinClassProcessor
#KT-21719 Fixed
2018-02-01 15:41:04 +03:00
Alexey Sedunov 90392a8d8a Loop to Call Chain: Do not generate lambda with double wrapping block
#KT-22476 Fixed
2018-02-01 15:41:03 +03:00
Alexey Sedunov 8c9c1609c0 Move Class to Top Leve: Suggest file name based on new class name
#KT-17977 Fixed
2018-02-01 15:41:01 +03:00
Alexey Sedunov 1f7fab837f Gradle: Import production output path for JavaScript modules 2018-02-01 15:35:34 +03:00
Alexey Sedunov 80887a84ca Kotlin Ultimate: Add "Build" action to JS run configurations
#KT-20522 Fixed
2018-02-01 15:35:34 +03:00
Natalia Selezneva 2ccf4b7d7f Initial support for scratch files 2018-02-01 10:21:55 +03:00
Alexey Sedunov 2c0af794ea JS: Drop obsolete "Kotlin (JavaScript)" run configuration
#KT-21312 Fixed
2018-02-01 04:40:30 +03:00
Nikolay Krasko 209c66ca1b Set better defaults on Imports tab in Code Style -> Kotlin (KT-22575)
"Top level symbols" and "Java Statics and Enum Members" are always
returned to 2 after saving to not-number option

 #KT-22575 Fixed
2018-01-31 13:27:30 +03:00
Nikolay Krasko 607fa30c5a Can't add import for using with '*' in settings (KT-22570)
#KT-22570 Fixed
2018-01-31 13:27:29 +03:00
Nikolay Krasko 894db730b2 Fix modification check for Kotlin import settings (KT-22557)
#KT-22557 Fixed
2018-01-31 13:27:29 +03:00
Nikolay Krasko 17da150bc2 Add ability to customize and save IF_RPAREN_ON_NEW_LINE setting 2018-01-31 13:27:29 +03:00
Toshiaki Kameyama 677b05cc8c KT-22167 "Add annotation target" quick fix does nothing and disappears from menu 2018-01-30 20:25:08 +03:00
Mikhail Glukhikh 6fbf5a8904 Reverts commit 2472966
(Remove unused function parameter: minor improvement)
Transformation was not equivalent due to change signature in between
This revert fixes broken quick-fix tests (remove parameter based)
2018-01-30 18:43:25 +03:00
Mikhail Glukhikh a0d0bc074b Cleanup: KotlinPullUpHelper 2018-01-30 16:32:20 +03:00
Mikhail Glukhikh cefa17f877 Reformat: KotlinPullUpHelper 2018-01-30 16:30:08 +03:00
Mikhail Glukhikh d88b5746c7 Delete companion manually during pull up 2018-01-30 16:29:22 +03:00
Mikhail Glukhikh 7c6a217579 Reformat: KotlinInlineCallableProcessor 2018-01-30 16:03:14 +03:00
Mikhail Glukhikh 6181ba47c8 Delete companion manually during callable inlining 2018-01-30 16:02:32 +03:00
Mikhail Glukhikh 5abb9dd23e Create actual fix: handle companions correctly #KT-21114 Fixed 2018-01-30 15:41:37 +03:00
Mikhail Glukhikh 725704e70f ExclExclCallFixes: reformat 2018-01-30 11:23:18 +03:00
Mikhail Glukhikh 2472966749 Remove unused function parameter: minor improvement 2018-01-30 11:23:18 +03:00
Mikhail Glukhikh 1298ef7fed Redundant Unit expression: simplify code a bit 2018-01-30 11:18:01 +03:00
Toshiaki Kameyama 18de0f75ab Redundant Unit inspection: fix false positive for single expression
So #KT-22097 Fixed
2018-01-30 10:03:36 +03:00
Mikhail Glukhikh 30acc224ec Reformat: redundant setter 2018-01-30 10:00:02 +03:00
Toshiaki Kameyama 69f3f04fe4 Correct report of "redundant setter" for override & empty block cases
So #KT-22364 Fixed
2018-01-30 09:59:55 +03:00
Toshiaki Kameyama 28123eaf7b Add intention for changing setter accessibility #KT-22409 Fixed 2018-01-29 19:09:19 +03:00
Alexey Sedunov 7f97d58970 Type Hierarchy: Do not use JVM class mapping in non-JVM modules
#KT-21424 In Progress
2018-01-29 18:56:29 +03:00
Mikhail Glukhikh 1f8e2a1057 Reformat: unfold return to ... 2018-01-29 18:01:10 +03:00
Toshiaki Kameyama 3a81be6cfb Do not insert returns before Nothing in "Replace return with 'if'"
So #KT-22159 Fixed
2018-01-29 17:56:26 +03:00
Mikhail Glukhikh f28bec0db1 Reformat: if-then utilities 2018-01-29 17:49:34 +03:00
Mikhail Glukhikh 3b8f5bce41 Reformat: "if then to safe access" inspection 2018-01-29 17:44:19 +03:00
Toshiaki Kameyama fad7818bf0 Fix "if to safe access" false positive for check on incorrect type
So #KT-21881 Fixed
2018-01-29 17:43:01 +03:00
kenji tomita a28bc830f5 Add Intention for single character substring #KT-22171 Fixed 2018-01-29 16:23:01 +03:00
Mikhail Glukhikh 29eb594309 Inspection to replace Java Collections methods: simplify type check
Related to KT-22038
2018-01-29 15:52:45 +03:00
Mikhail Glukhikh 068f520c01 Inspection to replace Java Collections methods: fix formatting 2018-01-29 15:52:45 +03:00
Toshiaki Kameyama be4739e65e Inspection to replace Java Collections methods: extend set of types
So #KT-22038 Fixed
2018-01-29 15:52:44 +03:00