Commit Graph

294 Commits

Author SHA1 Message Date
Alexey Sedunov 5c4dd75110 Light Methods: Change PSI element language to Kotlin 2014-11-26 13:07:34 +03:00
Alexey Sedunov 1008225116 Change Signature: Processing of non-Kotlin usages
#KT-5810 Fixed
 #KT-4187 Fixed
2014-11-26 13:07:33 +03:00
Alexey Sedunov 7556acf029 Light Classes: Provide light classes (as well as light fields) for enum entries 2014-11-18 13:24:57 +03:00
Alexey Sedunov a6479bfc90 Light Classes: Do not add "final" modifier to enum light classes 2014-11-18 13:24:56 +03:00
Alexey Sedunov b09684024b Generate light classes for Kotlin inner classes
#KT-6237 Fixed
2014-11-13 17:27:33 +03:00
Nikolay Krasko 798a6bf689 Temp workaround: force out-of-block modification for properties with nullable types
Initializers for properties with nullable types are analyzed with binding context common for all declarations.
This can cause invalid elements are left in the cache guarded with out-of-block  modification tracker. This workaround forces increment for such cases.
2014-10-22 18:18:09 +04:00
Nikolay Krasko 5cdd5f580d Rewrite out-of-block modifier increment algorithm
1. Search the top-level function or property (only they can produce blocks that won't affect other declarations)
    2. Check if current position is hidden by this declaration

    O^2 behaviour is removed
2014-10-22 18:18:09 +04:00
Nikolay Krasko 40bd9fbdf3 Refactoring: move functions 2014-10-22 18:18:08 +04:00
Nikolay Krasko 0862eead00 Rename file: JetCodeBlockModificationListener -> KotlinCodeBlockModificationListener 2014-10-22 18:18:07 +04:00
Nikolay Krasko 474bc536d6 Rewrite to Kotlin: JetCodeBlockModificationListener 2014-10-22 18:18:07 +04:00
Nikolay Krasko 7b3d96e9e9 Rewrite to Kotlin: rename file 2014-10-22 18:18:06 +04:00
Nikolay Krasko 6b605ec4f9 Rewrite to kotlin: JetModifiableBlockHelper 2014-10-22 18:18:05 +04:00
Nikolay Krasko 565612bc19 Take all responsibility for updating trackers, stop delegating it to Java-plugin code 2014-10-22 18:18:05 +04:00
Pavel V. Talanov 95302fd540 Fix not generating KotlinLightField for OBJECT$ and INSTANCE$ fields
Fix navigation from Java to such fields
Fix TODO in converter
2014-10-03 21:35:06 +04:00
Nikolay Krasko bc5f28d9fd Refactoring: rename KotlinLightMethodFromTrait -> KotlinLightMethodForTraitFakeOverride 2014-10-01 18:05:38 +04:00
Nikolay Krasko 8ada9b68b0 Add special class for getting methods from traits 2014-10-01 18:02:31 +04:00
Pavel V. Talanov 649a6f12bb Compute builtins directory url only once 2014-09-26 18:21:09 +04:00
Alexander Udalov 7b374b9509 Refactor CodegenBinding
- store source element in synthetic descriptor for easier debugging and lesser
  amount of needed method parameters everywhere
- simplify methods which calculate necessary information for MutableClosure
2014-09-26 10:22:24 +04:00
Alexander Udalov c1125402bd Store FqName in LightClassDataForKotlinClass rather than a String
It was also mistakenly named "jvmInternalName" while in fact it was holding the
result of Type#getClassName() which is not an internal name
2014-09-26 10:22:21 +04:00
Alexander Udalov 83f47412b6 Eliminate package "light" from org.jetbrains.jet.asJava
Move everything to org.jetbrains.jet.asJava because classes for some light
elements were already there
2014-09-11 10:37:48 +04:00
Alexander Udalov 50a301865f Move KotlinLightMethod and KotlinLightElement to "jet.as.java.psi" 2014-09-11 10:37:47 +04:00
Alexander Udalov fec64b31dc Fix resolve of Kotlin enum entries from Java
#KT-5719 Fixed
2014-09-11 10:37:47 +04:00
Alexander Udalov 70561cc539 Fix resolution of Kotlin enums' values() and valueOf() from Java
Use the code from PsiClassImpl / ClsClassImpl, which for some reason is absent
in AbstractLightClass

 #KT-5591 Fixed
2014-09-11 10:37:45 +04:00
Alexander Udalov d4b1797646 Override getText() in light classes to prevent decompiler errors on Kotlin sources
Fixes EA-58277
2014-09-11 10:37:07 +04:00
Nikolay Krasko 97a95d6a6a Fix "Cannot resolve method" error in Java for methods from trait 2014-08-28 13:47:36 +04:00
Alexander Udalov d5d4cff701 Minor, remove dependency of everything on "descriptor.loader.java"
Everything already depends on "frontend.java" which exports
"descriptor.loader.java"
2014-08-25 17:53:18 +04:00
Pavel V. Talanov db5303c019 Implement modules in IDE
IDE:
Rewrite AnalyzerFacade and implementations for JS and JVM to support creating separate analyzers for each module
Introduce ModuleInfo which is an intermediate entity between configuration (tests or idea modules) and ModuleDescriptor
Implement IdeaModuleInfos which represent IDEA modules, sdks and libraries
Add (somewhat thin) test checking their behaviour
Implement getModuleInfo() - utility to obtain IdeaModuleInfo for PsiElement
Drop Project.getLazyResolveSession() - not possible to obtain resolve session for the whole project any more
Adjust JavaResolveExtension accordingly
KotlinSignature Intention/Marker - make sure that analyzed element is cls element (he's not in resolve scope otherwise)

LightClasses:
Create separate package light classes for each module
Java code can only reference light class from the first module among it's dependencies
Duplicate jvm signature is only reported on package declarations inside one module

Injectors:
Receive GlobalSearchScope as paramer for VirtualFileFinder and JavaClassFinder
which allows to narrow analyzer scope

JDR:
Introduce ModuleClassResolver resolves java classes in correct java descriptor resolver (corresponding ModuleDescriptor)
Add test checking that java classes belong to correct module

Debugger:
Provide context to analyze files created by debugger in

Converter:
Postprocessor now needs a context to analyze resulting code in

JetPsiFactory:
Add verification that files created by psi factory are not analyzed without context (that is almost never a good idea)

Other:
Use new API in various tests, utilities, run configuration producers and builtin serializers
Various "TODO: (module refactoring)" which mark the unfinished parts
2014-08-22 22:58:54 +04:00
Alexander Udalov 45a57011d8 Simplify and enable by default inline/optimize/assertions
Inline, optimize, call assertions, param assertions are turned on by default
now almost everywhere; invert their meaning
2014-08-13 11:10:37 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Denis Zharkov 0e683b0b99 Added "optimize" flag to settings everywhere 2014-07-15 21:34:32 +04:00
Pavel V. Talanov 16aefae602 Move descriptorToDeclaration utilities family to a separate util class DescriptorToSourceUtils 2014-07-09 19:07:26 +04:00
Pavel V. Talanov d988256831 Refactor: Remove context parameter from BindingContextUtils.descriptorToDeclaration utilities family 2014-07-09 18:19:36 +04:00
Evgeny Gerashchenko 6501066274 Added hacky checks for accessing compiled functions from our module via package part instead of facade.
#KT-4590 fixed
2014-07-07 17:41:34 +04:00
Alexey Sedunov c2aa824242 Implement light method equality based on the original declarations
#KT-4350 Fixed
2014-06-25 19:08:00 +04:00
Andrey Breslav e2c5d9edf6 Support reporting errors on class objects and any classes or objects contained anywhere 2014-06-19 22:12:02 +04:00
Andrey Breslav 86e8a1d410 Do not report declaration clashes on MANY_IMPL_MEMBER_NOT_IMPLEMENTED 2014-06-19 22:12:01 +04:00
Andrey Breslav f0da5d570e Do not report "accidental overrides" when "override" modifier is specified 2014-06-19 22:12:01 +04:00
Andrey Breslav 9ecbeeb100 Filter diagnostics in the CLI compiler, as well as in the IDE 2014-06-19 22:12:00 +04:00
Andrey Breslav 61c7c2f1a1 Minor. Extract function 2014-06-19 22:11:59 +04:00
Andrey Breslav 8fd166ea7b Minor. Method renamed 2014-06-19 22:10:57 +04:00
Andrey Breslav 6bbc8ea951 Fix reporting errors on properties declared in constructors 2014-06-19 22:10:55 +04:00
Andrey Breslav 27f76630e6 ACCIDENTAL_OVERRIDE diagnostics supported
#KT-1 In Progress
2014-06-19 22:10:55 +04:00
Andrey Breslav 1343e59eb9 Properly handle accessors of top-level properties 2014-06-19 22:10:53 +04:00
Andrey Breslav 3bc404a80e Do not skip local classes in top-level functions
In this case we need names for such classes:

fun foo() = run {
  class A
  A()
}
2014-06-19 22:10:53 +04:00
Andrey Breslav dd23b02dae Use safe names in codegen, for the case of light classes 2014-06-19 22:10:53 +04:00
Andrey Breslav f3c46341e5 Filtering out duplicate signature diagnostics if CONFLICTING_OVERLOADS or REDECLARATION is present 2014-06-19 22:10:51 +04:00
Andrey Breslav f80619e4e9 Ability to generate light classes for scripts 2014-06-19 22:10:51 +04:00
Andrey Breslav 74deb58734 Filtering duplicate diagnostics for trait implementations 2014-06-19 22:10:50 +04:00
Andrey Breslav 91136ada27 Filtering duplicate diagnostics for package facades and package parts 2014-06-19 22:10:49 +04:00