Commit Graph

5733 Commits

Author SHA1 Message Date
Mikhail Glukhikh 9c15db93d9 Inline: more accurate handling of type arguments
Partial revert of b8cc7c2ca6
Soften requirements in remove type arguments intention in this mode
So #KT-17622 Fixed
Related to KT-17623
2017-05-31 12:47:50 +03:00
Mikhail Glukhikh 38d6c597a3 Handle expected type more precisely in RemoveExplicitTypeArguments
So #KT-17623 Fixed
2017-05-31 12:46:59 +03:00
Kirill Rakhman 08bd212d82 Add quickfix for @receiver applied to extension member instead of type
So #KT-14648 Fixed
2017-05-30 15:47:21 +03:00
Dmitry Neverov b206f6288d Convert to primary constructor preserves accessors #KT-17996 Fixed 2017-05-30 15:35:54 +03:00
Valentin Kipyatkov c69375ebdc Remove redundant curly braces in string templates on inline 2017-05-26 16:37:37 +03:00
Valentin Kipyatkov ab1b985bac Inline Property supported for properties with setter
#KT-2638 Fixed
2017-05-26 16:37:36 +03:00
Valentin Kipyatkov e6bfa55534 Inline Property also supported for properties with getter 2017-05-26 16:37:36 +03:00
Valentin Kipyatkov 940ce27925 Inline val: more correct and simple detection of write usages
#KT-17489 Fixed
2017-05-26 16:37:35 +03:00
Valentin Kipyatkov 55979aca74 Drop result value if it's not needed 2017-05-26 16:37:35 +03:00
Dmitry Neverov 753b714544 Report cases when class member can be private 2017-05-26 13:29:01 +02:00
Dmitry Petrov c83b764c73 Update testData after changes in diagnostics 2017-05-26 13:58:46 +03:00
Dmitry Petrov a86fe89aae Include file name for package-level members in diagnostics 2017-05-26 13:58:46 +03:00
Dmitry Petrov 7979663e6c Update testData for changed diagnostic messages 2017-05-26 13:58:46 +03:00
Dmitry Petrov 17eab2865d Include containing declaration name in message for JVM signature clashes
#KT-9359 Fixed
2017-05-26 13:58:46 +03: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
Dmitry Neverov 0fd42bc747 Don't suggest cast when !! is possible #KT-18033 Fixed 2017-05-26 09:47:57 +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
nd cb5459b7d7 Don't suggest adding replaceWith in DeprecationLevel.HIDDEN (#1094)
#KT-17917 Fixed
2017-05-24 15:06:51 +02:00
nd 8d6d228bb8 Move property to constructor preserves vararg keyword (#1095)
#KT-18035 Fixed
2017-05-24 14:58:30 +02:00
Alexander Udalov 965b4199f4 Fix compilation against JRE 9 on JPS
Write the modular JDK (9+) path to the module.xml file passed to the
compiler from the JPS plugin. This path is then recorded in the compiler
configuration in KotlinToJVMBytecodeCompiler.configureSourceRoots. This
is needed because in JPS plugin, we pass "-no-jdk" and thus no JDK home
path was recorded in the compiler configuration in
K2JVMCompiler.setupJdkClasspathRoots. Presence of JDK home path in the
configuration is crucial for JDK 9 support (see
KotlinCoreEnvironment.Companion.createApplicationEnvironment), because
classes there can only be loaded with the special "jrt" file system, not
as .class files in .jar files

 #KT-17801 Fixed
2017-05-24 15:46:57 +03:00
shiraji c8e58ce9ab Fix WrapWithSafeLetCallFix ignore extension method
Related to KT-17726
2017-05-24 14:02:01 +03:00
Dmitry Neverov 46aaee5d05 Fix nullability quick-fixes with implicit receiver #KT-17726 Fixed 2017-05-24 14:01:58 +03:00
Dmitry Jemerov 4f08d2b16a Remove incorrect argument count check from TODO searcher 2017-05-23 18:36:17 +02:00
qx 152c8b521e Missed file 2017-05-22 18:34:27 +03:00
qx bc14ce740a KT-15309 Don't apply "Fix with 'asDynamic'" to member extension funcitons 2017-05-22 18:34:27 +03:00
Alexander Udalov f8e82f148a Drop TypeLazinessToken and LazyResolveToken 2017-05-22 18:15:19 +03:00
Pavel V. Talanov 8fc953f529 Modules with different language levels can't be analyzed together
"Supports additional builtIn members" setting
    is basically adding members to some types
If we analyze them toghether other modules would leak types
    that have those members (or don't) into other modules scopes
    leading to code that has erroneous highlighting

See KT-17357

#KT-17357 Fixed
2017-05-22 17:42:21 +03:00
Alexey Sedunov 75b73ecbcb Copy: Disable CopyKotlinDeclarationsHandler on non-source files 2017-05-22 13:51:08 +03:00
Alexey Sedunov 151b512a6c Kotlin Facet: Do not rewrite v2 configuration to latest version
This causes unwanted changes in configuration files
after plugin update
2017-05-22 13:51:07 +03:00
Alexey Sedunov 6049bb8238 Configuration: Use project-level JVM target when facet is absent
#KT-17722 Fixed
2017-05-22 13:51:06 +03:00
Valentin Kipyatkov 1fe6886a33 Fixed error message to quote parameter name 2017-05-20 23:44:20 +03:00
Kirill Rakhman 4cbdbaa057 refactor ConvertFunctionToPropertyIntention and fix 'Convert function to property shouldn't insert explicit type if it was inferred previously' (#1011)
Fixes #KT-14820
2017-05-19 21:32:11 +03:00
Mikhail Glukhikh 17869abfaf Don't suggest making interface member final
(which was possible in leaking this inspection)
So #KT-14443 Fixed
2017-05-19 20:36:31 +03:00
Mikhail Glukhikh a73cf0e1fe Don't suggest make object container open #KT-11003 Fixed 2017-05-19 20:36:24 +03:00
Dmitry Neverov 3b4dafe691 Detect recursive property accessors #KT-17221 Fixed 2017-05-19 20:36:09 +03:00
Dmitry Jemerov ded5bfb841 Show calls of TODO() function in TODO view
#KT-8617 Fixed
2017-05-19 18:23:45 +02: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
Dmitry Jemerov f6574a475b Show location for local classes in Goto Class
#KT-7954 Fixed
2017-05-18 21:02:24 +02:00
Dmitry Jemerov 4dd3f30f2d Build stubs for local functions; show them in Goto Symbol
#KT-14161 Fixed
2017-05-18 21:02:24 +02:00
Dmitry Jemerov af043843b7 Don't show disambiguation for "Show expression type" on "this"
#KT-17840 Fixed
2017-05-18 21:02:24 +02:00
Dmitry Jemerov 8f38d03b48 Indicate vararg parameters in Goto Symbol presentation
#KT-17899 Fixed
2017-05-18 21:02:24 +02:00
Nikolay Krasko 14c343de35 Enable auto-indent in multiline strings when caret is before interpolation
#KT-17849 Fixed
2017-05-18 20:00:18 +03:00
Nikolay Krasko 251a0270a4 Make auto-indent work for multiline string with injection (KT-17942)
#KT-17942 Fixed
2017-05-18 20:00:18 +03:00
Nikolay Krasko 0551659281 Don't indent to unrelated closing quote (KT-17894)
#KT-17894 Fixed
2017-05-18 20:00:18 +03:00
Nikolay Krasko 0cd3e4f3a4 Minor: JetFile -> KtFile 2017-05-18 20:00:17 +03:00
Alexey Sedunov 0994474e87 Presentation: Fix NPE on functional type rendering
#KT-17638 Fixed
2017-05-18 14:22:40 +03:00
Alexey Sedunov a80fb6f20f Copy: Report module accessibility conflicts 2017-05-18 14:22:39 +03:00
Pavel V. Talanov 55721e4f16 Test not creating resolvers for modules that have no relevant packages 2017-05-16 22:15:06 +03:00
Pavel V. Talanov 798c80ed07 Use wrappers around java.util.* to emulate kotlin.collection.* behaviour
Backend: If kotlin class extends kotlin.collection.List
    write it as it's super interface (light class mode only)
IDE: Provide wrapper classes to java resolve
    that try to emulate backend behaviour

For example if kotlin class implements kotlin.collections.Map,
    we provide a superinterface that has abstract 'getEntries' method
    and 'entrySet' method that is considered default.
In reality all those methods are generated in the class itself.

In IDE supporting this case without hacks is not feasible performance-wise
    since kotlin.collection.* may not be an immediate supertype and we need
    to compute all supertypes just to calculate own methods of the class
2017-05-16 22:01:03 +03:00
Mikhail Glukhikh 51af18608f AbstractLocalInspectionTest: add LANGUAGE_VERSION support
Related to KT-17164
2017-05-16 20:44:12 +03:00