Task #2056
Mutualize and clarify the result nodes tree hierarchy
Statut: | Closed | Début: | 04/03/2017 | |
---|---|---|---|---|
Priorité: | Normal | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Development | Temps passé: | - | |
Version cible: | TXM 0.8.0a (split/restructuration) |
Description
Mutualize and clarify the result nodes tree hierarchy. It will also permit to avoid cyclic dependencies in plug-ins.
Solution¶
- define methods in TXMResult (or TXMObject?): getParent(), getChildren(), delete(), deleteChild(int index), etc. and copy(), clone() ?
- override these in subclasses that needs to 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:
- does only computation and produces a TXMResult
- this class is used to monitor a computation
- delete/merge HasResult
- delete/merge Result
- check that all commands inherit from TXMResult
- class org.txm.core.results.TXMResult.java and interface org.txm.core.results.ITXMResult.java has been developed
- interface ITXMResult was needed for some TXM abstract results as LexicalTable, LexicalTableImpl, etc.
- HasResult, Result and old TXMResult classes have been removed/merged
- TxmObject inherits from new TXMResult (need to clarify here, the name are not well chosen)
- Actual hierarchy
- TXMResult <- Function <- A function (with thread canceling support)
- TXMResult <- A result (without thread canceling support)
- TXMResult <- TxmObject <- an object
- IChartResult <- ITXMResult (used for export purpose)
- Still in progress:
- need to clarify the Function class role and name
- need to clarify the TxmObject role and name
- the problem here is a TxmObject needs methods from TXMResult but that's strange to have a TxmObject that inherits from a result in terms of semantic
Historique
#1 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#2 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#3 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#4 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#5 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#6 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
- Description mis à jour (diff)
#7 Mis à jour par Sebastien Jacquot il y a environ 7 ans
- Statut changé de New à Closed
- % réalisé changé de 0 à 100
Done in 0.8, need to explain it in dev Wiki.