Feature #1112
RCP: 0.7.6, define and implement names policy for TBX result object names, RCP editor/tab names/titles, charts exported view files, raw charts exported files from nodes and txt/csv results exported files
Status: | New | Start date: | 11/06/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% |
|
Category: | UI | Spent time: | - | |
Target version: | TXM X.X |
Description
Current state¶
NOTE: As a reminder, an "editor" and a "tab" means the same SWT component (real name is "editor part").
TBX result object names¶
- TBD
Editor/tab titles¶
- CAH => title computed from CAH.getName() + type of result "Classification:" added before
- TBD
- TODO: at least use the same pattern? For some results the type of result is displayed in the title, for some others it is not.
(e.g. actually for dimension partition there is not the corpus name in the title, only the type of result and partition name or for CAH)
Data result export¶
- no automatic file name is computed
- this export is at TBX level therefore the name can not be computed from the editor title. It should be computed from the TBX result object name
Raw chart result export (from Corpus view nodes)¶
- no automatic file name is computed
- this export is at TBX level therefor the name can not be computed from the editor title. It should be computed from the TBX result object name
Chart editor view export (from chart editor tool bar)¶
- the file name is computed from the chart editor title
- a custom method is applied to replace all invalid characters by the character '_'
- see: org.txm.tbx.chartsengine.base.ChartsEngine.cleanFileName(String):
public static String cleanFileName(String fileName) { return fileName.replaceAll("[^a-zA-Z0-9\\._-]+", "_"); }
This method is not optimal, e.g. it removes accented characters. We should aim to use platform native Java filename validation if exists.
Furthermore this method should be moved from the chart rendering layer and shared by all export mechanism.
MD: something like
File f = new File(path, name) f.createEmptyFile(); if (f.exists()) { ... }
SJ: it would be nice for invalidating file names. After that we need to create a valid name from the invalid name. Maybe url encoding could do that, as in PHP.
First proposals¶
- when exporting from an editor, compute the output file name from the editor title, but before we need to define if we put the type of result in the title of the editor. If not we may add it to the computed file name (at this moment this case is only for the chart editor)
- when exporting from a node (TBX level), compute the file name from the TXM result object name. The type of result seems to not be stored in TXM object result and I guess it shouldn't so we may need to add it to the computed file name
- for editor titles:
- user can see the type of result with the title icon image, it may be sufficient?
- for all results, start the title by the corpus name
- for partition dimensions, change icon and add corpus name?
History
#1 Updated by Sebastien Jacquot over 8 years ago
- Subject changed from RCP: 0.7.6, define and implement names policy for result object names, editor/tab names/titles, charts exported view files, raw charts exported files from nodes and txt/csv results exported files to RCP: 0.7.6, define and implement names policy for TBX result object names, RCP editor/tab names/titles, charts exported view files, raw charts exported files from nodes and txt/csv results exported files
- Description updated (diff)
#2 Updated by Matthieu Decorde over 8 years ago
- Description updated (diff)
#3 Updated by Sebastien Jacquot over 8 years ago
- Description updated (diff)
#4 Updated by Sebastien Jacquot over 8 years ago
- Description updated (diff)
#5 Updated by Sebastien Jacquot over 8 years ago
- Target version changed from TXM 0.7.7 to TXM 0.7.8
#6 Updated by Matthieu Decorde over 7 years ago
- Target version changed from TXM 0.7.8 to TXM 0.8.0a (split/restructuration)
#7 Updated by Sebastien Jacquot almost 5 years ago
- Target version changed from TXM 0.8.0a (split/restructuration) to TXM 0.8.0
#8 Updated by Matthieu Decorde about 4 years ago
- Target version changed from TXM 0.8.0 to TXM X.X