Commit Graph

277 Commits

Author SHA1 Message Date
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 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 6588310736 Add missing public modifiers in project code 2014-08-12 21:13:46 +04:00
Pavel V. Talanov aa02388aa0 Merge j2k and j2k-tests modules 2014-08-12 21:13:45 +04:00
Alexander Udalov de0f751207 Replace object$ -> OBJECT$, instance$ -> INSTANCE$ in the project 2014-07-26 00:21:05 +04:00
Valentin Kipyatkov 3c33b7dcfa Fixed KT-5247 Java to Kotlin: convert java @interfaces into Kotlin annotation classes
#KT-5247 Fixed
2014-07-25 16:54:24 +04:00
Valentin Kipyatkov d7e857ed0a J2K: fixed bug 2014-07-25 16:54:24 +04:00
Valentin Kipyatkov d154d2e25b Fixed assertion + refactored code making it more simple 2014-07-25 16:54:24 +04:00
Valentin Kipyatkov b9bd5c8fb8 Fixed KT-5443 J2K converter crashes when code contains catch with multiple exception types
#KT-5443 Fixed
2014-07-25 16:54:24 +04:00
Valentin Kipyatkov 957ffb0313 J2K: adding type arguments where they are needed and removing them where they are redundant 2014-07-25 16:54:24 +04:00
Valentin Kipyatkov f836278acc J2K: Fixed conversion of <primitive type>.class
#KT-5428 Fixed
2014-07-25 16:54:24 +04:00
Valentin Kipyatkov a2fa5bc536 J2K: more correct set of annotations to drop 2014-07-25 16:54:23 +04:00
Valentin Kipyatkov fface785db J2K: moved part of code into special AnnotationConverter to make Converter.kt smaller 2014-07-25 16:54:23 +04:00
Valentin Kipyatkov ab3eca92db J2K: got rid from Converter.convertElement + fixed local classes conversion
#KT-5202 Fixed
2014-07-25 16:54:23 +04:00
Valentin Kipyatkov 930022aaac J2K: correct conversion of nested class references
#KT-5294 Fixed
 #KT-5400 Fixed
2014-07-25 16:54:23 +04:00
Valentin Kipyatkov bcc36c4e48 Fixed KT-5383 J2K: preserve annotations from primary constructor + never drop constructors with annotations
#KT-5383 Fixed
2014-07-25 16:54:23 +04:00
Valentin Kipyatkov 3527b186bf Fixed KT-5276 J2K: Convert calls to getClass() to javaClass property access
#KT-5276 Fixed
2014-07-25 16:54:23 +04:00
Valentin Kipyatkov ecb984352e J2K: supported synchronized, volatile, transient and strictfp
#KT-3678 Fixed
2014-07-25 16:54:22 +04:00
Valentin Kipyatkov 4ec746a2e1 Added test for KT-3367 2014-07-25 16:54:22 +04:00
Valentin Kipyatkov dac1edc35f Java to Kotlin converter: "//file" in test data has made optional 2014-07-25 16:54:22 +04:00
Valentin Kipyatkov 08d7b64160 Java to Kotlin converter: added tests for 2 old issues 2014-07-25 16:54:22 +04:00
Valentin Kipyatkov 276d1dcf14 Java to Kotlin converter: code refactorings after review 2014-07-25 16:54:22 +04:00
Pavel V. Talanov 7269e383cf Rewrite JetPsiFactory to kotlin, make project a property
Instead of passing to every function
All static methods are now member functions
2014-07-15 16:41:12 +04:00
Valentin Kipyatkov 6f1bdd1227 Java to Kotlin converter: added blank line between main method and class 2014-07-10 23:20:40 +04:00
Valentin Kipyatkov fea36048f5 Java to Kotlin converter: better and more correct code 2014-07-10 23:20:40 +04:00
Valentin Kipyatkov 3765a67a72 Java to Kotlin converter: removed unused class 2014-07-10 23:20:40 +04:00
Valentin Kipyatkov bf952198b5 Java to Kotlin converter: refactoring 2014-07-10 23:20:40 +04:00
Valentin Kipyatkov 8a7639e233 Java to Kotlin converter: used standard utility for main method detection 2014-07-10 23:20:39 +04:00
Valentin Kipyatkov d5f0af15c3 Java to Kotlin converter: fixed some bugs in switch statement conversion 2014-07-10 23:20:39 +04:00
Valentin Kipyatkov b983a0eaa0 Fixed KT-5204 Converter from java could generate var's for locals when needed
#KT-5204 Fixed
2014-07-10 23:20:39 +04:00
Valentin Kipyatkov acc58173da Java to Kotlin converter: added auto-conversion run of Kotlin analyzer. Implemented first fix with it - redundant !! removal 2014-07-10 23:20:39 +04:00
Valentin Kipyatkov 69a5b79342 J2K: minor code improvements 2014-07-10 23:20:39 +04:00
Valentin Kipyatkov 46d6ba3340 Java to Kotlin converter: special conversion of some Collections methods 2014-07-10 23:20:39 +04:00
Valentin Kipyatkov 9bd742472d Fixed KT-5339 J2K: convert Objects.equals to == and !=
Mock JDK regenerated to add java.util.Objects

 #KT-5339 Fixed
2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 514f11695f Java to Kotlin converter: explicit locals type option is used for for variable too 2014-07-10 23:20:38 +04:00
Valentin Kipyatkov d3a1fa6b9a KT-5405 J2K: convert for's through indices of some list or array into use of ".indices" + fixed a bug in for-statement conversion
#KT-5405 Fixed
2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 5c688e9916 Fixed KT-5433 J2K: incorrect conversion of method call with vararg
#KT-5433 Fixed
2014-07-10 23:20:38 +04:00
Valentin Kipyatkov fe46b40220 Java to Kotlin converter: no special logic for returns in try-with-resource is needed anymore 2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 2ebaab867d Fixed KT-5434 J2K: incorrect conversion of main method
#KT-5434 Fixed
2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 28e003e79f Java to Kotlin converter: code refactoring 2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 139b7cdd27 Java to Kotlin converter: moved code of switch statement conversion into separate class 2014-07-10 23:20:38 +04:00
Valentin Kipyatkov 8d290ee127 Java to Kotlin converter: better switch conversion in case of code block in case 2014-07-10 23:20:37 +04:00
Valentin Kipyatkov 3ccd8839ff Java to Kotlin converter: refactoring and fixing switch conversion
#KT-5390 Fixed
2014-07-10 23:20:37 +04:00
Valentin Kipyatkov 6bd5a12498 Java to Kotlin converter: minor refactoring of switch conversion + no need for empty else 2014-07-10 23:20:37 +04:00
Valentin Kipyatkov e84c753e99 Fixed KT-5396 J2K: properly format "else if" on conversion
#KT-5396 Fixed
2014-07-10 23:20:37 +04:00
Valentin Kipyatkov 88235c3eb2 Minor code corrections after code review 2014-07-10 23:20:37 +04:00
Valentin Kipyatkov 330c41fc61 Java to Kotlin converter: code refactoring 2014-07-10 23:20:37 +04:00
Valentin Kipyatkov f8261a8b6e Java to Kotlin converter: fixed two similar bugs 2014-07-10 23:20:37 +04:00
Valentin Kipyatkov 3c42933f96 Java to Kotlin converter: fixed exception on conversion 2014-07-10 23:20:36 +04:00