* IDEMPIERE-4842 Easier model registration
- Change from https://github.com/atteo/classindex to
https://github.com/classgraph/classgraph, remove annotation processor
config.
- Change service.ranking of DefaultModelFactory to -1 and
service.ranking of AnnotationBasedModelFactory to 0. This give
AnnotationBasedModelFactory higher priority over DefaultModelFactory and
allow plugins to have higher priority over AnnotationBasedModelFactory
with server.ranking of 1 (the common practise before the introduction of
AnnotationBasedModelFactory).
- Added resultset constructor to MTree. This is to allow the use of
MTree with model factory.
- Remove classindex annotation from org.adempiere.base.Model and X_*
model classes.
- Added unit test for table to model class mapping
- AnnotationBasedModelFactory: Change from using annotation processor to
runtime annotation scanning using the classgraph library. The default
setting scans all the X_* model class and travels the inheritance
hierarchy to discover the M* model class. Plugin needs to create a
subclass of AnnotationBasedModelFactory and register it as an OSGi
component to scan the plugin's annotated model classes (the plugin's
custom AnnotationBasedModelFactory component should have service.ranking
> 0).
* IDEMPIERE-4842 Easier model registration
minor refinement
* Minor changes
Co-authored-by: hengsin <hengsin@gmail.com>
* IDEMPIERE-4842 Easier model registration
- Temporary disable AnnotationBasedModelFactory until getSubclasses()
doesn't work for subclass from different package is resolve.
* IDEMPIERE-4842 Easier model registration
- turn of annotation processing in editor which causes slow editor
performance
* Preliminary support for automatic model class registration
Model classes can be tagged with a new @Model annotation that allows for
easy/fast class scanning/registration, based on the ClassIndex library.
The list of annotated model classes is generated at compile time, thus
reducing reflection reliance to a bare minimum.
NOTE: Eclipse uses its own Java compiler which is not strictly standard
compliant and requires extra configuration. In Java Compiler ->
Annotation Processing -> Factory Path you need to add ClassIndex jar
file
* Annotation based model factory
* Improve classloader determination for annotation scanning
ClassIndex default annotation scanning method determines the classloader
to be used by calling Thread.currentThread().getContextClassLoader(),
which should not be used in an OSGi environment.
* Enable ClassIndex's annotation processor under Eclipse
Make sure annotation processing is enabled at Module Properties -> Java
Compiler -> Annotation Processing
* Refactoring annotation-based model class detection
Eliminated the need of annotating M* classes, by using ClassIndex's
@IndexSubclasses annotation.
* Minor change
* Minor changes
* Creation of AbstractModelFactory
* Documentation
* Make AnnotationBasedModelFactory extend AbstractModelFactory
* IDEMPIERE-4842 Easier model registration
- add annotation processor jdt settings
- fix @Component annotation for AnnotationBasedModelFactory
- fix generated x_* class missing "org.atteo.classindex.IndexSubclasses"
import
* Expose ClassIndex lib to other bundles
* Updated model classes
Co-authored-by: hengsin <hengsin@gmail.com>
* IDEMPIERE-4488 Remove .classpath from repository
* IDEMPIERE-4488 Remove .classpath from repository
add ignore for .classpath
* IDEMPIERE-4488 Remove .classpath from repository
remove ".settings/org.eclipse.jdt.core.prefs"
* IDEMPIERE-4488 Remove .classpath from repository
fix false status report for /bin and .project
* IDEMPIERE-4329 Cleanup eclipse warnings
Clean unused imports
* IDEMPIERE-4329 Cleanup eclipse warnings
Clean some additional warnings
Make org.adempiere.base to respect the Warnings/Errors level configuration from workspace
* IDEMPIERE-4329 Cleanup eclipse warnings
One more unused import caused by the previous commit
a mavent project convert from plugin have flow default rule
1. maven project prefer setting JRE to Execution environment, so .classpath is updated
2. java class compliment to target/classes/, so build.propertie is updated
3. JDK compliance configuration setting per project (only this option), so .settings/org.eclipse.jdt.core.prefs is created
extra setting about warning done manual to resolved
https://bugs.eclipse.org/bugs/show_bug.cgi?id=367431
it happend on bundle use non-standard java package
org.adempiere.base/.settings/org.eclipse.jdt.core.prefs
org.adempiere.ui.swing/.settings/org.eclipse.jdt.core.prefs
on org.adempiere.server, old method add accessrules to classpathentry don't work for maven build.
so change to warning method make it consitent with other
org.adempiere.server/.settings/org.eclipse.jdt.core.prefs