Mikhail Glukhikh
840847e47c
Code cleanup: several inspections applied
2017-06-29 16:25:57 +03:00
Mikhail Zarechenskiy
f8617f6676
Adapt collecting synthetic constructors in IDE for completion
2017-06-16 16:44:53 +03:00
Alexander Udalov
7febd846e8
Export 'intellij-core' in module 'frontend'
...
Remove intellij-core from dependencies of modules which already depend
on frontend or any module that exports frontend (such as frontend.java)
2017-06-06 14:29:26 +03:00
Alexander Udalov
e67e0440bb
Rename LexicalScope.Empty -> Base
...
"Empty" is slightly confusing because although the scope has no declared
symbols, it is not empty: it has a parent scope which can contain
symbols and can have parents as well
2017-06-05 10:27:38 +03:00
Pavel V. Talanov
40561dabed
J2K JavaToKotlinClassMap
2017-05-16 22:00:58 +03:00
Mikhail Zarechenskiy
429f0e4f68
Adapt changes in IDE after moving SAM adapters to synthetic scope
...
The main change is that now to get static sam adapters one should do it using synthetic scopes and static scope of container
2017-05-05 21:30:10 +03:00
Alexey Sedunov
fd41e266fb
Quick Fixes: Add/remove 'suspend' in hierarchy
...
#KT-15903 Fixed
2017-04-24 14:55:37 +03:00
Alexey Sedunov
c492f339e6
Quick Fixes: Fix AssertionError on rendering type parameter
...
#KT-17404 Fixed
2017-04-21 13:32:33 +03:00
Alexander Udalov
a96b67ea29
Refactor, move TargetPlatform to ModuleInfo
2017-04-18 22:58:56 +03:00
Simon Ogorodnik
2380e0bacc
Optimize PluginDeclarationProviderFactory.getStubBasedPackageMemberDeclarationProvider
...
Add cache for fast package exists check in specific module
#KT-16850 fixed
2017-04-18 17:58:45 +03:00
Simon Ogorodnik
9ca65fcf99
Fix addition of wrong java.lang imports on optimize imports
...
Add check to star importer, to not import already imported fqNames
#KT-15273 fixed
2017-04-18 17:45:45 +03:00
Alexander Udalov
7fe9b99087
Support different target platforms for modules in AnalyzerFacade
...
Instead of reusing the same AnalyzerFacade that is used for resolution
of a module to resolve its dependencies, analyze each dependency
module/library with a facade depending on its target platform. Introduce
and use CommonLibraryDetectionUtil in addition to
KotlinJavaScriptLibraryDetectionUtil, to detect common libraries (with
.kotlin_metadata files).
Note that before multi-platform projects, this was not needed because
there were only two platforms (JVM and JS), and JVM module had only JVM
modules/libraries as dependencies, JS module had only JS
modules/libraries as dependencies. Now, for example, a JVM module can
have a common module/library as a dependency, and it would be incorrect
to analyze that dependency with JvmAnalyzerFacade because that facade
does not know anything about .kotlin_metadata files.
The changes in Dsl.kt and KotlinCacheServiceImpl.kt are needed because
PsiElement.getJavaDescriptorResolver, called from some IDE code, started
to fail on a common module, because the container for a common module
does not have the JavaDescriptorResolver
2017-04-14 00:44:00 +03:00
Mikhail Glukhikh
aed98a745e
Do not use KtClassInitializer as analyzable parent
...
Fixes analyzeFully() semantics making it closer to compiler
Fixes two flaky tests for "leaking this" quick-fixes
2017-04-07 15:35:58 +03:00
Ilya Gorbunov
dce0da68c6
Cleanup: post-cleanup after deprecation cleanup in compiler
...
Replace `takeIf { !expr }` with `takeUnless { expr }`.
Cleanup redundant parethesis as in `listOf((expr))`.
Replace `listOf(expr)` with `expr.let(::listOf)` where the former caused significant indentation change.
2017-03-23 16:48:38 +03:00
Valentin Kipyatkov
b5dd2cc540
Completion of lambda parameters
...
Also changed policy for sorting of smart completion items in basic completion
#KT-16800 Fixed
#KT-12002 Fixed
2017-03-20 19:08:02 +03:00
Simon Ogorodnik
f56af41d1e
Fix TypeAliasConstructorDescriptor's to create only once when required
...
Some IDE features relates onto that same descriptors will remain same
between resolve calls
Fix it to be true for TypeAliasConstructorDescriptor's
#KT-16265 fixed
2017-03-20 16:55:40 +03:00
Pavel V. Talanov
babb3b557d
J2K ImportPath: kotlinify
2017-03-15 20:51:17 +03:00
Simon Ogorodnik
5c4ba53f42
Optimization of Basic Code Completion
...
Now we first search for simple reference variants, then for extensions
Because extension search is slow
#KT-16856
2017-03-15 17:50:29 +03:00
Simon Ogorodnik
4906ddfc29
Optimization of Basic Code Completion
...
Now we don't perform code formatting on temporary psi used
in ShadowedDeclarationFilter
#KT-16856
2017-03-15 17:50:20 +03:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Mikhail Glukhikh
d0cc1635db
Cleanup: apply "Use synthetic property access syntax"
2017-03-15 16:13:40 +03:00
Alexander Udalov
cf7048dd0f
Do not inject CompilerConfiguration into compiler front-end
...
Inject LanguageVersionSettings instead; all information relevant to the
analysis should be now passed via an instance of LanguageVersionSettings
(which should be renamed to a more general name in the future).
This is partially a revert of d499998 and related commits
2017-03-15 11:02:59 +03:00
Alexander Udalov
f5d4dd33da
Inject JvmTarget into some JVM-specific call checkers
...
This makes it possible to drop CompilerConfiguration from
CallCheckerContext, which in turn helps to avoid passing the entire
CompilerConfiguration instance through front-end
2017-03-15 11:02:57 +03:00
Nikolay Krasko
0a7a73d4be
Refactoring: extract method for getting lexical scope without facade
2017-03-10 14:58:16 +03:00
Dmitry Jemerov
c6bfb02754
Move JsAnalyzerFacade to ide-common module to enable its use in Dokka
2017-02-21 18:39:21 +01:00
Dmitry Jemerov
060a865fb1
Use correct resolution facade for resolving cross-module links in KDoc comments
...
#KT-15647 Fixed
2017-02-15 12:08:18 +01:00
Simon Ogorodnik
c2ba4e3ab9
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-31 15:14:18 +03:00
Simon Ogorodnik
d117b0210f
Revert "KT-14252 Completion could suggest constructors available via typealiases"
...
Reverted due problems with tests
This reverts commit 55eeb74c08 .
2017-01-30 16:46:38 +03:00
Simon Ogorodnik
55eeb74c08
KT-14252 Completion could suggest constructors available via typealiases
...
#KT-14252 fixed
2017-01-30 16:24:12 +03:00
Simon Ogorodnik
b422b0e24d
KT-14722 completion list isn't filled up for typealias to object
...
#KT-14722 fixed
2017-01-28 21:42:39 +03:00
Simon Ogorodnik
f1c4230a68
KT-14680 import statement to typealias reported as unused when using only TA constructor
...
#KT-14680 fixed
2017-01-26 21:18:20 +03:00
Mikhail Zarechenskiy
462aed35d3
Don't exclude callable references with type parameters from completion
2017-01-26 14:48:37 +03:00
Simon Ogorodnik
bf3d4471cd
KT-14710 Sample references aren't resolved in IDE
...
#KT-14710 fixed
2017-01-26 13:27:57 +03:00
Dmitry Petrov
b9f9894310
KT-15677 KT-15775
...
Update parser & descriptor renderer to handle parenthesized types and function types properly.
Resolve annotations in parenthesized types.
AnnotationsImpl.isEmpty() returned false for targeted annotations only
(e.g., 'fun @receiver:Ann C?.foo()').
Properly keep track of targeted annotations.
2017-01-19 09:53:17 +03:00
Alexey Sedunov
862966fd33
Override/Implement Members: Support all nullability annotations respected by the Kotlin compiler
...
#KT-12704 Fixed
#KT-15583 Fixed
2017-01-13 15:17:34 +03:00
Simon Ogorodnik
0cf02dcb7b
KT-15092 Suppress inspection "use property access syntax" for some getters and fix completion for them
...
#KT-15092 fixed
2017-01-12 14:53:38 +03:00
Denis Zharkov
dd392963ac
Minor. Rename SyntheticExtensionFunctions -> SyntheticMemberFunctions
2016-12-07 21:04:57 +03:00
Denis Zharkov
035383285c
Fix processing synthetic members in completion
...
Not all synthetic scope's descriptors are extensions (SAM adapters are not)
#KT-11128 Fixed
2016-12-07 21:04:53 +03:00
Mikhail Glukhikh
268702e0cc
"Change return type for enclosing fix" now handles TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH correctly #KT-14063 Fixed
2016-12-07 18:52:04 +03:00
Mikhail Zarechenskiy
160d43fe2e
Introduce new feature: division by zero in constant expressions
2016-12-02 17:42:56 +03:00
Alexey Sedunov
2a594a5bcc
Create from Usage: Support generation of abstract members for superclasses. Skip non-abstract superclasses when generating abstract member
...
#KT-14019 Fixed
2016-12-02 14:14:05 +03:00
Alexey Sedunov
0f58e2eef2
Introduce Type Alias: Replace type usages in constructor calls. Do not replace usages of existing type aliases
...
#KT-14685 Fixed
2016-11-30 14:35:30 +03:00
Simon Ogorodnik
1a211ee7b0
Completion for fqNames in KDoc links
...
Tests, also proved that KT-14432 are fixed
Added completion and tests for extension functions.
2016-11-29 14:06:54 +03:00
Simon Ogorodnik
62077dafc3
Fix resolving of packages in FQN kdoc links
...
Assume link [pack.SomeType], pack no more will be marked as unresolved reference
2016-11-29 14:06:51 +03:00
Valentin Kipyatkov
869b177823
Introduced KtExpression.analyzeAsReplacement() utility
2016-11-08 19:14:40 +03:00
Valentin Kipyatkov
e850446f17
Introduced BindingContext.DATA_FLOW_INFO_BEFORE
2016-11-08 19:14:40 +03:00
Valentin Kipyatkov
9490d1bb1c
Reused code of analyzeInContext
2016-11-08 12:46:41 +03:00
Valentin Kipyatkov
67e5ed802f
More correct
2016-11-08 12:46:39 +03:00
Valentin Kipyatkov
68174470c3
Add BodyResolveMode parameter to resolveToDescriptor()
2016-11-02 19:25:27 +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