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

    • -10
    • +6
    ./EventQualifierSerializerGenerator.java
  1. … 680 more files in changeset.
ERRAI-1075: Create APT generator for errai-marshalling (#296)

* Create APT generator for NavigationGraphGenerator

* Start to move errai-marshalling configuration out of EnvUtil clas

* Fixed exposed and nonExposed portable types

* Inline methods and add comment

* Fix NullPointerException

* Move Marshalling configuration out of EnvUtil

* Create MarshallersAptGenerator (not working)

* Prepare MarshallersGenerator to run in APT environment too

* Make errai-marshalling use completely interchangeable ErraiConfiguration implementations

* Fix ClassScanner parameters to use reflections while searching @Portable types

* Make MetaClassFinder available for DefinitionsFactoryImpl

* Add @MappingAlias annotation to ErraiConfiguration

* Make MarshallerAptGenerator work, but with errors

* Scan @ServerMarshallers with MetaClassFinder

* Fix tests and improve GWT environment MetaClassFinder

* Improve MarshallerAptGenerator. References not yet resolved in MarshallerFactoryImpl

* Make ErraiMarshalling.gwt.xml use APT generators and skip creation of abstract classes in generated marshallers

* MarshallerAptGenerator working with both GWT and APT generators

* MarshallerAptGenerator working and generating every Marshaller

* Fix logging in errai-demos

* Fix X marshaller not found (generics)

* Little refactors

* Remove static initialization of ErraiAppPropertiesConfiguration in MarshallingConfiguration

* Remove QualifyingMetaDataFactory property

* Remove unsafe call from errai-ioc decorators logic

* Add PageRequest in ErraiMarshallingModule's configuration

* Rollback parameter type to erased

* Revert "Remove unsafe call from errai-ioc decorators logic"

This reverts commit b496229be2f7ecaa50e9ea4c5951035772d10487.

* Fix issue with generic field/parameters. Add time logs to files generation in APT environment.

* Remove @Portable annotation added by mistake

* Remove unsafeIsAnnotationPresent from HasAnnotations

* Remove unsafe methods from HasAnnotations

* Remove AbstractHasAnnotations class

* Refactor configuration files

* Add tests to new properties in @ErraiApp

* Update comments

* PR final pass

* Remove even more unsafe calls from HasAnnotations implementation

* Removed annotation caches and unnecessary methods from subclasses of HasAnnotations

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

    • -2
    • +16
    ./EventQualifierSerializerGenerator.java
  1. … 254 more files in changeset.
Add Errai APT Generators mechanism

    • -11
    • +9
    ./EventQualifierSerializerGenerator.java
  1. … 270 more files in changeset.
ERRAI-978: Generated client code doesn't compile for observer methods of primitive types.

Observer methods of primitive types are registered as observes of the boxed types,

since only boxed types can be fired as events.

  1. … 2 more files in changeset.
ERRAI-974: Call observers for indirect interface supertypes of event.

Instead of generating addLookups for all indirect supertypes,

do this for only direct supertypes/interfaces and recurse

to get indirect supertypes.

    • -27
    • +23
    ./JSR299IOCExtensionConfigurator.java
  1. … 9 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.
Move CDIAnnotationUtils from errai-ioc (reasoning below).

CDIAnnotationUtils is used by errai-cdi-server in dev mode to

generate the EventQualifierSerializerImpl.class. This means

that SDM can break when errai-ioc is set to provided scoped.

To avoid having to specify a separate profile for SDM, CDIAnnotationUtils

has been moved to errai-codegen. The same problem now exists for errai-codegen

where if it is set to provided scope it may break SDM, however, leaving

errai-codgen as compile scoped and deploying it to the server in production

has less potential for bad side-effects than deploying the errai-ioc jar.

    • -2
    • +2
    ./EventQualifierSerializerGenerator.java
  1. … 4 more files in changeset.
Improve logging for generation of MarshallerFactory and EventQualifierSerializerImpl classes.

    • -1
    • +10
    ./EventQualifierSerializerGenerator.java
  1. … 3 more files in changeset.
Add property for setting class file output directory for marshallers and event qualifier serializers.

    • -7
    • +22
    ./EventQualifierSerializerGenerator.java
  1. … 3 more files in changeset.
Fix errai-cdi refactoring: move shared generator to errai-cdi-shared.

    • -135
    • +0
    ./NonGwtEventQualifierSerializerGenerator.java
  1. … 2 more files in changeset.
ERRAI-682+: Fix EventQualifierSerializerImpl class-loading issue (description below).

Fix two separate issues with the loading and generation of the

EventQualifierSerializerImpl:

* At runtime, only try to load class files with the "file" protocol

(in particular, don't load impls from jars on the classpath -- this

caused the ClassChangeUtil.loadClassDefinition to throw an exception

because it is only meant to load files from within the current project).

* Only generate impls into class output folders when running a

production compile.

    • -4
    • +17
    ./EventQualifierSerializerGenerator.java
  1. … 3 more files in changeset.
Remove old JsType annotations (use only jsinterop.annotation.*)

  1. … 5 more files in changeset.
ERRAI-682: Qualifiers with members on events

    • -0
    • +68
    ./EventQualifierSerializerGenerator.java
    • -0
    • +135
    ./NonGwtEventQualifierSerializerGenerator.java
  1. … 35 more files in changeset.
Add missing license headers and update copyright notice in existing headers.

  1. … 3055 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. … 3081 more files in changeset.
Remove old JBoss and Red Hat license headers. Add new "Red Hat and affiliates" header.

  1. … 3163 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. … 26 more files in changeset.
Support CDI events across dynamic modules

  1. … 7 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.

  1. … 380 more files in changeset.
Fixed ERRAI-781: deleted outdated eager observer registration logic

Conflicts:

errai-cdi/weld-integration/src/main/java/org/jboss/errai/cdi/server/CDIExtensionPoints.java

    • -196
    • +0
    ./ObserversMarshallingExtension.java
  1. … 4 more files in changeset.
Fixed ERRAI-781: deleted outdated eager observer registration logic

    • -196
    • +0
    ./ObserversMarshallingExtension.java
  1. … 4 more files in changeset.
Performance improvement for IOC generation (faster method param scanning)

- Scanning only methods in reloadable classes manually, relying on reflections for the rest

  1. … 4 more files in changeset.
Fixed ERRAI-679: Observing java.lang.Object leads to code overload in BootsrapperImpl

    • -8
    • +32
    ./JSR299IOCExtensionConfigurator.java
  1. … 1 more file in changeset.
Perf. improvement for IOC bootstrapper generation

Only consider reloadable types when scanning for subtypes in the metaclass cache. Non-reloadable types (types in JARs that can't change in devmode) can be scanned using reflections which is significantly faster because the data is already cached.

    • -7
    • +10
    ./JSR299IOCExtensionConfigurator.java
  1. … 5 more files in changeset.
ERRAI-649: @LocalEvent prevents remote subscription @Portable typed events.

  1. … 2 more files in changeset.
code cleanup

  1. … 11 more files in changeset.
- Massive refactoring to bus API - @Disposes methods now work properly with the async bean manager.

  1. … 246 more files in changeset.
add support for new @Timed methods in Errai IOC.

  1. … 14 more files in changeset.
add more tests for the async bean manager.

  1. … 47 more files in changeset.