Incremental mode [message #1018732] |
Thu, 14 March 2013 07:28  |
Eclipse User |
|
|
|
Hi,
i'm wondering how the incremental mode in MoDisco is implemented. Does "incremental" mean that if i run MoDisco on an already discovered project (e.g. if the source code was changed after the former discovery), that the resulting MoDisco model is updated rather than created from scratch again?
Regards,
Thomas
|
|
|
|
|
|
|
Re: Incremental mode [message #1044051 is a reply to message #1043813] |
Thu, 18 April 2013 08:41  |
Eclipse User |
|
|
|
Hi Thomas,
I had a look at the JDTVisitor. Its seems to me that the code is complete for what it was supposed to do :
- the visit(VariableDeclarationFragment) does the job to determine previously references and reuse the proxy (call setProxy(false)).
- the visit(FieldDeclaration) does not have to do it, since a FieldDeclaration is just a container for VariableDeclarationFragment. No other statement has reference to one "FieldDeclaration".
Now may be the problem is that you consider the existing parameter called "INCREMENTAL_MODE" as a way to manage the incremental update of one java model. Actually the INCREMENTAL_MODE just proposes some memory optimization, not an attempt of "incremental model update" as you want to do. The memory optimization works as follows :
- when the jdtvisitor encouters some reference to unknown java type/method/field, a "proxy" element is created
- if INCREMENTAL_MODE==false, the discoverer tries to substitute "proxies" with concrete elements at the final end of discovery
- if INCREMENTAL_MODE==true, the discoverer tries to substitute "proxies" with concrete elements at many steps (each java package, and each time a type/method/field declaration is visited)
You may ask through one bugzilla entry to set some fields from JdtVisitor/JavaReader "protected". When possible, one commiter will study the impacts of this modification.
hoping it will help you,
Fabien.
|
|
|
Powered by
FUDForum. Page generated in 0.05382 seconds