Commit Graph

1082 Commits

Author SHA1 Message Date
Dmitry Neverov 753b714544 Report cases when class member can be private 2017-05-26 13:29:01 +02:00
Ilya Zorin 5e265b3d17 Convert intention "a..b-1 -> a until b" into weak warning inspection
So #KT-17895 Fixed
2017-05-26 09:48:04 +03:00
Valentin Kipyatkov 40bbf82a41 Hint action to update usages on cut/paste of top-level declarations 2017-05-24 16:49:37 +03:00
Pavel V. Talanov f701f8f590 Cache GSScope by dependencies in ScriptDependencyModuleInfo
Removing state in previous commit led to 'toVfsRoots' being called to often
2017-05-22 19:12:09 +03:00
Dmitry Neverov 3b4dafe691 Detect recursive property accessors #KT-17221 Fixed 2017-05-19 20:36:09 +03:00
Valentin Kipyatkov 92a763552c KT-17970 Intention actions to format parameter/argument list placing each on separate line
#KT-17970 Fixed
2017-05-19 12:20:51 +03:00
Nikolay Krasko 0191c8c6c1 Force kotlin injector before temporary injector (KT-6610)
Place KotlinLanguageInject before TemporaryPlacesInjector

TemporaryPlacesInjector injects languages as a single place while we
need to distinguish interpolated and non-interpolated strings. Bad
ordering leads to inconsistent behaviour in temporary injection and
injection with annotations and comments.

See InjectedLanguageManagerImpl.getInjectorMap()

 #KT-6610 In Progress
2017-05-18 20:00:18 +03:00
Nikolay Krasko 2f1a40a40d Use multi host injector for Kotlin injection (KT-6610)
#KT-6610 In Progress
2017-05-18 20:00:18 +03:00
Pavel V. Talanov 21b32b9de5 IDE Performance: skip resolver construction for non-relevant modules
Querying non-existent packages does not trigger module resolver computation
2017-05-16 22:15:07 +03:00
Mikhail Glukhikh 9990550429 Introduce inspection "replace arrayOf with literal" #KT-17164 Fixed 2017-05-16 20:44:11 +03:00
Alexey Sedunov 1072495001 Copy: Support top-level declarations 2017-05-16 13:10:41 +03:00
Alexey Sedunov 4c1c1a989a Copy: Support multiple classes in the same file 2017-05-16 13:10:40 +03:00
Alexey Sedunov 92446df14a Copy: Support class copying
#KT-8180 Fixed
 #KT-9054 Fixed
2017-05-16 13:10:39 +03:00
Alexey Sedunov f2bb6e4dac Rename: Support import aliases
#KT-4379 Fixed
2017-05-16 13:10:36 +03:00
Alexey Sedunov 3c94184de9 Rename: Support labeled expressions
#KT-7107 Fixed
2017-05-16 13:10:34 +03:00
Nikolay Krasko 861cac5b52 Better indent in multi-line strings (KT-17849)
Inspired by MultilineStringEnterHandler from https://github.com/JetBrains/intellij-scala
https://github.com/JetBrains/intellij-scala/blob/edb741f344afff063197b406ca0c7c266a26c436/src/org/jetbrains/plugins/scala/editor/enterHandler/MultilineStringEnterHandler.scala

 #KT-17849 Fixed
2017-05-12 17:34:05 +03:00
Mikhail Glukhikh a77390ccd6 Change both IfThenTo... inspections highlight level
Retain WEAK WARNING for null checks, one-liners,
and is checks without dot calls in main branch.
Set INFORMATION (no highlighting, just fix) for other cases.

Switch off both bound intentions.
So #KT-15076 Fixed
2017-05-11 20:46:51 +03:00
Kirill Rakhman a8b2d3b4e8 Add inspection to detect copy() calls in a data class without named arguments
So #KT-17660 Fixed
2017-05-10 17:43:44 +03:00
Mikhail Glukhikh 382bf9a500 ConvertReferenceToLambda status refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
2017-05-10 14:56:38 +03:00
Mikhail Glukhikh 759e6643c6 ConvertLambdaToReference refactoring
Intention is not registered now; inspection is enabled by default now,
 but has highlight level of "No highlighting"
Inspection does not depend on text length now

So #KT-14335 Fixed
2017-05-10 14:56:37 +03:00
Yuli Fiterman 99b1bb98dc KT-7848: Literal copy/paste processor for Kotlin (#1074)
* KT-7848 Initial implementation of literal copy/paste processor for Kotlin

* KT-7847: Tests

* KT-7847: fix issues caught in unit tests with recognizing invalid template entries

* KT-7847: check for KtFile

* KT-7847:  fix capitalization for test data file names

* KT-7847:  Initial changes according as per review
2017-05-08 17:18:28 +03:00
Kirill Rakhman 8e00af5642 Add intention to convert top level val with object expression to object declaration (#974)
* Add intention to convert top level val with object expression to object
Fixes #KT-14137

* fix intention description
2017-05-08 16:35:03 +03:00
Yan Zhulanow 254e8156ac NoArg: Initialize properties in noarg constructor (KT-16692) 2017-05-04 18:46:42 +03:00
Dmitry Jemerov 7812a17f13 Mark Kotlin plugin as a JPS plugin so that JPS extensions are loaded
The Kotlin output parser for the Gradle build output in Android Studio
is loaded through the JPS extension manager, and the Kotlin JPS
plugin doesn't exist in Android Studio, so we need to use this
mechanism.

 #KT-17596 Fixed
2017-05-02 21:26:45 +02:00
Pavel V. Talanov 03b68666e4 KtLightClassForSourceDeclaration: use psi based resolve to speedup isInheritor checks 2017-05-02 15:40:17 +03:00
Yan Zhulanow ce145c015d Android Extensions: rename plugin JAR file names in plugin artifact
Rename compiler plugin to 'android-extensions-compiler' in order to have the same name in dist and IDEA plugin.
Rename IDEA plugin to 'android-extensions-ide' to make things clear.
2017-04-28 19:43:36 +03:00
Dmitry Neverov 9dd217eee3 Introduce intention to name anonymous parameter #KT-17191 Fixed 2017-04-27 20:58:38 +03:00
shiraji 0eceef1519 Add inspection to detect use of callable reference as a lambda body
So #KT-17053 Fixed
2017-04-27 18:21:27 +03:00
fitermay 8b3f8ce750 Inlay param/type support for kotlin 2017-04-26 18:09:12 +02:00
Vyacheslav Gerasimov 49c8dfbb06 Add gutter icons for Android resource references
#KT-16843 Fixed
2017-04-26 18:38:29 +03:00
Kirill Rakhman 76507caf4b Add intention to convert concatenation to raw string #KT-17503 Fixed 2017-04-25 16:43:52 +03:00
Dmitry Jemerov 5315f4d9da Initial implementation of rainbow highlighting for Kotlin
#KT-12629 Fixed
2017-04-22 13:45:36 +02:00
Alexey Sedunov 6f984d8260 Gradle Support: Do not create facet for module without kotlin plugin
#KT-17265 Fixed
2017-04-21 13:32:30 +03:00
Simon Ogorodnik 4978a204f0 Make LibraryDependenciesCache cache again!
#KT-17495 fixed
2017-04-20 20:23:11 +03:00
shiraji 83169ad781 "Add open to callable" intention introduced #KT-16786 Fixed 2017-04-19 11:37:48 +03:00
Vyacheslav Gerasimov 06c8de02b5 Add intentions for registering Android components in manifest
Activity, Service, BroadcastReceiver

#KT-17389 Fixed
2017-04-18 19:04:15 +03:00
Vyacheslav Gerasimov 5b58a6f9e8 Add intentions Add/Remove/Redo parcelable implementation
#KT-17465 Fixed
#KT-12049 Fixed
2017-04-18 19:04:14 +03:00
Simon Ogorodnik 2380e0bacc Optimize PluginDeclarationProviderFactory.getStubBasedPackageMemberDeclarationProvider
Add cache for fast package exists check in specific module
 #KT-16850 fixed
2017-04-18 17:58:45 +03:00
Zalim Bashorov 51e84f7ce4 Move some script related part of frontend to separate module to avoid using kotlin-reflect.jar in frontend module
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:35 +03:00
Sergey Mashkov 007408c792 Maven: rename completion providers 2017-04-14 13:27:09 +03:00
Sergey Mashkov 711398f14f Maven: eliminate constants in maven.xml 2017-04-14 13:27:07 +03:00
Sergey Mashkov a427248969 Maven: add more plugin parameters IDE support 2017-04-14 13:27:07 +03:00
Sergey Mashkov 2521dacc25 Maven: KT-17093 Import from maven: please provide a special tag for coroutine option 2017-04-14 13:27:06 +03:00
Alexey Sedunov cd6177534a Move: Add conflict checking for "Move packages" case 2017-04-11 11:45:12 +03:00
Alexey Sedunov 358b5fe548 Move: Force package name change when moving Java files
Package statement in Java file is updated too late
when moving the entire containing directory, so we force it
with intercepting MoveFileHandler implementation
2017-04-11 11:45:08 +03:00
Alexey Sedunov 7f115343f9 Kotlin Facet: Drop Gradle/Maven-based version info providers
They are obsolete since compiler/library version can be detected
based on module dependencies generated on external model import
2017-04-11 11:45:04 +03:00
Pavel V. Talanov 4f701285b1 Light class builder: do not generate methods delegating to DefaultImpls in kotlin classes
Class APIs from java point of view stays the same so we can avoid generating those methods
Otherwise we have to calculate all supertypes when getMethods() is called,
    which imposes severe performance penalties
We have to pretend these methods are not 'abstract' (also we consider them 'default' for safety)
    so java highlighting does not report "class should be abstract" for all inheritors
We have to manually report "class should be abstract" on some of the java inheritors,
    specifically those that are implementing interfaces directly
	    as opposed to extending kotlin classes implementing those interfaces
2017-04-09 15:09:01 +03:00
Pavel V. Talanov a44aa8e112 Introduce KotlinOverridableInternalMembersShortNameIndex
Keeping track of all potentially overridable internal members
To optimize certain scenarios in light classes
2017-03-27 17:58:47 +03:00
Alexey Sedunov b3274acfc0 Refactor KotlinShortenReferencesRefactringHelper
Rename refactoring helper and its infrastructure
Add support for different request types
2017-03-26 12:56:21 +03:00
Mikhail Glukhikh b5aa529901 Make inspection "lambda->reference" off by default #KT-17002 Fixed 2017-03-24 16:20:07 +03:00