Commit Graph

10894 Commits

Author SHA1 Message Date
Mikhail Glukhikh 84993ec3a0 Resolution API: introduce and use KtElement.resolveToCall() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh 513376e5f0 Introduce KtNamedFunction.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh 5848bc9a44 Introduce KtClassOrObject.resolveToDescriptorIfAny() 2018-02-20 20:25:42 +03:00
Mikhail Glukhikh bd0cbb716c Rename: analyzeWithDeclarations --> analyzeWithContent() 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh f6513cd17e Introduce resolveToParameterDescriptorIfAny(), drop reified version 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh 7a1b3cd224 Introduce & use resolveToDescriptorIfAny<DescriptorType>
This allows to omit casts after resolveToDescriptorIfAny() call,
get different descriptors for different receivers (in future),
distinguish parameter / property situation for primary constructor
2018-02-20 20:25:41 +03:00
Mikhail Glukhikh 8c97f8cbb5 Deprecate KtElement.analyzeFullyAndGetResult(), use analyzeAndGetResult 2018-02-20 20:25:41 +03:00
Mikhail Glukhikh eabc7c9ba8 Replace some KtDeclaration.analyze() with resolveToDescriptorIfAny()
Also, enhance comment on KtElement.analyze()
2018-02-20 20:25:40 +03:00
Mikhail Glukhikh 88b8652ed2 J2K: convert + get rid of analyzeFully (3 files) 2018-02-20 20:25:40 +03:00
Mikhail Glukhikh 50ce8d68bf J2K: rename *.java --> *.kt (3 files) 2018-02-20 20:25:40 +03:00
Mikhail Glukhikh c1f7303fa3 CanBePrimaryConstructorProperty: analyzeFully --> analyze 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh 57d0da9843 MoveMemberOutOfCompanionObject: reformat 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh d4dbd4cd6a MoveMemberOutOfCompanionObject: analyzeFully --> analyze 2018-02-20 20:25:39 +03:00
Mikhail Glukhikh 8986b8a1a2 Introduce analyzeWithContent() & analyzeWithDeclarations()
These functions have more clear names & receivers.
Old analyzeFully() applied on KtElement made deprecated
because for general KtElement it's unclear what is "full analysis"
2018-02-20 20:25:38 +03:00
Mikhail Glukhikh e78bd73ba3 LeakingThisInspection: add comment about analyzeFully 2018-02-20 20:25:38 +03:00
Mikhail Glukhikh fda40723dc Downgrade LoopToCallChainInspection to INFORMATION level 2018-02-20 19:08:01 +03:00
Mikhail Glukhikh 02ee641daa Add CommonModuleResolveScopeEnlarger providing correct scope for commons
So #KT-22873 Fixed
So #KT-22858 Fixed
So #KT-22853 Fixed
2018-02-20 13:14:45 +03:00
Dmitry Savvinov e071d054c9 Refactor DataFlowValueFactory implementation into several separate files 2018-02-20 13:11:33 +03:00
Dmitry Savvinov 0929673576 Refactor DataFlowValueFactory into proper component 2018-02-20 13:11:33 +03:00
Toshiaki Kameyama a36e8c86f1 KT-22428 Create member function from usage shouldn't present type parameters as options (#1509)
* KT-22428 Create member function from usage shouldn't present type parameters as options

* Reformat & cleanup
2018-02-17 14:09:44 +03:00
Nikolay Krasko 866129984e Expression can be parenthesized on replace with if (KT-22874, EA-91186)
#KT-22874 Fixed
2018-02-16 13:29:53 +03:00
Nikolay Krasko 67183ad3b0 Fix class cast exception in KotlinFunctionParameterInfoHandler (EA-91186) 2018-02-16 13:29:50 +03:00
Nikolay Krasko 86dfc1ae2c Add internal action for reactivating post-open project activity 2018-02-16 13:29:48 +03:00
Nikolay Krasko 8a655b70e0 Fix isModified check in Kotlin compiler tab (KT-22851)
outputPostfix and outputPrefix is saved with nullize in apply, but
modification check was without it.

 #KT-22851 Fixed
2018-02-16 13:29:47 +03:00
Alexander Podkhalyuzin d940546a10 Added optional dependency to Kotlin/Native Java plugin 2018-02-15 18:58:53 +03:00
Mikhail Glukhikh 78136fbb07 IDE facet refactoring, ModuleInfo.expectedBy introduced.
Part of facet classes was extracted to idea-analysis module
Related to KT-21771
2018-02-14 15:09:14 +03:00
Toshiaki Kameyama e35ec8ee08 Introduce intention 'expr.unsafeCast<Type>()' <- -> 'expr as Type'
So #KT-16382 Fixed
2018-02-13 13:05:52 +03:00
Mikhail Glukhikh 085c7d30ed Specify expl. lambda signature: derive from offset independent intention
Related to KT-22492
2018-02-13 12:28:56 +03:00
Toshiaki Kameyama 5499078fcc Make "Specify explicit lambda signature" available on whole lambda
So #KT-22492 Fixed
2018-02-13 12:28:50 +03:00
Toshiaki Kameyama 059a797e10 Don't report redundant semicolon for a call before lambda expression
So #KT-22719 Fixed
2018-02-13 11:52:04 +03:00
Toshiaki Kameyama f9555f3f64 Join with assignment: remove comment from target range #KT-22110 Fixed 2018-02-13 11:45:31 +03:00
Vyacheslav Karpukhin 53946456cf Do not use hardcoded plugin ID for update checks
When Kotlin plugin is bundled into another plugin, there won't be a plugin with ID org.jetbrains.kotlin registered in PluginManager, which leads to runtime exceptions. To fix that let's determine the plugin ID dynamically instead.
2018-02-12 17:33:54 +03:00
Nikolay Krasko f5e78a89bc Collect statistics of used defaults set in formatting (KT-22252)
^KT-22252 In Progress
2018-02-12 17:33:54 +03:00
Alexey Sedunov e1aec46300 Configuration: Set up Kotlin SDK (if necessary) on plugin startup
#KT-22590 Fixed
2018-02-12 15:10:16 +03:00
Simon Ogorodnik 470a4bb615 Fix Missing documentation inspection for primary ctor properties
#KT-20954 fixed
#KT-21005 fixed
2018-02-12 13:41:50 +03:00
Nikolay Krasko 1e567438a2 Store selected set of defaults in code style settings (KT-22252)
#KT-22252 In Progress
2018-02-11 16:50:20 +03:00
Nikolay Krasko 5d25b8b476 Control serialize/deserialize of CommonCodeStyleSettings 2018-02-11 16:50:19 +03:00
Alexey Sedunov e5e583e3e5 Configuration: Show Koltin plugin path as "home path" of Kotlin SDK
#KT-22640 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov 84fed8071c Create from Usage: Support target directory selection for "Create class"
#KT-22152 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov 695a2a4098 Rename: Support retargeting/shadowing conflict checking for functions
#KT-22564 Fixed
2018-02-09 14:17:40 +03:00
Alexey Sedunov fffd74f002 Refactor: Move canMoveLambdaOutsideParentheses() function to idea-core module 2018-02-09 14:17:39 +03:00
Alexey Sedunov 428b086458 Refactor: Move 'isIdentifier' and 'quoteIfNeeded' functions to frontend 2018-02-09 14:17:37 +03:00
Alexey Sedunov fddfbf225f Change Signature: Support implicit calls of 'invoke' and 'get'
Also drop 'operator' keyword when necessary

 #KT-22718 Fixed
2018-02-09 14:17:37 +03:00
Ilmir Usmanov 87bbac9d43 Take coroutineContext into account in RedundantSuspendModifierInspection
#KT-22651: Fixed
2018-02-08 19:34:20 +03:00
Alexander Udalov 21e2a3c0b4 Load module annotations in IDE
#KT-22759 Fixed
2018-02-08 17:08:33 +01:00
Pavel V. Talanov 229184dd78 Dsl line marker: provide simple tooltip
Test dsl line marker
2018-02-08 15:36:42 +01:00
Pavel V. Talanov 519ea12bb2 Test, dsl highlighter: test custom highlighting applied to calls 2018-02-08 15:36:41 +01:00
Mikhail Glukhikh d554a4234d Redundant object type check: fix problem highlighting #KT-22484 Fixed 2018-02-08 17:10:44 +03:00
Mikhail Glukhikh 901ae087bc Redundant object type check: use referential equality, forbid for when
So #KT-22538 Fixed
2018-02-08 17:10:43 +03:00
Mikhail Glukhikh fbe6929903 Reformat: RedundantObjectTypeCheckInspection 2018-02-08 17:10:41 +03:00