Commit Graph

38482 Commits

Author SHA1 Message Date
Ilya Chernikov ea71d57808 Use script-runtime properly in IDEA project:
use it from the installed plugin for dependent modules (frontend)
use it from bootstrap in the plugin being built
also drop unused daemon-client from the plugin

This makes it consistent with ant build and allow building idea project
without prior ant dist
2017-04-19 15:22:15 +02:00
Sergey Igushkin 2360d5f330 Changed to prepending annotation processor path instead of appending it
to classpath and existing annotation processors.
2017-04-19 16:06:55 +03:00
Mikhail Glukhikh 91f7f19902 ExpressionReplacementPerformer: handle string templates accurately 2017-04-19 13:12:59 +03:00
Mikhail Glukhikh 815a367978 ReplacementPerformer: always copy statement to insert #KT-17273 Fixed 2017-04-19 13:12:58 +03:00
Mikhail Glukhikh 0f6b9473e9 Inliner: don't take into account nonexistent PSI to keep parameter
So #KT-17272 Fixed
2017-04-19 13:12:57 +03:00
Mikhail Glukhikh b8cc7c2ca6 Add type arguments more accurately during inlining 2017-04-19 13:12:56 +03:00
Mikhail Glukhikh f8e1f5e613 Inliner: specify explicit lambda signature for calls with lambdas
So #KT-17213 Fixed
So #KT-17395 Fixed
2017-04-19 13:12:55 +03:00
Mikhail Glukhikh 02e9a3d027 Specify lambda signature: handle special parameters correctly
So #KT-17372 Fixed
2017-04-19 13:12:53 +03:00
Mikhail Glukhikh 6453e10d44 If necessary, add parameter types while inlining lambda 2017-04-19 13:12:52 +03:00
Mikhail Glukhikh 666133beee Minor refactoring (.replaced instead of .replace) 2017-04-19 13:12:51 +03:00
Alexander Podkhalyuzin 75d231cc37 Deprecated setting was used for import optimization on the fly. (#1049) 2017-04-19 11:57:15 +02:00
AJ Alt 8d8f5aa3e0 Update usage of deprecated sourceMappingURL format
The usage of `//@` in sourceMappingURL pragmas was deprecated in favor of `//#`. 
The deprecation happened in 2013, and was motivated by incompatibilities in IE.

The Chromium and Mozilla issues tracking the change:

https://bugs.chromium.org/p/chromium/issues/detail?id=239660
https://bugzilla.mozilla.org/show_bug.cgi?id=870361

And the Mozilla documentation on the warning that is issued as a result of using the deprecated syntax:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_source_map_pragma?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default
2017-04-19 12:54:45 +03:00
Dmitry Jemerov c7bcf4bea7 Don't assert element validity in diagnostic code (EA-92848) 2017-04-19 11:49:12 +02:00
Dmitry Jemerov ffa77c55c4 Handle the case when there's no current project view pane (EA-91198) 2017-04-19 11:49:12 +02:00
Dmitry Jemerov f35079055a Don't try to import elements that don't belong to any module (EA-91890) 2017-04-19 11:49:12 +02:00
Dmitry Jemerov a76d72ea52 Wrap index access in read actions (EA-96128) 2017-04-19 11:49:12 +02:00
Dmitry Jemerov a96eaa2fa9 Remove incorrect @NotNull annotation on getIcon() (EA-79802) 2017-04-19 11:49:12 +02:00
Dmitry Jemerov 03cef30717 Correctly honor expected type when converting string templates to UAST
#KT-17315 Fixed
 #KT-17316 Fixed
2017-04-19 11:46:13 +02:00
Dmitry Jemerov f801c5f3f8 Avoid another case of reading file content when building stubs
Do not read file content in isKotlinInternalCompiledFile() if possible
2017-04-19 11:36:10 +02:00
shiraji 83169ad781 "Add open to callable" intention introduced #KT-16786 Fixed 2017-04-19 11:37:48 +03:00
Ilya Chernikov cdb42c989e Relax error reporting on script dependencies resolving
to avoid exceptions reported on the gradle model problems, e.g. missing
dependencies
2017-04-19 08:14:30 +02:00
Alexander Udalov 134bec6de8 Move dependency on built-ins in IDE higher for common modules
See the comment in ModuleInfo
2017-04-18 22:58:56 +03:00
Alexander Udalov a96b67ea29 Refactor, move TargetPlatform to ModuleInfo 2017-04-18 22:58:56 +03:00
Alexander Udalov 9a8dc14616 Do not add JS/JVM libraries to common library dependencies in LibraryDependenciesCache
Currently kotlin-stdlib-common doesn't have serialized built-ins inside,
so in a multiplatform project, it was possible that either JVM or JS
built-ins (depending on the order of entries in the project
configuration) were going to be used for the analysis of a common module
depending on kotlin-stdlib-common. This resulted, for example, in
additional built-in member calls (e.g. "List.stream()") being unresolved
in JVM modules when they used the List instance coming from the common
module (see the added test)
2017-04-18 22:58:56 +03:00
Alexander Udalov 4c2c734733 Minor cleanup in LibraryDependenciesCache 2017-04-18 22:58:56 +03:00
Ilya Gorbunov 59dc0f57fc Clarify copyRecursively behavior in case of a single file. 2017-04-18 21:26:55 +03:00
Shaun Reich 7ebd86725f Fix FileTreeWalk doc typo/grammar 2017-04-18 21:26:53 +03:00
Ilya Gorbunov ea18282f4c Minor: reformat docs to distinguish summary 2017-04-18 21:26:52 +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
Ilya Gorbunov 37c3d8f204 Sort out warnings related to inline and library functions in stdlib-js 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov ac46f1e23d Cleanup warnings in stdlib-js 2017-04-18 18:51:20 +03:00
Ilya Gorbunov cb186aabf9 Another workaround for IDEA shared source root limitation 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +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
Simon Ogorodnik 9ca65fcf99 Fix addition of wrong java.lang imports on optimize imports
Add check to star importer, to not import already imported fqNames
 #KT-15273 fixed
2017-04-18 17:45:45 +03:00
Dmitry Jemerov dd4a5944f1 Delegate getContaingFile() for UAST declarations to Kotlin origin
This is required to be able to report inspection problems on such
elements.
2017-04-18 15:13:34 +02:00
Ilya Chernikov 2a9de93a82 Attempt to eliminate crashes if script template is broken
Attempts to fix issues similar to EA-100334 completely
2017-04-18 14:57:31 +02:00
Ilya Chernikov 7754e90ad4 Restore another part of script template resolving for even older legacy code
complements d284979
Fixes EA-100334
2017-04-18 14:57:30 +02:00
Nikolay Krasko 5dbf3b6b4d Allow search usages for declarations when correct isEquivalentTo
Now it's possible to do find usages for other languages when light
elements are used.

Revert efb36f4a49 and revise fix of KT-7983:
Don't consider local and non-local class with same fqn equivalent.

 #KT-7983 Fixed
2017-04-18 15:25:08 +03:00
Nikolay Krasko eb941c75f9 Minor: check that invoke() usages search doesn't find overrides 2017-04-18 15:25:08 +03:00
Nikolay Krasko d0a26cf052 Log shifting to plain text search for tests 2017-04-18 15:25:08 +03:00
Nikolay Krasko 6e3016284a Test find usages behaviour when failing to text search on Groovy files
Set test directory to directory with test files (not relative to
findUsages folder). This way test will be configured as if all testdata
is under source root (previously it was copied into package under path
with findUsages) and resolvers will see classes under root package.

 #KT-14974 In Progress
2017-04-18 15:25:08 +03:00
Nikolay Krasko e1de0b9cd8 Fix bad language check in find usages that caused falling to text search 2017-04-18 15:25:08 +03:00
Nikolay Krasko 331279583d Restores test failures on unknown directive 2017-04-18 15:25:07 +03:00
Pavel V. Talanov ec4da854b8 Codegen: fix NPE in NO_ANNOTATION_VISITOR
EA-100245 fixed
2017-04-18 14:59:49 +03:00
Pavel V. Talanov 8eb7117bf1 Light class codegen: do not apply compiler plugins
Applying plugins leads to failures when matching members in LazyLightClassDataHolder
    because plugins rely on analysis results
This decision has its drawbacks (java won't see results of plugin execution)
    but more work on light classes is needed if we want to support this usecase
We can argue that plugins should only generate synthetic members
    but there is no such restriction atm
2017-04-18 14:59:47 +03:00
Pavel V. Talanov bea1da5c7a KtLazyLightClass: do not store references to LightClassDataHolder
Otherwise any cached reference to light class can lead to severe memory leaks in IDE
    since LightClassBuiderResult holds GenerationState which holds ModuleDescriptor
2017-04-18 14:59:45 +03:00
Pavel V. Talanov 3401529be1 IDELightClassContexts#isDummyResolveApplicable: add missing check
Missing check caused exact resolve being applied to every class that had 'equals' overridden
2017-04-18 14:59:43 +03:00