Commit Graph

151 Commits

Author SHA1 Message Date
Dmitry Jemerov 45ef9b02c4 remove some leftovers of old package facades in IDE code 2015-11-11 19:25:11 +01:00
Pavel V. Talanov de4ea45f20 Do not compute stubs when building DefaultImpls light classes
Do not build stubs when computing inner classes of a light class
This should implicitly fix a deadlock reported in KT-9907 and KT-9811
2015-11-10 14:31:14 +03:00
Pavel V. Talanov bff7ff0c5d Improve heuristic to decide whether we will generate DefaultImpls for interface
This is not accurate, there are some cases when we will generate DefaultImpls class that are not covered:
- Inherited default implementations
- Annotated members

In these cases IDE will report an error when in fact code compiles
What is critical though is to be able to decide whether to build DefaultImpls light classes solely based on psi without triggering stubs calculation
2015-11-10 14:31:11 +03:00
Pavel V. Talanov ad87ec12cd Fast implementation for KtLightClassForExplicitDeclaration#getContainingClass()
Prevent computing stubs for light classes for nested/inner classes when calling completion from java
2015-11-10 14:31:08 +03:00
Pavel V. Talanov 73cb94a3b2 FakeFileForLightClass: implement API correctly 2015-11-10 14:30:59 +03:00
Pavel V. Talanov 39dacbf3c8 Minor: better toString() 2015-11-10 14:30:58 +03:00
Pavel V. Talanov 1dd7e0edba Minor: do not pass psiManager redundantly 2015-11-10 14:30:57 +03:00
Pavel V. Talanov 6dbe8e8a1b Minor: KtLightClassForFacade remove old todos and fix toString 2015-11-10 14:30:55 +03:00
Pavel V. Talanov 085d95a5b8 Tests: Introduce LightClassComputationControl to track when stubs for light classes are built
Use it to track when light classes are built in KotlinSourceInJavaCompletionTest
2015-11-10 14:30:53 +03:00
Pavel V. Talanov ec48b54032 Rename KotlinJavaFileStubProvider and remove StubGenerationStrategy class 2015-11-10 14:30:51 +03:00
Pavel V. Talanov 7e091d0df4 J2K KotlinJavaFileStubProvider: refactor code 2015-11-10 14:30:48 +03:00
Pavel V. Talanov 75b8985468 J2K KotlinJavaFileStubProvider: autoconvert and minor changes 2015-11-10 14:26:29 +03:00
Pavel V. Talanov 6f02c0593b J2K KotlinJavaFileStubProvider: rename file 2015-11-10 14:25:19 +03:00
Dmitry Jemerov e64a270d1a more renames to get rid of "Jet" in class and method names 2015-11-09 19:07:11 +01:00
Nikolay Krasko 178aba54dd Test it's safe to call PsiElement methods on Kotlin light elements 2015-11-07 01:27:34 +03:00
Dmitry Jemerov 3bd7f87d2b rename "Jet" from names of IDE classes; consistently use Kt prefix for PSI elements and classes directly related to specific PSI elements 2015-11-02 18:49:35 +01:00
Pavel V. Talanov 78bb44850d Minor: KotlinAnnotationLightMethod -> KotlinLightAnnotationMethod 2015-11-02 18:39:00 +03:00
Pavel V. Talanov 9f5c0741bd KotlinLightField: create KotlinLightEnumConstant based on delegate psi, not whether could find original declaration
This was not true for decompiled classes and led to enum entries from kotlin compiled files being unresolved in java
2015-11-02 18:38:58 +03:00
Pavel V. Talanov e5f075c7f6 Refactor light fields: move all implementation into one file and prettify code 2015-11-02 18:38:52 +03:00
Pavel V. Talanov e6b498f943 J2K KotlinLightField: convert and fix compilation 2015-11-02 18:38:50 +03:00
Pavel V. Talanov d7519225a0 J2K KotlinLightField: rename file 2015-11-02 18:38:49 +03:00
Pavel V. Talanov f8efdacefd Refactor light methods: drop KotlinLightMethodForTraitFake and KotlinNoOriginLightMethod
Move two remaining meaningful implementation into one place
Move code that choose which implementation to use out of KotlinWrappingLightClass
2015-11-02 18:38:47 +03:00
Pavel V. Talanov 37c17ba71e Light classes: correct wrappers for annotation methods 2015-11-02 18:38:19 +03:00
Mikhail Glukhikh f8a70302ac Cleanup: get rid of effective visibility warnings 2015-10-28 14:31:51 +03:00
Dmitry Petrov 09f0b3fe87 KT-9721:
- Kotlin/JS still uses package facades.
Handle them properly in StubClassBuilder parentStack.
- Generate backend-related diagnostics in IDE
using light class generation for file facades.
- Drop PackageFacadeStubCache.
2015-10-26 19:37:52 +03:00
Dmitry Jemerov d6a3870101 rename Kt to Kotlin in KtType, KtIcons 2015-10-20 16:23:31 +02:00
Dmitry Jemerov 49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Michael Bogdanov c8c3e88c82 Make top-level property backing field private in bytecode 2015-10-19 19:09:30 +03:00
Nikolay Krasko 4a0eb3836f Diagnostic for EA-70732 (another try) 2015-10-19 18:38:46 +03:00
Dmitry Petrov 31a85132c6 Dropping package facades:
- use KotlinCodegenFacade to build light classes
(PackageCodegen is not enough to obtain proper diagnostics)
2015-10-19 16:03:19 +03:00
Dmitry Petrov 149e70aa07 Dropping package facades:
- light classes: do not generate light class for package facade
- drop package facades as multifile classes compilation mode support
- get rid of some additional package facade fqName usages
- update tests for light classes
2015-10-19 16:03:16 +03:00
Pavel V. Talanov d74a989d93 Tweak light classes to avoid computing stubs on certain api calls
Should speed up completion from java for certain cases
2015-10-19 15:27:48 +03:00
Michael Bogdanov 7022d84ec1 Use package part context for class generation 2015-10-18 17:53:27 +03:00
Nikolay Krasko cf7f94a559 Process request for searching class with empty qualified name without errors 2015-10-16 16:28:02 +03:00
Alexander Udalov fb5d8de84b Use type table in DescriptorSerializer, add switch to enable/disable, test 2015-10-15 18:25:40 +03:00
Ilya Gorbunov c4ef4758d2 Remove last two usages of Delegates.blockingLazy 2015-10-15 18:20:39 +03:00
Dmitry Petrov 8cd624a58a Drop package facades: code cleanup in Kotlin project. 2015-10-15 10:33:47 +03:00
Dmitry Petrov 5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Ilya Gorbunov 90e5ee8a7e Replace KotlinPackage legacy facade with corresponding package parts. 2015-10-07 22:36:29 +03:00
Ilya Gorbunov 3106458cc4 Replace assert with lazy assert, times with repeat. 2015-10-07 22:36:23 +03:00
Dmitry Jemerov c5d3673b6b change the ID of the language from "jet" to "kotlin"; rename JetLanguage to KotlinLanguage 2015-10-06 16:14:07 +02:00
Mikhail Glukhikh 6f7d9459fa Completion for sealed class inheritors and a pair of tests 2015-09-30 19:38:14 +03:00
Dmitry Petrov 91214c50a6 Unify containing classes mapping for deserialized callable members. 2015-09-30 09:56:06 +03:00
Denis Zharkov 22d58239e3 Support DefaultImpls in light-classes and indices
#KT-4647 Fixed
2015-09-30 08:19:52 +03:00
Denis Zharkov 27bc62bd8e Minor. Rename constants: TRAIT_IMPL* -> DEFAULT_IMPLS* 2015-09-30 08:19:50 +03:00
Valentin Kipyatkov 420c6856be Changed naming algorithm of accessor name generation: "isXXX" and "kClass" cases affected 2015-09-29 18:32:24 +03:00
Valentin Kipyatkov 98da621ab3 Temporary rename of properties starting with "is" and used from java code (will revert back after changing accessor naming policy) 2015-09-29 18:32:23 +03:00
Dmitry Petrov 8595315ba5 - Package facade classes should have ACC_DEPRECATED
- Light classes for package facades should be deprecated
2015-09-23 17:41:13 +03:00
Denis Zharkov 9c4564a5a6 Get rid of deprecated annotations and modifiers in project code 2015-09-18 09:34:27 +03:00
Dmitry Petrov 47b8853051 Generate light classes for single-file facades using PackageCodegen. 2015-09-15 10:25:40 +03:00