Commit Graph

5376 Commits

Author SHA1 Message Date
Natalia Ukhorskaya 741f55d89c Debugger: Add filter for Kotlin specific classes
#KT-2076 Fixed
2014-08-29 15:17:12 +04:00
Natalia Ukhorskaya f26ea299dc Debugger: add tests (filter classloaders and constructors) 2014-08-29 15:17:11 +04:00
Alexander Udalov ec12d1d71d Fix deprecation warnings on junit.framework.Assert
Use org.junit.Assert instead everywhere. Also fix some other minor warnings
2014-08-29 12:34:07 +04:00
Alexander Udalov d37727185e Fix IDEA plugin behavior with classes in library sources
In case when some class was contained in sources of some library (in addition
to classes of some library) we incorrectly assumed that its ModuleInfo is
LibrarySourceInfo of that library, because we checked if the file was in
library sources first. Now we check if the file is in library _classes_ first,
and then sources

 #KT-5695 Fixed
2014-08-28 17:24:42 +04:00
zarechenskiy 9fe42be7c4 Move part of lazy element resolver structure to new module ide-lazy-resolve
This new module will be used from Eclipse, it should not have any idea
specific logic that is applicable only for idea
2014-08-28 13:53:48 +04:00
Nikolay Krasko 97a95d6a6a Fix "Cannot resolve method" error in Java for methods from trait 2014-08-28 13:47:36 +04:00
Valentin Kipyatkov 9859b10854 Fixed test 2014-08-27 19:07:39 +04:00
Valentin Kipyatkov 5fb9aae68c Escaping of keyword names in completion (more tests to be added) 2014-08-27 19:07:39 +04:00
Valentin Kipyatkov f5419cb04e DeclarationLookupObject.descriptor is never null 2014-08-27 19:07:38 +04:00
Valentin Kipyatkov 8a2d4154d6 Completion: non-imported elements are added to the list later 2014-08-27 19:07:38 +04:00
Valentin Kipyatkov ae9eb19f39 Auto-import popup to import global properties
#KT-4541 Fixed
 #KT-3097 Fixed
2014-08-27 19:07:38 +04:00
Valentin Kipyatkov f8e2841c2b Checked that auto-import works for extension properties 2014-08-27 19:07:38 +04:00
Valentin Kipyatkov 2841fab6d5 Code refactorings 2014-08-27 19:07:38 +04:00
Valentin Kipyatkov ced2abb860 Converted AutoImportFix to Kotlin 2014-08-27 19:07:38 +04:00
Valentin Kipyatkov 7c61539516 Faster code for auto-import fix 2014-08-27 19:07:37 +04:00
Valentin Kipyatkov ba91bc36aa Moved code that has nothing to do with short names from short names cache 2014-08-27 19:07:37 +04:00
Valentin Kipyatkov 04bf0059ec Code refactoring 2014-08-27 19:07:37 +04:00
Valentin Kipyatkov 6b8800f392 More correct code 2014-08-27 19:07:37 +04:00
Valentin Kipyatkov 1b99ffb6b1 Minor code refactorings 2014-08-27 19:07:37 +04:00
Valentin Kipyatkov bb343c2853 Fixed KT-5046 No autocompletion for not imported extension properties
#KT-5046 Fixed
2014-08-27 19:07:37 +04:00
Valentin Kipyatkov 9c138d8637 Fixed KT-1476 Code completion for not imported properties
#KT-1476 Fixed
2014-08-27 19:07:37 +04:00
Valentin Kipyatkov 6bcfa08fde Code completion: more optimal fetching of top level functions 2014-08-27 19:07:36 +04:00
Valentin Kipyatkov ca59391e56 Converted JetShortNamesCache to Kotlin 2014-08-27 19:07:36 +04:00
Valentin Kipyatkov 9c5778e174 Code completion and auto-import popup not offer classes from inaccessible modules + some code refactoring JetShortNamesCache 2014-08-27 19:07:36 +04:00
Valentin Kipyatkov 3e2ad55c9e Code completion: changed dummy identifier for basic completion to ignore context ahead + no invisible symbols on first completion even if nothing matches 2014-08-27 19:07:36 +04:00
Valentin Kipyatkov 4f4b84dbd2 Code completion: minor changes after review 2014-08-27 19:07:36 +04:00
Natalia Ukhorskaya ccc4e1c767 Fix exception getting source position for library file 2014-08-27 15:58:00 +04:00
Natalia Ukhorskaya 6b28ccbc9b JetPositionManager: add tests 2014-08-27 15:57:59 +04:00
Natalia Ukhorskaya e7ebf6fda2 Minor: change debugger tests structure 2014-08-27 15:57:59 +04:00
Natalia Ukhorskaya 453592edf4 Debugger: breakpoints in library source files 2014-08-27 15:57:58 +04:00
Natalia Ukhorskaya 91f7f2479d Debugger tests: workaround for idea bug in output replacement 2014-08-27 15:57:57 +04:00
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
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
Alexander Udalov 087eec4521 Regenerate tests after recent generator improvements 2014-08-25 19:00:09 +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
Pavel V. Talanov 7a1d5d63dc Rename: AnalyzerFacadeForJvm(Js) -> TopDownAnalyzerFacadeForJvm(Js) 2014-08-22 23:16:55 +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