Andrey Uskov
59bcd608a1
Minor. Remove useless code related to IJ 173 and AS 3.1 in build scripts
2019-02-17 12:29:01 +03:00
Andrey Uskov
52be952fb7
Refactor gradle importing tests. Add possibility to test various
...
versions of gradle kotlin plugin
2019-02-17 12:28:19 +03:00
Andrey Uskov
5c82daf7a1
Improve bunches of GradleImportingTestCase
2019-02-17 12:27:33 +03:00
Yan Zhulanow
a7ea252973
Refactoring: Split KotlinCoreEnvironment setup functions for Android Lint
2019-02-15 21:23:27 +03:00
Yan Zhulanow
1fbf51ea13
Kapt: Ignore imports for enum entries on import conversion (KT-28220)
2019-02-15 21:23:27 +03:00
Yan Zhulanow
87cad2af02
Kapt: Fix "no interface expected here" in class implementing interface with secondary constructor (KT-27506)
2019-02-15 21:23:27 +03:00
Yan Zhulanow
a9eaf1c345
Pill: Rename Pill configurations, make its name not capital
2019-02-15 21:23:27 +03:00
Yan Zhulanow
770a2e3f2d
Attach expect sources to all source set tasks (KT-26977)
...
If kapt is enabled, there are several Kotlin compilation tasks for one source set (stub generator + compile). We should attach the expect sources to all of them.
2019-02-15 21:23:26 +03:00
Yan Zhulanow
1c824655d4
Kapt: Fix supertype conversion for DefaultImpls (KT-28306)
2019-02-15 21:23:26 +03:00
Ting-Yuan Huang
3a768060ca
Skip annotation processing when there's no AP specified
...
This also fixes KT-29302 where stub generation is skipped while the
subsequent annotation processing phase anticipates the generated stubs.
This patch addresses cases where kapt.use.worker.api=true. The cases
where kapt.use.worker.api=false are handled in the same place of stub
generation.
2019-02-15 21:23:25 +03:00
Yan Zhulanow
53fa647d41
Revert "Kapt: Do not treat initially empty configurations specially (KT-27404)" (KT-29481)
...
This partially reverts commit 2cb2141e07 .
2019-02-15 21:23:25 +03:00
Yan Zhulanow
0444203b9b
Ignore non-jar files in ServiceLoaderLite (KT-29513)
2019-02-15 21:23:25 +03:00
Yan Zhulanow
15a316ff90
Fix keyword completion for code fragments (KT-28680)
2019-02-15 21:23:25 +03:00
Yan Zhulanow
088b89b534
Pill: Add a dependency to backend.ir, fix JPS build
2019-02-15 21:23:25 +03:00
Alexander Udalov
f2bf81e799
Fix UOE when using Java annotation with infinity/NaN as default value
...
The root problem is the fact that ConstantExpressionEvaluator returns
null for values such as infinity and NaN loaded from cls psi (see
IDEA-207252). This commit simply reverts a part of 8ab9226805 where we
started to compute default values more often than needed. In
LazyJavaClassMemberScope, we only need to check whether or not there
_is_ a default value, not compute its value.
#KT-29792 Fixed
2019-02-15 19:13:53 +01:00
Alexander Udalov
b2cdf2dc74
Simplify AnnotationSplitter creation and target set computation
2019-02-15 17:53:27 +01:00
Alexander Udalov
4692247897
Do not check backing field presence in AnnotationSplitter
...
This code can be invoked early, during body resolution and before the
fact that a property has backing field (which is only known for certain
after body resolution, because an implicit 'field' identifier may be
used). Since split annotations are cached until the end of the program,
they may end up on incorrect elements in the bytecode (or disappear
completely) as in KT-29507 or KT-28182.
Because the FIELD target has the lowest priority among implicit
annotation targets (see TARGET_PRIORITIES), it's safe to always assume
that FIELD is a valid target when splitting annotations. This only
changes the way annotations are split in case of incorrect code, as
changes in test data show.
#KT-28182 Fixed
#KT-29507 Fixed
2019-02-15 17:53:27 +01:00
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