Task #2056

Updated by Sebastien Jacquot over 2 years ago

Mutualize and clarify the result nodes tree hierarchy. It will also permit to avoid cyclic dependencies in plug-ins.

h3. .h3 Solution

* define methods in TXMResult (or TXMObject?): getParent(), getChildren(), delete(), deleteChild(int index), etc. and copy(), clone() ?
* override these in subclasses that needs to do free some other resources/objects
* check the way that the toolbox uses to remove an object from R (RServeVariablesView) and enhance it (at this moment it tests the instanceof each object leading to cyclic dependencies in plug-ins)
* define method updateChild(int index) to update a child result from modification of its parent?

* use the methods in the result adapters

NOTE: these adapters are used to fill the tree of the corpora view:

* see: /org.txm.rcp/src/main/java/org/txm/rcpapplication/TextometrieContentProvider.java
* and: /org.txm.rcp/src/main/java/org/txm/rcpapplication/TextometrieLabelProvider.java

SJ: First proposal:

* define TXMResult
* define TXMObject extends TXMResult
* find a better name for TXMObject
* redefine Function role: do only computation and produce a TXMResult
* delete/merge HasResult
* delete/merge Result