Task #2045

Updated by Sebastien Jacquot over 3 years ago

Mutualize and clarify TXMResult, Function, TXMObject, HasResults. It will also permit to avoid cyclic dependencies in plug-ins.

WIP (Framapad):


* getName()
* getSimpleName()
* getAdvancedName()?
* getDetails()?
* toString()

Uses these methods to display in:
* console log
* corpora view tree node label (AdapterFactory)
* Editor tab title
* status bar (when clicking a node result)
* prefilled file name when exporting a result (could be the editor tab title, it is not uniformed at this moment)

getAdvancedName() could return a string dedicated to "advanced users" following XML pattern with @ showing what is SU and what is SUP, eg.:

* partition name: DISCOURS_text@loc

.h3 Solution

* define abstract methods in TXMResult
* checks that all results extend TXMResult
* create a class TXMEditorInput that stores the TXMResult object as in the ChartEditorInput (checks and reuse the source code of CustomizableEditor)
* use one of these methods in TXMEditorPart.init() to set part name with: setPartName(editorInput.getResult().getName())
* use one of these methods in the CorporaView click listener to update the status bar
* use one of these methods in the export dialog to fill the file name
* define methods Log.info(TXMResult), severe(TXMResult), etc. that call TXMResult.toString() and use them for looging