Commit Graph

9 Commits

Author SHA1 Message Date
Dmitry Savvinov 5ab79a111d Introduce 'mayHaveContract'-flag in stubs
This is needed for further commit, which supports contracts-based
smartcasts in partial body resolve mode.

NB: Stubs can be built from 3 sources:
- source code (contract presence can be checked by PSI)
- binary data (contract presence can be checked by Kotlin Metadata)
- decompiled sources

The last case is a bit of a headache, because usually bodies are omitted
in decompiled sources. To workaround it, we have to inject stubbed
contract-call in the body.
2018-07-27 16:59:24 +03:00
Dmitry Jemerov 4dd3f30f2d Build stubs for local functions; show them in Goto Symbol
#KT-14161 Fixed
2017-05-18 21:02:24 +02:00
Nikolay Krasko 355dca2a97 Add toString for KotlinStubBaseImpl
Try to simplify "Stub and PSI element type mismatch" exception analyze.

(cherry picked from commit 11aa71e)
2016-10-21 00:18:27 +03:00
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00
Valentin Kipyatkov 6a2cc66eb1 Got rid of isProbablyNothing in stubs + fixed exception on some files on indexing stubs 2015-04-02 10:10:31 +03:00
Valentin Kipyatkov b22233d378 Corrected test data for stub tests 2014-11-24 20:11:25 +03:00
Pavel V. Talanov e33144f89a Define toString() for stub impl classes via reflection
Update outdated test data for stub builder test
2014-05-21 16:50:55 +04:00
Pavel V. Talanov eb27020340 Stubs: reduce the amount of boilerplate code
Extract a common type for placeholder stub elements
2014-05-21 15:37:59 +04:00
Pavel V. Talanov fd5aea7c14 Refactor: use generated approach for stubs test
Remove meaningless assertion
Add comment to NotStorePropertyFromDelegate test
2014-03-24 17:06:07 +04:00