Commit Graph

67 Commits

Author SHA1 Message Date
Pavel V. Talanov 82b19499e3 Converter tests:
Use generated tests approach in converter tests

Introduce two seperate generated test cases of each of configurations, all tests are generated in both test cases
Test data for plugin configuration has extension "ide.kt", for basic configuration "*.kt"
Test data file is used to determine type of the test (file/class/expression/...) instead of directory, all test data is moved accordingly
Add abstract base classes for generated tests
Rename test folder "file" to "misc" (for the lack of imagination)
2013-12-22 15:53:13 +04:00
Pavel Talanov cba8d3b6db Converter:
Replace hack used to configure Converter by ConverterSettings class
Minor: remove redundant open modifiers, add override annotations
2013-12-22 15:37:09 +04:00
Pavel Talanov 3edefcf598 Converter:
Refactor handling of primitive types
Inject converter in places of use
Make Element and Node traits
2013-12-22 15:37:08 +04:00
Pavel V. Talanov e19373cac7 Hack that adds more convenient defaults for J2K, minimal test for these defaults 2013-10-29 21:03:37 +04:00
Pavel V. Talanov a649eb52cf J2K: Do not specify type of for loop parameter 2013-10-29 21:03:36 +04:00
Pavel V. Talanov 28f3d692ab Apply reformat code and optimize imports to kotlin code in j2k
Minor: remove Unit return types
2013-10-29 21:03:35 +04:00
Pavel V. Talanov 2a5657e0e6 Convert JavaToKotlinTranslator, StandaloneJavaToKotlinConverterTest, TestCaseBuilder to Kotlin 2013-10-29 21:03:34 +04:00
Pavel V. Talanov 212c4f62d3 Delete commented out code 2013-10-29 21:03:33 +04:00
Pavel V. Talanov 5e254f6edb Copyright generated for new version of Java to Kotlin converter 2013-10-29 21:03:32 +04:00
Pavel V. Talanov 789a069647 j2k module depends on descriptor.loader.java 2013-10-29 21:03:31 +04:00
Pavel V. Talanov 10b80ca2b7 Rollback facade classes to main repo version 2013-10-29 21:03:30 +04:00
Pavel V. Talanov 375951798e Prepare repository for merge into master 2013-10-29 21:03:29 +04:00
Pavel V. Talanov 6fbf97bbcf Remove sources of the java version of Java to Kotlin converter 2013-10-29 21:01:55 +04:00
Alexey Sedunov 45b07c0e18 Rename getMyType() method 2013-10-21 17:18:09 +04:00
Alexey Sedunov 1cb551385a Do not generate nullable types when converting "instanceof" to "is" 2013-10-21 17:09:19 +04:00
Alexey Sedunov 054588bd3b Fix conversion of Java class literals 2013-10-21 17:09:18 +04:00
Andrey Breslav 5b04783ee2 Using Disposer.newDisposable() instead of an anonymous class 2013-10-15 15:28:29 +04:00
Zalim Bashorov 24fde7110b J2K: reverted temporary fix after update to IDEA 132.325 EAP -- removed JavaToKotlinTranslator#NEVER_CHANGE. 2013-09-23 13:38:13 +04:00
Zalim Bashorov 4dd880f99c J2K: improved asserts.
(Additionally it needs for investigate EA-37704)
2013-09-18 21:25:08 +04:00
Zalim Bashorov d50f65634a Register ProjectRootModificationTracker as NEVER_CHANGE in StandaloneJavaToKotlinConverterTest. 2013-09-13 14:38:39 +04:00
Zalim Bashorov d0172ebdc2 Fixed bug in TypeConversionUtil#getAllBoxedTypeSupers which created CachedValueProvider.Result with null as dependency because the ProjectRootModificationTracker service was not registered.
Register ProjectRootModificationTracker as NEVER_CHANGE in JavaToKotlinTranslator.
2013-09-13 13:06:52 +04:00
Andrey Breslav 25a5025c58 Built-ins can now be initialized on demand 2013-08-23 17:39:06 +04:00
Andrey Breslav b7966179f5 Deserialize built-ins 2013-08-23 17:39:04 +04:00
Evgeny Gerashchenko f52338a582 Renamed Name.getName() and FqName.getFqName() to asString() 2013-05-30 13:07:28 +04:00
Natalia.Ukhorskaya c37a3713d3 Fix tests for j2converter 2013-05-30 12:12:52 +04:00
Andrey Breslav af5ee3acba forceResolveAll() is not called when compiler initializes built-ins 2013-04-17 13:49:47 +04:00
Evgeny Gerashchenko f181907b9c Got rid of code depending on Unit aliasing. 2013-03-22 16:38:24 +04:00
Evgeny Gerashchenko ec5331057a Removed unnecessary final on local variables. 2013-03-13 14:12:50 +04:00
Andrey Ponomarev e4a172946b KT-3368 J2K: converted enums contain name() method
#KT-3368 Fixed
2013-02-25 16:15:53 +01:00
Andrey Ponomarev 34c227b8ed J2K: enum constants are non-nullable 2013-02-21 14:24:26 +01:00
Andrey Ponomarev e4df4059d1 J2K: Detect @NotNull references in call chains 2013-02-21 14:24:25 +01:00
Andrey Ponomarev 514c7b553f J2K: Detect @NotNull fields 2013-02-21 14:24:25 +01:00
Evgeny Gerashchenko 52b7ee6447 Happy new year 2013! 2013-01-28 18:58:08 +04:00
Evgeny Gerashchenko e03eaf6dde Removed @author javadocs from code. 2012-12-28 17:44:31 +04:00
Natalia.Ukhorskaya ef52ce6b9b J2KTranslator: remove findRtJar method. Use PathUtil instead 2012-11-29 18:21:14 +04:00
Evgeny Gerashchenko 0c43e77ac0 Minor. Fixed references to KotlinBuiltIns.UNIT_ALIAS. 2012-10-23 18:06:16 +04:00
Andrey Breslav 10cf303133 BuiltIns initialization in J2K fixed 2012-10-17 17:40:06 +04:00
Andrey Breslav c719ae427a JetStandardClasses -> KotlinBuiltIns 2012-10-17 13:48:05 +04:00
Evgeny Gerashchenko 789c8608e5 Replaced sure() invocation with '!!' operator in Java to Kotlin converter. 2012-09-17 18:00:20 +04:00
Andrey Breslav d8632f81aa J2K Translator migrated onto Leda 2012-07-25 12:07:20 +04:00
Nikolay Krasko 28b0eefe5d - KT-2353 convert a selection of Java code to Kotlin by copy paste (or context menu) - Apply patch from Sergey Ignatov
#KT-2353 fixed
2012-07-18 14:33:13 +04:00
Stepan Koltsov 33a59ff5fe Name class
In the most places in frontend identifier is stored in Name class, was in String.
Name has two advantages over String:
* validation: you cannot accidentally create identifier with dot, for example
* readability: if you see String, you don't now whether it is
  identifier, fq name, jvm class name or something else

Name's disadvantage is (small) performance overhead. We have no value types in JVM.
2012-05-23 02:52:32 +04:00
Evgeny Gerashchenko e294a8821f Introduced JetStandardClasses.UNIT_ALIAS constant, got rid of hard-coding it in all code except for tests. 2012-05-15 12:40:01 +04:00
Svetlana Isakova 8b45b26785 reordered modifiers order: visibility first in j2k converter 2012-03-30 14:37:15 +04:00
Svetlana Isakova 83426659f1 j2k tests fixed 2012-03-30 14:11:44 +04:00
Svetlana Isakova 167a9c444a Added 'public' annotation and specified return types for library functions 2012-03-30 13:38:35 +04:00
Nikolay Krasko cefbe090ba translateToKotlin method 2012-03-19 16:26:25 +04:00
James Strachan eb3aac9acb refactored std.* package to be kotlin.*. Due to KT-1381 I had to move the functions from kotlin.test into the stdlib for now (I made them not depend on JUnit for now) 2012-03-03 12:11:06 +00:00
Alex Tkachman 53bba59a4f dbl -> toDouble 2012-02-22 13:14:41 +02:00
Andrey Breslav ee3e7bb80f Fixing j2K tests 2012-02-20 21:58:33 +04:00