Task #2003

Enhance multiple charts engines cohabitation

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

Statut:Closed Début:16/01/2017
Priorité:Normal Echéance:
Assigné à:- % réalisé:

100%

Catégorie:Charts Temps passé: -
Version cible:TXM 0.8.0

Description

Enhance multiple charts engines cohabitation to be able to lazy create some charts with another charts engine even if the current selected charts engine does not manage the type of chart (some kind of downgrade functionality).
Eg.: to create a Wordcloud with R even if the current charts engine is JFreeChart and does not implement a Wordcloud chart creator. The cohabitation is also linked with the management of other future charts engine contributions, eg.: graph charts engine or using other wordcloud library.

Solution

Store a list of current installed charts engine extensions in TBX layer.
Store a list of current installed SWT charts components provider extensions in RCP layer.
Provide some preference pages for all the charts engine extensions with display format. The display format (Java, svg, png, etc.) drives the SWT components provider used when creating a chart.

Validation tests

  • open the preferences (Tools\Parameters)
  • go to TXM\Advanced\Charts engine node and check that current engine is set to Java
  • go to TXM\Advanced\Charts engine\JFreeChart node and check that display format is set to "JFreeChart/Java2D"
  • go to TXM\Advanced\Charts engine\R node and check that display format is set to "svg"
  • create a CAH
    => a chart editor must open
  • additional tests
  • create a Wordcloud
    => a chart editor must open

(Since there are no chart creator in JFC charts engine for CAH or Wordcloud, if a chart is open it means the lazy charts engine change works.)

Historique

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

  • Description mis à jour (diff)
  • Statut changé de New à Feedback
  • % réalisé changé de 0 à 80
Done, the new behavior is:
  • at start, the toolbox creates a charts engine for all installed implementation contribution plug-ins, then set one as current from the default preferences or from the preferences file (at this moment a JFCChartsEngine and an RChartsEngine are created)
    • (the current charts engine can be retrieve with ChartsEngine.getCurrent() and all installed charts engine are stored in the ChartsEngine class)
  • the RCP then creates an SWT charts components providers for all installed implementation contributions, then set one as current that can manage, as input format, the output format of the current charts engine (at this moment a JFCSWTChartsComponentsProvider, a SVGSWTChartsComponentsProvider and a RasterSWTChartsComponentsProvider are created)
    • (the current SWT charts components provider can be retrieve with SWTChartsComponentsProvider.getCurrent() and all installed providers are stored in the SWTChartsComponentsProvider class)
  • changing the current charts engine in the preferences page change the current SWTChartsComponentsProvider by getting the first one that manages the output format of the current charts engine
  • when opening an editor with SWTChartsComponentsProvider.getCurrent().openEditor(), the provider checks if the current charts engine can render the asked type of chart, if no it looks if other charts engines can and uses another one if possible

#2 Mis à jour par Sebastien Jacquot il y a 8 mois

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

#3 Mis à jour par Sebastien Jacquot il y a 2 mois

  • Statut changé de Feedback à Closed
  • % réalisé changé de 80 à 100

Formats disponibles : Atom PDF