Feature #1106

Improve the "Show export result in the text editor" functionnality

Ajouté par Sebastien Jacquot il y a presque 11 ans. Mis à jour il y a plus de 5 ans.

Statut:Feedback Début:
Priorité:Normal Echéance:
Assigné à:- % réalisé:

0%

Catégorie:Export Temps passé: -
Version cible:TXM 0.X.X

Description

The choice of which type of editor is opened according to the export file type is inherited from ancient code. We may define a better way of which type must be opened in internal viewers and which of them must be opened in external viewers (through preferences ? Something as a combo box with 3 entries like "Do not display exported results", "Display exported results in TXM", "Display exported results in external viewer").

Actually, I think there is no real interest to re-open charts exported file directly in TXM,unlike the case of .txt, .csv result exports.

Solution 1

  • rename the preference as something like "Display exported results in internal viewer" or "Open exported results in TXM" since it could concern chart files too ?
  • manage the opening of other internal editor according to the file format: TXMBrowser for raster formats: PNG, JPG; SVG Batik Editor for SVG; external viewer for PS, PDF (or add some libs for these formats)

Solution 2

  • add a preference as "Show/Open/Display exported charts in external viewer" ?

Solution 3

  • mix solution 1 and 2, i.e. manage internal viewer opening and also external viewer opening for all TXM result types

Misc

  • I think the word "Open" or "Display" would be better than "Show" ?

Historique

#1 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Description mis à jour (diff)

#2 Mis à jour par Sebastien Jacquot il y a presque 11 ans

  • Description mis à jour (diff)

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

  • Description mis à jour (diff)

#4 Mis à jour par Sebastien Jacquot il y a presque 11 ans

This bug/question is also linked to the menu entry "Open..." which always opens a Text editor despite of the file format. We may rewrite the OpenFile command for it opens editor according to file format:

  • SVG => Batik or TXMBrowser (but user may want to open the SVG XML source ?)
  • Rasters => TXMBrowser
  • CSV, TXT => TextEditor
  • XML => XML editor (about this, I think it would be nice to include the XML Editor in TXM base and not as an extension because XML is the base format)

If we do that, we may remove the "Open in browser..." command.

There is another bug with the commands "Open..." and "Open in browser..." leading to "Caused by: java.lang.ClassCastException: org.eclipse.jface.text.TextSelection cannot be cast to org.eclipse.jface.viewers.IStructuredSelection" when trying to run it from menu entry when the Corpus view is not active (have not the focus).

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

Actually the commands already exist:

  • org.txm.rcp/src/main/java/org/txm/rcpapplication/commands/OpenBrowser.java
  • org.txm.rcp/src/main/java/org/txm/rcpapplication/commands/OpenFile.java (open a TXT editor)
  • org.txm.rcp/src/main/java/org/txm/rcpapplication/commands/OpenGraph.java (open a Batik SVG editor for .svg extension and a TXMBrowser for .png, .jpeg and .jpg extensions)
  • org.txm.rcp/src/main/java/org/txm/rcpapplication/commands/OpenSVGGraph.java

we may just have to link them to the "Open..." command.

#6 Mis à jour par Sebastien Jacquot il y a plus de 10 ans

  • Version cible changé de TXM 0.7.7 à TXM 0.7.8

#7 Mis à jour par Matthieu Decorde il y a environ 10 ans

  • Version cible changé de TXM 0.7.8 à TXM 0.8.0a (split/restructuration)

#8 Mis à jour par Sebastien Jacquot il y a plus de 8 ans

  • Catégorie changé de Commands / Export à Export

#9 Mis à jour par Sebastien Jacquot il y a plus de 7 ans

  • Version cible changé de TXM 0.8.0a (split/restructuration) à TXM 0.8.0

#10 Mis à jour par Sebastien Jacquot il y a plus de 6 ans

  • Version cible changé de TXM 0.8.0 à TXM 0.8.2

#11 Mis à jour par Serge Heiden il y a plus de 6 ans

Is this functionality really important?

#12 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Description mis à jour (diff)
  • Version cible changé de TXM 0.8.2 à TXM 0.X.X

#13 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • Tracker changé de Bug à Feature
  • Sujet changé de RCP: 0.7.6, automatically opening exported chart file (and other files ?) in TXM text editor doesn't work à Improve the "Show export result in the text editor" functionnality
  • Description mis à jour (diff)

#14 Mis à jour par Sebastien Jacquot il y a plus de 5 ans

  • % réalisé changé de 100 à 0

Formats disponibles : Atom PDF