Commit Graph

105 Commits

Author SHA1 Message Date
Alexander Udalov 8ff8b411a7 Support object declarations in DI generator 2014-08-25 17:53:30 +04:00
zarechenskiy 34bf3d7f0e Supress warnings in injectors using "all" parameter, not "ALL"
This parameter value supports by IDEA and Eclipse
2014-08-12 13:11:21 +04:00
Pavel V. Talanov 4c57aa9f23 Generate Injectors: minor, remove redundant GenerateInjectors class 2014-02-14 16:47:23 +04:00
Pavel V. Talanov f8a8bbe9b0 Generate Injectors: add ability to specify that a field is a context
Context field's properties can injected into other components
Use it in GenerateInjectors.kt
2014-02-14 16:47:22 +04:00
Pavel V. Talanov 1ab4c2763f Generate Injectors: rewrite facade to Kotlin 2014-02-14 16:47:19 +04:00
Nikolay Krasko 7546a6dc41 Suppressing warnings + update copyright date 2014-01-31 14:52:13 +04:00
Andrey Breslav 651cc26e5e Test that injectors are properly generated 2013-09-24 06:45:25 -07:00
Andrey Breslav 09da73da1b Log what test classes were regenerated 2013-09-24 06:45:25 -07:00
Alexander Udalov 8e59e789dc Extract util.runtime module out of util
Cleanup module dependencies: a lot of modules depended on 'frontend.java' just
to use something from 'util' module, exported by 'frontend.java', whereas they
really need nothing from 'frontend.java'. Also 'frontend.java' just exported
'util', not using anything from it.

Create a new 'util.runtime' module, which will be available at runtime. Make
'util' export 'util.runtime' and make all modules who needed these utils depend
on 'util' directly instead of 'frontend.java'
2013-09-18 17:21:11 +04:00
Nikolay Krasko 70ae9e589c Generate only final fields for injectors - make the access thread-safe 2013-08-08 00:37:42 +04:00
Andrey Breslav aee27aee2a Topologically sort fields according to constructor dependencies 2013-04-12 21:06:52 +04:00
Andrey Breslav dc8e80ea59 Reporting unused parameters 2013-04-12 21:06:52 +04:00
Andrey Breslav 76e7731b6b Better reporting of ambiguous dependencies 2013-04-12 21:06:51 +04:00
Andrey Breslav 1d41f9faf3 Better error reporting for missing dependencies 2013-04-12 21:06:51 +04:00
Andrey Breslav a0e9f4ea01 Copyright added 2013-04-01 13:39:44 +04:00
Leonid Shalupov 5ee5c841cb generators: don't write to files if content is not changed 2013-03-30 15:42:41 +04:00
Andrey Breslav 7e5794cc7f A common method extracted 2013-03-06 12:53:14 +04:00
Andrey Breslav deda45135e Generating imports after all usages were generated 2013-03-06 12:53:13 +04:00
Andrey Breslav 47d1ea2770 Migrated to Printer 2013-03-06 12:53:13 +04:00
Andrey Breslav ac981915a1 Imports are tracked when types are used 2013-03-06 12:53:10 +04:00
Andrey Breslav f7de41ea1b The rudimentary support for lazy injection removed 2013-03-06 12:52:49 +04:00
Andrey Breslav 7df84101d4 Parts of DependencyInjectorGenerator moved out 2013-03-06 12:52:48 +04:00
Andrey Breslav 3920028fe5 Initial support for factory methods 2013-03-06 12:52:44 +04:00
Andrey Breslav 84ff885f72 Constructor body generation extracted as a method (+ migrated to Printer for convenience) 2013-03-06 12:51:02 +04:00
Andrey Breslav 70f44244f9 Refactoring: dependency computations isolated in a separate class 2013-03-06 12:50:50 +04:00
Evgeny Gerashchenko 07a25a7757 Removed newline after copyrights in generated injectors. 2013-01-30 19:24:16 +04: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
Evgeny Gerashchenko 8d7e79c806 Renamed & moved AllInjectorsGenerator. 2012-11-12 19:54:22 +04:00
Andrey Breslav 937c4e8baf BuiltinsScopeExtensionMode not needed any more
(see the changes in DefaultModuleConfiguration.java)
2012-10-17 13:48:07 +04:00
Andrey Breslav e81f38b6a8 JetStandardLibrary -> KotlinBuiltIns 2012-10-17 13:48:05 +04:00
Alex Tkachman be09227569 generation of inner classes inside object literal. #KT-2607 fixed
on the way ClassCodegen and MemberCodegen refactored out and injectors regenerated
2012-09-20 17:57:07 +03:00
Svetlana Isakova 7073b12d11 add ModuleConfiguration to injectors
(to be able to use it in TypeResolver)
2012-09-05 18:55:15 +04:00
Alex Tkachman 6cc85a6ce3 JetTypeMapper moved to state package 2012-08-30 13:08:41 +03:00
Alex Tkachman 0852f3939f (BindingContext,BindingTrace,TypeMapper,GenerationState)Aware classes introduced and related changes in GenerationState construction/injection 2012-08-30 11:50:51 +03:00
Alex Tkachman b45f19c0e2 GenerationState refactored to be (almost) immutable and methodless (modulo little protection from reuse)
GenerationStrategy introduced to handle separately cases of regular compilation and building of JetLightClasses (this was only real overridable behavior of GenerationState in old code)
state subpackage introduced
2012-08-30 09:33:10 +03:00
Alex Tkachman 7452bb2957 CodegenAnnotator does not exist anymore
Injectors regenerated to reflect that
2012-08-28 11:54:52 +03:00
Alex Tkachman 15c1d7bda7 most of data previously kept in CodegenAnnotator now lives in binding context (CodegenBinding utility class)
injectors regenerated in order to have BindingTrace around
2012-08-28 09:31:19 +03:00
Alex Tkachman cfbab55a43 ClosureAnnotator renamed to CodegenAnnotator 2012-08-27 19:06:01 +03:00
Alex Tkachman 10a47ea86f big codegen rewrite 2012-08-27 17:43:03 +03:00
Andrey Breslav 08bb390820 Project is available in codegen 2012-08-24 12:18:18 +04:00
Nikolay Krasko cf6787b798 Inject context for body resolve 2012-08-14 14:15:10 +04:00
Evgeny Gerashchenko 67304c64ff Removed unused myProject field from IntrinsicMethods. Removed from injector parameters, etc. 2012-08-09 15:13:42 +04:00
Alexander Udalov 7e38c0f70d Fix line endings in dependency injector generator
Copyright text should be printed as is, without
translating line endings to LF. This prevents
injectors from having mixed endings on Windows
with core.autocrlf=true
2012-07-24 18:23:18 +04:00
Andrey Breslav 7f6222cc4e Fixing compilation after merge 2012-07-09 13:39:05 +04:00
Andrey Breslav 4d220fb980 Injector for bare JavaDescriptorResolver 2012-07-09 13:39:04 +04:00
Andrey Breslav 1f95636bdf Injectors regenerated 2012-07-09 13:39:03 +04:00
Andrey Breslav af882cbd51 Dependency injection frameworks improvements
* Injectors can now implement interfaces (this was the primary goal)
* Fields can have different types than getters
* Imports are more accurate and no duplicate imports are added
2012-07-09 13:39:03 +04:00
Evgeny Gerashchenko f7290d178b Replaced passing compiler special mode to JetTypeMapper with special enum type. Enum type means if builtin types should be mapped to Java standard classes in generated bytecode. 2012-07-07 23:07:18 +04:00
Evgeny Gerashchenko 6e7d08b478 Introduced BuiltinsScopeExtensionMode enum. Using it instead of CompilerSpecialMode to create JavaBridgeConfiguration. 2012-07-07 23:07:18 +04:00