Alexey Sedunov
9a4fa3a871
Presentation: Add icons for type aliases
2016-11-30 14:35:27 +03:00
Nikolay Krasko
dc1e3ae441
Allow to search builtins descriptors in stubs by name
2016-11-28 14:38:34 +03:00
Nikolay Krasko
3537673417
Don't enable search stub declaration by name if file doesn't contain descriptor key
...
This might cause irrelevant declarations found with the same name.
2016-11-28 14:38:34 +03:00
Nikolay Krasko
b816c182f0
Try to avoid loading ast for decompiled files (KT-14804)
...
#KT-14804 Fixed
2016-11-28 14:38:34 +03:00
Alexander Udalov
0dc31af73d
Introduce KotlinMetadataFinder#hasMetadataPackage
...
Before creating a MetadataPackageFragment, check that the corresponding
directory (across the classpath) contains at least one .kotlin_metadata file.
Otherwise we're creating packages for every simple name queried during the
resolution and sometimes prefer a (empty) package to the existing class, for
example when the latter class is star-imported
2016-11-25 20:50:15 +03:00
Alexander Udalov
bfb7b21472
Load definitions of symbols from .kotlin_metadata files
...
Extract AbstractDeserializedPackageFragmentProvider out of
JvmBuiltInsPackageFragmentProvider and implement it a little bit differently in
MetadataPackageFragmentProvider. The main difference is in how the package
fragment scope is constructed: for built-ins, it's just a single scope that
loads everything from one protobuf message. For metadata, package scope can
consist of many files, some of which store information about classes and others
are similar to package parts on JVM, so a ChainedMemberScope instance is
created.
Introduce a bunch of interfaces/methods to deliver the needed behavior to the
'deserialization' module which is not JVM-specific and does not depend on the
compiler code: MetadataFinderFactory,
PackagePartProvider#findMetadataPackageParts, KotlinMetadataFinder#findMetadata.
Note that these declarations are currently only implemented in the compiler; no
metadata package parts/fragments will be found in IDE or reflection
2016-11-25 20:50:13 +03:00
Alexey Andreev
20669c1b97
JS: fix building stubs for JS library that contains classes in default package
2016-11-24 17:49:11 +03:00
Dmitry Jemerov
1570886be3
Don't throw exception when resolving out-of-content-root PSI elements to descriptors (EA-92177 assert: ResolverForProjectImpl.descriptorForModule)
2016-11-23 18:29:25 +01:00
Dmitry Jemerov
956e1c70dc
Provide toString() for classes that extend GlobalSearchScope (to diagnose package fragment errors)
2016-11-23 18:29:24 +01:00
Dmitry Jemerov
ebbbe1b801
Include exception in report, not only log it (EA-90231 - assert: ClsJavaStubByVirtualFileCache.createStub)
2016-11-23 18:29:22 +01:00
Dmitry Jemerov
f9f590d270
More diagnostics for EA-85926 and EA-77163
2016-11-23 18:29:21 +01:00
Alexander Udalov
22e1221c75
Support "default platform" in IDE via facet settings
2016-11-22 18:19:02 +03:00
Dmitry Jemerov
baf321a193
Highlight escape sequences in character literals
...
#KT-13795 Fixed
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
b742c8a63d
Implement "Show non-public" filter for Kotlin structure view
...
#KT-14217 Fixed
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
f586eebe16
KotlinStructureViewModel: cleanup after J2K
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
4b591bf41f
KotlinStructureViewModel: J2K
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
bf97e64c1d
KotlinStructureViewModel: rename to .kt
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
f4ce63f6d7
Collect local declarations under properties (KT-14215); improve presentation of object declarations
...
#KT-14215 Fixed
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
45077023bb
KotlinStructureElementPresentation: cleanup after J2K
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
75a5b0ee0c
KotlinStructureElementPresentation: J2K
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
6225867cae
KotlinStructureElementPresentation: rename to .kt
2016-11-22 13:20:35 +01:00
Dmitry Jemerov
99bfbd0a26
Never set isScript flag for stubs of file facade and multifile facade classes (scripts are always generated with ClassKind.CLASS)
2016-11-22 10:26:16 +01:00
Dmitry Jemerov
6a8f78d7c1
Don't add script files to facade indices
...
#KT-12445 Fixed
2016-11-21 14:35:00 +01:00
Zalim Bashorov
7dbcbeb794
IDE: fix detecting target platform for module when it contains js stdlib without regular name
...
Don't use fixed library name to detect JS stdlib.
2016-11-18 15:57:46 +03:00
Alexander Udalov
3d75b78dc5
Use IOUtil instead of DataOutput for readUTF/writeUTF in file based index
...
It uses less space and also may be a little bit faster
2016-11-16 16:30:34 +03:00
Dmitry Jemerov
3f7b9745b4
Fix race condition with synthetic files facade calculation in Upsource (UP-8046)
2016-11-14 12:56:34 +01:00
Alexander Udalov
0b6ad3bc07
Use target platform configured in facet in module analysis
2016-11-11 19:00:12 +03:00
Alexander Udalov
1ce8ed907c
Use TargetPlatformDetector.getPlatform instead of ProjectStructureUtil.isJsKotlinModule
...
The reason for this is to make the choice of the platform more explicit now
that there are more platforms than just JVM and JS (default platform, and also
possibly native in the future)
2016-11-11 19:00:10 +03:00
Mikhail Zarechenskiy
6656bf835f
Perform resolve of constructor parameters during partial constructor resove
...
#KT-13354 Fixed
2016-11-09 23:00:25 +03:00
Valentin Kipyatkov
e850446f17
Introduced BindingContext.DATA_FLOW_INFO_BEFORE
2016-11-08 19:14:40 +03:00
Alexey Sedunov
30d08c989d
Kotlin Facet: Use facet configuration to provide language version for IDE analyzer
2016-11-07 20:03:30 +03:00
Valentin Kipyatkov
3d5d2d8258
KT-14376 ClassCastException from object with vals
...
#KT-14376 Fixed
2016-11-07 18:31:04 +03:00
Valentin Kipyatkov
68174470c3
Add BodyResolveMode parameter to resolveToDescriptor()
2016-11-02 19:25:27 +03:00
Yan Zhulanow
951868f590
Explicitly filter out classes found by DataBindingClassFinder and DataBindingComponentClassFinder for scope without sources (KT-12402)
...
This change is temporary, and it should be reverted when the original problem in DataBinding IDE support is fixed.
2016-11-01 19:36:33 +03:00
Valentin Kipyatkov
046c55a7ac
Caching for PARTIAL_FOR_COMPLETION resolve too (because it's used not only in completion)
2016-10-28 09:47:27 +03:00
Ilya Chernikov
2e03a6f1fd
Add script dependencies modification tracker, some optimizations
2016-10-27 23:36:54 +02:00
Simon Ogorodnik
b802ca0af5
Fix for non-resolving of KtReference, which getTargetDescriptors returning multiple descriptors to same element
2016-10-27 20:02:25 +03:00
Nikolay Krasko
0261385681
Report file name for getDefaultPlatform() information
2016-10-27 14:26:07 +03:00
Dmitry Jemerov
38a448ebbd
use a non-deprecated API
2016-10-27 12:50:39 +02:00
Alexander Udalov
e0989caf46
Load built-ins from module dependencies in JVM compiler
...
Introduce a new method KotlinClassFinder#findBuiltInsData, which is only
implemented correctly in the JvmCliVirtualFileFinder because it's only used in
the compiler code at the moment.
Introduce JvmBuiltInsPackageFragmentProvider, the purpose of which is to look
for .kotlin_builtins files in the classpath and provide definitions of
built-ins from those files.
Also exclude script.runtime from compilation because, as other excluded
modules, it has no dependency on the stdlib and is no longer compilable from
the IDE now, because it cannot resolve built-ins from anywhere
2016-10-26 16:31:09 +03:00
Alexander Udalov
035d6156a7
Drop Cloneable in JS, synthesize it at compile-time on JVM
...
Use the same approach that is used for creating function type classes
(Function{0,1,...}) + add Cloneable to supertypes of Array and primitive arrays
#KT-5537 Fixed
2016-10-25 15:42:33 +03:00
Alexander Udalov
0e9f29fdba
Make ClassDescriptor#classId nullable
...
Local classes or anonymous objects do not have a class id. Use "!!" almost
everywhere to make assertion explicit
2016-10-25 15:42:32 +03:00
Alexander Udalov
c0147860bd
Allow multiple ClassDescriptorFactory instances in deserialization
2016-10-25 15:42:32 +03:00
Nikolay Krasko
a344ad0644
Fix absence of annotation for function type in cls stubs and ignore @ExtensionFunctionType
2016-10-25 13:30:35 +03:00
Nikolay Krasko
d1dfcfaca1
Fix stub-psi mismatch exception on restoring annotation for nullable types
...
(cherry picked from commit 1aa37f11258dde289a9f7cb700294a038168fbdc)
Conflicts:
compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt
idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt
2016-10-25 13:22:53 +03:00
Mikhail Glukhikh
e53940f4af
KT-8442 related: correct handling of erroneous destructuring references, fixes EA-90434
2016-10-25 13:13:15 +03:00
Mikhail Glukhikh
e7e56ab85c
KT-8442 related: destructuring declarations aren't taken into account during light classes generation, fixes EA-81204
2016-10-25 13:13:11 +03:00
Valentin Kipyatkov
f5d4b1dc8d
KT-14191 FormattingModelInconsistencyException Exception on applying intention Replace with count()
...
#KT-14191 Fixed
2016-10-24 18:32:01 +03:00
Mikhail Glukhikh
6b9252a5d3
KT-7929 related: incorrect KtDestructuringDeclarationEntry is not resolved to descriptor, fixes EA-76715
2016-10-24 15:17:52 +03:00
Mikhail Glukhikh
1c8a2bb4cc
No more attempts to resolve KtDestructuringDeclaration to descriptor #KT-7929 Fixed
...
Also #KT-8442 Fixed
2016-10-24 15:17:48 +03:00