Commit Graph

51949 Commits

Author SHA1 Message Date
Kirill Shmakov 5595a2dd1b Add highlighting for exceptions stacktrace on Mac
KT-29817
Review: KOTLIN-CR-2722
2019-02-15 18:33:14 +03:00
Dmitry Petrov 08de82db85 Added tests for KT-29833 2019-02-15 16:25:16 +03:00
Dmitry Petrov 4c3d0cd9d7 KT-29861 startOffset/endOffset for 'valueOf' function of enum class 2019-02-15 16:25:16 +03:00
Dmitry Petrov 1b0d410a6f KT-29862 startOffset of class declaration
NB startOffset of primary class constructor declaration should still
point to the 'class' keyword (because of debugger requirements).
2019-02-15 16:25:16 +03:00
Natalia Selezneva 92a160e6c3 Fix navigation to buildSrc from scripts
buildSrc folder should be placed under project dir (root or included project)
^KT-29707 Fixed
2019-02-15 16:06:55 +03:00
Natalia Selezneva 830973a93c Fix "Multiple Script Definitions" notification for settings.gradle.kts
^KT-29832 Fixed
2019-02-15 16:06:55 +03:00
Natalia Selezneva d8080f205c Always scan root for script templates in background
^KT-29893 Fixed

Provide AsyncScriptDefinitionsContributor.
Show a notification if the highlighting for script is requested when not all script templates are loaded
2019-02-15 16:06:54 +03:00
Natalia Selezneva 00cd6a698d Do not run multiple script dependencies updates if dependencies weren't saved yet
^KT-29770 Fixed
2019-02-15 16:06:54 +03:00
Natalia Selezneva 8918a83fb4 Unify cache size for script dependencies 2019-02-15 16:06:54 +03:00
Natalia Selezneva abc2dbba39 Minor: fix typo in package name 2019-02-15 16:06:54 +03:00
Natalia Selezneva 889396ec27 Cache 10 + 5 scripts in KotlinCacheService
This may be useful for find usages (and inspections that uses it) of declaration from buildSrc which may be used in several scripts
2019-02-15 16:06:54 +03:00
Natalia Selezneva 74909c4d09 Do not run unused symbol inspection if declaration in used in more than 3 scripts 2019-02-15 16:06:53 +03:00
Ilya Chernikov c29332e290 Regenerate tests 2019-02-15 13:15:47 +01:00
Toshiaki Kameyama cd13648906 Object literal can be converted to lambda: report if "return" is only one and is in the last statement
#KT-29763 Fixed
2019-02-15 13:52:19 +03:00
Ilya Matveev 7c3c21790b Fix subplugin options for K/N 2019-02-15 13:37:16 +03:00
Nicolay Mitropolsky 2678ada5ae 191: AbstractModelBuilderTest: addExtraProjectModelClasses was removed in platform 2019-02-15 11:39:54 +03:00
Dmitriy Dolovov 375697c413 User friendly presentation of KLIBs in IDEA
Missed fixes in 181 bunch
2019-02-15 15:32:22 +07:00
Dmitriy Dolovov 05323f8a30 CIDR: Avoid exception in JavaDocumentationProvider
as there is no Java support in CIDR
2019-02-15 11:12:28 +07:00
Nicolay Mitropolsky a29bf61d05 191: fix for KotlinUastReferencesTest reference target assertion added in 191 2019-02-14 20:44:17 +03:00
Ilmir Usmanov d269ff8ac8 Update test data 2019-02-14 18:33:20 +03:00
Ilmir Usmanov 19d2262cf1 Generate call of throwOnFailure instead of manual check
whether coroutine is resumed with exception.
 #KT-28015 Fixed
2019-02-14 18:33:17 +03:00
Nikolay Krasko 7c83d5df93 Move queue back to class instance after bad refactoring in search package
Relevant commit: 7f1e7cc461
2019-02-14 18:26:55 +03:00
Dmitry Gridin 33954c7632 Add inspection to move the variable declaration into when
#KT-29001 Fixed
2019-02-14 17:45:53 +03:00
Nikolay Krasko 7abe9333c8 Minor: remove deprecated usages of PsiSearchHelper.SERVICE 2019-02-14 17:23:49 +03:00
Nikolay Krasko 7f1e7cc461 Minor: reformat and cleanup org.jetbrains.kotlin.idea.search package 2019-02-14 17:23:49 +03:00
Nikolay Krasko 16c79b562e Minor: cleanup warnings in KotlinFunctionParameterInfoHandler.kt 2019-02-14 17:23:49 +03:00
Nicolay Mitropolsky a3bd70a76e KotlinDeclarationSearcher: return backing fields for parameters (KT-29034) 2019-02-14 17:12:17 +03:00
Dmitry Petrov 6aff53204f psi2ir: support dynamic infix calls ('foo bar 42' is 'foo.bar(42)') 2019-02-14 16:03:11 +03:00
Dmitry Petrov 740d5ec468 Mute some tests in JS_IR after adding basic dynamic expressions support 2019-02-14 16:03:11 +03:00
Dmitry Petrov 77cbd10f9c psi2ir: don't generate temporaries in dynamic array augmented assignment
In constructs such as 'd[i] += x', where both indexed get and indexed
set are dynamic calls, it's safe to generate augmented assignment body
directly, without temporary variables for array ('d') and index ('i').
Note that corresponding IntermediateValue's are OnceExpressionValue's,
which would throw an exception if this assumption is violated.
2019-02-14 16:03:11 +03:00
Dmitry Petrov 580eb6fcac JS_IR: support dynamic expressions in block decomposition 2019-02-14 16:03:11 +03:00
Dmitry Petrov 03c35a4f44 JS_IR: support dynamic expressions in JS tree generation 2019-02-14 16:03:11 +03:00
Dmitry Petrov 4cee8c6f00 Minor: fix IrDynamicOperatorExpressionImpl double dispatch methods 2019-02-14 16:03:11 +03:00
Dmitry Petrov 5b4b22a8b6 psi2ir: additional tests for dynamic expressions: '?:', '!!' 2019-02-14 16:03:11 +03:00
Dmitry Petrov 83b2fed5be psi2ir: minor: drop unused import 2019-02-14 16:03:11 +03:00
Dmitry Petrov 6889e470d1 psi2ir: minor: move array access generation code 2019-02-14 16:03:11 +03:00
Dmitry Petrov 50269d3a5c psi2ir: minor: simplify code for dynamic array element assignment 2019-02-14 16:03:11 +03:00
Dmitry Petrov cf29dce4c2 pri2ir: dynamic unary & binary expressions
NB1 Not every dynamic unary or binary expression is translated to
dynamic operator expressions literally. For example, assignments and
increments can have safe calls in LHS, which require some extra logic.

NB2 There are some open design questions left regarding how dynamic
expressions should actually be translated.
2019-02-14 16:03:11 +03:00
Dmitry Petrov 82701de87b psi2ir: minor: drop some unused params/imports 2019-02-14 16:03:11 +03:00
Dmitry Petrov fbbe4f6e92 psi2ir: dynamic array element get/set 2019-02-14 16:03:11 +03:00
Dmitry Petrov 9a2bd5f4e6 psi2ir: dynamic member simple assignment/augmented assignment/++/-- 2019-02-14 16:03:11 +03:00
Dmitry Petrov fc76d0970b psi2ir: Implicit casts with 'dynamic' 2019-02-14 16:03:11 +03:00
Dmitry Petrov 3c8f52b436 psi2ir: simple dynamic member calls 2019-02-14 16:03:11 +03:00
Dmitry Petrov ddb1ea2047 psi2ir: dynamic member access ('d.x', 'd?.x') 2019-02-14 16:03:11 +03:00
Dmitry Petrov 6e7ccfbfff Introduce IrDynamicExpression and children
Dynamic expressions are represented as either operator expressions -
e.g., `d1 + d2`, `d[e]`, `d(e1, e2, e3)`, `d += e` -
where "operator" is a one of the known operators,
or as member reference expressions - e.g., `d.memberName` - where
member name is some arbitrary name (unresolved at compile-time and
represented as String).
2019-02-14 16:03:11 +03:00
Anton Bannykh f8dc6763bd JS: minor review fixes 2019-02-14 15:14:28 +03:00
Anton Bannykh 4e298ae5cb JS: Inlined local declarations should be positioned after imports 2019-02-14 15:14:28 +03:00
Anton Bannykh 0bfd332580 JS: improve a test (review fix) 2019-02-14 15:14:28 +03:00
Anton Bannykh 9ad1d8d054 JS: improve inline suspend function declaration splitter 2019-02-14 15:14:28 +03:00
Anton Bannykh 4b39e2df12 JS: (review fix) Header -> InlineData 2019-02-14 15:14:28 +03:00