Task #2113
Use the new TXMResult and TXMEditor hierarchy and centralization
Status: | Closed | Start date: | 04/05/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% |
|
Category: | Development | Spent time: | - | |
Target version: | TXM 0.8.0a (split/restructuration) |
Description
Use the new TXMResult and TXMEditor hierarchy and centralization.
WIP:
To factorize and share a bunch of functions/code:
TBX:- base results must extend TXMResult or implement ITXMResult
- chart results must extend ChartResult or implement IChartResult
- result must define the abstract methods getName(), getSimpleName(), etc.
- result must define the abstract methods getType() that must return a translatable string representation of the object/result.
=> to use for sorting nodes on type independently of the current lang
=> may also be used create the part name prefix (tab title), eg. : Progression: ["faire"], CA: xx, AFC : xx
- editor inputs must use TXMEditorInput or ChartEditorInput
- TXMEditorInput stores a TXMResult member, used by RCP platform for checking an editor is not already open (equals()), to define the name of the input, also to future persistence
- editor parts must extend TXMEditorPart or ChartEditorPart
- TXMEditorPart stores a TXMEditorInput and retrieves information from it as the name or the tooltip tab
- result adapter factory and result adapter must extend TXMResultAdapterFactory and return a TXMResultAdapter implementation that use the tree hierarchy of TXMResult (getChildren, getParent, etc.)
- adapters are used in the Corpora view to display icon and node name
- (plugin.xml) display "export data" menu entry is now based on ITXMResult instanceof test on the current node selection
- (plugin.xml) display "export chart" menu entry is now based on IChartResult instanceof test on the current node selection
Still need to discuss about the name methods, getName(), getSimpleName(), getDetails(), getValidFileName(), etc. and which ones to use at what locations.
WIP: These modifications are pretty tricky to track and check so here is a canvas to help to define progression in the sub-tasks of this task.
WIP: need to split this canvas and move one part to plug-ins extraction issues
- TXMResult inheritance / ITXMResult implementation
- TXMEditor
- AdapterFactory
- getName(), etc.
Cascade naming and user naming¶
- currently 2 objects can have a user-defined name: Subcorpus and Partition
=> both extends TxmObject
=> these objects must store the user-defined name
=> add a member userName in TXMResult or TXMObject
=> modify code in a way that getName() returns the userName if exists otherwise the cascading name - other results can use cascade naming: parent.getName() + this.name, etc.
- we may introduce the notion of internal name, especially for CQP and R objects, to easily manage names used for display and names used when communicating with the 3rd-party tools (eg. CQP name and R symbol can be considered as internal names)
- SJ: I suggest to put this mechanism in the TXMResult itself rather than in TXMObject in prevision of offer a way to rename all result types.
Sub-tasks canvas for name and information strings generated in TXMResult class¶
WIP: Current state and usage locations
UI¶
- Editor/Tab title
- getName()
- Editor/Tab tool tip
- getDetails()
- Tree node label through TXMResultAdapter
- getSimpleName()
- Status bar when clicking on a result node
- getName()
- getDetails()
- getAdvancedName()
- etc.
Core/logs¶
- console
Validation tests base canvas¶
WIP...
- compute a non-chart command result
- check the node name
- check the editor/tab title
- check the editor/tab tool tip
- click on the result node => check the status bar message
- open the data export dialog box from right click on the node (or editor tool bar) and check the pre-filled generated file name of the export dialog box
- cancel the export
- change the command parameters
- check the new name of the tree result node, tab title and tooltip (may change or not, according to the parameters that have been edited)
- compute a chart command result
- check the node name
- check the editor/tab title
- check the editor/tab tool tip
- click on the result node => check the status bar message
- open the data export dialog box from right click on the node and check the pre-filled generated file name of the export dialog box
- cancel the export
- open the chart export dialog box from right click on the node and check the pre-filled generated file name of the export dialog box
- cancel the export
- open the chart view export dialog box from the editor tool bar and check the pre-filled generated file name of the export dialog box
- cancel the export
- change the command and/or rendering parameters
- check the new name of the tree result node, tab title and tooltip (may change or not, according to the parameters that have been edited)
Subtasks
History
#1 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#2 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#3 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#4 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#5 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#6 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#7 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#8 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#9 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#10 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#11 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#12 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#13 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#14 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#15 Updated by Sebastien Jacquot almost 4 years ago
- Description updated (diff)
#16 Updated by Sebastien Jacquot almost 3 years ago
- Subject changed from Use the new TXMResult and TXMEditor hierarchy to Use the new TXMResult and TXMEditor hierarchy and centralization
- Description updated (diff)
#17 Updated by Sebastien Jacquot over 2 years ago
- Status changed from New to Closed