Commit Graph

385 Commits

Author SHA1 Message Date
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
Pavel V. Talanov 0cf3cdb01d Introduce SubpackagesIndexService
In memory cache which provides faster response to getSubpackages() queries
2014-08-22 14:35:58 +04:00
Alexander Udalov 6913869b9c Make "descriptors" not depend on intellij-core
Remove dependency on ProcessCanceledException with a hacky solution not to
break anything at the moment
2014-08-19 12:10:31 +04:00
Alexander Udalov eab0342d39 Remove TestOnly annotation from JetScope#printScopeStructure
Because this method is located in core/ which will be present at runtime, and
this annotation is not needed at runtime
2014-08-19 12:10:30 +04:00
Alexander Udalov df2c8889d4 Remove dependency of "descriptors" on ContainerUtil 2014-08-19 12:10:30 +04:00
Alexander Udalov 7229044a62 Remove dependency of "descriptors" on ImmutableSet 2014-08-19 12:10:29 +04:00
Alexander Udalov 2055d4d72c Remove dependency of "descriptors" on Maps/Sets 2014-08-19 12:10:28 +04:00
Alexander Udalov 9bc7d27fe1 Remove dependency of "descriptors" on Lists
Also insert a sensible starting capacity almost everywhere
2014-08-19 12:10:27 +04:00
Alexander Udalov aff7619206 Remove dependency of "descriptors" on StringUtil 2014-08-19 12:10:25 +04:00
Alexander Udalov df554e7c53 Remove dependency of "descriptors" on Function/Condition/Processor 2014-08-19 12:10:24 +04:00
Alexander Udalov 47d5f83d04 Report unmet trait requirements
#KT-3006 Fixed
2014-08-13 17:19:55 +04:00
Alexander Udalov 4ff6a627d0 Get rid of isConstructorOfStaticNestedClass()
This value can always be computed in ConstructorDescriptorImpl#initialize
2014-08-13 15:13:23 +04:00
Alexander Udalov 415fe7a5e6 Initial support for classes in scripts and REPL 2014-08-13 15:13:22 +04:00
Pavel V. Talanov 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Alexey Sedunov d226a11c8e Find Usages: Add support of naming conventions
#KT-1356 Fixed
2014-08-08 18:59:47 +04:00
Alexey Sedunov 311166737f Associate synthetic component function descriptors with corresponding
constructor parameters
2014-08-08 18:59:45 +04:00
Pavel V. Talanov 8496c535aa Replace ModuleDescriptorImpl implementation
Change the way modules are configured:
Add dependencies on other modules instead of adding additional package fragment providers
Refactor related code
Drop DependencyKind
Hide common new module creation in CliLightClassGenerationSupport
2014-07-31 21:25:49 +04:00
Svetlana Isakova 11ea241efb Render candidate and resulting descriptors in resolved call tests 2014-07-30 17:07:09 +04:00
Pavel V. Talanov af616e731b Fix DescriptorUtils#getContainingModule 2014-07-29 21:01:11 +04:00
Alexander Udalov fb958897a9 Introduce kotlin.Cloneable
- Cloneable is a trait with a single protected member 'clone', which is mapped
  to java.lang.Cloneable on JVM
- 'clone' is non-abstract to be able to call 'super.clone()' in the
  implementations. Also if you need your class to be Cloneable, most of the
  time inheriting from Cloneable and calling 'super.clone()' will work
- hack 'super.clone()' in JVM intrinsics and TImpl delegation generation
- make arrays Cloneable, handle 'clone()' calls in the intrinsic

 #KT-4890 Fixed
2014-07-25 21:19:39 +04:00
Pavel V. Talanov 3f7050635c Builtins: check for function and extension function types by fq names
As opposed to checking by descriptor
2014-07-25 21:15:03 +04:00
Alexander Udalov 70adb0f4e2 Temporarily prohibit non-local returns for some stdlib functions
Make InlineUtil work with FQ names, not descriptors

 #KT-5496 Fixed
 #KT-5497 Fixed
2014-07-19 02:13:27 +04:00
Alexander Udalov 540b87a1dc Support object array annotation arguments in deserialization 2014-07-19 02:13:26 +04:00
Evgeny Gerashchenko 708816f09c Fixed generating method calls from same module when inlining. 2014-07-11 14:54:12 +04:00
Alexander Udalov 0e758b97f7 Minor, delete outdated comments and refine type 2014-07-10 20:30:47 +04:00
Pavel V. Talanov 8b91855fac Drop SynthesizedCallableMemberDescriptor 2014-07-09 18:19:37 +04:00
Pavel V. Talanov 59e43020c3 Initial version of storing SourceElements in descriptors
Introduce SourceElement, JavaSourceElementFactory, DeclarationDescriptorWithSource
Implement getSource() for eager, lazy and java descriptors
2014-07-09 18:19:34 +04:00
Andrey Breslav e3b1639edf KT-5425 Kotlin plugin crashes when project uses RxJava 17.0 or older
#KT-5425 Fixed
2014-07-09 16:10:41 +04:00
Svetlana Isakova 06a257025f Added NotNull annotations 2014-07-08 14:48:15 +04:00
Alexander Udalov 71cd7838d2 Move/inline enum class object related methods in DescriptorUtils 2014-07-07 18:33:31 +04:00
Alexander Udalov e502d8dcc6 Remove JetScopeAdapter 2014-07-07 18:15:32 +04:00
Alexander Udalov 64512ae87b Move writable scope implementations to 'frontend' 2014-07-07 18:15:31 +04:00
Alexander Udalov b9fd52739f Move around some descriptor implementations
- mutable class, mutable package fragment and their dependencies go to module
  'frontend'
- ModuleDescriptorImpl and PackageFragmentDescriptorImpl are moved to the
  package "impl" in their module
2014-07-07 18:15:31 +04:00
Alexander Udalov bf45a3590b Use a specialized scope in EnumClassObjectDescriptor
Instead of WritableScopeImpl
2014-07-07 18:15:30 +04:00
Alexander Udalov 6e5339ad3c Move values/valueOf creation logic to EnumClassObjectDescriptor 2014-07-07 18:15:29 +04:00
Alexander Udalov db3e5ed678 Use EnumClassObjectDescriptor in TypeHierarchyResolver 2014-07-07 18:15:28 +04:00
Alexander Udalov de21f76e10 Introduce EnumClassObjectDescriptor
Extract the duplicate logic in deserialization and descriptor.loader.java
2014-07-07 18:15:27 +04:00
Alexander Udalov 8efeb3ac6a Move script descriptor implementation to frontend 2014-07-07 18:15:27 +04:00
Michael Bogdanov 14788213a2 Annotation parameter processing util 2014-07-07 10:51:47 +04:00
Michael Bogdanov da01a11137 New diagnostic for non-local return annotation 2014-07-07 10:51:46 +04:00
Pavel V. Talanov 123523d1dc Drop ClassDataFinder#getClassNames() 2014-07-03 20:46:42 +04:00
Pavel V. Talanov 0c8956a36e Refactor: DescriptorFinder -> ClassDataFinder
Deserialization subsystem only need to know about the way to obtain class data, it can construct descriptors itself (no need to call DeserializedClassDescriptor constructor from other modules)
2014-07-03 20:46:41 +04:00
Pavel V. Talanov 53337f793b Move caching of deserialized classes to new component ClassDeserializer
Drop AbstractDescriptorFinder
2014-07-03 20:46:40 +04:00
Pavel V. Talanov 55ae3cab19 Drop DependencyClassByQualifiedNameResolver and implementation 2014-07-03 20:46:37 +04:00
Pavel V. Talanov d961d17cd4 Fix DeserializerForDecompiler: create package fragment provider for missing dependencies 2014-07-03 20:46:35 +04:00
Pavel V. Talanov 7ee7047753 Deserializer: use module to search for dependencies in TypeDeserializer 2014-07-03 20:46:33 +04:00
Alexander Udalov c18fd179a9 Get rid of intellij Pair in TypeUtils 2014-06-26 22:02:59 +04:00
Alexander Udalov beb66e2247 Minor, don't intersect sets, use retainAll instead 2014-06-26 22:02:59 +04:00
Alexander Udalov eb11a7dc88 Move utilities out of runtime modules
DescriptorUtils & DescriptorSubstitutor contained a lot of utilities that were
used only in compiler & IDE. Move them closer to their usages
2014-06-26 22:02:59 +04:00
Zalim Bashorov 0d0751c3f9 Minor: JvmCodegenUtil#isNullableType -> TypeUtils#isNullableType 2014-06-26 14:55:56 +04:00