Commit Graph

17099 Commits

Author SHA1 Message Date
Natalia Ukhorskaya 40c4022c98 Debugger tests: add custom library 2014-08-27 15:57:57 +04:00
Natalia Ukhorskaya aa9382fefa Debugger: report LOG.ERROR in kotlin.internal.mode for exceptions from extract function 2014-08-27 15:57:56 +04:00
Natalia Ukhorskaya a0460fe3e9 Evaluate Expression: don't evaluate expression in context of package directive
EA-57962 Fixed
2014-08-27 15:57:55 +04:00
Alexander Udalov b0cb4c330f Don't try to read binary data from a non-class file
Fixes EA-59470, where a virtual file is checked to be a compiled Kotlin class
from the decompiler (which doesn't check its FileType)
2014-08-27 14:07:24 +04:00
Pavel V. Talanov 8c041f56cc Do not analyze kotlin source files in jars for java projects 2014-08-26 21:12:09 +04:00
Alexander Udalov 7dd0613f96 Fix NoErrorsInStdlibTest
stdlib was analyzed with an older version of itself in the classpath. But
without that older version stdlib still depends on a built-in part
(builtins, runtime.jvm, reflection), so we compile those as a separate library
beforehand
2014-08-26 21:12:09 +04:00
Nikolay Krasko 50903050ff Configure exception with absolute file path to enable easy patching 2014-08-26 14:55:12 +04:00
Nikolay Krasko 186a9a13a8 Report unmet trait requirements in IDE
#KT-3006 Fixed
2014-08-26 14:42:29 +04:00
Nikolay Krasko 679d641a94 Allow create Kotlin declarations during building indices process 2014-08-26 14:28:56 +04:00
Andrey Breslav b8f7d68bd4 Minor tweaks in the grammar 2014-08-26 12:16:35 +04:00
kisenka 8da384b466 Convert markup from Confuence wiki to Markdown 2014-08-26 12:04:34 +04:00
Alexander Udalov e14ec050b4 Minor, update obsolete message in JetTestUtils 2014-08-25 19:11:53 +04:00
Alexander Udalov 8bdad92eff Minor, fix warnings and inspections in JetTestUtils 2014-08-25 19:05:30 +04:00
Alexander Udalov 087eec4521 Regenerate tests after recent generator improvements 2014-08-25 19:00:09 +04:00
Alexander Udalov def37c6830 Test generator: improve import statements in generated tests
- delete unused "junit.framework.Assert" import
- delete import of the abstract super class, because it always happens to be in
  the same package
- reorder other imports in such way that "Optimize Imports" action in IDEA will
  mostly have no effect in generated tests. However this will still happen in
  tests without any nested test cases (useless imports of InnerClasses etc.)
2014-08-25 19:00:08 +04:00
Alexander Udalov fb3ef047fc Test generator: inline the constant FQ name 2014-08-25 19:00:04 +04:00
Alexander Udalov 8ff8b411a7 Support object declarations in DI generator 2014-08-25 17:53:30 +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
Alexander Udalov 2ea9a2cfc9 Generate annotations on enum entry constants in bytecode
#KT-5665 Fixed
2014-08-25 17:50:08 +04:00
Alexander Udalov 477bac9b2a Minor, remove obsolete source roots for IDEA libraries 2014-08-25 12:39:20 +04:00
Alexander Udalov 994348b0ca Remove dependency on Maps from jps-plugin
It seems that there's no Guava in the classpath formed for JPS plugins

 #KT-5676 Fixed
2014-08-25 12:36:26 +04:00
Pavel V. Talanov 5dc5862134 Add missing public to ModuleClassResolver 2014-08-23 12:52:27 +04:00
Pavel V. Talanov b749beb5fa Fix AnalyzerFacadeForJvm reference in GenerateInjectors 2014-08-23 12:46:31 +04:00
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +04:00
Pavel V. Talanov 46f1873dc8 JDR: drop various code that is marked as temporary
Remove additional logic for comparing files in JavaClassFinderImpl
Drop redundant check for builtins in findClassInJava(FqName)
Drop resolve cache query in LazyJavaClassMemberScope and LazyJavaPackageFragmentScope
2014-08-22 22:59:07 +04:00
Pavel V. Talanov e56a124c0b ResolveSessionForBodies is not ModificationTracker 2014-08-22 22:59:05 +04:00
Pavel V. Talanov d6bd4535fa Introduce MultiModuleHighlightingTest
Checks that analysis produces expected diagnostics when configured by real IDEA module
2014-08-22 22:59:03 +04:00
Pavel V. Talanov fbe894ea88 Debugger, minor: Insert type arguments after replacing expression 2014-08-22 22:59:01 +04:00
Pavel V. Talanov 4982e22ec7 Drop IDEAConfig 2014-08-22 22:58:59 +04:00
Pavel V. Talanov e3e83fdee5 Rework JetSourceFilterScope
JetSourceFilterScope doesn't have to check file type
Avoid redundant wrapping in JetSourceFilterScope (this may improve performance in case of frequent queries to indices)

We can safely use kotlinSourcesAndLibraries scope in declaration provider given we have correct scope in the first place
This allows for resolving kotlin js libraries (which are kotlin files in classes root) whithout additional hacks (i.e. IDEAConfig)
2014-08-22 22:58:57 +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
Pavel V. Talanov 07935c837a Drop JetAllPackagesIndex 2014-08-22 14:36:02 +04:00
Pavel V. Talanov 5acd23e880 Implement SubpackagesIndexService#hasSubPackages()
Use it in PackageIndexUtil#packageExists()
2014-08-22 14:36:01 +04:00
Pavel V. Talanov faf303693e Extract containsAny utility 2014-08-22 14:36:00 +04:00
Pavel V. Talanov 8cfcf4d930 Use JetExactPackagesIndex in getAllPossiblePackageClasses 2014-08-22 14:35:59 +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
Pavel V. Talanov 007ea9e10a Introduce JetExactPackagesIndex
Use it to implement PackageIndexUtil#findFilesWithExactPackage()
2014-08-22 14:35:55 +04:00
Pavel V. Talanov 3418d15590 Avoid redundant wrapping in SyntheticFilesFilteringScope 2014-08-22 14:35:53 +04:00
Pavel V. Talanov 3b78e3eb99 Introduce PackageIndexUtil#packageExists()
Use it in IDELightClassGenerationSupport and PluginDeclarationProviderFactory
2014-08-22 14:35:52 +04:00
Pavel V. Talanov 77416aba5f Add dependency on intellij-core explicitly
util module doesn't export intellij-core dependency
2014-08-22 13:09:08 +04:00
Michael Nedzelsky d3bf58d761 JS backend: extract inline calls during translation 2014-08-22 02:17:16 +04:00
Michael Nedzelsky 76757b14e2 JS backend: new tests for use break, continue and return in &&, ||, ?: 2014-08-22 02:17:11 +04:00
Michael Nedzelsky d969e58b88 JS backend: support for while/do while with complex conditions 2014-08-22 02:17:08 +04:00
Michael Nedzelsky 53f0e6dcd2 JS backend: remove dangerous package, correct translation for call, assignments, binary operations, support try...catch as expression
#KT-5576 Fixed
 #KT-5594 Fixed
 #KT-3166 Fixed
 #KT-5545 Fixed
 #KT-5594 Fixed
 #KT-5258 Fixed

JS backend: fix KT-4879: extra side effect when use when in default arguments

 #KT-4879 Fixed

JS backend: improve and fix WhenTranslator, fix order of evaluation for condtitions, fix KT-5263 (JS: extra tmp when initialize val in when by expression with if)

 #KT-5263 Fixed
2014-08-22 02:17:00 +04:00
Michael Nedzelsky 629d9a275b JS backend: fix dangling else issue in generated code for JsToStringGenerationVisitor
JS backend: fix KT-5253: when with if inside

 #KT-5253 Fixed
2014-08-22 02:16:56 +04:00
Michael Nedzelsky bfa8fea5b8 JS backend: move patternMatching tests to expression/when 2014-08-22 02:16:53 +04:00
Pavel V. Talanov a5c02c792b Add annotation root to all relevant libraries 2014-08-21 20:08:48 +04:00
Pavel V. Talanov 1af64aece5 Add missing public in project code 2014-08-21 20:08:46 +04:00
Nikolay Krasko dbdc30fd94 Ignore decompiler problem, just show trouble declarations 2014-08-21 17:57:19 +04:00
Nikolay Krasko 4b4257adf9 Change executor Id to default one. It prevents NullPointerException because of missed runner. 2014-08-21 17:57:19 +04:00