Commit Graph

38457 Commits

Author SHA1 Message Date
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
Pavel V. Talanov 10aa9c5910 PsiBasedClassResolver: get default imports without resolution facade
Using DefaultImportProvider is expensive in this scenario
2017-04-18 14:59:41 +03:00
Pavel V. Talanov c436a9af07 TargetPlatform#getDefaultImports(): cache result in all implementations 2017-04-18 14:59:39 +03:00
Pavel V. Talanov 421b785697 Minor: fix erroneous refactoring 2017-04-18 14:59:37 +03:00
Ilya Gorbunov f22375601b Remove unneeded suppressions 2017-04-18 12:47:11 +03:00
Ilya Gorbunov 8f452ed046 Cleanup warnings in stdlib and generated code 2017-04-18 12:47:04 +03:00
Ilya Gorbunov 6af986cfdd Refactor serialization tests and move them to test/io package
Add tests for singleton deserializing.
2017-04-18 12:46:52 +03:00
Ilya Gorbunov b67aed61ce Fix preprocessor failure to to create directory when the first operation is modification 2017-04-18 12:46:43 +03:00
Sergey Mashkov 96160606ba Maven: KT-15050 setup logger so IDEA's core could log error
Introduce system property kotlin.compiler.X.enable.idea.logger=true
The reason is that I suspect that the error is somewhere at com.intellij.ide.plugins.PluginManagerCore#loadDescriptorFromJar but unfortunately default logger doesn't log messages at "info" log level so we can't see why exactly does it fail.
Users can enable IDEA's logger to see more details.
2017-04-18 12:31:39 +03:00
Alexey Andreev 7e6df03421 Fix improper handling of coroutine interceptors
Don't use coroutine facade in following cases:
* When calling coroutine functions in non-suspend mode (i.e.
  suspend flag is either false or skipped).
* When passing continuation from suspend function to suspend function.

Use facade only for corresponding intrinsics.
Reason: interceptor should not be called on each suspend function
invocation, it should be called after resume from innermost
suspend function.

Fix KT-17067. The example provided with the issue is very similar to
dispatchResume.kt which passes after these changes.

Add test to prove that KT-17446 is no more reproducible.
2017-04-18 11:22:18 +03:00
Mikhail Zarechenskiy f3ed75998e Simplify resolve for control labels by using PSI
Diagnostic `NOT_A_RETURN_LABEL` wasn't quite useful and its eliminating allows to simplify label resolver a lot. It could be also added using PSI
2017-04-18 10:23:19 +03:00
Alexey Sedunov e79a7d3e94 Change Signature: Update test data 2017-04-17 23:00:20 +03:00
Alexey Sedunov 45929fd3e3 Change Signature: Invalidate ChangeInfo after the refactoring
The goal is to avoid keeping all semantic information used by
KotlinChangeInfo in UndoableAction produced by the refactoring

#KT-17333 Fixed
2017-04-17 23:00:19 +03:00
Alexey Sedunov b33b06722d Change Signature: Support header/impl declarations 2017-04-17 23:00:18 +03:00
Alexey Sedunov 66265972aa Multiplatform Project: Fix impl-by-header search and vice versa 2017-04-17 23:00:17 +03:00
Alexey Sedunov e1503d80f2 Test Framework: Move common members to KotlinMultiFileTestCase 2017-04-17 23:00:16 +03:00
Alexey Sedunov d78828001d Rename: Support header/impl declarations 2017-04-17 23:00:15 +03:00
Alexey Sedunov 701ba5b59b Rename: Support rename by caret in multi-module tests 2017-04-17 23:00:13 +03:00
Alexey Sedunov b65e082425 Test Framework: Fix module creation in multi-module tests 2017-04-17 23:00:12 +03:00
Alexey Sedunov 69ef8e89a9 Move: Fix NPE on moving file to non-source directory 2017-04-17 23:00:11 +03:00
Alexey Sedunov b229eeeb47 Move: Prevent running refactoring helpers on partial move
It may lead to some imports being wringly removed
due to their references being unresolved yet

Also fix NPE on package rename via directory move
2017-04-17 23:00:10 +03:00
Alexey Sedunov aa0f0ef02d Presentation: Do not use resolve to compute element description
Invoking analysis on EDT may degrade editor performance
2017-04-17 23:00:08 +03:00
Alexey Sedunov 8df502de84 Move To Upper Level: Fix target package computation
#KT-13466 Fixed
2017-04-17 23:00:07 +03:00
Alexey Sedunov fc33d89e28 Move Member out of Companion: Improve conflict checking
Also do not show conflict dialog under write action
2017-04-17 23:00:06 +03:00
Alexander Udalov 7a25af0f2f Fix NPE caused by KotlinCompileMojoBase if no "Xcoroutines" value is passed
NPE was happening in CLICompiler.chooseCoroutinesApplicabilityLevel
2017-04-17 18:40:35 +03:00
Zalim Bashorov 9783a31779 Remove kotlin-reflect.jar dependency from util module and move reflectionUtil.kt closer to "clients"
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:38 +03:00