Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
ERRAI-1075: Integration tests using APT generators (#316)

* Allow multiple @ErraiApps in same jar

* Generating code for multiple @ErraiApp annotations. With problems.

* Fixed many errors in errai-ui tests APT codegen

* Partially fix errai-bus tests code generation

* Fix ErraiAptExportedTypes tests

* Fix multidimensional arrays marshaller factory generation

* Configured APT generators for errai-ioc. There are error still.

* Configure APT generators for errai-ioc-bus-support. There are still errors.

* Configure APT generators for errai-cdi-server. Fix export file exported public types

* Fix exporting only public elements in Export Files for good

* Fix exporting parameters of methods/constructors annotated with @Inject

* Fix exporting primitive values

* Configure APT generators for errai-data-binding.

* Configure APT generators for errai-jaxrs-client

* Configure APT generators for errai-navigation and errai-validation. Still broken.

* Fix random error caused by local exportable types not being erased

* Make generators be exported as part of their ErraiModule

* Remove test

* Removed unused parameter

* Reorganize tests in errai-security and configure APT generators

* Fix stylesheet files discovery

* Fix stylesheet load for reals

* Fix class name of generated files for local @ErraiApps

* Revert some undesired changes

* Prepared for running tests with apt-generated code

* Create GWT Module file generator to override rebinding rules for APT-generated code

* GWT modules being adapted to apt-generated classes in demos as well

* Place gwtModuleName in @ErraiApp

* Moved GWT module generation to ErraiAppAptGenerator

* Added additionalClassElement configuration to errai-ui

* Improve switch between generating code using APT or GWT generators

* General improvements

* Add testResources configuration to errai-ui

* Configure remaining test @ErraiApps in errai-cdi-server

* More tests configuration

* Remove comments on ErraiGenerators

* Fix errai-security-client IT tests code generation error

* General fixes

* Fixed some tests and add MetaMethodTest for all MetaMethod impls

* Add asyncBeanManager property to async tests @ErraiApp

* Add scope to un-annotated implementations of interface

* Make APTClass be the first option in MetaClassFactory

* Fix error in MetaClassFactory.get

* Resolved primitive issues in MetaClassFactory.loadClass

* Resolved primitive issues in MetaClassFactory.loadClass

* Make sure APTClassUtil is not initialized before codegen tests

* Fix broken test

* Make errai-codegen tests use APTClass before using JavaReflectionClass

* PR general pass

* Rollbcak unneeded change

* Create errai-ioc-extension-tests

* Add log4j.properties to errai-navigation tests

* CDI IOCExtensions now stay in another module and are pre-compiled

* Created mechanism to define exporting strategies depending on the annotation

* Replaced ExportedAnnotations for ExportingStrategies configuration class

* Fixed tests

* Small refactors

* Minor fixes/refactorings

* Fixed errai-navigation tests. Attemp to fix errai-validation but not complete yet

* Fix errai-jaxrs-client tests by configuring mappingAliases correctly

* Fixed one of the broken tests in errai-ioc

* Fix errai-ioc test by configuring @ErraiModule properly

* Improved exporting strategies for errai-ioc and errai-jaxrs-client

* Created jsInteropSupportEnabled configuration property

* Create dynamic validation property in @ErraiApp

* Fix almost every test in errai-data-binding

* Fix StyleBindingDecorator

* Fix errai-ioc test by dealing correctly with generic arrays as parameters in constructors/methods

* Fixed some of the server/client code generation problems

* Server code generation and CDI test fixes

* Moved Funject out of errai-cdi-server, so that it is pre-compiled

* Fix RpcIntegrationTest

* Fix SpecializationIntegrationTest

* Attempt to fix Stereotypes test

* Reset definitions factory before generating code for an @ErraiApp

* Fix JsTypeInjectionTest by changing from List to Set in WindowInjectionContextImpl providers

* General refactorings

* Fix DisconnectedEventIntegrationTest

* Fix BeanManagerIntegrationTest.testNormalScopeOverridesDependent

* Fix BeanManagerIntegrationTest.testBeanManagerLookupInheritedScopeBean by returning inherited annotations on APTClass as well

* Created tests for inherited annotations in APTClass

* Ignore tests of unsupported features in APT environment

* Fix MetaClassFinder extending/restriction methods

* Make ValidatorFactoryGenerator async and ignore dynamic validation tests for now.

* Fix configuration to ignore tests of unsupported features in APT environment

* Remove local flag from '@ErraiApp'. An app is local when the modules property is not empty

* PR final pass

* PR fixes

  1. … 680 more files in changeset.
Create APT generators for errai-ioc module

  1. … 255 more files in changeset.
Add Errai APT Generators mechanism

  1. … 271 more files in changeset.
ERRAI-1018: Support for javax.enterprise.inject.Typed

* Rework implementation of injectables matching sites of the exact type.

Now uses a predicate on the path of references used to resolve a dependency

in order to determine if a resolved candidate satisfies an injection site.

* Use path predicate to support @Typed for resolution of dependencies at

compile time.

* When @Typed is present, only use types in @Type for assignable types.

This allows beans to only be looked up dynamically by types in @Typed.

  1. … 29 more files in changeset.
Temporarily revert ERRAI-1018 commit because of downstream project issues.

This reverts commit a35e7f90a7d23ce5595da188f55d1c954c14c8c6.

  1. … 24 more files in changeset.
ERRAI-1018: Support for javax.enterprise.inject.Typed

* Rework the mechanism for having injectables satisfy only injection

sites. Now each injectable supplies a predicate that evaluates the

path used to resolve itself for a given site. The predicate can veto

a path so that the injectable is not resolved for that site.

* Use new path predicate mechanism to support @Typed. Beans with

@Typed have a predicate that only returns true if the injection

site is one of the types declared in the @Typed annotation.

  1. … 24 more files in changeset.
Generate dummy implementations for some JsTypes to avoid compiler inlining.

  1. … 4 more files in changeset.
Fix IOC generation infinite loop when a parameterized type is injected with and without type arguments.

  1. … 7 more files in changeset.
Add wiring type for pseudo-scopes, validate lack of pseudo-scope cycles (with tests).

This commit changes @EntryPoint and @Singleton to pseudo-scopes, meaning

they are not proxied and cannot be in a cycle that does not contain a

normal-scoped bean.

  1. … 22 more files in changeset.
Support dynamic serialization of qualifiers on the server and introduce minor changes to CDIAnnotationUtil (description below).

* Create DynamicEventQualifierSerializer that uses reflection to access qualifier properties.

* Use the DynamicEventQualifierSerializer if CDIExtensionPoints can't load or generate a static impl.

* Fix the package name of CDIAnnotationUtils (still had ioc in it but it is now in codegen).

* Support getting qualifier properties with reflection as well as codegen API (in CDIAnnotationUtils).

  1. … 9 more files in changeset.
Rename External to Shared and WindowScope to SharedSingleton, +javadoc

  1. … 11 more files in changeset.
Support sharing a single instance of a JsType defined in two scripts via new window scope.

  1. … 15 more files in changeset.
Allow IOCExtensionConfigurators to register callbacks for processed types.

    • -0
    • +35
    ./ExtensionTypeCallback.java
  1. … 5 more files in changeset.
Allow reuse of extension provided injectables (description below).

Now injectable providers can reuse a single injectable for multiple

injection sites. This allows the WidgetIOCExtension to generate at

most one factory per Widget type, rather than one factory per

injection site.

  1. … 15 more files in changeset.
Add missing license headers and update copyright notice in existing headers.

  1. … 3052 more files in changeset.
Revert "Remove old JBoss and Red Hat license headers. Add new "Red Hat and affiliates" header."

Changes from the reverted commit did not preserve original copyright dates.

This reverts commit d8e735dfe2f6ed25fe9e06b753ae2f6154d76b02.

  1. … 3078 more files in changeset.
Remove old JBoss and Red Hat license headers. Add new "Red Hat and affiliates" header.

  1. … 3160 more files in changeset.
Fix static producer/disposer method bugs with uninstantiable types and support producers for JsTypes.

Fixed bug where producers and disposers required a producer instance even

if the methods/fields were static.

  1. … 17 more files in changeset.
Try to use @Inject constructors for proxying and allow non-public constructors for beans.

Proxies will use @Inject constructors if no accessible no-arg constructors

exist. Proxies will prefer public/protected no-arg constructors.

Dependent scoped beans can have constructors of any scope.

  1. … 10 more files in changeset.
Enhance WidgetIOCExtension and related fixes (description below).

Cache concrete subtypes of Widget in MetaClassBridgeUtil

to add provider extensions in WidgetIOCExtension.

Remove subtype matching feature and fixup exact type matching

feature.

  1. … 11 more files in changeset.
Performance improvments and IOCExtensionConfigurator API change (details below).

* Don't pass in IOCProcessor to IOCExtentionsConfigurators. Allows caching

of scanned extensions, decorators, and tasks.

* Don't load class from class loader in JavaReflectionClass.

* Reduce usage of MetaClass.asClass for class literals in generated code.

* Overload some methods in EnvUtil to take MetaClasses (to avoid calling asClass).

* Never clear non-reloadable types from MetaClassCache.

  1. … 27 more files in changeset.
Remove redundant async IoC tests and change IOC.getBeanManager() behaviour.

errai-ioc-async-tests now runs all tests from errai-ioc with

the async flag set to true. Duplicate tests have been removed.

When the async flag is set to true, IOC.getBeanManager() returns

as SyncBeanManager that is used internally by the AsyncBeanManager

(containing beans from all downloaded code fragments).

  1. … 50 more files in changeset.
ERRAI-590, ERRAI-850, ERRAI-851: Implement new IOC container (more description below).

The new container uses code genererated in multiple files instead

of a single monolithic file. At compile time an implementation of

org.jboss.errai.ioc.client.container.Factory is generated for each bean.

The factory is responsible for requesting dependencies from other

factories to wire the bean, running code generated by decorators,

and cleaning up when the bean is destroyed.

The GWT.create calls for the factories are generated in the

BootstrapperImpl. The BootstrapperImpl now only registers

factories with their respective contexts.

This container has the following differences from behaviour

in the 3.x version of errai-ioc:

* Normal scoped beans must be proxiable.

* The @New qualifier is not supported.

* Normal scoped beans (except @Entrypoint or with @Startup) are lazily instatiated.

* @Alternative beans must be explicitly enabled (even if no other beans match).

* Resolution of types behaves like CDI. Some cases that worked in 3.x may now be ambiguous.

** Injecting a common supertype of multiple concrete classes is ambiguous.

* Different API for programmtically adding beans to bean manager.

    • -0
    • +409
    ./FactoryController.java
    • -0
    • +42
    ./InjectableProvider.java
    • -11
    • +0
    ./InjectorRegistrationListener.java
  1. … 367 more files in changeset.
Support injection of singleton beans across script boundaries (dyn. modules)

  1. … 6 more files in changeset.
InjectionContext performance enhancement.

In getMatchingAnnotationForElementType, check if the annotation is directly on the type before filling in stereotypes.

minor cleanup: javadoc formatting and suppress warnings

  1. … 1 more file in changeset.
Fixed JDK 8 compatibility issue regarding inferred generic types

  1. … 1 more file in changeset.
Minor perf. improvement and cleanup

  1. … 1 more file in changeset.
Minor perf. improvement and cleanup

  1. … 1 more file in changeset.
Use Predicate to filter file paths when scanning in GwtValidationGenerator.

  1. … 7 more files in changeset.