Community
Participate
Working Groups
In order to prepare the weaving with kdm.source models (files representation), the Java discoverer must be instrumented in order to retrieve the source regions informations (startPosition, startLine, ...) outside of the discoverer. Such a need will appear for other discoverers, so a generic mechanism may be provided for such informations retrieving.
Hi Fabien, Please find attached a generic mechanism of listeners in order to prepare the weaving between kdl.source models and MoDisco Java ones The Java Reader now raises a flag each time a Compilation Unit is computed. Those events can be captured simply by adding a SourceVisitListener to the used JavaDiscoverer instance Projects concerned by this patch are : org.eclipse.gmt.modisco.infra.discoverymanager org.eclipse.gmt.modisco.java.discoverer 1. I, Nicolas Guyomar, and others contributors listed in this bug, authored 100% of the content 2. I have the rights to donate the content to Eclipse under the EPL 3. I have already provided the filled Employer Consent Forms to the Foundation Regards Nicolas
Created attachment 174972 [details] Listener mechanism to prepare Java model weaving with kdm one
Hi Nicolas, thanks for the contribution. There is something wrong in your implementation of observable/observer pattern : - the SourceVisitListener should only be an interface in infrastructure. - the infrastructure must not reference any project from the Java layer. PS : the Java discoverer has been slightly modified (fix on bug 309606) since you have created the patch. Could you synchronize and create again the patch ? Fabien.
Created attachment 175047 [details] Listener mechanism to prepare Java model weaving with kdm one This version of the patch does not referenced java layer component SourceVisitListener is now an interface
Now everything looks good. Thanks ! The fix has been commited into SVN.
The patch has been successfully applied.