Feature #1106

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

The preference "Show export result in the text editor" raises a null pointer exception when trying to open the exported chart file with internal viewer. It seems normal because TXM tries to open a Text editor and give it some SVG, PNG, etc. files
But after some further tests I have the same problem with concordance, index, etc. under Windows. The bug comes from window.getActivePage() in org.txm.rcpapplication.commands.OpenFile.openfile(File). window is null.

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.

h3. Solution 1

* fix the text editor bug with .csv
* 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)

h3. Solution 2

* fix the text editor bug with .csv
* add a preference as "Show/Open/Display exported charts in external viewer" ?

h3. Solution 3

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

h3. Misc

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

Retour