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

Ajouté par Sebastien Jacquot il y a environ 3 ans. Mis à jour il y a environ 2 ans.

Statut:New Début:06/11/2014
Priorité:Normal Echéance:
Assigné à:- % réalisé:

0%

Catégorie:UI Temps passé: -
Version cible:TXM 0.7.9

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?

Historique

#1 Mis à jour par Sebastien Jacquot il y a environ 3 ans

  • Sujet changé de 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 à 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 mis à jour (diff)

#2 Mis à jour par Matthieu Decorde il y a environ 3 ans

  • Description mis à jour (diff)

#3 Mis à jour par Sebastien Jacquot il y a environ 3 ans

  • Description mis à jour (diff)

#4 Mis à jour par Sebastien Jacquot il y a environ 3 ans

  • Description mis à jour (diff)

#5 Mis à jour par Sebastien Jacquot il y a presque 3 ans

  • Version cible changé de TXM 0.7.7 à TXM 0.7.8

#6 Mis à jour par Matthieu Decorde il y a environ 2 ans

  • Version cible changé de TXM 0.7.8 à TXM 0.7.9

Formats disponibles : Atom PDF