Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 2719)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 2720)
@@ -53,6 +53,7 @@
 import org.txm.rcp.swt.widget.ThresholdsGroup;
 import org.txm.rcp.swt.widget.structures.PropertiesComboViewer;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.Subcorpus;
 import org.txm.specificities.core.functions.Specificities;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
@@ -209,6 +210,12 @@
 				this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 				this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 				this.vMaxSpinner.setMinimum(2);
+				CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+				if (corpus != null) {
+					this.vMaxSpinner.setMaximum(corpus.getSize());
+					this.fMaxSpinner.setMaximum(corpus.getSize());
+					this.fMinSpinner.setMaximum(corpus.getSize());
+				}
 			}
 			
 		}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java	(revision 2719)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/RCAChartCreator.java	(revision 2720)
@@ -9,21 +9,22 @@
 import org.txm.ca.core.functions.CA;
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.ca.core.statsengine.r.functions.FactoMineRCA;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.utils.logger.Log;
 
 /**
  * R CA chart creator.
+ * 
  * @author mdecorde
  * @author sjacquot
  *
  */
-public class RCAChartCreator extends RChartCreator implements CAChartCreator {
-
+public class RCAChartCreator extends RChartCreator<CA> implements CAChartCreator {
+	
 	/**
 	 * Creates a factorial map chart from the specified CA result from "FactoMineR" R package and writes it in the specified file.
+	 * 
 	 * @param ca
 	 * @param destFile
 	 * @param showIndividuals
@@ -32,50 +33,51 @@
 	 * @param secondDimension
 	 * @return the generated file containing the chart
 	 */
-	public File createFactorialMapChart(FactoMineRCA ca, File destFile, boolean showIndividuals, boolean showVariables, int firstDimension, int secondDimension, String title)	{
-
+	public File createFactorialMapChart(FactoMineRCA ca, File destFile, boolean showIndividuals, boolean showVariables, int firstDimension, int secondDimension, String title) {
+		
 		try {
-
+			
 			String label = ""; //$NON-NLS-1$
 			String invisible = ""; //$NON-NLS-1$
 			if (showIndividuals)
-				label +=", \"col\""; //$NON-NLS-1$
+				label += ", \"col\""; //$NON-NLS-1$
 			else
-				invisible +=", \"col\""; //$NON-NLS-1$
-
+				invisible += ", \"col\""; //$NON-NLS-1$
+			
 			if (showVariables)
-				label +=", \"row\""; //$NON-NLS-1$
+				label += ", \"row\""; //$NON-NLS-1$
 			else
-				invisible +=", \"row\""; //$NON-NLS-1$
-
+				invisible += ", \"row\""; //$NON-NLS-1$
+			
 			if (label.length() > 0)
-				label = "c("+label.substring(1)+")"; //$NON-NLS-1$ //$NON-NLS-2$
+				label = "c(" + label.substring(1) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 			else
 				label = "c(\"all\")"; //$NON-NLS-1$
-
+			
 			if (invisible.length() > 0)
-				invisible = "c("+invisible.substring(1)+")"; //$NON-NLS-1$ //$NON-NLS-2$
+				invisible = "c(" + invisible.substring(1) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 			else
 				invisible = "c()"; //$NON-NLS-1$
-
+			
 			String axes = "c(" + firstDimension + ", " + secondDimension + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-			String cmd = "plot.CA("+ ca.getSymbol() +", label=" + label + ", invisible=" + invisible + ", axes=" + axes + ", title=\"" + title + "\", cex=.8)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 			
+			String cmd = "plot.CA(" + ca.getSymbol() + ", label=" + label + ", invisible=" + invisible + ", axes=" + axes + ", title=\"" + title + "\", cex=.8)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+			
 			this.getChartsEngine().plot(destFile, cmd);
 			
 		}
-		catch(Exception e) {
-			Log.severe(CACoreMessages.bind(CACoreMessages.cantCreateCAChartFileChartsEngineColonP0P1, RChartsEngine.DESCRIPTION+" - FactoMineR package", e)); //$NON-NLS-1$
+		catch (Exception e) {
+			Log.severe(CACoreMessages.bind(CACoreMessages.cantCreateCAChartFileChartsEngineColonP0P1, RChartsEngine.DESCRIPTION + " - FactoMineR package", e)); //$NON-NLS-1$
 			Log.printStackTrace(e);
 		}
-
+		
 		return destFile;
 	}
-
-
+	
+	
 	/**
 	 * Creates a factorial map chart from the specified CA result from "CA" R package and writes it in the specified file.
+	 * 
 	 * @param ca
 	 * @param destFile
 	 * @param showIndividuals
@@ -84,16 +86,16 @@
 	 * @param secondDimension
 	 * @return the generated file containing the chart
 	 */
-	public File createFactorialMapChart(org.txm.ca.core.statsengine.r.functions.CA ca, File destFile, boolean showIndividuals, boolean showVariables, int firstDimension, int secondDimension)	{
-
+	public File createFactorialMapChart(org.txm.ca.core.statsengine.r.functions.CA ca, File destFile, boolean showIndividuals, boolean showVariables, int firstDimension, int secondDimension) {
+		
 		try {
-
+			
 			double[] sv = ca.getEigenvalues();
 			double tot = 0;
 			DecimalFormat f = new DecimalFormat("###.00"); //$NON-NLS-1$
 			for (int i = 0; i < sv.length; i++)
 				tot += (sv[i]);
-
+			
 			double inertie1 = (((sv[firstDimension - 1] * sv[firstDimension - 1]) / tot) * 100.0);
 			double inertie2 = (((sv[secondDimension - 1] * sv[secondDimension - 1]) / tot) * 100.0);
 			String contrib1 = "axis(" + firstDimension + "): inertia=" + f.format(inertie1) + "%"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -106,72 +108,72 @@
 			cmd += ", cex=.5);"; //$NON-NLS-1$
 			cmd += "mtext(\"" + contrib1 + "\", side = 1, line = 2);"; //$NON-NLS-1$ //$NON-NLS-2$
 			cmd += "mtext(\"" + contrib2 + "\", side = 2, line = 2);"; //$NON-NLS-1$ //$NON-NLS-2$
-
+			
 			this.getChartsEngine().plot(destFile, cmd);
 		}
-		catch(Exception e) {
+		catch (Exception e) {
 			Log.severe(CACoreMessages.bind(CACoreMessages.cantCreateCAChartFileChartsEngineColonP0P1, RChartsEngine.DESCRIPTION + " - CA package", e)); //$NON-NLS-1$
 			Log.printStackTrace(e);
 		}
-
+		
 		return destFile;
 	}
 	
-
-
+	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-
-		CA ca = (CA) result;
-	
+	public File createChart(CA ca, File file) {
+		
 		// FactoMineR R package
-		if(ca.useFactoMineR())	{
-			return this.createFactorialMapChart((FactoMineRCA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca.getSecondDimension(), Utils.createCAFactorialMapChartTitle(ca));
+		if (ca.useFactoMineR()) {
+			return this.createFactorialMapChart((FactoMineRCA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca.getSecondDimension(), Utils
+					.createCAFactorialMapChartTitle(ca));
 		}
 		// CA R package
-		else	{
-			return this.createFactorialMapChart((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca.getSecondDimension());
+		else {
+			return this.createFactorialMapChart((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), file, ca.isShowIndividuals(), ca.isShowVariables(), ca.getFirstDimension(), ca
+					.getSecondDimension());
 		}
 	}
-
-
+	
+	
 	@Override
-	public Class getResultDataClass() {
+	public Class<CA> getResultDataClass() {
 		return CA.class;
 	}
-
-
-
+	
+	
+	
 	@Override
 	public ArrayList<String> getCAFactorialMapChartSelectedPoints(Object chart, int series) {
 		// FIXME: not implemented
 		Log.severe(this.getClass() + ".getCAFactorialMapChartSelectedPoints(): Not yet implemented."); //$NON-NLS-1$
-		return new ArrayList<String>(0);
+		return new ArrayList<>(0);
 	}
-
-
+	
+	
 	@Override
 	public void updateChartCAFactorialMapHighlightPoints(Object chart, boolean rows, String[] labels) {
 		// FIXME: not implemented
 		Log.severe(this.getClass() + ".updateChartCAFactorialMapHighlightPoints(): Not yet implemented."); //$NON-NLS-1$
 	}
-
-
+	
+	
 	@Override
 	public void updateChartCAFactorialMapSetLabelItemsSelectionOrder(Object chart, String[] rowLabels, String[] colLabels) {
 		// FIXME: not implemented
 		Log.severe(this.getClass() + ".updateChartCAFactorialMapSetLabelItemsSelectionOrder(): Not yet implemented."); //$NON-NLS-1$
 	}
-
-
+	
+	
 	@Override
 	public void updateChartCAFactorialMapSetDimensions(CA ca) {
 		// FIXME: not implemented
 		Log.severe(this.getClass() + ".updateChartCAFactorialMapSetDimensions(): Not yet implemented."); //$NON-NLS-1$
 	}
-
-
-
-
-
-}
\ No newline at end of file
+	
+	
+	
+	
+	
+}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java	(revision 2719)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/r/REigenvaluesChartCreator.java	(revision 2720)
@@ -8,7 +8,6 @@
 import org.txm.ca.core.functions.Eigenvalues;
 import org.txm.ca.core.messages.CACoreMessages;
 import org.txm.ca.core.statsengine.r.functions.FactoMineRCA;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
@@ -20,86 +19,89 @@
  * @author sjacquot
  *
  */
-public class REigenvaluesChartCreator extends RChartCreator {
-
+public class REigenvaluesChartCreator extends RChartCreator<Eigenvalues> {
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-
-		CA ca = (CA) ((Eigenvalues) result).getCA();
-
+	public File createChart(Eigenvalues result, File file) {
+		
+		CA ca = result.getCA();
+		
 		// FactoMineR R package
-		if(ca.useFactoMineR())	{
+		if (ca.useFactoMineR()) {
 			return this.createSingularValuesBarPlot((FactoMineRCA) ca.getCA(), file);
 		}
 		// CA R package
-		else	{
+		else {
 			return this.createSingularValuesBarPlot((org.txm.ca.core.statsengine.r.functions.CA) ca.getCA(), file);
 		}
-
 	}
-
-
+	
+	
 	/**
 	 * Creates a bar plot with eigenvalues of the specified CA result from "FactoMineR" R package.
+	 * 
 	 * @param ca
 	 * @param file
 	 * @return the singular values bar plot object
-	 * @throws RWorkspaceException 
-	 * @throws REXPMismatchException 
+	 * @throws RWorkspaceException
+	 * @throws REXPMismatchException
 	 */
 	public File createSingularValuesBarPlot(FactoMineRCA ca, File file) {
-
+		
 		// Create the X axis labels with custom prefix
 		StringBuilder xLabels = new StringBuilder(30);
 		xLabels.append("c("); //$NON-NLS-1$
 		REXP sv;
 		try {
-			sv = RWorkspace.getRWorkspaceInstance().eval("length("+ca.getSymbol()+"$eig$eigenvalue)");  //$NON-NLS-1$ $NON-NLS-2$
+			sv = RWorkspace.getRWorkspaceInstance().eval("length(" + ca.getSymbol() + "$eig$eigenvalue)");  //$NON-NLS-1$ $NON-NLS-2$
 			int ncol = sv.asInteger();
-
+			
 			for (int i = 0, c = ncol; i < c; i++) {
-				if(i > 0)	 {
+				if (i > 0) {
 					xLabels.append(", "); //$NON-NLS-1$
 				}
 				xLabels.append("\"" + (i + 1) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			xLabels.append(")"); //$NON-NLS-1$
-
+			
 			String cmd = "tmpY <- " + ca.getSymbol() + "$eig$eigenvalue[1:" + ncol + "];\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			cmd += "barplot(tmpY, main=\"" //$NON-NLS-1$
 					+ CACoreMessages.eigenvalues + "\", ylab=\"" + //$NON-NLS-1$
 					CACoreMessages.eigenvalue + "\", xlab=\"" + //$NON-NLS-1$
 					CACoreMessages.axis + "\", names.arg=" + xLabels + ");\n"; //$NON-NLS-1$ //$NON-NLS-2$
-
+			
 			this.getChartsEngine().plot(file, cmd);
-
+			
 			return file;
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			e.printStackTrace();
 			return null;
 		}
 	}
-
-
+	
+	
 	/**
 	 * Creates a bar plot with eigenvalues of the specified CA result from "CA" R package.
+	 * 
 	 * @param ca
 	 * @param file
 	 * @return the singular values bar plot object
 	 */
 	public File createSingularValuesBarPlot(org.txm.ca.core.statsengine.r.functions.CA ca, File file) {
-		this.getChartsEngine().plot(file, "barplot(" +  ca.getSymbol() + "$sv)"); //$NON-NLS-1$ //$NON-NLS-2$
+		this.getChartsEngine().plot(file, "barplot(" + ca.getSymbol() + "$sv)"); //$NON-NLS-1$ //$NON-NLS-2$
 		return file;
 	}
-
-
-
+	
+	
+	
 	@Override
 	public Class<Eigenvalues> getResultDataClass() {
 		return Eigenvalues.class;
 	}
-
-
-
-
-}
\ No newline at end of file
+	
+	
+	
+	
+	
+}
Index: tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java
===================================================================
--- tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java	(revision 2719)
+++ tmp/org.txm.ca.core/src/org/txm/ca/core/chartsengine/jfreechart/themes/highcharts/chartcreators/JFCEigenvaluesChartCreator.java	(revision 2720)
@@ -10,7 +10,6 @@
 import org.txm.ca.core.functions.CA;
 import org.txm.ca.core.functions.Eigenvalues;
 import org.txm.ca.core.messages.CACoreMessages;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis;
 import org.txm.statsengine.core.StatException;
@@ -22,13 +21,13 @@
  * @author sjacquot
  *
  */
-public class JFCEigenvaluesChartCreator extends JFCChartCreator {
+public class JFCEigenvaluesChartCreator extends JFCChartCreator<Eigenvalues> {
 	
 	
 	@Override
-	public Object createChart(ChartResult result) {
+	public JFreeChart createChart(Eigenvalues result) {
 		
-		CA ca = ((Eigenvalues) result).getCA();
+		CA ca = result.getCA();
 		JFreeChart chart = null;
 		
 		// Creates the empty dataset
@@ -44,9 +43,9 @@
 	
 	
 	@Override
-	public void updateChart(ChartResult result) {
+	public void updateChart(Eigenvalues result) {
 		
-		CA ca = ((Eigenvalues) result).getCA();
+		CA ca = result.getCA();
 		JFreeChart chart = (JFreeChart) result.getChart();
 		
 		// freeze rendering while computing
@@ -88,11 +87,8 @@
 	
 	
 	@Override
-	public Class getResultDataClass() {
+	public Class<Eigenvalues> getResultDataClass() {
 		return Eigenvalues.class;
 	}
 	
-	
-	
-	
 }
Index: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java	(revision 2719)
+++ tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java	(revision 2720)
@@ -23,182 +23,184 @@
  */
 // FIXME: simulation tests for cooccurrence chart
 public class CooccurrenceGSChartCreator extends GSChartCreator {
-
+	
 	/**
 	 * 
 	 */
 	public CooccurrenceGSChartCreator() {
 		// TODO Auto-generated constructor stub
 	}
-
+	
 	@Override
 	public Object createChart(ChartResult result) {
-//
-//		   String styleSheet =
-//	                "node {" +
-//	                "	fill-mode: dyn-plain;" + 
-//	                "   fill-color: grey;" +
-//	                "	size-mode: dyn-size;" + 
-//	            	"	size: 5px;" + 
-////	                "   size: 30px, 30px;" +
-////	                "   text-size: 12px;" +
-////	                "   shape: freeplane;" +
-////	      //          "   size-mode: fit;" +
-////	                "   fill-mode: none;" +
-////	                "   stroke-mode: plain;" +
-//	                "}" +
-//	                "edge {" +
-//	                "   shape: cubic-curve;" +
-//
-//
-//
-////	                "   stroke-mode: plain;" +
-//	                
-//	                "}" +
-//	                /*"node.marked {" +
-//	                "   fill-color: red;" +
-//	                "}" +*/
-//	                
-//	                "node.titre {" +
-//	                "   size: 55px, 45px;" +
-//	                "   fill-color: blue;" +
-//	                "   text-color: red;" +
-//	                "   shape: diamond;" +
-//	                "}" +
-//
-//	                "node.axe {" +
-//	                "   fill-color: blue;" +
-//	                "   text-color: blue;" +
-//	                "   shape: box;" +
-//	                "}" +
-//	                /*
-//	                "node.mot {" +
-//	                "   fill-color: green;" +
-//	                "   text-color: green;" +
-//	                "}" +*/
-//	                "node.auteur {" +
-//	                "   fill-color: red;" +
-//	                "   text-color: gray;" +
-//	                "   shape: diamond;" +
-//	                "}";
-//		
+		//
+		// String styleSheet =
+		// "node {" +
+		// " fill-mode: dyn-plain;" +
+		// " fill-color: grey;" +
+		// " size-mode: dyn-size;" +
+		// " size: 5px;" +
+		//// " size: 30px, 30px;" +
+		//// " text-size: 12px;" +
+		//// " shape: freeplane;" +
+		//// // " size-mode: fit;" +
+		//// " fill-mode: none;" +
+		//// " stroke-mode: plain;" +
+		// "}" +
+		// "edge {" +
+		// " shape: cubic-curve;" +
+		//
+		//
+		//
+		//// " stroke-mode: plain;" +
+		//
+		// "}" +
+		// /*"node.marked {" +
+		// " fill-color: red;" +
+		// "}" +*/
+		//
+		// "node.titre {" +
+		// " size: 55px, 45px;" +
+		// " fill-color: blue;" +
+		// " text-color: red;" +
+		// " shape: diamond;" +
+		// "}" +
+		//
+		// "node.axe {" +
+		// " fill-color: blue;" +
+		// " text-color: blue;" +
+		// " shape: box;" +
+		// "}" +
+		// /*
+		// "node.mot {" +
+		// " fill-color: green;" +
+		// " text-color: green;" +
+		// "}" +*/
+		// "node.auteur {" +
+		// " fill-color: red;" +
+		// " text-color: gray;" +
+		// " shape: diamond;" +
+		// "}";
+		//
 		
 		Cooccurrence cooccurrence = (Cooccurrence) result.getParent();
-		//Graph graph = (Graph) result.getChart();
+		// Graph graph = (Graph) result.getChart();
 		
 		Graph graph = new SingleGraph(cooccurrence.getSimpleName());
-//		graph.addAttribute("ui.stylesheet", styleSheet);
-
+		// graph.addAttribute("ui.stylesheet", styleSheet);
 		
-//		graph.clear();
-//		graph.clearSinks();
-//	  	
-//		Generator gen = new DorogovtsevMendesGenerator();
-//    	gen.addSink(graph);
-//    	gen.begin();
-//    	for(int i=0; i<500; i++) {
-//    	    gen.nextEvents();
-//    	}
-//    	gen.end();
-
-		//graph.addAttribute("ui.stylesheet", styleSheet);
-		//System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); // Pour les fonctionnalités avancées des CSS
-
-//		int maxSize = 20;
-//		
-//		// add query node
-//		Node rootNode = graph.addNode(cooccurrence.getQuery().getQueryString());
-//		rootNode.addAttribute("ui.size", 5);
-//		rootNode.addAttribute("ui.color", Color.RED);
-//		
-//		// add cooccurrents nodes
-//		for (int i = 0; i < cooccurrence.getLines().size(); i++) {
-//			
-//			Node n2 = graph.addNode(cooccurrence.getLines().get(i).occ);
-//			n2.addAttribute("ui.size", cooccurrence.getLines().get(i).freq / 5);
-//			
-//			graph.addEdge(String.valueOf(i), rootNode, n2);
-//
-//		}
-//		
-////		graph.addNode("A");
-////		graph.addNode("B");
-////		graph.addNode("C");
-////		graph.addEdge("AB", "A", "B");
-////		graph.addEdge("BC", "B", "C");
-////		graph.addEdge("CA", "C", "A");
-//
-//		// set text labels
-//        for (Node n : graph) {
-//        	n.setAttribute("ui.label", n.getId());
-//        }
-	
-
+		
+		// graph.clear();
+		// graph.clearSinks();
+		//
+		// Generator gen = new DorogovtsevMendesGenerator();
+		// gen.addSink(graph);
+		// gen.begin();
+		// for(int i=0; i<500; i++) {
+		// gen.nextEvents();
+		// }
+		// gen.end();
+		
+		// graph.addAttribute("ui.stylesheet", styleSheet);
+		// System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); // Pour les fonctionnalités avancées des CSS
+		
+		// int maxSize = 20;
+		//
+		// // add query node
+		// Node rootNode = graph.addNode(cooccurrence.getQuery().getQueryString());
+		// rootNode.addAttribute("ui.size", 5);
+		// rootNode.addAttribute("ui.color", Color.RED);
+		//
+		// // add cooccurrents nodes
+		// for (int i = 0; i < cooccurrence.getLines().size(); i++) {
+		//
+		// Node n2 = graph.addNode(cooccurrence.getLines().get(i).occ);
+		// n2.addAttribute("ui.size", cooccurrence.getLines().get(i).freq / 5);
+		//
+		// graph.addEdge(String.valueOf(i), rootNode, n2);
+		//
+		// }
+		//
+		//// graph.addNode("A");
+		//// graph.addNode("B");
+		//// graph.addNode("C");
+		//// graph.addEdge("AB", "A", "B");
+		//// graph.addEdge("BC", "B", "C");
+		//// graph.addEdge("CA", "C", "A");
+		//
+		// // set text labels
+		// for (Node n : graph) {
+		// n.setAttribute("ui.label", n.getId());
+		// }
+		
+		
 		// FIXME: tests (opening a Frame with the graph but be careful, closing the Frame closes the entire RCP app)
-    	//graph.display();
+		// graph.display();
 		
 		return graph;
 	}
 	
 	@Override
 	public void updateChart(ChartResult result) {
-	
+		
 		Cooccurrence cooccurrence = (Cooccurrence) result.getParent();
 		Graph graph = (Graph) result.getChart();
 		
 		graph.clear();
 		
-		   String styleSheet =
-	                "node {" +
-	                "	fill-mode: dyn-plain;" + 
-	                "   fill-color: grey;" +
-	                "	size-mode: dyn-size;" + 
-	            	"	size: 5px;" + 
-//	                "   size: 30px, 30px;" +
-//	                "   text-size: 12px;" +
-//	                "   shape: freeplane;" +
-//	      //          "   size-mode: fit;" +
-//	                "   fill-mode: none;" +
-//	                "   stroke-mode: plain;" +
-	                "}" +
-	                "edge {" +
-	                "   shape: cubic-curve;" +
-
-
-
-//	                "   stroke-mode: plain;" +
-	                
-	                "}" +
-	                /*"node.marked {" +
-	                "   fill-color: red;" +
-	                "}" +*/
-	                
-	                "node.titre {" +
-	                "   size: 55px, 45px;" +
-	                "   fill-color: blue;" +
-	                "   text-color: red;" +
-	                "   shape: diamond;" +
-	                "}" +
-
-	                "node.axe {" +
-	                "   fill-color: blue;" +
-	                "   text-color: blue;" +
-	                "   shape: box;" +
-	                "}" +
-	                /*
-	                "node.mot {" +
-	                "   fill-color: green;" +
-	                "   text-color: green;" +
-	                "}" +*/
-	                "node.auteur {" +
-	                "   fill-color: red;" +
-	                "   text-color: gray;" +
-	                "   shape: diamond;" +
-	                "}";
+		String styleSheet = "node {" +
+				"	fill-mode: dyn-plain;" +
+				"   fill-color: grey;" +
+				"	size-mode: dyn-size;" +
+				"	size: 5px;" +
+				// " size: 30px, 30px;" +
+				// " text-size: 12px;" +
+				// " shape: freeplane;" +
+				// // " size-mode: fit;" +
+				// " fill-mode: none;" +
+				// " stroke-mode: plain;" +
+				"}" +
+				"edge {" +
+				"   shape: cubic-curve;" +
+				
+				
+				
+				// " stroke-mode: plain;" +
+				
+				"}" +
+				/*
+				 * "node.marked {" +
+				 * "   fill-color: red;" +
+				 * "}" +
+				 */
+				
+				"node.titre {" +
+				"   size: 55px, 45px;" +
+				"   fill-color: blue;" +
+				"   text-color: red;" +
+				"   shape: diamond;" +
+				"}" +
+				
+				"node.axe {" +
+				"   fill-color: blue;" +
+				"   text-color: blue;" +
+				"   shape: box;" +
+				"}" +
+				/*
+				 * "node.mot {" +
+				 * "   fill-color: green;" +
+				 * "   text-color: green;" +
+				 * "}" +
+				 */
+				"node.auteur {" +
+				"   fill-color: red;" +
+				"   text-color: gray;" +
+				"   shape: diamond;" +
+				"}";
+				
+				
+		graph.addAttribute("ui.stylesheet", styleSheet);
 		
-		
-		   graph.addAttribute("ui.stylesheet", styleSheet);
-		
 		int maxSize = 20;
 		
 		// add query node
@@ -213,34 +215,36 @@
 			n2.addAttribute("ui.size", cooccurrence.getLines().get(i).freq / 5);
 			
 			graph.addEdge(String.valueOf(i), rootNode, n2);
-
+			
 		}
 		
-//		graph.addNode("A");
-//		graph.addNode("B");
-//		graph.addNode("C");
-//		graph.addEdge("AB", "A", "B");
-//		graph.addEdge("BC", "B", "C");
-//		graph.addEdge("CA", "C", "A");
-
+		// graph.addNode("A");
+		// graph.addNode("B");
+		// graph.addNode("C");
+		// graph.addEdge("AB", "A", "B");
+		// graph.addEdge("BC", "B", "C");
+		// graph.addEdge("CA", "C", "A");
+		
 		// set text labels
-        for (Node n : graph) {
-        	n.setAttribute("ui.label", n.getId());
-        }
-
+		for (Node n : graph) {
+			n.setAttribute("ui.label", n.getId());
+		}
 		
+		
 		super.updateChart(result);
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.chartsengine.core.ChartCreator#getResultDataClass()
 	 */
 	@Override
 	public Class getResultDataClass() {
 		return CooccurrenceGraph.class;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.chartsengine.core.ChartCreator#getSeriesShapesColors(java.lang.Object)
 	 */
 	@Override
@@ -248,5 +252,5 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
-
+	
 }
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java	(revision 2719)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java	(revision 2720)
@@ -10,6 +10,9 @@
 import org.txm.core.results.Parameter;
 import org.txm.rcp.swt.widget.FloatSpinner;
 import org.txm.rcp.swt.widget.ThresholdsGroup;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.utils.logger.Log;
 import org.txm.wordcloud.core.functions.WordCloud;
 import org.txm.wordcloud.core.preferences.WordCloudPreferences;
@@ -40,7 +43,7 @@
 	
 	
 	@Override
-	public void __createPartControl() {
+	public void __createPartControl() throws CqiClientException {
 		
 		Composite extendedParametersGroup = this.getExtendedParametersGroup();
 		
@@ -57,7 +60,11 @@
 		
 		// max words / vmax
 		this.vMaxSpinner.setMinimum(10);
-		this.vMaxSpinner.setMaximum(100000);
+		CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+		if (corpus != null) {
+			this.vMaxSpinner.setMaximum(corpus.getSize());
+			this.fMinSpinner.setMaximum(corpus.getSize());
+		}
 		
 		// rotation percent
 		new Label(extendedParametersGroup, SWT.NONE).setText(WordCloudUIMessages.percentOfRotatedLabelsColon);
Index: tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java
===================================================================
--- tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java	(revision 2719)
+++ tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/RasterImageChartsComponentProvider.java	(revision 2720)
@@ -24,6 +24,7 @@
 
 /**
  * Raster image/SWT WebBrowserEditor charts component provider.
+ * 
  * @author sjacquot
  *
  */
@@ -31,110 +32,110 @@
 // FIXME : first of all : need to see if we still need these formats support in the RCP directly in the view (they will be available via export entry)
 // FIXME : the PS and PDF should be moved to a new plugin ExternalChartComponentProvider that launches external system file viewer
 public class RasterImageChartsComponentProvider extends SWTChartsComponentsProvider {
-
 	
+	
 	/**
 	 * 
 	 */
 	public RasterImageChartsComponentProvider() {
 		super();
 	}
-
 	
-
-//	@Override
-//	public ChartEditorInput createChartEditorInput(ChartResult result) {
-//		ChartCreator chartCreator = result.getChartCreator();
-//		File file = chartCreator.createChartFile(result);
-//		// FIXME : to temporary restore the PS and PDF formats : need to be recoded if we decide to keep the PDF and PS view else to remove if we decide to keep only the feature as export
-//		if(this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF)	{
-//			OpenURI.open(file);
-//			return null;
-//		}
-//		
-//		//return (ChartEditor) this.openFile(editorInputName, null, file);
-//		
-//		ChartEditorInput chartEditorInput = new ChartEditorInput(result);
-//		
-//		
-//		/// FIXME: to restore layer
-//	//	this.createChartComponent(chartEditorInput);
-//		
-//		// sets and updates the local preferences node qualifier from the result data
-//		//editor.getEditorInput().syncLocalPreferencesNode();
-//		
-//		return chartEditorInput;
-//
-//	}
-
-//	@Override
-//	public boolean createChartComponent(ChartsEngine chartsEngine, ChartEditorInput chartEditorInput) {
-//		
-//		Object chart = chartEditorInput.getChart();
-//		
-//		if(chart != null)	{
-//			chartEditorInput.setChartComponent(chart);
-//			
-//			// sets and updates the local preferences node qualifier from the result data
-//			chartEditorInput.syncLocalPreferencesNode();
-//
-//			// FIXME: temporary solution
-//			try {
-//				chartEditorInput.getResult().compute();
-//			}
-//			catch(Exception e) {
-//				// TODO Auto-generated catch block
-//				e.printStackTrace();
-//			}
-//
-//			
-//			return true;
-//		}
-//		
-//		
-//		return false;
-//	}
-
-//		public ChartEditor openEditor(ChartEditorInput chartEditorInput, String editorPartId)	{
-//		
-//		ChartEditor chartEditor = ChartEditor.openEditor(null, editorPartId); 
-//		
-//		// FIXME : to temporary restore the PS and PDF formats : need to be recoded if we decide to keep the PDF and PS view else to remove if we decide to keep only the feature as export
-//		// directly close the opened editor after the external viewer is opened
-//		// The best would be to create a plugin as dummyexternalviewer implementing SWT charts components extension?
-//		if(this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF)	{
-//			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-//			IWorkbenchPage page = window.getActivePage();
-//			page.closeEditor(chartEditor, false);
-//		}
-//		
-//		return chartEditor;
-//	}
 	
+	
+	// @Override
+	// public ChartEditorInput createChartEditorInput(ChartResult result) {
+	// ChartCreator chartCreator = result.getChartCreator();
+	// File file = chartCreator.createChartFile(result);
+	// // FIXME : to temporary restore the PS and PDF formats : need to be recoded if we decide to keep the PDF and PS view else to remove if we decide to keep only the feature as export
+	// if(this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF) {
+	// OpenURI.open(file);
+	// return null;
+	// }
+	//
+	// //return (ChartEditor) this.openFile(editorInputName, null, file);
+	//
+	// ChartEditorInput chartEditorInput = new ChartEditorInput(result);
+	//
+	//
+	// /// FIXME: to restore layer
+	// // this.createChartComponent(chartEditorInput);
+	//
+	// // sets and updates the local preferences node qualifier from the result data
+	// //editor.getEditorInput().syncLocalPreferencesNode();
+	//
+	// return chartEditorInput;
+	//
+	// }
+	
+	// @Override
+	// public boolean createChartComponent(ChartsEngine chartsEngine, ChartEditorInput chartEditorInput) {
+	//
+	// Object chart = chartEditorInput.getChart();
+	//
+	// if(chart != null) {
+	// chartEditorInput.setChartComponent(chart);
+	//
+	// // sets and updates the local preferences node qualifier from the result data
+	// chartEditorInput.syncLocalPreferencesNode();
+	//
+	// // FIXME: temporary solution
+	// try {
+	// chartEditorInput.getResult().compute();
+	// }
+	// catch(Exception e) {
+	// // TODO Auto-generated catch block
+	// e.printStackTrace();
+	// }
+	//
+	//
+	// return true;
+	// }
+	//
+	//
+	// return false;
+	// }
+	
+	// public ChartEditor openEditor(ChartEditorInput chartEditorInput, String editorPartId) {
+	//
+	// ChartEditor chartEditor = ChartEditor.openEditor(null, editorPartId);
+	//
+	// // FIXME : to temporary restore the PS and PDF formats : need to be recoded if we decide to keep the PDF and PS view else to remove if we decide to keep only the feature as export
+	// // directly close the opened editor after the external viewer is opened
+	// // The best would be to create a plugin as dummyexternalviewer implementing SWT charts components extension?
+	// if(this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF) {
+	// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+	// IWorkbenchPage page = window.getActivePage();
+	// page.closeEditor(chartEditor, false);
+	// }
+	//
+	// return chartEditor;
+	// }
+	
 	@Override
 	public ChartComposite createComposite(ChartEditor chartEditor, Composite parent) {
-		RasterComposite composite = new RasterComposite(chartEditor, parent,  SWT.EMBEDDED);
+		RasterComposite composite = new RasterComposite(chartEditor, parent, SWT.NONE);
 		
-		 // Link the composite to the chart editor (need to be done before initializing the AWT delegation events)
-		//FIXME:
-		 //chartEditor.setChartComposite(composite);
-
+		// Link the composite to the chart editor (need to be done before initializing the AWT delegation events)
+		// FIXME:
+		// chartEditor.setChartComposite(composite);
+		
 		// FIXME : to temporary restore the PS and PDF formats : need to be recoded if we decide to keep the PDF and PS view else to remove if we decide to keep only the feature as export
-		 // The best would be to create a plugin as dummyexternalviewer implementing SWT charts components extension?
-		 // Opens an external viewer
-		if(this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF)	{
+		// The best would be to create a plugin as dummyexternalviewer implementing SWT charts components extension?
+		// Opens an external viewer
+		if (this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PS || this.chartsEngine.getOutputFormat() == ChartsEngine.OUTPUT_FORMAT_PDF) {
 			OpenURI.open((File) chartEditor.getResult().getChart());
 		}
-//		else	{
-//			 // Load the chart in composite
-//			composite.loadChart();
-//		}
-	 
+		// else {
+		// // Load the chart in composite
+		// composite.loadChart();
+		// }
+		
 		return composite;
 	}
-
 	
 	
+	
 	/**
 	 * 
 	 * @param file
@@ -144,7 +145,8 @@
 	 * @return
 	 */
 	// FIXME : first of all : need to see if we still need these formats support in the RCP directly in the view (they will be available via export entry)
-	// FIXME : need to create a ChartEditor for the RasterImageChartsComponentProvider ? at least it would be used to stock the result (Progression, CA, Partition, etc.) but is it useful in this case ?
+	// FIXME : need to create a ChartEditor for the RasterImageChartsComponentProvider ? at least it would be used to stock the result (Progression, CA, Partition, etc.) but is it useful in this case
+	// ?
 	// And yes if we really still need these format PNG, JPG, the (ChartEditor) cast doesn't work for the CA chart
 	// FIXME : need to globally check this class, it has been quickly developed for retrocompatiblity with PNG and JPEG formats
 	public IEditorPart openFile(String editorname, Image titleImage, File file) {
@@ -153,18 +155,18 @@
 		return editor;
 	}
 	
-
-//	@Override
-//	public ArrayList<String> getEditorSupportedExportFileFormats() {
-//		// FIXME : no export from web browser PNG, JPEG, see if needed
-//		return new ArrayList<String>();
-//	}
-
+	
+	// @Override
+	// public ArrayList<String> getEditorSupportedExportFileFormats() {
+	// // FIXME : no export from web browser PNG, JPEG, see if needed
+	// return new ArrayList<String>();
+	// }
+	
 	@Override
 	public ArrayList<String> getChartsEngineSupportedExportFileFormats() {
 		return this.chartsEngine.getSupportedOutputFileFormats();
 	}
-
 	
-
+	
+	
 }
Index: tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java
===================================================================
--- tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java	(revision 2719)
+++ tmp/org.txm.chartsengine.raster.rcp/src/org/txm/chartsengine/raster/rcp/swt/RasterComposite.java	(revision 2720)
@@ -1,10 +1,13 @@
 package org.txm.chartsengine.raster.rcp.swt;
+
 import java.io.File;
 import java.util.ArrayList;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
@@ -20,11 +23,12 @@
 
 /**
  * Raster Image SWT composite.
+ * 
  * @author sjacquot
  *
  */
-public class RasterComposite extends ChartComposite	{
-
+public class RasterComposite extends ChartComposite {
+	
 	/**
 	 * The loaded raster image file.
 	 */
@@ -37,83 +41,88 @@
 	
 	/**
 	 * Creates a Raster image composite.
+	 * 
 	 * @param parent
 	 * @param style
 	 */
 	public RasterComposite(ChartEditor chartEditor, Composite parent, int style) {
 		super(chartEditor, parent, style);
-	
 		
+		this.setLayout(new GridLayout(1, false));
+		
 		this.file = null;
 		
-		  //ScrolledComposite sc = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
-	        //GridData layoutData = new GridData( GridData.FILL_HORIZONTAL );
-//	        layoutData.horizontalSpan = 2;
-//	        layoutData.heightHint = 400;
-//	        sc.setLayoutData( layoutData );
-//	 
-	        this.imageLabel = new Label( this, SWT.NONE );
-	        
-//	       // imgLabel.setImage( image );
-//	        this.imageLabel.setSize(  this.imageLabel.computeSize( SWT.DEFAULT, SWT.DEFAULT ));
-//	        sc.setContent(  this.imageLabel );
-	 
-//	        Label l = new Label( shell, SWT.NONE );
-//	        l.setText( "Nom actuel :" );
-//	        layoutData = new GridData();
-//	        layoutData.verticalIndent = 20;
-//	        l.setLayoutData( layoutData );
-//	 
-//	        Text text = new Text( shell, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY );
-//	        text.setText( "The image name" );
-//	        layoutData = new GridData( GridData.FILL_HORIZONTAL );
-//	        layoutData.verticalIndent = 20;
-//	        text.setLayoutData( layoutData );
+		// ScrolledComposite sc = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
+		// GridData layoutData = new GridData( GridData.FILL_HORIZONTAL );
+		// layoutData.horizontalSpan = 2;
+		// layoutData.heightHint = 400;
+		// sc.setLayoutData( layoutData );
+		//
 		
+		this.imageLabel = new Label(this, SWT.NONE);
+		this.imageLabel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+		this.imageLabel.setText("Nothing loaded yet.");
+		// // imgLabel.setImage( image );
+		// this.imageLabel.setSize( this.imageLabel.computeSize( SWT.DEFAULT, SWT.DEFAULT ));
+		// sc.setContent( this.imageLabel );
 		
-//		Frame frame = SWT_AWT.new_Frame(this);
-//		
-//		// Need to add an AWT Panel to fix mouse events and mouse cursors changes on Swing JPanel
-//		Panel rootPanel = new Panel(new BorderLayout());
-//		this.chartComponent = new SVGPanel(chartEditor, frame);
-//		rootPanel.add(this.getPanel());
-//		frame.add(rootPanel);
-//		frame.pack();
+		// Label l = new Label( shell, SWT.NONE );
+		// l.setText( "Nom actuel :" );
+		// layoutData = new GridData();
+		// layoutData.verticalIndent = 20;
+		// l.setLayoutData( layoutData );
+		//
+		// Text text = new Text( shell, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY );
+		// text.setText( "The image name" );
+		// layoutData = new GridData( GridData.FILL_HORIZONTAL );
+		// layoutData.verticalIndent = 20;
+		// text.setLayoutData( layoutData );
+		
+		
+		// Frame frame = SWT_AWT.new_Frame(this);
+		//
+		// // Need to add an AWT Panel to fix mouse events and mouse cursors changes on Swing JPanel
+		// Panel rootPanel = new Panel(new BorderLayout());
+		// this.chartComponent = new SVGPanel(chartEditor, frame);
+		// rootPanel.add(this.getPanel());
+		// frame.add(rootPanel);
+		// frame.pack();
 	}
-
-
+	
+	
 	@Override
 	public IChartComponent _createChartComponent() {
 		
 		Object chart = this.chartEditor.getChart();
 		
-		if(chart != null)	{
-			//chartEditorInput.setChartComponent(chart);
+		if (chart != null) {
+			// chartEditorInput.setChartComponent(chart);
 			
 			// sets and updates the local preferences node qualifier from the result data
-			//chartEditorInput.syncLocalPreferencesNode();
-
+			// chartEditorInput.syncLocalPreferencesNode();
+			
 			// FIXME: temporary solution
 			try {
 				this.chartEditor.getResult().compute();
 			}
-			catch(Exception e) {
+			catch (Exception e) {
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
-
 			
+			
 			return (IChartComponent) chart;
 		}
 		
 		
 		return null;
 	}
-
-
-
+	
+	
+	
 	/**
 	 * Loads a raster image from the specified file.
+	 * 
 	 * @param file the file to load
 	 */
 	public void loadRasterFile(File file) {
@@ -121,34 +130,39 @@
 		Log.info(TXMCoreMessages.bind("Loading Raster image from file: {0}...", file));
 		
 		this.file = file;
-		if(this.image != null)	{
+		if (this.image != null) {
 			this.image.dispose();
 		}
 		
 		ImageData imgData = new ImageData(file.getAbsolutePath());
 		this.image = new Image(Display.getCurrent(), imgData);
 		this.imageLabel.setImage(this.image);
-        this.imageLabel.setSize(this.imageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+		// this.imageLabel.setSize(this.imageLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+		
+		imageLabel.getParent().layout();
 	}
-
 	
 	
-
 	
-//	@Override
-//	public void requestFocusInChartComponent()	{
-//		// FIXME: to check
-////		EventQueue.invokeLater(new Runnable () {
-////			public void run () {
-////				getPanel().requestFocusInWindow();
-////			}
-////		});
-//	}
-
 	
+	
+	// @Override
+	// public void requestFocusInChartComponent() {
+	// // FIXME: to check
+	//// EventQueue.invokeLater(new Runnable () {
+	//// public void run () {
+	//// getPanel().requestFocusInWindow();
+	//// }
+	//// });
+	// }
+	
+	
 	@Override
-	public void loadChart()	{
-//		this.file = (File) this.chartComponent;
+	public void loadChart() {
+		// this.file = (File) this.chartComponent;
+		
+		this.file = this.getChartsEngine().exportChart(this.getChartResult(), 600, 400, this.getChartsEngine().getOutputFormat());
+		
 		this.loadRasterFile(this.file);
 	}
 	
@@ -159,51 +173,51 @@
 	}
 	
 	
-
+	
 	@Override
 	public void copyChartViewToClipboard() {
 		// TODO Auto-generated method stub
 		System.err.println("RasterComposite.copyChartViewToClipboard(): not implemented.");
 	}
-
-
 	
+	
+	
 	@Override
 	public EventCallBackHandler getMouseCallBackHandler() {
-	//	return super.getMouseCallBackHandler(this.getPanel());
+		// return super.getMouseCallBackHandler(this.getPanel());
 		return null;
 	}
-
-
+	
+	
 	@Override
 	public EventCallBackHandler getKeyCallBackHandler() {
 		return null;
-		//return super.getKeyCallBackHandler(this.getPanel());
+		// return super.getKeyCallBackHandler(this.getPanel());
 	}
-
-
-
-
+	
+	
+	
+	
 	@Override
 	public void clearChartItemsSelection() {
 		// TODO Auto-generated method stub
 		System.err.println("RasterComposite.clearChartItemsSelection(): not implemented.");
 	}
-
+	
 	@Override
 	public File exportView(File file, String fileFormat) {
 		System.out.println("RasterComposite.exportView(): not yet implemented.");
 		return null;
 	}
-
-
+	
+	
 	@Override
 	public ArrayList<String> getEditorSupportedExportFileFormats() {
 		// FIXME : no export from web browser PNG, JPEG, see if needed
-		return new ArrayList<String>();
+		return new ArrayList<>();
 	}
-
-
+	
+	
 	@Override
 	public void initEventsListeners() {
 		// TODO Auto-generated method stub
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java	(revision 2719)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsPieChartCreator.java	(revision 2720)
@@ -3,7 +3,6 @@
 import java.io.File;
 import java.util.List;
 
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.partition.core.chartsengine.base.Utils;
@@ -18,16 +17,16 @@
  * @author sjacquot
  *
  */
-public class RPartitionDimensionsPieChartCreator extends RChartCreator {
-
+public class RPartitionDimensionsPieChartCreator extends RChartCreator<PartitionDimensions> {
 	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-
+	public File createChart(PartitionDimensions result, File file) {
+		
 		try {
 			
-			PartitionDimensions partitionDimensions = (PartitionDimensions) result;
-
+			PartitionDimensions partitionDimensions = result;
+			
 			// parameters
 			boolean sortPartsBySize = partitionDimensions.isSortingBySize();
 			boolean displayPartsCountInTitle = partitionDimensions.isDisplayingPartCountInTitle();
@@ -36,53 +35,53 @@
 			
 			// Create parts names command string
 			String snames = "c("; //$NON-NLS-1$
-			for(int i = 0; i < parts.size(); i++) {
+			for (int i = 0; i < parts.size(); i++) {
 				String name = parts.get(i).getName();
-				if(name.trim().length() == 0)
+				if (name.trim().length() == 0)
 					name = "N/A"; //$NON-NLS-1$
 				snames += "\"" + name + "\""; //$NON-NLS-1$ //$NON-NLS-2$
-				if(i != parts.size() - 1)
+				if (i != parts.size() - 1)
 					snames += ","; //$NON-NLS-1$
 			}
 			snames += ")"; //$NON-NLS-1$
-
+			
 			// Create parts sizes command string
 			String ssizes = "c("; //$NON-NLS-1$
-
-			for(int i = 0; i < parts.size(); i++) {
+			
+			for (int i = 0; i < parts.size(); i++) {
 				ssizes += "" + parts.get(i).getSize(); //$NON-NLS-1$
-				if(i != parts.size() - 1)
+				if (i != parts.size() - 1)
 					ssizes += ","; //$NON-NLS-1$
 			}
 			ssizes += ")"; //$NON-NLS-1$
-
+			
 			// colors
-			//this.getChartsEngine().setColors(result.getRenderingColorsMode(),  1);
+			// this.getChartsEngine().setColors(result.getRenderingColorsMode(), 1);
 			// FIXME: one color by part
 			this.getChartsEngine().setColors(result.getRenderingColorsMode(), parts.size());
-
 			
+			
 			String ylab = PartitionCoreMessages.numberOfWords;
-
-			//String cmd = "pie(" + ssizes + ", col=colors, labels=" + snames + ", horiz=F, las=2, ylab=\"" + ylab + "\");\n"; //$NON-NLS-1$
-
+			
+			// String cmd = "pie(" + ssizes + ", col=colors, labels=" + snames + ", horiz=F, las=2, ylab=\"" + ylab + "\");\n"; //$NON-NLS-1$
+			
 			String cmd = String.format("pie(%s, col=colors, labels=%s, horiz=F, las=2, ylab=\"%s\");\n", ssizes, snames, ylab); //$NON-NLS-1$
 			
 			// plot the chart
-			this.getChartsEngine().plot(file, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle));
-
+			this.getChartsEngine().plot(file, cmd, result, Utils.createPartitionDimensionsChartTitle(partitionDimensions), Utils.createPartitionDimensionsChartSubtitle(partitionDimensions,
+					sortPartsBySize, displayPartsCountInTitle));
+			
 		}
-		catch(Exception e) {
+		catch (Exception e) {
 			Log.severe(PartitionCoreMessages.bind(PartitionCoreMessages.cantCreateDimensionsPartitionChartFileChartsEngineColonP0, RChartsEngine.DESCRIPTION) + e);
 		}
-
+		
 		return file;
 	}
-
-
+	
+	
 	@Override
-	public Class getResultDataClass() {
+	public Class<PartitionDimensions> getResultDataClass() {
 		return PartitionDimensions.class;
 	}
-
-}
\ No newline at end of file
+}
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java	(revision 2719)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/r/RPartitionDimensionsBarChartCreator.java	(revision 2720)
@@ -3,7 +3,6 @@
 import java.io.File;
 import java.util.List;
 
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.partition.core.chartsengine.base.Utils;
@@ -18,11 +17,11 @@
  * @author sjacquot
  *
  */
-public class RPartitionDimensionsBarChartCreator extends RChartCreator {
+public class RPartitionDimensionsBarChartCreator extends RChartCreator<PartitionDimensions> {
 
 	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
+	public File createChart(PartitionDimensions result, File file) {
 
 		try {
 			
@@ -85,7 +84,7 @@
 
 
 	@Override
-	public Class getResultDataClass() {
+	public Class<PartitionDimensions> getResultDataClass() {
 		return PartitionDimensions.class;
 	}
 
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java	(revision 2719)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsBarChartCreator.java	(revision 2720)
@@ -1,6 +1,5 @@
 package org.txm.partition.core.chartsengine.jfreechart;
 
-import java.awt.Color;
 import java.util.List;
 
 import org.jfree.chart.JFreeChart;
@@ -11,7 +10,6 @@
 import org.jfree.data.xy.XYSeries;
 import org.jfree.data.xy.XYSeriesCollection;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis;
 import org.txm.chartsengine.jfreechart.core.themes.base.SymbolAxisBetweenTicks;
@@ -28,11 +26,11 @@
  * @author sjacquot
  *
  */
-public class JFCPartitionDimensionsBarChartCreator extends JFCChartCreator {
+public class JFCPartitionDimensionsBarChartCreator extends JFCChartCreator<PartitionDimensions> {
 	
 	
 	@Override
-	public JFreeChart createChart(ChartResult result) {
+	public JFreeChart createChart(PartitionDimensions result) {
 		
 		JFreeChart chart = null;
 		
@@ -50,9 +48,9 @@
 	}
 	
 	@Override
-	public void updateChart(ChartResult result) {
+	public void updateChart(PartitionDimensions result) {
 		
-		PartitionDimensions partitionDimensions = (PartitionDimensions) result;
+		// PartitionDimensions partitionDimensions = (PartitionDimensions) result;
 		JFreeChart chart = (JFreeChart) result.getChart();
 		
 		// freeze rendering while computing
@@ -60,8 +58,8 @@
 		
 		
 		// parameters
-		boolean sortPartsBySize = partitionDimensions.isSortingBySize();
-		boolean displayPartsCountInTitle = partitionDimensions.isDisplayingPartCountInTitle();
+		boolean sortPartsBySize = result.isSortingBySize();
+		boolean displayPartsCountInTitle = result.isDisplayingPartCountInTitle();
 		
 		
 		if (result.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE)
@@ -74,7 +72,7 @@
 			XYSeries series = new XYSeries(PartitionCoreMessages.t);
 			dataset.addSeries(series);
 			
-			List<Part> parts = partitionDimensions.getParts(sortPartsBySize);
+			List<Part> parts = result.getParts(sortPartsBySize);
 			String[] xAxisSymbols = new String[parts.size()];
 			
 			
@@ -96,13 +94,13 @@
 		
 		
 		// Create chart title
-		chart.setTitle(Utils.createPartitionDimensionsChartTitle(partitionDimensions));
+		chart.setTitle(Utils.createPartitionDimensionsChartTitle(result));
 		
 		// Subtitle
 		if (chart.getSubtitleCount() > 0) {
 			chart.removeSubtitle(chart.getSubtitle(0));
 		}
-		chart.addSubtitle(new TextTitle(Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle), this.getChartsEngine().getJFCTheme()
+		chart.addSubtitle(new TextTitle(Utils.createPartitionDimensionsChartSubtitle(result, sortPartsBySize, displayPartsCountInTitle), this.getChartsEngine().getJFCTheme()
 				.getSmallFont(),
 				(this.getChartsEngine().getJFCTheme().getAxisLabelPaint()), Title.DEFAULT_POSITION,
 				Title.DEFAULT_HORIZONTAL_ALIGNMENT,
@@ -115,14 +113,8 @@
 		
 	}
 	
-	
 	@Override
-	public Class getResultDataClass() {
+	public Class<PartitionDimensions> getResultDataClass() {
 		return PartitionDimensions.class;
 	}
-	
-	
-	
-	
-	
 }
Index: tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java
===================================================================
--- tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java	(revision 2719)
+++ tmp/org.txm.partition.core/src/org/txm/partition/core/chartsengine/jfreechart/JFCPartitionDimensionsPieChartCreator.java	(revision 2720)
@@ -1,5 +1,5 @@
 package org.txm.partition.core.chartsengine.jfreechart;
-import java.awt.Color;
+
 import java.util.List;
 
 import org.jfree.chart.JFreeChart;
@@ -9,7 +9,6 @@
 import org.jfree.chart.util.SortOrder;
 import org.jfree.data.general.DefaultPieDataset;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.partition.core.chartsengine.base.Utils;
 import org.txm.partition.core.functions.PartitionDimensions;
@@ -23,31 +22,31 @@
  * @author sjacquot
  *
  */
-public class JFCPartitionDimensionsPieChartCreator extends JFCChartCreator {
-
-
+public class JFCPartitionDimensionsPieChartCreator extends JFCChartCreator<PartitionDimensions> {
+	
+	
 	@Override
-	public Object createChart(ChartResult result) {
+	public JFreeChart createChart(PartitionDimensions result) {
 		
 		JFreeChart chart = null;
-
+		
 		// Creating an empty data set
 		DefaultPieDataset dataset = new DefaultPieDataset();
-
+		
 		// Create the chart
 		chart = this.getChartsEngine().createPieChart(dataset, null, true);
 		
 		return chart;
 	}
-
 	
+	
 	@Override
-	public void updateChart(ChartResult result) {
-
-		PartitionDimensions partitionDimensions = (PartitionDimensions) result;
+	public void updateChart(PartitionDimensions result) {
+		
+		PartitionDimensions partitionDimensions = result;
 		JFreeChart chart = (JFreeChart) result.getChart();
-
 		
+		
 		// freeze rendering while computing
 		chart.setNotify(false);
 		
@@ -55,54 +54,55 @@
 		// parameters
 		boolean sortPartsBySize = partitionDimensions.isSortingBySize();
 		boolean displayPartsCountInTitle = partitionDimensions.isDisplayingPartCountInTitle();
-
-
-		if(result.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE)
-				|| result.hasParameterChanged(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE))	{
+		
+		
+		if (result.hasParameterChanged(ChartsEnginePreferences.CHART_TYPE)
+				|| result.hasParameterChanged(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE)) {
 			
 			// Fill the data set from the result
-			DefaultPieDataset dataset = (DefaultPieDataset)((PiePlot) chart.getPlot()).getDataset();
+			DefaultPieDataset dataset = (DefaultPieDataset) ((PiePlot) chart.getPlot()).getDataset();
 			dataset.clear();
 			
 			try {
-	
+				
 				List<Part> parts = partitionDimensions.getParts(sortPartsBySize);
-	
-				for (int i = 0 ; i < parts.size() ; i++) {
+				
+				for (int i = 0; i < parts.size(); i++) {
 					dataset.setValue(parts.get(i).getName(), parts.get(i).getSize());
 				}
-	
-				if(sortPartsBySize)	{
+				
+				if (sortPartsBySize) {
 					dataset.sortByValues(SortOrder.ASCENDING);
 				}
-				else	{
+				else {
 					dataset.sortByKeys(SortOrder.ASCENDING);
 				}
 			}
-			catch(CqiClientException e) {
+			catch (CqiClientException e) {
 				e.printStackTrace();
 			}
 		}
-
+		
 		// Create chart title
 		chart.setTitle(Utils.createPartitionDimensionsChartTitle(partitionDimensions));
-
+		
 		// Subtitle
-		if(chart.getSubtitleCount() > 0)	{
-			chart.removeSubtitle(chart.getSubtitle(0));	
+		if (chart.getSubtitleCount() > 0) {
+			chart.removeSubtitle(chart.getSubtitle(0));
 		}
-		chart.addSubtitle(new TextTitle(Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle), this.getChartsEngine().getJFCTheme().getSmallFont(),
-				((Color)this.getChartsEngine().getJFCTheme().getAxisLabelPaint()), Title.DEFAULT_POSITION,
-                Title.DEFAULT_HORIZONTAL_ALIGNMENT,
-                Title.DEFAULT_VERTICAL_ALIGNMENT, Title.DEFAULT_PADDING));
-
+		chart.addSubtitle(new TextTitle(Utils.createPartitionDimensionsChartSubtitle(partitionDimensions, sortPartsBySize, displayPartsCountInTitle), this.getChartsEngine().getJFCTheme()
+				.getSmallFont(),
+				(this.getChartsEngine().getJFCTheme().getAxisLabelPaint()), Title.DEFAULT_POSITION,
+				Title.DEFAULT_HORIZONTAL_ALIGNMENT,
+				Title.DEFAULT_VERTICAL_ALIGNMENT, Title.DEFAULT_PADDING));
 		
+		
 		super.updateChart(result);
 		
 	}
 	
 	@Override
-	public Class getResultDataClass() {
+	public Class<PartitionDimensions> getResultDataClass() {
 		return PartitionDimensions.class;
 	}
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java	(revision 2719)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionBaseChartCreator.java	(revision 2720)
@@ -8,13 +8,12 @@
 import java.util.List;
 
 import org.apache.commons.lang.StringEscapeUtils;
-import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.chartsengine.r.core.themes.DefaultTheme;
 import org.txm.progression.core.chartsengine.base.ProgressionChartCreator;
 import org.txm.progression.core.chartsengine.base.Utils;
 import org.txm.progression.core.functions.Progression;
+import org.txm.progression.core.preferences.ProgressionPreferences;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.utils.logger.Log;
@@ -26,7 +25,7 @@
  * @author sjacquot
  *
  */
-public class RProgressionBaseChartCreator extends RChartCreator implements ProgressionChartCreator {
+public abstract class RProgressionBaseChartCreator extends RChartCreator<Progression> implements ProgressionChartCreator {
 	
 	
 	
@@ -38,12 +37,14 @@
 	 * @param cumulative
 	 * @return
 	 */
-	public File createChartFile(ChartResult result, File file, boolean cumulative) {
+	public File createChart(Progression result, File file, boolean cumulative) {
 		
 		try {
 			
-			Progression progression = (Progression) result;
+			Progression progression = result;
 			
+			// boolean cumulative = result.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
+			
 			// parameters
 			int renderingColorMode = progression.getRenderingColorsMode();
 			
@@ -177,17 +178,16 @@
 		return -1;
 	}
 	
-	
 	@Override
-	public Class getResultDataClass() {
-		return Progression.class;
-	}
-	
-	@Override
 	public ArrayList<ArrayList<Integer>> getAllPointPositionsBySeries(Object chart) {
 		Log.severe(this.getClass() + ".getAllPointPositionsBySeries(): Not yet implemented."); //$NON-NLS-1$
 		return null;
 	}
 	
 	
+	@Override
+	public Class<Progression> getResultDataClass() {
+		return Progression.class;
+	}
+	
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java	(revision 2719)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionCumulativeChartCreator.java	(revision 2720)
@@ -3,6 +3,7 @@
 import java.io.File;
 
 import org.txm.chartsengine.core.results.ChartResult;
+import org.txm.progression.core.functions.Progression;
 
 // FIXME: SJ: this chart creator has been disabled in extension definition to force JFC mode for Cumulative chart and R mode for Density chart since the Density chart is not yet implemented in JFC charts engine  
 /**
@@ -12,12 +13,11 @@
  *
  */
 public class RProgressionCumulativeChartCreator extends RProgressionBaseChartCreator {
-
-
+	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-		return super.createChartFile(result, file, true);
+	public File createChart(Progression result, File file) {
+		return super.createChart(result, file, true);
 	}
-
-
+	
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java	(revision 2719)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/r/RProgressionDensityChartCreator.java	(revision 2720)
@@ -2,7 +2,7 @@
 
 import java.io.File;
 
-import org.txm.chartsengine.core.results.ChartResult;
+import org.txm.progression.core.functions.Progression;
 
 /**
  * R progression density chart creator.
@@ -11,12 +11,12 @@
  *
  */
 public class RProgressionDensityChartCreator extends RProgressionBaseChartCreator {
-
-
+	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-		return super.createChartFile(result, file, false);
+	public File createChart(Progression result, File file) {
+		return super.createChart(result, file, false);
 	}
-
-
+	
+	
 }
Index: tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java
===================================================================
--- tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java	(revision 2719)
+++ tmp/org.txm.progression.core/src/org/txm/progression/core/chartsengine/jfreechart/JFCProgressionCumulativeChartCreator.java	(revision 2720)
@@ -34,14 +34,14 @@
  * @author sjacquot
  *
  */
-public class JFCProgressionCumulativeChartCreator extends JFCChartCreator implements ProgressionChartCreator {
+public class JFCProgressionCumulativeChartCreator extends JFCChartCreator<Progression> implements ProgressionChartCreator {
 	
 	
 	@Override
-	public JFreeChart createChart(ChartResult result) {
+	public JFreeChart createChart(Progression result) {
 		
 		
-		Progression progression = (Progression) result;
+		Progression progression = result;
 		
 		// parameters
 		boolean cumulative = result.getBooleanParameterValue(ProgressionPreferences.CHART_CUMULATIVE);
@@ -116,9 +116,9 @@
 	
 	
 	@Override
-	public void updateChart(ChartResult result) {
+	public void updateChart(Progression result) {
 		
-		Progression progression = (Progression) result;
+		Progression progression = result;
 		JFreeChart chart = (JFreeChart) result.getChart();
 		
 		// freeze rendering while computing
Index: tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartsEngine.java	(revision 2719)
+++ tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartsEngine.java	(revision 2720)
@@ -32,6 +32,7 @@
 import org.txm.chartsengine.jfreechart.core.themes.base.JFCTheme;
 import org.txm.chartsengine.jfreechart.core.themes.base.SymbolAxisBetweenTicks;
 import org.txm.chartsengine.jfreechart.core.themes.highcharts.defaulttheme.HighchartsDefaultTheme;
+import org.txm.utils.logger.Log;
 
 import com.lowagie.text.Document;
 import com.lowagie.text.Rectangle;
@@ -436,12 +437,28 @@
 		return jfcTheme;
 	}
 	
-	
+	//
 	@Override
-	public File createChartFile(Object chart, File file) {
-		return this.export((JFreeChart) chart, file);
+	public File exportChart(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormat) {
+		Object chart = result.getChart();
+		if (chart == null) {
+			Log.severe("Error: null chart in " + result);
+			return null;
+		}
+		if (chart instanceof JFreeChart) {
+			return exportChart(chart, file, outputFormat, imageWidth, imageHeight); // create & write a
+		}
+		else {
+			Log.severe("Error: the chart is not a JFreeChart " + chart + " " + result);
+			return null;
+		}
 	}
 	
+	// @Override
+	// public File createChartFile(Object chart, File file, String outputFormat) {
+	// return this.export((JFreeChart) chart, file);
+	// }
+	
 	@Override
 	public File exportChart(Object chart, File file, String outputFormat, int imageWidth, int imageHeight, int drawingAreaX, int drawingAreaY, int drawingAreaWidth, int drawingAreaHeight) {
 		return JFCChartsEngine.export(chart, file, outputFormat, imageWidth, imageHeight, drawingAreaX, drawingAreaY, drawingAreaWidth, drawingAreaHeight);
@@ -578,7 +595,7 @@
 	public static File exportRasterImage(JFreeChart chart, File file, String outputFormat, int imageWidth, int imageHeight, int drawingAreaX, int drawingAreaY, int drawingAreaWidth,
 			int drawingAreaHeight) {
 		
-		BufferedImage bufferedImage = ((JFreeChart) chart).createBufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB, null);
+		BufferedImage bufferedImage = chart.createBufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB, null);
 		
 		// Crop
 		bufferedImage = bufferedImage.getSubimage(drawingAreaX, drawingAreaY, drawingAreaWidth, drawingAreaHeight);
@@ -854,7 +871,7 @@
 	
 	@Override
 	public ArrayList<String> getSupportedOutputDisplayFormats() {
-		ArrayList<String> formats = new ArrayList<String>(1);
+		ArrayList<String> formats = new ArrayList<>(1);
 		
 		formats.add(OUTPUT_FORMAT_JFC_JAVA2D);
 		
@@ -863,7 +880,7 @@
 	
 	@Override
 	public ArrayList<String> getSupportedOutputFileFormats() {
-		ArrayList<String> formats = new ArrayList<String>(6);
+		ArrayList<String> formats = new ArrayList<>(6);
 		
 		formats.add(OUTPUT_FORMAT_SVG); // Default format
 		
Index: tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java	(revision 2719)
+++ tmp/org.txm.chartsengine.jfreechart.core/src/org/txm/chartsengine/jfreechart/core/JFCChartCreator.java	(revision 2720)
@@ -1,20 +1,18 @@
 package org.txm.chartsengine.jfreechart.core;
 
 import java.awt.Color;
-import java.io.File;
 import java.util.ArrayList;
 
 import org.jfree.chart.JFreeChart;
-import org.jfree.chart.axis.SymbolAxis;
 import org.jfree.chart.plot.CategoryPlot;
 import org.jfree.chart.plot.XYPlot;
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.renderers.interfaces.IRendererWithItemSelection;
+import org.txm.utils.logger.Log;
 
 
-
 /**
  * JFreeChart base chart creator.
  * 
@@ -25,22 +23,33 @@
  * @author sjacquot
  *
  */
-public abstract class JFCChartCreator extends ChartCreator {
+public abstract class JFCChartCreator<R extends ChartResult> extends ChartCreator<JFCChartsEngine, R> {
 	
+	// @Override
+	// public final Object createChart(ChartResult result) {
+	// if ("java".equals(this.getChartsEngine().getOutputFormat())) {
+	// return _createJFreeChart(result);
+	// }
+	// else {
+	// return createChartFile(result);
+	// }
+	// }
 	
 	@Override
-	public void updateChart(ChartResult result) {
+	public abstract JFreeChart createChart(R result);
+	
+	@Override
+	public void updateChart(R result) {
 		this.updateChart(result, true);
 	}
 	
-	
 	/**
 	 * Updates the chart according to the shared parameters, also applies the current theme to the chart and the user renderer settings.
 	 * 
 	 * @param result
 	 * @param applyTheme
 	 */
-	public void updateChart(ChartResult result, boolean applyTheme) {
+	public void updateChart(R result, boolean applyTheme) {
 		
 		// Java object
 		if (result.getChart() instanceof JFreeChart) {
@@ -102,11 +111,17 @@
 			
 			chart.setNotify(true);
 		}
-		// File
-		else if (result.getChart() instanceof File) {
-			// creates a new chart but using the same file
-			this.createChartFile(result, (File) result.getChart());
+		else {
+			Log.severe("Error: JFCChartCreator only manage JFC charts: " + result.getChart());
 		}
+		// // File
+		// else if (result.getChart() instanceof File) {
+		// // creates a new chart but using the same file
+		// this.createChartFile(result, (File) result.getChart());
+		// }
+		// else { // FIXME hack to set the chart File
+		// result.setChart(this.createChartFile(result));
+		// }
 	}
 	
 	
@@ -130,21 +145,8 @@
 		return colors;
 	}
 	
-	
-	
-	
 	@Override
-	public Class getChartsEngineClass() {
+	public Class<JFCChartsEngine> getChartsEngineClass() {
 		return JFCChartsEngine.class;
 	}
-	
-	/**
-	 * Convenience method.
-	 * 
-	 * @return the casted charts engine.
-	 */
-	protected JFCChartsEngine getChartsEngine() {
-		return (JFCChartsEngine) this.chartsEngine;
-	}
-	
 }
Index: tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/jfreechart/JFCWordCloudChartCreator.java
===================================================================
--- tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/jfreechart/JFCWordCloudChartCreator.java	(revision 2719)
+++ tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/jfreechart/JFCWordCloudChartCreator.java	(revision 2720)
@@ -2,23 +2,18 @@
 
 import org.jfree.chart.JFreeChart;
 import org.jfree.data.xy.XYSeriesCollection;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.wordcloud.core.functions.WordCloud;
 
-public class JFCWordCloudChartCreator extends JFCChartCreator {
+public class JFCWordCloudChartCreator extends JFCChartCreator<WordCloud> {
 	
-	public JFCWordCloudChartCreator() {
-		// TODO Auto-generated constructor stub
-	}
-	
 	@Override
-	public JFreeChart createChart(ChartResult result) {
+	public JFreeChart createChart(WordCloud result) {
 		
 		// TODO Auto-generated method stub
 		System.err.println("JFCWordCloudChartCreator.createChart(): Not yet implemented");
 		
-		WordCloud wordCloud = (WordCloud) result;
+		WordCloud wordCloud = result;
 		
 		
 		
@@ -61,14 +56,7 @@
 	}
 	
 	@Override
-	// FIXME: to not load the chart creator, to remove when implemented
-	public Class getChartsEngineClass() {
-		return null;
-	}
-	
-	
-	@Override
-	public Class getResultDataClass() {
+	public Class<WordCloud> getResultDataClass() {
 		return WordCloud.class;
 	}
 	
Index: tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java
===================================================================
--- tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java	(revision 2719)
+++ tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/chartsengine/r/RWordCloudChartCreator.java	(revision 2720)
@@ -2,22 +2,20 @@
 
 import java.io.File;
 
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
-import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.statsengine.core.StatException;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
 import org.txm.wordcloud.core.functions.WordCloud;
 
-public class RWordCloudChartCreator extends RChartCreator {
+public class RWordCloudChartCreator extends RChartCreator<WordCloud> {
 	
 	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
+	public File createChart(WordCloud result, File file) {
 		
 		try {
-			WordCloud wordCloud = (WordCloud) result;
+			WordCloud wordCloud = result;
 			
 			
 			// parameters
@@ -68,7 +66,7 @@
 			// System.out.println("ploting...");
 			// rw.plot(svgFile, cmd, device);
 			
-			((RChartsEngine) this.chartsEngine).plot(file, cmd);
+			this.chartsEngine.plot(file, cmd);
 			
 			
 			// System.out.println("cleaning");
@@ -88,7 +86,7 @@
 	}
 	
 	@Override
-	public Class getResultDataClass() {
+	public Class<WordCloud> getResultDataClass() {
 		return WordCloud.class;
 	}
 	
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/LexiconEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/LexiconEditor.java	(revision 2719)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/LexiconEditor.java	(revision 2720)
@@ -2,6 +2,7 @@
 package org.txm.index.rcp.editors;
 
 import org.eclipse.swt.layout.GridData;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 
 /**
  * Extends the index editor to:
@@ -13,7 +14,8 @@
 public class LexiconEditor extends IndexEditor {
 	
 	@Override
-	public void _createPartControl() {
+	public void _createPartControl() throws CqiClientException {
+		
 		super._createPartControl();
 		
 		this.propertiesSelector.setMaxPropertyNumber(1);
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java	(revision 2719)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/PartitionIndexEditor.java	(revision 2720)
@@ -36,9 +36,6 @@
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -68,6 +65,7 @@
 import org.txm.searchengine.core.IQuery;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.Part;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.WordProperty;
@@ -76,7 +74,8 @@
 
 /**
  * Partition index editor.
- *
+ * TODO inherit the IndexEditor and add more columns to the table
+ * 
  * @author mdecorde
  */
 public class PartitionIndexEditor extends TXMEditor<PartitionIndex> {
@@ -161,10 +160,11 @@
 	 * Creates the part control.
 	 *
 	 * @param parent the parent
+	 * @throws CqiClientException
 	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
-	public void _createPartControl() {
+	public void _createPartControl() throws CqiClientException {
 		
 		
 		this.index = this.getResult();
@@ -229,78 +229,21 @@
 		// Listener
 		propertiesSelector.addSelectionListener(computeSelectionListener);
 		
-		
 		// extended parameters
 		
-		// FIXME: old version
 		// Filters
-		// Composite filtercontrols = new Composite(paramArea, SWT.NONE);
-		// FormData filtersLayoutData = new FormData();
-		// filtersLayoutData.top = new FormAttachment(queryArea, 0);
-		// filtersLayoutData.bottom = new FormAttachment(100);
-		// filtersLayoutData.left = new FormAttachment(0);
-		// filtersLayoutData.right = new FormAttachment(100);
-		// filtercontrols.setLayoutData(filtersLayoutData);
-		//
-		// GridLayout gridLayout = new GridLayout();
-		// gridLayout.numColumns = 9;
-		// gridLayout.makeColumnsEqualWidth = false;
-		// filtercontrols.setLayout(gridLayout);
-		//
-		// Label tmp = new Label(filtercontrols, SWT.NONE);
-		// tmp.setText(TXMCoreMessages.common_thresholds);
-		// tmp.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
-		//
-		// Label lFmin = new Label(filtercontrols, SWT.NONE);
-		// lFmin.setText(TXMCoreMessages.common_fMin);
-		// lFmin.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
-		//
-		// GridData fieldsGridData = new GridData(GridData.VERTICAL_ALIGN_END);
-		// fieldsGridData.minimumWidth = 100;
-		//
-		// fMinSpinner = new Spinner(filtercontrols, SWT.BORDER);
-		// fMinSpinner.setMinimum(0);
-		// fMinSpinner.setMaximum(9999999);
-		// fMinSpinner.setIncrement(1);
-		// fMinSpinner.setPageIncrement(100);
-		// fMinSpinner.setLayoutData(fieldsGridData);
-		// fMinSpinner.addKeyListener(computeKeyListener);
-		// fMinSpinner.addSelectionListener(computeSelectionListener);
-		//
-		// Label lFmax = new Label(filtercontrols, SWT.NONE);
-		// lFmax.setText(TXMCoreMessages.common_fMax);
-		// lFmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
-		//
-		// fMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
-		// fMaxSpinner.setMinimum(0);
-		// fMaxSpinner.setMaximum(9999999);
-		// fMaxSpinner.setIncrement(1);
-		// fMaxSpinner.setPageIncrement(100);
-		// fMaxSpinner.setLayoutData(fieldsGridData);
-		// fMaxSpinner.addKeyListener(computeKeyListener);
-		// fMaxSpinner.addSelectionListener(computeSelectionListener);
-		//
-		// Label lVmax = new Label(filtercontrols, SWT.NONE);
-		// lVmax.setText(TXMCoreMessages.VMAX_1);
-		// lVmax.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
-		//
-		// vMaxSpinner = new Spinner(filtercontrols, SWT.BORDER);
-		// vMaxSpinner.setMinimum(0);
-		// vMaxSpinner.setMaximum(9999999);
-		// vMaxSpinner.setIncrement(1);
-		// vMaxSpinner.setPageIncrement(100);
-		// vMaxSpinner.setLayoutData(fieldsGridData);
-		// vMaxSpinner.addKeyListener(computeKeyListener);
-		// vMaxSpinner.addSelectionListener(computeSelectionListener);
-		
-		
-		// FIXME: new version
-		// Filters
 		ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), this);
 		this.fMinSpinner = thresholdsGroup.getFMinSpinner();
 		this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 		this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 		
+		CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+		if (corpus != null) {
+			this.vMaxSpinner.setMaximum(corpus.getSize());
+			this.fMaxSpinner.setMaximum(corpus.getSize());
+			this.fMinSpinner.setMaximum(corpus.getSize());
+		}
+		
 		Label lNLigneppage = new Label(this.getExtendedParametersGroup(), SWT.NONE);
 		lNLigneppage.setText(IndexUIMessages.pageSize);
 		
Index: tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java
===================================================================
--- tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 2719)
+++ tmp/org.txm.index.rcp/src/org/txm/index/rcp/editors/IndexEditor.java	(revision 2720)
@@ -67,6 +67,7 @@
 import org.txm.searchengine.core.IQuery;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.searchengine.cqp.corpus.Property;
 import org.txm.searchengine.cqp.corpus.WordProperty;
 import org.txm.statsengine.r.rcp.views.RVariablesView;
@@ -158,10 +159,11 @@
 	 * Creates the part control.
 	 *
 	 * @param parent the parent
+	 * @throws CqiClientException
 	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
 	 */
 	@Override
-	public void _createPartControl() {
+	public void _createPartControl() throws CqiClientException {
 		
 		
 		this.index = this.getResult();
@@ -236,6 +238,12 @@
 		this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 		this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 		
+		CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+		if (corpus != null) {
+			this.vMaxSpinner.setMaximum(corpus.getSize());
+			this.fMaxSpinner.setMaximum(corpus.getSize());
+			this.fMinSpinner.setMaximum(corpus.getSize());
+		}
 		
 		// FIXME: SJ: we should create a widget class for the number of results per page
 		// Number of results per page
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java	(revision 2719)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java	(revision 2720)
@@ -3,7 +3,6 @@
 import java.io.File;
 
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.specificities.core.functions.SpecificitiesSelection;
 import org.txm.specificities.core.messages.SpecificitiesCoreMessages;
@@ -16,20 +15,21 @@
 
 /**
  * Creates a bar chart from the specified <code>SpecificitiesSelection</code> result.
+ * 
  * @author sjacquot
  *
  */
-public class RSpecificitiesBarChartCreator extends RChartCreator {
-
-
+public class RSpecificitiesBarChartCreator extends RChartCreator<SpecificitiesSelection> {
 	
+	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
-
+	public File createChart(SpecificitiesSelection result, File file) {
+		
 		try {
 			
-			SpecificitiesSelection specificitiesSelection = (SpecificitiesSelection) result;
-
+			SpecificitiesSelection specificitiesSelection = result;
+			
 			// parameters
 			boolean transpose = specificitiesSelection.isGroupingByLines();
 			boolean drawBars = specificitiesSelection.isDrawingBars();
@@ -37,143 +37,146 @@
 			float banality = specificitiesSelection.getBanality();
 			int renderingColorMode = result.getRenderingColorsMode();
 			
-			//boolean grayscale = (renderingColorMode == ChartsEngine.RENDERING_GRAYSCALE_MODE);
+			// boolean grayscale = (renderingColorMode == ChartsEngine.RENDERING_GRAYSCALE_MODE);
 			
-	
-
+			
+			
 			// TODO: should filter max and min here
 			// specIndex
-
+			
 			Matrix spec = new DoubleMatrix(specificitiesSelection.getSelectedSpecificitiesIndex());
 			Vector types = new VectorImpl(specificitiesSelection.getSelectedTypeNames());
 			Vector parts = new VectorImpl(specificitiesSelection.getSelectedPartNames());
-
+			
 			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
 			rw.eval("rownames(" + spec.getSymbol() + ") <- " + types.getSymbol() + ";"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			rw.eval("colnames(" + spec.getSymbol() + ") <- " + parts.getSymbol() + ";"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-			//System.out.println(""+"barplot(" + spec.getSymbol() + ", beside=T, legend.text=rownames(" + spec.getSymbol() + "));"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
+			
+			// System.out.println(""+"barplot(" + spec.getSymbol() + ", beside=T, legend.text=rownames(" + spec.getSymbol() + "));"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			
 			String matrix = spec.getSymbol();
 			if (transpose)
-				matrix = "t("+matrix+")"; //$NON-NLS-1$ //$NON-NLS-2$
-
-
+				matrix = "t(" + matrix + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+			
+			
 			String names = parts.getSymbol();
 			if (transpose)
 				names = types.getSymbol();
-
+			
 			String legend = types.getSymbol();
 			if (transpose)
 				legend = parts.getSymbol();
-
-
+			
+			
 			// Title
 			String title = "";
-			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE))	{
-				title = specificitiesSelection.getName();	
+			if (result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE)) {
+				title = specificitiesSelection.getName();
 			}
 			
-
+			
 			// Colors
 			int itemsCount = 0;
-			 // to put one color per part
+			// to put one color per part
 			if (transpose) {
 				itemsCount = specificitiesSelection.getSelectedPartNames().length;
 			}
 			// to put one color per word
-			else	{
-				itemsCount = specificitiesSelection.getSelectedTypeNames().size();				
+			else {
+				itemsCount = specificitiesSelection.getSelectedTypeNames().size();
 			}
-
+			
 			String[] colors = new String[itemsCount];
 			String[] allColors = this.getChartsEngine().getTheme().getPaletteAsHexFor(renderingColorMode, itemsCount);
-
-			for (int i = 0 ; i < itemsCount ; i++) {
+			
+			for (int i = 0; i < itemsCount; i++) {
 				colors[i] = allColors[i % allColors.length];
 			}
 			this.getChartsEngine().setColors(colors);
 			
-
 			
-			//String cmd = "op <- par(mar=c(5.5,5,5,5), xpd=TRUE);\n"; //$NON-NLS-1$
+			
+			// String cmd = "op <- par(mar=c(5.5,5,5,5), xpd=TRUE);\n"; //$NON-NLS-1$
 			String cmd = "op <- par(mar=c(5.5,5,5,5));\n"; //$NON-NLS-1$
-
+			
 			if (drawBars) {
-				cmd += 	"mat <- "+matrix+";\n" + //$NON-NLS-1$ //$NON-NLS-2$
-						"draw <- barplot(mat, space=c(1,3), col=colors"+ //$NON-NLS-1$
-						", horiz=F, las=2, names.arg="+names+", main=\""+title+ //$NON-NLS-1$ //$NON-NLS-2$
-						"\", beside=T, xpd=TRUE);\n" +  //$NON-NLS-1$ //$NON-NLS-2$
+				cmd += "mat <- " + matrix + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
+						"draw <- barplot(mat, space=c(1,3), col=colors" + //$NON-NLS-1$
+						", horiz=F, las=2, names.arg=" + names + ", main=\"" + title + //$NON-NLS-1$ //$NON-NLS-2$
+						"\", beside=T, xpd=TRUE);\n" +  //$NON-NLS-1$
 						// removed : legend.text="+legend + "
-						//"rm(op);" + //$NON-NLS-1$
-						"W2 <- 100000;\n"+//$NON-NLS-1$
-						"lines(c(0,W2), c(-"+banality+", -"+banality+"), lty=2);\n" + // seuil banalité inférieur //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						"lines(c(0,W2), c("+banality+", "+banality+"), lty=2);\n" + // seuil banalité supérieur //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						"lines(c(0,W2), c(0,0), lty=1);\n"+ //$NON-NLS-1$
+						// "rm(op);" + //$NON-NLS-1$
+						"W2 <- 100000;\n" +//$NON-NLS-1$
+						"lines(c(0,W2), c(-" + banality + ", -" + banality + "), lty=2);\n" + // seuil banalité inférieur //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						"lines(c(0,W2), c(" + banality + ", " + banality + "), lty=2);\n" + // seuil banalité supérieur //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						"lines(c(0,W2), c(0,0), lty=1);\n" + //$NON-NLS-1$
 						"\n"; //$NON-NLS-1$
-			} else {
-				//compute the hist but dont show the bar
-				cmd += 	"mat <- "+matrix+";\n" + //$NON-NLS-1$ //$NON-NLS-2$
-						"draw <- barplot(mat, space=c(1,3), col=\"white\", border=NA, horiz=F, las=2, names.arg="+names+", main=\""+title+"\", beside=T);\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						//"rm(op);\n"; //$NON-NLS-1$
 			}
-
+			else {
+				// compute the hist but dont show the bar
+				cmd += "mat <- " + matrix + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
+						"draw <- barplot(mat, space=c(1,3), col=\"white\", border=NA, horiz=F, las=2, names.arg=" + names + ", main=\"" + title + "\", beside=T);\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				// "rm(op);\n"; //$NON-NLS-1$
+			}
+			
 			if (drawLines) {
 				if (transpose) {
-					cmd +=	"for(i in 1:length(draw[1,])){\n" + //$NON-NLS-1$
+					cmd += "for(i in 1:length(draw[1,])){\n" + //$NON-NLS-1$
 							"lines(draw[,i], mat[,i], col=colors[[i]]);\n" + //$NON-NLS-1$
 							"}\n"; //$NON-NLS-1$
-				} else {
-					cmd +=	"for(i in 1:length(draw[,1])){\n" + //$NON-NLS-1$
+				}
+				else {
+					cmd += "for(i in 1:length(draw[,1])){\n" + //$NON-NLS-1$
 							"lines(draw[i,], mat[i,], col=colors[[i]]);\n" + //$NON-NLS-1$
 							"}\n"; //$NON-NLS-1$
 				}
 				if (!drawBars) {
 					if (transpose) {
-						cmd +=	"for(i in 1:length(draw[1,])){\n" + //$NON-NLS-1$
-								"text(draw[,i], 0, label="+legend+", offset=0, srt=90);\n" + //$NON-NLS-1$ //$NON-NLS-2$
+						cmd += "for(i in 1:length(draw[1,])){\n" + //$NON-NLS-1$
+								"text(draw[,i], 0, label=" + legend + ", offset=0, srt=90);\n" + //$NON-NLS-1$ //$NON-NLS-2$
 								"lines(c(draw[[1,i]],draw[[length(draw[,i]),i]]), c(0,0))" + //$NON-NLS-1$
 								"}\n"; //$NON-NLS-1$
-					} else {
+					}
+					else {
 						cmd += "lines( c(0,99999), c(0,0))\n"; //$NON-NLS-1$
 					}
 				}
 			}
-
 			
+			
 			// Grid
-			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID))	{
+			if (result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID)) {
 				cmd += this.getChartsEngine().getGridPlotCmd();
 			}
 			
 			// Legend
-			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_LEGEND))	{
-				if (drawBars)	{
-					cmd += "legend(\"topright\", "+legend+", inset = c(-0.2,0), col = colors, fill = colors, xpd=TRUE);\n"; //$NON-NLS-1$ //$NON-NLS-2$
+			if (result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_LEGEND)) {
+				if (drawBars) {
+					cmd += "legend(\"topright\", " + legend + ", inset = c(-0.2,0), col = colors, fill = colors, xpd=TRUE);\n"; //$NON-NLS-1$ //$NON-NLS-2$
 				}
-				else	{
-					cmd += "legend(\"topright\", "+legend+", inset = c(-0.2,0), col = colors, lty = 1, xpd=TRUE);\n"; //$NON-NLS-1$ //$NON-NLS-2$
+				else {
+					cmd += "legend(\"topright\", " + legend + ", inset = c(-0.2,0), col = colors, lty = 1, xpd=TRUE);\n"; //$NON-NLS-1$ //$NON-NLS-2$
 				}
 			}
-
+			
 			// Plot all
 			this.getChartsEngine().plot(file, cmd);
-
-
+			
+			
 		}
 		catch (Exception e) {
 			Log.severe(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.cantCreateSpecificitiesChartFileChartsEngineColonP0, this.getChartsEngine().getName()) + e);
 		}
-
+		
 		return file;
 	}
-
 	
-
-
+	
+	
+	
 	@Override
-	public Class getResultDataClass() {
+	public Class<SpecificitiesSelection> getResultDataClass() {
 		return SpecificitiesSelection.class;
 	}
-
-}
\ No newline at end of file
+	
+}
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/jfreechart/JFCSpecificitiesBarChartCreator.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/jfreechart/JFCSpecificitiesBarChartCreator.java	(revision 2719)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/jfreechart/JFCSpecificitiesBarChartCreator.java	(revision 2720)
@@ -12,7 +12,6 @@
 import org.jfree.data.general.DatasetUtils;
 import org.jfree.data.xy.XYSeries;
 import org.jfree.data.xy.XYSeriesCollection;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis;
 import org.txm.chartsengine.jfreechart.core.themes.base.SymbolAxisBetweenTicks;
@@ -22,145 +21,146 @@
 
 /**
  * Creates a bar chart from the specified <code>SpecificitiesSelection</code> result.
+ * 
  * @author sjacquot
  *
  */
-public class JFCSpecificitiesBarChartCreator extends JFCChartCreator {
-
+public class JFCSpecificitiesBarChartCreator extends JFCChartCreator<SpecificitiesSelection> {
+	
 	@Override
-	public JFreeChart createChart(ChartResult result) {
-
-		SpecificitiesSelection specificitiesSelection = (SpecificitiesSelection) result;
-
+	public JFreeChart createChart(SpecificitiesSelection result) {
+		
+		SpecificitiesSelection specificitiesSelection = result;
+		
 		// parameters
 		boolean drawBars = specificitiesSelection.isDrawingBars();
 		boolean drawLines = specificitiesSelection.isDrawingLines();
 		
 		JFreeChart chart = null;
-
-
+		
+		
 		// Create the data set
 		XYSeriesCollection dataset = new XYSeriesCollection();
-
-        if(drawBars)	{
+		
+		if (drawBars) {
 			// Create the bar chart
-	        chart = this.getChartsEngine().createXYBarChart(dataset, specificitiesSelection.getName(), SpecificitiesCoreMessages.part, SpecificitiesCoreMessages.score, true, false);
-        }
-        else	{
+			chart = this.getChartsEngine().createXYBarChart(dataset, specificitiesSelection.getName(), SpecificitiesCoreMessages.part, SpecificitiesCoreMessages.score, true, false);
+		}
+		else {
 			// Create the line chart
-	        chart = this.getChartsEngine().createXYLineChart(result, dataset, specificitiesSelection.getName(), SpecificitiesCoreMessages.part, SpecificitiesCoreMessages.score,
-	        		true, false, true, true, true, false, false);
-        }
-
+			chart = this.getChartsEngine().createXYLineChart(result, dataset, specificitiesSelection.getName(), SpecificitiesCoreMessages.part, SpecificitiesCoreMessages.score,
+					true, false, true, true, true, false, false);
+		}
+		
 		return chart;
 		
 	}
-
+	
 	@Override
-	public void updateChart(ChartResult result) {
+	public void updateChart(SpecificitiesSelection result) {
 		
-		SpecificitiesSelection specificitiesSelection = (SpecificitiesSelection) result;
+		SpecificitiesSelection specificitiesSelection = result;
 		JFreeChart chart = (JFreeChart) result.getChart();
 		
 		float banality = specificitiesSelection.getBanality();
-
 		
+		
 		// freeze rendering while computing
 		chart.setNotify(false);
-
 		
+		
 		// removes all existing range marker
 		chart.getXYPlot().clearRangeMarkers();
 		
-        // Add positive banality marker
-        Marker marker = new ValueMarker(banality);
-        marker.setPaint(Color.RED);
-        marker.setLabel(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.banalityColonP0, banality));
-        marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
-        marker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
-        chart.getXYPlot().addRangeMarker(marker);
-
-
-        // Add negative banality marker
-        marker = new ValueMarker(-banality);
-        marker.setPaint(Color.RED);
-        marker.setLabel(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.banalityColonP0, -banality));
-        marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
-        marker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
-        chart.getXYPlot().addRangeMarker(marker);
-
+		// Add positive banality marker
+		Marker marker = new ValueMarker(banality);
+		marker.setPaint(Color.RED);
+		marker.setLabel(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.banalityColonP0, banality));
+		marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
+		marker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
+		chart.getXYPlot().addRangeMarker(marker);
 		
+		
+		// Add negative banality marker
+		marker = new ValueMarker(-banality);
+		marker.setPaint(Color.RED);
+		marker.setLabel(SpecificitiesCoreMessages.bind(SpecificitiesCoreMessages.banalityColonP0, -banality));
+		marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
+		marker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT);
+		chart.getXYPlot().addRangeMarker(marker);
+		
+		
 		// Transpose or not (group by lines or not)
-        if(result.hasParameterChanged(SpecificitiesPreferences.CHART_GROUP_BY_LINES))	{
-        
+		if (result.hasParameterChanged(SpecificitiesPreferences.CHART_GROUP_BY_LINES)) {
+			
 			// Fill the data set
 			XYSeriesCollection dataset = (XYSeriesCollection) chart.getXYPlot().getDataset();
 			dataset.removeAllSeries();
 			String[] xAxisSymbols;
-	
+			
 			// Transpose the data set
 			List<String> types = specificitiesSelection.getSelectedTypeNames();
 			String[] parts = specificitiesSelection.getSelectedPartNames();
-			if (specificitiesSelection.isGroupingByLines())	{
-		        xAxisSymbols = new String[types.size()];
-	
-				for(int i = 0; i < parts.length; i++) {
+			if (specificitiesSelection.isGroupingByLines()) {
+				xAxisSymbols = new String[types.size()];
+				
+				for (int i = 0; i < parts.length; i++) {
 					XYSeries series = new XYSeries(parts[i]);
 					dataset.addSeries(series);
-	
-					for(int j = 0; j < types.size(); j++) {
+					
+					for (int j = 0; j < types.size(); j++) {
 						series.add(j, specificitiesSelection.getSelectedSpecificitiesIndex()[j][i]);
 						// Add X axis symbol
 						xAxisSymbols[j] = types.get(j);
 					}
 				}
-	
+				
 			}
 			else {
-		        xAxisSymbols = new String[parts.length];
-	
-				for(int i = 0; i < types.size(); i++) {
-	
+				xAxisSymbols = new String[parts.length];
+				
+				for (int i = 0; i < types.size(); i++) {
+					
 					XYSeries series = new XYSeries(types.get(i));
 					dataset.addSeries(series);
-	
-					for(int j = 0; j < parts.length; j++) {
+					
+					for (int j = 0; j < parts.length; j++) {
 						series.add(j, specificitiesSelection.getSelectedSpecificitiesIndex()[i][j]);
 						// Add X axis symbol
 						xAxisSymbols[j] = parts[j];
 					}
 				}
 			}
-	
-	        
-	        // Custom range axis for ticks drawing options
-	        double minimumValue = DatasetUtils.findMinimumRangeValue(chart.getXYPlot().getDataset()).doubleValue();
-	        double maximumValue = DatasetUtils.findMaximumRangeValue(chart.getXYPlot().getDataset()).doubleValue();
-	        // Adjust ticks values according to data set contains only positives values or only negatives values
-	        if(minimumValue > 0)	{
-	        	minimumValue = 0;
-	        }
-	        if(maximumValue < 0)	{
-	        	maximumValue = specificitiesSelection.getBanality();
-	        }
-	        // Custom range axis to cut the values to minimum and maximum values
-	        chart.getXYPlot().setRangeAxis(new ExtendedNumberAxis((NumberAxis) chart.getXYPlot().getRangeAxis(), true, true, minimumValue, maximumValue));
 			
-	        chart.getXYPlot().setDomainAxis(new SymbolAxisBetweenTicks(SpecificitiesCoreMessages.part, xAxisSymbols));
-        }
-        
+			
+			// Custom range axis for ticks drawing options
+			double minimumValue = DatasetUtils.findMinimumRangeValue(chart.getXYPlot().getDataset()).doubleValue();
+			double maximumValue = DatasetUtils.findMaximumRangeValue(chart.getXYPlot().getDataset()).doubleValue();
+			// Adjust ticks values according to data set contains only positives values or only negatives values
+			if (minimumValue > 0) {
+				minimumValue = 0;
+			}
+			if (maximumValue < 0) {
+				maximumValue = specificitiesSelection.getBanality();
+			}
+			// Custom range axis to cut the values to minimum and maximum values
+			chart.getXYPlot().setRangeAxis(new ExtendedNumberAxis((NumberAxis) chart.getXYPlot().getRangeAxis(), true, true, minimumValue, maximumValue));
+			
+			chart.getXYPlot().setDomainAxis(new SymbolAxisBetweenTicks(SpecificitiesCoreMessages.part, xAxisSymbols));
+		}
+		
 		super.updateChart(result);
 		
 	}
 	
-
+	
 	@Override
-	public Class getResultDataClass() {
+	public Class<SpecificitiesSelection> getResultDataClass() {
 		return SpecificitiesSelection.class;
 	}
 	
-
 	
 	
-
-}
\ No newline at end of file
+	
+	
+}
Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 2719)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 2720)
@@ -65,6 +65,7 @@
 import org.txm.rcp.views.QueriesView;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.statsengine.core.StatException;
 import org.txm.statsengine.core.data.Vector;
 import org.txm.statsengine.r.rcp.views.RVariablesView;
@@ -235,6 +236,13 @@
 			this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 			this.vMaxSpinner.setMinimum(2); // LT won't work with 1 line only
 			
+			CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+			if (corpus != null) {
+				this.vMaxSpinner.setMaximum(corpus.getSize());
+				this.fMaxSpinner.setMaximum(corpus.getSize());
+				this.fMinSpinner.setMaximum(corpus.getSize());
+			}
+			
 			// Merge or delete columns button
 			mergeDeleteColumnsButton = new Button(extendedParametersArea, SWT.PUSH);
 			mergeDeleteColumnsButton.setText(LexicalTableUIMessages.mergeOrDeleteColumns);
Index: tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartCreator.java	(revision 2719)
+++ tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartCreator.java	(revision 2720)
@@ -1,30 +1,25 @@
 package org.txm.chartsengine.graphstream.core;
 
-import java.io.File;
-
 import org.graphstream.graph.Graph;
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.results.ChartResult;
+import org.txm.utils.logger.Log;
 
-
-
 /**
  * GraphStream base chart creator.
  * 
  * All GSC charts creators should extend this class.
- * The updateChart(ChartResult result) method implementation of the subclasses must call super.update(result) to benefit to the shared system. 
+ * The updateChart(ChartResult result) method implementation of the subclasses must call super.update(result) to benefit to the shared system.
  * 
  * @author sjacquot
  *
  */
-public abstract class GSChartCreator extends ChartCreator {
-
+public abstract class GSChartCreator<R extends ChartResult> extends ChartCreator<GSChartsEngine, R> {
 	
-	
 	@Override
-	public void updateChart(ChartResult result) {
+	public void updateChart(R result) {
 		// Java object
-		if(result.getChart() instanceof Graph)	{
+		if (result.getChart() instanceof Graph) {
 			Graph graph = (Graph) result.getChart();
 			
 			
@@ -32,100 +27,85 @@
 			System.out.println("GSChartCreator.updateChart() style sheet dump: " + graph.getAttribute("ui.stylesheet"));
 			
 			// Add the current shared preferences as Font size, etc.
-//			graph.addAttribute("ui.stylesheet", graph.getAttribute("ui.stylesheet") + "node {"
-//					+ " text-size: " + result.getFont().split("\\|")[2] + ";" 
-//					+ " text-font: \"" + result.getFont().split("\\|")[1] + "\";" 
-//							
-//							+ " }");
-
+			// graph.addAttribute("ui.stylesheet", graph.getAttribute("ui.stylesheet") + "node {"
+			// + " text-size: " + result.getFont().split("\\|")[2] + ";"
+			// + " text-font: \"" + result.getFont().split("\\|")[1] + "\";"
+			//
+			// + " }");
+			
 			// FIXME: Debug
 			System.out.println("GSChartCreator.updateChart() style sheet dump: " + graph.getAttribute("ui.stylesheet"));
-
 			
 			
 			
 			
-			
-			
-			
-			
-			
-//			// freeze rendering
-//			chart.setNotify(false);
-//
-//			
-//			// applying full theme 
-//			if(applyTheme)	{
-//				this.getChartsEngine().getJFCTheme().applyThemeToChart(result);
-//			}
-//
-//			
-//			// rendering color mode
-//			this.getChartsEngine().getJFCTheme().applySeriesPaint(result);
-//
-//			// multiple line strokes
-//			this.getChartsEngine().getJFCTheme().applySeriesStrokes(result);
-//
-//			// title visibility
-//			if(chart.getTitle() != null && result.hasParameterChanged(ChartsEnginePreferences.SHOW_TITLE))	{
-//				chart.getTitle().setVisible(result.isTitleVisible());
-//			}
-//			// legend visibility
-//			if(chart.getLegend() != null && result.hasParameterChanged(ChartsEnginePreferences.SHOW_LEGEND))	{
-//				chart.getLegend().setVisible(result.isLegendVisible());
-//			}
-//			// CategoryPlot
-//			if(chart.getPlot() instanceof CategoryPlot)	{
-//				CategoryPlot plot = (CategoryPlot) chart.getPlot();
-//				// grid visibility
-//				plot.setDomainGridlinesVisible(result.isGridVisible());
-//				plot.setRangeGridlinesVisible(result.isGridVisible());
-//				
-//				// force the renderer initialization to override theme settings
-//				if(plot.getRenderer() instanceof IRendererWithItemSelection)	{
-//					((IRendererWithItemSelection) plot.getRenderer()).init();
-//				}
-//			}
-//			// XYPlot
-//			else if(chart.getPlot() instanceof XYPlot)	{
-//				XYPlot plot = (XYPlot) chart.getPlot();
-//				// grid visibility
-//				plot.setRangeGridlinesVisible(result.isGridVisible());
-//				plot.setDomainGridlinesVisible(result.isGridVisible());
-//				
-//				// force the renderer initialization to override theme settings
-//				if(plot.getRenderer() instanceof IRendererWithItemSelection)	{
-//					((IRendererWithItemSelection) plot.getRenderer()).init();
-//				}
-//			}
-//			
-//			chart.setNotify(true);
+			// // freeze rendering
+			// chart.setNotify(false);
+			//
+			//
+			// // applying full theme
+			// if(applyTheme) {
+			// this.getChartsEngine().getJFCTheme().applyThemeToChart(result);
+			// }
+			//
+			//
+			// // rendering color mode
+			// this.getChartsEngine().getJFCTheme().applySeriesPaint(result);
+			//
+			// // multiple line strokes
+			// this.getChartsEngine().getJFCTheme().applySeriesStrokes(result);
+			//
+			// // title visibility
+			// if(chart.getTitle() != null && result.hasParameterChanged(ChartsEnginePreferences.SHOW_TITLE)) {
+			// chart.getTitle().setVisible(result.isTitleVisible());
+			// }
+			// // legend visibility
+			// if(chart.getLegend() != null && result.hasParameterChanged(ChartsEnginePreferences.SHOW_LEGEND)) {
+			// chart.getLegend().setVisible(result.isLegendVisible());
+			// }
+			// // CategoryPlot
+			// if(chart.getPlot() instanceof CategoryPlot) {
+			// CategoryPlot plot = (CategoryPlot) chart.getPlot();
+			// // grid visibility
+			// plot.setDomainGridlinesVisible(result.isGridVisible());
+			// plot.setRangeGridlinesVisible(result.isGridVisible());
+			//
+			// // force the renderer initialization to override theme settings
+			// if(plot.getRenderer() instanceof IRendererWithItemSelection) {
+			// ((IRendererWithItemSelection) plot.getRenderer()).init();
+			// }
+			// }
+			// // XYPlot
+			// else if(chart.getPlot() instanceof XYPlot) {
+			// XYPlot plot = (XYPlot) chart.getPlot();
+			// // grid visibility
+			// plot.setRangeGridlinesVisible(result.isGridVisible());
+			// plot.setDomainGridlinesVisible(result.isGridVisible());
+			//
+			// // force the renderer initialization to override theme settings
+			// if(plot.getRenderer() instanceof IRendererWithItemSelection) {
+			// ((IRendererWithItemSelection) plot.getRenderer()).init();
+			// }
+			// }
+			//
+			// chart.setNotify(true);
 		}
-		// File
-		else if(result.getChart() instanceof File)	{
-			// creates a new chart but using the same file
-			this.createChartFile(result, (File)result.getChart());
-				
-			// FIXME: using new file
-			//this.createChartFile(result, preferencesNode);
-				
+		else {
+			Log.severe("Error: GSChartCreator only manage Graph charts: " + result.getChart());
 		}
+		// // File
+		// else if(result.getChart() instanceof File) {
+		// // creates a new chart but using the same file
+		// this.createChartFile(result, (File)result.getChart());
+		//
+		// // FIXME: using new file
+		// //this.createChartFile(result, preferencesNode);
+		//
+		// }
 	}
 	
-
-
-
 	@Override
-	public Class getChartsEngineClass() {
+	public Class<GSChartsEngine> getChartsEngineClass() {
 		return GSChartsEngine.class;
 	}
-	
-	/**
-	 * Convenience method.
-	 * @return the casted charts engine.
-	 */
-	protected GSChartsEngine getChartsEngine()	{
-		return (GSChartsEngine) this.chartsEngine;
-	}
-	
 }
Index: tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java	(revision 2719)
+++ tmp/org.txm.chartsengine.graphstream.core/src/org/txm/chartsengine/graphstream/core/GSChartsEngine.java	(revision 2720)
@@ -8,34 +8,36 @@
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.graphstream.core.preferences.GSChartsEnginePreferences;
 
 /**
  * GraphStream charts engine.
+ * 
  * @author sjacquot
  *
  */
 public class GSChartsEngine extends ChartsEngine {
-
 	
+	
 	/**
 	 * Constants for extra output formats.
 	 */
 	public final static String OUTPUT_FORMAT_GRAPHSTREAM = "GraphStream/Java2D"; //$NON-NLS-1$
-
-
+	
+	
 	/**
 	 * The charts engine internal name.
 	 */
 	public final static String NAME = "graphstream_charts_engine"; //$NON-NLS-1$
-
+	
 	/**
 	 * The charts engine description.
 	 */
 	public final static String DESCRIPTION = "GraphStream";
-
 	
 	
+	
 	/**
 	 * Creates a GraphStream charts engine with output format from the preferences.
 	 */
@@ -43,27 +45,30 @@
 		this(GSChartsEnginePreferences.getInstance().getString(GSChartsEnginePreferences.OUTPUT_FORMAT));
 	}
 	
-
+	
 	/**
 	 * Creates a GraphStream charts engine with the specified output format.
+	 * 
 	 * @param outputFormat
 	 */
 	public GSChartsEngine(String outputFormat) {
 		super(DESCRIPTION, outputFormat);
 	}
-
 	
-
-
-	/* (non-Javadoc)
+	
+	
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.core.engines.Engine#getName()
 	 */
 	@Override
 	public String getName() {
 		return GSChartsEngine.NAME;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.core.engines.Engine#getState()
 	 */
 	@Override
@@ -71,8 +76,9 @@
 		// TODO Auto-generated method stub
 		return true;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.core.engines.Engine#start(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	@Override
@@ -80,8 +86,9 @@
 		// TODO Auto-generated method stub
 		return true;
 	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.core.engines.Engine#stop()
 	 */
 	@Override
@@ -89,17 +96,9 @@
 		// TODO Auto-generated method stub
 		return true;
 	}
-
-	/* (non-Javadoc)
-	 * @see org.txm.chartsengine.core.ChartsEngine#createChartFile(java.lang.Object, java.io.File)
-	 */
-	@Override
-	public File createChartFile(Object chart, File file) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	/* (non-Javadoc)
+	
+	/*
+	 * (non-Javadoc)
 	 * @see org.txm.chartsengine.core.ChartsEngine#exportChart(java.lang.Object, java.io.File, java.lang.String, int, int, int, int, int, int)
 	 */
 	@Override
@@ -107,25 +106,31 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
-
-
+	
+	
 	@Override
 	public ArrayList<String> getSupportedOutputDisplayFormats() {
-		ArrayList<String> formats = new ArrayList<String>(1);
+		ArrayList<String> formats = new ArrayList<>(1);
 		
 		formats.add(OUTPUT_FORMAT_GRAPHSTREAM);
 		
 		return formats;
 	}
-
-
+	
+	
 	@Override
 	public ArrayList<String> getSupportedOutputFileFormats() {
 		System.err.println("ECEChartsEngine.getSupportedOutputFileFormats(): not yet implemented.");
-		ArrayList<String> formats = new ArrayList<String>(1);
+		ArrayList<String> formats = new ArrayList<>(1);
 		formats.add(OUTPUT_FORMAT_NONE);
 		return formats;
-
+		
 	}
-
+	
+	@Override
+	public File exportChart(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormatSvg) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	
 }
Index: tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java	(revision 2719)
+++ tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swt/SVGChartComposite.java	(revision 2720)
@@ -20,6 +20,7 @@
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.IChartComponent;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
 import org.txm.chartsengine.rcp.swt.SwingChartComposite;
@@ -45,7 +46,7 @@
 	
 	
 	/**
-	 * The chart SVG file.
+	 * The displayed chart SVG file. Null while loadChart(chart) is not called
 	 */
 	protected File file;
 	
@@ -64,7 +65,17 @@
 	
 	@Override
 	public void loadChart(Object chart) {
-		this.loadSVGDocument((File) chart);
+		ChartsEngine engine = chartEditor.getChartsEngine();
+		ChartResult result = chartEditor.getResult();
+		int w = this.getSize().x;
+		int h = this.getSize().y;
+		if (w == 0 | h == 0) { // if the composite is not drawn (editor is opening), the chart file size is set to 600*400 by default, TODO resetView() should show-zoom the chart
+			w = 600;
+			h = 400;
+		}
+		File file = engine.exportChart(result, w, h, ChartsEngine.OUTPUT_FORMAT_SVG);
+		
+		this.loadSVGDocument(file);
 	}
 	
 	
Index: tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swing/SVGCanvas.java
===================================================================
--- tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swing/SVGCanvas.java	(revision 2719)
+++ tmp/org.txm.chartsengine.svgbatik.rcp/src/org/txm/chartsengine/svgbatik/rcp/swing/SVGCanvas.java	(revision 2720)
@@ -52,299 +52,309 @@
  * @author sjacquot
  * 
  */
-public class SVGCanvas extends JSVGCanvas implements IChartComponent	{
-
+public class SVGCanvas extends JSVGCanvas implements IChartComponent {
+	
 	/**
 	 * The linked editor.
 	 */
 	protected ChartEditor editor;
-
+	
 	/**
-	 *  The Constant serialVersionUID.
+	 * The Constant serialVersionUID.
 	 */
 	private static final long serialVersionUID = -4381954167495751486L;
-
+	
 	/**
-	 *  Current zoom value.
+	 * Current zoom value.
 	 */
 	int zoom = 0;
-
+	
 	/**
 	 * Key pressed pan factor.
 	 */
 	protected double keyPressedPanFactor = 0.5;
-
-
+	
+	
 	/**
 	 * Instantiates a new SVG panel.
 	 *
 	 * @param frame the frame
 	 */
-	public SVGCanvas()	{
-		//super(new BorderLayout());
+	public SVGCanvas() {
+		// super(new BorderLayout());
 		super(null, true, false);
 		
-		//this.svgCanvas = new JSVGCanvas(null, true, false);
-		//this.add("Center", svgCanvas); //$NON-NLS-1$
-
+		// this.svgCanvas = new JSVGCanvas(null, true, false);
+		// this.add("Center", svgCanvas); //$NON-NLS-1$
+		
 		// TODO: needed for automatic refresh after dynamically modifying the SVG DOM
-		//svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
-
+		// svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC);
+		
 		List<Interactor> list = this.getInteractors();
 		list.clear();
-
-
+		
+		
 		// FIXME : test for constant text label font size (only work with the SVG produced by the SVGGraphicsDevice of R, not with CairoSVG because it doesn't produces text tag, only glyph paths)
-		//svgCanvas.addMouseWheelListener(new ___AbstractImageZoomInteractor());
-
+		// svgCanvas.addMouseWheelListener(new ___AbstractImageZoomInteractor());
+		
 		list.add(zoomInteractor);
 		list.add(imageZoomInteractor);
 		list.add(panInteractor);
 		list.add(resetTransformInteractor);
-
+		
 		this.addMouseWheelListener(new MouseWheelListener() {
-
+			
 			@Override
 			public void mouseWheelMoved(MouseWheelEvent e) {
-
-
+				
+				
 				// FIXME : test zoom by viewbox attribute
-//				final MouseWheelEvent mwe = e;
-//				svgCanvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {
-//
-//					@Override
-//					public void run() {
-//						// TODO Auto-generated method stub
-//
-//						//System.out.println("SVGPanel.SVGPanel(...).new MouseWheelListener() {...}.mouseWheelMoved(): " + ((Element)getSVGDocument().getFirstChild()).getAttribute("viewBox"));
-//
-//						String[] viewBox = ((Element)getSVGDocument().getFirstChild()).getAttribute("viewBox").split(" ");
-//
-//						int x = Integer.valueOf(viewBox[0]);
-//						int y = Integer.valueOf(viewBox[1]);
-//						int width = Integer.valueOf(viewBox[2]);
-//						int height = Integer.valueOf(viewBox[3]);
-//
-//						if (mwe.getUnitsToScroll() < 0)	{
-//
-//							x += 10;
-//							y += 10;
-//							width -= 10;
-//							height -= 10;
-//
-//
-//
-//						}
-//						else	{
-//
-//							x -= 10;
-//							y -= 10;
-//							width += 10;
-//							height += 10;
-//
-//						}
-//						((Element)getSVGDocument().getFirstChild()).setAttribute("viewBox", x  + " " + y + " " + width + " " + height);
-//					}
-//				});
-
-
-
-
+				// final MouseWheelEvent mwe = e;
+				// svgCanvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {
+				//
+				// @Override
+				// public void run() {
+				// // TODO Auto-generated method stub
+				//
+				// //System.out.println("SVGPanel.SVGPanel(...).new MouseWheelListener() {...}.mouseWheelMoved(): " + ((Element)getSVGDocument().getFirstChild()).getAttribute("viewBox"));
+				//
+				// String[] viewBox = ((Element)getSVGDocument().getFirstChild()).getAttribute("viewBox").split(" ");
+				//
+				// int x = Integer.valueOf(viewBox[0]);
+				// int y = Integer.valueOf(viewBox[1]);
+				// int width = Integer.valueOf(viewBox[2]);
+				// int height = Integer.valueOf(viewBox[3]);
+				//
+				// if (mwe.getUnitsToScroll() < 0) {
+				//
+				// x += 10;
+				// y += 10;
+				// width -= 10;
+				// height -= 10;
+				//
+				//
+				//
+				// }
+				// else {
+				//
+				// x -= 10;
+				// y -= 10;
+				// width += 10;
+				// height += 10;
+				//
+				// }
+				// ((Element)getSVGDocument().getFirstChild()).setAttribute("viewBox", x + " " + y + " " + width + " " + height);
+				// }
+				// });
+				
+				
+				
+				
 				// FIXME : tests for constant text font size
 				// FIXME : only work with SVG generated with text tag
 				// FIXME : do not work properly
-//				NodeList elements = svgCanvas.getSVGDocument().getElementsByTagName("text");
-//				Element element;
-//				for (int i = 0; i < elements.getLength(); i++) {
-//					element = (Element) elements.item(i);
-//
-//					// TODO : Debug : Affichage des attributs de l'�l�ment
-////					NamedNodeMap attributes = element.getAttributes();
-////					int numAttrs = attributes.getLength();
-////					System.out.println("");
-////					for (int j = 0; j < numAttrs; j++) {
-////
-////						Attr attr = (Attr) attributes.item(j);
-////
-////						String attrName = attr.getNodeName();
-////						String attrValue = attr.getNodeValue();
-////						System.out.print(" " + attrName + "=" + attrValue);
-////					}
-//
-//					// TODO : test de modif de l'attribut font-size du texte
-//					// TODO : Fonctionne mais prend beaucoup plus de ressources que la modification directe de la shape GVT
-//					element.removeAttribute("style");
-//					//element.setAttribute("style", "font-size:" + (8 * 1d / zoom));
-//
-//					if(zoom != 0)	{
-//						double fontSize = (8 * 1d / zoom);
-//						element.setAttribute("font-size",  fontSize + "px");
-//					}
-//
-//				}
-
-
+				// NodeList elements = svgCanvas.getSVGDocument().getElementsByTagName("text");
+				// Element element;
+				// for (int i = 0; i < elements.getLength(); i++) {
+				// element = (Element) elements.item(i);
+				//
+				// // TODO : Debug : Affichage des attributs de l'�l�ment
+				//// NamedNodeMap attributes = element.getAttributes();
+				//// int numAttrs = attributes.getLength();
+				//// System.out.println("");
+				//// for (int j = 0; j < numAttrs; j++) {
+				////
+				//// Attr attr = (Attr) attributes.item(j);
+				////
+				//// String attrName = attr.getNodeName();
+				//// String attrValue = attr.getNodeValue();
+				//// System.out.print(" " + attrName + "=" + attrValue);
+				//// }
+				//
+				// // TODO : test de modif de l'attribut font-size du texte
+				// // TODO : Fonctionne mais prend beaucoup plus de ressources que la modification directe de la shape GVT
+				// element.removeAttribute("style");
+				// //element.setAttribute("style", "font-size:" + (8 * 1d / zoom));
+				//
+				// if(zoom != 0) {
+				// double fontSize = (8 * 1d / zoom);
+				// element.setAttribute("font-size", fontSize + "px");
+				// }
+				//
+				// }
+				
+				
 				// FIXME : old version by matrix transformation
-				if (e.getUnitsToScroll() < 0)	{
+				if (e.getUnitsToScroll() < 0) {
 					zoom(e.getX(), e.getY(), true);
 				}
-				else	{
+				else {
 					zoom(e.getX(), e.getY(), false);
 				}
-
-
+				
+				
 			}
 		});
-
+		
 		// add default chart key listener
 		this.addKeyListener(new ChartKeyListener(this, 10.5));
 		
-		//this.setChartEditor(editor);
+		// this.setChartEditor(editor);
 		
-
+		
 	}
-
+	
 	// ----------------------------------------------------------------------
 	// Interactors
 	// ----------------------------------------------------------------------
-
+	
 	/**
 	 * An interactor to perform a zoom.
-	 * <p>Binding: BUTTON1 + CTRL Key</p>
+	 * <p>
+	 * Binding: BUTTON1 + CTRL Key
+	 * </p>
 	 */
 	protected Interactor zoomInteractor = new AbstractZoomInteractor() {
+		
 		@Override
 		public boolean startInteraction(InputEvent ie) {
 			int mods = ie.getModifiers();
-			return
-			ie.getID() == MouseEvent.MOUSE_PRESSED &&
-			(mods & InputEvent.BUTTON1_MASK) != 0 &&
-			(mods & InputEvent.CTRL_MASK) != 0;
+			return ie.getID() == MouseEvent.MOUSE_PRESSED &&
+					(mods & InputEvent.BUTTON1_MASK) != 0 &&
+					(mods & InputEvent.CTRL_MASK) != 0;
 		}
 	};
-
+	
 	/**
 	 * An interactor to perform a realtime zoom.
-	 * <p>Binding: BUTTON3 + SHif T Key</p>
+	 * <p>
+	 * Binding: BUTTON3 + SHif T Key
+	 * </p>
 	 */
 	protected Interactor imageZoomInteractor = new AbstractImageZoomInteractor() {
+		
 		@Override
 		public boolean startInteraction(InputEvent ie) {
 			int mods = ie.getModifiers();
-			return
-			ie.getID() == MouseEvent.MOUSE_PRESSED &&
-			(mods & InputEvent.BUTTON3_MASK) != 0 &&
-			(mods & InputEvent.SHIFT_MASK) != 0;
+			return ie.getID() == MouseEvent.MOUSE_PRESSED &&
+					(mods & InputEvent.BUTTON3_MASK) != 0 &&
+					(mods & InputEvent.SHIFT_MASK) != 0;
 		}
 	};
-
+	
 	/**
 	 * An interactor to perform a translation.
-	 * <p>Binding: BUTTON1 + SHif T Key</p>
+	 * <p>
+	 * Binding: BUTTON1 + SHif T Key
+	 * </p>
 	 */
 	protected Interactor panInteractor = new AbstractPanInteractor() {
+		
 		@Override
 		public boolean startInteraction(InputEvent ie) {
 			int mods = ie.getModifiers();
-			return
-			ie.getID() == MouseEvent.MOUSE_PRESSED &&
-			(mods & InputEvent.BUTTON1_MASK) != 0 &&
-			(mods & InputEvent.SHIFT_MASK) != 1;
+			return ie.getID() == MouseEvent.MOUSE_PRESSED &&
+					(mods & InputEvent.BUTTON1_MASK) != 0 &&
+					(mods & InputEvent.SHIFT_MASK) != 1;
 		}
 	};
-
+	
 	/**
 	 * An interactor to reset the rendering transform.
-	 * <p>Binding: CTRL+SHif T+BUTTON3</p>
+	 * <p>
+	 * Binding: CTRL+SHif T+BUTTON3
+	 * </p>
 	 */
 	protected Interactor resetTransformInteractor = new AbstractResetTransformInteractor() {
+		
 		@Override
 		public boolean startInteraction(InputEvent ie) {
 			int mods = ie.getModifiers();
-			return
-			ie.getID() == MouseEvent.MOUSE_CLICKED &&
-			(mods & InputEvent.BUTTON2_MASK) != 0 &&
-			(mods & InputEvent.SHIFT_MASK) != 1 &&
-			(mods & InputEvent.CTRL_MASK) != 1;
+			return ie.getID() == MouseEvent.MOUSE_CLICKED &&
+					(mods & InputEvent.BUTTON2_MASK) != 0 &&
+					(mods & InputEvent.SHIFT_MASK) != 1 &&
+					(mods & InputEvent.CTRL_MASK) != 1;
 		}
 	};
-
+	
 	/**
 	 * Resets pan and zoom.
 	 */
-	public void resetView()	{
+	@Override
+	public void resetView() {
 		this.zoom = 0;
 		AffineTransform trans = AffineTransform.getTranslateInstance(0, 0);
 		trans.scale(1, 1);
 		this.setRenderingTransform(trans);
 	}
-
-
-
+	
+	
+	
 	@Override
 	public void zoom(double x, double y, boolean zoomIn) {
 		
 		// FIXME: zoom tests. reset the pan
 		
 		// TODO Auto-generated method stub
-//		x += this.svgCanvas.getRenderingTransform().getTranslateX();
-//		y += this.svgCanvas.getRenderingTransform().getTranslateY();
-
-
+		// x += this.svgCanvas.getRenderingTransform().getTranslateX();
+		// y += this.svgCanvas.getRenderingTransform().getTranslateY();
+		
+		
 		AffineTransform trans = AffineTransform.getTranslateInstance(x, y);
-
-
-		if(zoomIn)	{
+		
+		
+		if (zoomIn) {
 			trans.scale(this.getRenderingTransform().getScaleX() * 1.1, this.getRenderingTransform().getScaleY() * 1.1);
 		}
-		else	{
+		else {
 			trans.scale(this.getRenderingTransform().getScaleX() * 0.9, this.getRenderingTransform().getScaleY() * 0.9);
 		}
-
-//		trans.translate(-x + this.svgCanvas.getRenderingTransform().getTranslateX(), -y + this.svgCanvas.getRenderingTransform().getTranslateY());
-
-	//	System.out.println("SVGPanel.zoom2(): " + this.svgCanvas.getRenderingTransform().getTranslateX());
-
+		
+		// trans.translate(-x + this.svgCanvas.getRenderingTransform().getTranslateX(), -y + this.svgCanvas.getRenderingTransform().getTranslateY());
+		
+		// System.out.println("SVGPanel.zoom2(): " + this.svgCanvas.getRenderingTransform().getTranslateX());
+		
 		trans.translate(-x, -y);
-
-
-		if(trans.getDeterminant() != 0)	{
+		
+		
+		if (trans.getDeterminant() != 0) {
 			this.setRenderingTransform(trans);
 		}
 	}
-
+	
 	// FIXME: tests zoom
 	/**
 	 * Zoom in or zoom out the panel at the specified origin point coordinates.
+	 * 
 	 * @param x
 	 * @param y
 	 * @param zoom
 	 */
-	public void zoom(double x, double y, int zoom)	{
-
+	public void zoom(double x, double y, int zoom) {
+		
 		// FIXME: SJ: the zoom does nothing when zoom is equal to 0 and 1.
-
+		
 		AffineTransform trans = AffineTransform.getTranslateInstance(x, y);
-
+		
 		int dy = zoom;
 		double s;
-		if(dy < 0) {
+		if (dy < 0) {
 			s = -1f / dy;
 		}
 		else {
 			s = dy;
 		}
-
+		
 		trans.scale(s, s);
-
+		
 		trans.translate(-x, -y);
-
-		if(trans.getDeterminant() != 0)	{
+		
+		if (trans.getDeterminant() != 0) {
 			this.setRenderingTransform(trans);
 		}
 	}
-
-
+	
+	
 	@Override
 	public void pan(double srcX, double srcY, double dstX, double dstY, double panFactor) {
 		
@@ -353,26 +363,26 @@
 		this.setRenderingTransform(trans);
 		
 	}
-
+	
 	@Override
 	public ChartEditor getChartEditor() {
 		return this.editor;
 	}
-
+	
 	@Override
 	public void setChartEditor(ChartEditor editor) {
 		this.editor = editor;
 	}
-
+	
 	@Override
 	public void updateMouseOverItem(MouseEvent event) {
 		// TODO Auto-generated method stub
 		
 	}
-
+	
 	@Override
 	public void squareOff() {
 		// not needed in this implementation
 	}
-
+	
 }
Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCEditor.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCEditor.java	(revision 2719)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCEditor.java	(revision 2720)
@@ -23,6 +23,7 @@
 import org.txm.rcp.swt.widget.structures.PropertiesComboViewer;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 
 /**
  * AHC chart editor.
@@ -52,6 +53,12 @@
 	protected Spinner fMinSpinner;
 	
 	/**
+	 * Minimum frequency filtering spinner.
+	 */
+	@Parameter(key = TXMPreferences.F_MAX)
+	protected Spinner fMaxSpinner;
+	
+	/**
 	 * Maximum number of lines filtering.
 	 */
 	@Parameter(key = TXMPreferences.V_MAX)
@@ -153,10 +160,17 @@
 		
 		if (!this.getResult().getParent().isVisible() // CA parent parent is not visible
 				&& !(this.getResult().getParent().getParent().getParent() instanceof PartitionIndex)) { // and its 2x parent is not a PartitionIndex
-			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, false);
+			ThresholdsGroup thresholdsGroup = new ThresholdsGroup(this.getExtendedParametersGroup(), SWT.NONE, this, true, true);
 			this.fMinSpinner = thresholdsGroup.getFMinSpinner();
+			this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 			this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 			this.vMaxSpinner.setMinimum(2);
+			CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+			if (corpus != null) {
+				this.vMaxSpinner.setMaximum(corpus.getSize());
+				this.fMaxSpinner.setMaximum(corpus.getSize());
+				this.fMinSpinner.setMaximum(corpus.getSize());
+			}
 		}
 	}
 	
Index: tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/events/JFCDefaultChartMouseListener.java
===================================================================
--- tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/events/JFCDefaultChartMouseListener.java	(revision 2719)
+++ tmp/org.txm.chartsengine.jfreechart.rcp/src/org/txm/chartsengine/jfreechart/rcp/events/JFCDefaultChartMouseListener.java	(revision 2720)
@@ -173,7 +173,7 @@
 								for (int j = 0; j < selectedItems.length; j++) {
 									// Symbol Axis
 									if (((XYPlot) plot).getDomainAxis() instanceof SymbolAxis) {
-										menuText += (String) ((SymbolAxis) ((XYPlot) plot).getDomainAxis()).getSymbols()[selectedItems[j]] + "\n";
+										menuText += ((SymbolAxis) ((XYPlot) plot).getDomainAxis()).getSymbols()[selectedItems[j]] + "\n";
 									}
 									// CA
 									// FIXME move this to CA.core/rcp ?
@@ -232,6 +232,7 @@
 		
 		this.chartComponent.getChartEditor().getComposite().getDisplay().syncExec(new Runnable() {
 			
+			@Override
 			public void run() {
 				chartComponent.getChartEditor().getComposite().setCurrentContextMenu(a);
 				
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/editors/ChartEditor.java	(revision 2720)
@@ -197,7 +197,7 @@
 		}
 		
 		// Chart composite
-		this.chartComposite = this.swtChartsComponentsProvider.createComposite(this, this.getResultArea());
+		this.chartComposite = this.getSWTChartsComponentsProvider().createComposite(this, this.getResultArea());
 		
 		GridData gd = new GridData(GridData.FILL_BOTH);
 		this.chartComposite.setLayoutData(gd);
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/IChartComponent.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/IChartComponent.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/IChartComponent.java	(revision 2720)
@@ -12,17 +12,18 @@
  *
  */
 public interface IChartComponent {
-
 	
 	
+	
 	/**
 	 * Zooms the view at x and y coordinates.
+	 * 
 	 * @param x
 	 * @param y
 	 * @param zoomIn
 	 */
 	public abstract void zoom(double x, double y, boolean zoomIn);
-
+	
 	/**
 	 * Resets the view.
 	 */
@@ -30,6 +31,7 @@
 	
 	/**
 	 * Pans the view.
+	 * 
 	 * @param srcX
 	 * @param srcY
 	 * @param dstX
@@ -40,31 +42,35 @@
 	
 	/**
 	 * Gets the linked editor.
+	 * 
 	 * @return
 	 */
 	public ChartEditor getChartEditor();
 	
 	/**
 	 * Sets the linked editor.
+	 * 
 	 * @param editor
 	 */
 	public void setChartEditor(ChartEditor editor);
 	
 	/**
 	 * Updates the mouse over item selection according to the specified mouse event.
+	 * 
 	 * @param event
 	 */
 	public void updateMouseOverItem(MouseEvent event);
 	
 	/**
 	 * Checks if the component has the focus.
+	 * 
 	 * @return
 	 */
 	public boolean hasFocus();
 	
-
+	
 	/**
-	 *  Constrains axes ticks to square aspect ratio.
+	 * Constrains axes ticks to square aspect ratio.
 	 */
 	public void squareOff();
 	
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/AdvancedChartEditorToolBar.java	(revision 2720)
@@ -14,6 +14,7 @@
 import org.txm.Toolbox;
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.ChartsEnginesManager;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
@@ -165,11 +166,10 @@
 			ArrayList<String> chartsEngineNames = new ArrayList<>();
 			ArrayList<ChartCreator> allChartCreators = new ArrayList<>();
 			
-			for (int i = 0; i < ChartsEngine.getChartsEngines().size(); i++) {
-				ArrayList<ChartCreator> chartCreators = ChartsEngine.getChartsEngines().get(i).getChartCreators(this.getEditorPart().getResult());
-				for (int j = 0; j < chartCreators.size(); j++) {
-					chartsEngineNames.add(ChartsEngine.getChartsEngines().get(i).getName());
-					allChartCreators.add(chartCreators.get(j));
+			for (ChartsEngine engine : ChartsEnginesManager.getChartsEngines()) {
+				for (ChartCreator creator : engine.getChartCreators(this.getEditorPart().getResult())) {
+					chartsEngineNames.add(engine.getName());
+					allChartCreators.add(creator);
 				}
 			}
 			
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/swt/ChartComposite.java	(revision 2720)
@@ -21,30 +21,32 @@
 import org.txm.utils.logger.Log;
 
 /**
- * Chart drawing area base SWT composite.
+ * Chart drawing area based on a SWT composite. this composite should be extended to implement specific draw component (Swing, etc.)
  * 
+ * This composite can only be used with a ChartEditor and a ChartResult
+ * 
  * @author sjacquot
  *
  */
 public abstract class ChartComposite extends Composite {
-
-
-
-	protected static final String CONTEXT_MENU_EMPTY_AREA_ID =  "ChartEditorContextMenuEmptyArea"; //$NON-NLS-1$
-	protected static final String CONTEXT_MENU_ITEM_AREA_ID =  "ChartEditorContextMenuItemArea"; //$NON-NLS-1$
 	
-
+	
+	
+	protected static final String CONTEXT_MENU_EMPTY_AREA_ID = "ChartEditorContextMenuEmptyArea"; //$NON-NLS-1$
+	
+	protected static final String CONTEXT_MENU_ITEM_AREA_ID = "ChartEditorContextMenuItemArea"; //$NON-NLS-1$
+	
 	/**
 	 * Custom tool tip.
 	 */
 	// FIXME: tests HTML tool tips
 	protected ___CustomHTMLToolTip toolTip;
-
+	
 	/**
 	 * The chart component.
 	 */
 	protected IChartComponent chartComponent;
-
+	
 	/**
 	 * Context menus.
 	 */
@@ -60,24 +62,24 @@
 	 */
 	public ChartComposite(ChartEditor<ChartResult> chartEditor, Composite parent, int style) {
 		super(parent, style);
-
+		
 		this.chartEditor = chartEditor;
 		
-		this.contextMenus = new ArrayList<Menu>();
+		this.contextMenus = new ArrayList<>();
 		this.contextMenus.add(null);
 		this.contextMenus.add(null);
 	}
-
 	
 	
+	
 	/**
 	 * Loads the chart from specified data object (can be a File, an UI component, etc.).
 	 * 
 	 * @param chart
 	 */
 	public abstract void loadChart(Object chart);
-
 	
+	
 	/**
 	 * Loads or reloads the chart from the chart object stored in the linked editor input.
 	 * This method is especially used for file based implementations of charts engine for reloading a file that has been externally modified.
@@ -87,38 +89,40 @@
 	
 	/**
 	 * Loads or reloads the chart from the chart object stored in the linked editor input.
+	 * 
 	 * @param resetView
 	 * @param clearChartItemsSelection
 	 * @param squareOff
 	 */
-	public void loadChart(boolean resetView, boolean clearChartItemsSelection, boolean squareOff)	{
+	public void loadChart(boolean resetView, boolean clearChartItemsSelection, boolean squareOff) {
 		this.loadChart();
-
-		if(squareOff)	{
+		
+		if (squareOff) {
 			this.squareOff();
 		}
 		
-		if(clearChartItemsSelection)	{
+		if (clearChartItemsSelection) {
 			this.clearChartItemsSelection();
 		}
-
-		if(resetView)	{
+		
+		if (resetView) {
 			this.resetView();
 		}
 	}
-
+	
 	/**
 	 * Loads or reloads the chart from the chart object stored in the linked editor input.
+	 * 
 	 * @param resetView
 	 * @param clearChartItemsSelection
 	 */
-	public void loadChart(boolean resetView, boolean clearChartItemsSelection)	{
+	public void loadChart(boolean resetView, boolean clearChartItemsSelection) {
 		this.loadChart(resetView, clearChartItemsSelection, false);
 	}
 	
 	/**
 	 * Creates a new chart component.
-	 *  
+	 * 
 	 * @param chartsEngine
 	 * @param chartEditorInput
 	 * @return
@@ -132,28 +136,28 @@
 	 * @param chartEditorInput
 	 * @return
 	 */
-	public void createChartComponent()	{
+	public void createChartComponent() {
 		
-	//	if (!this.chartEditor.getResult().isChartDirty()) {
-			
-			Log.finest(this.getClass().getSimpleName() + ": creating a chart component...");
-			
-			this.chartComponent = this._createChartComponent();
-			this.chartComponent.setChartEditor(this.chartEditor);
-			
-			// initialize the default shared context menus as Export, etc.
-			this.initDefaultContextMenus();
-			// initialize Listeners.
-			this.initEventsListeners();
-			// register user entries event call back extensions
-			this.registerEventCallBackExtensions();
-
-			
-		//	return true;
-//		}
-//		else	{
-//			return false;
-//		}
+		// if (!this.chartEditor.getResult().isChartDirty()) {
+		
+		Log.finest(this.getClass().getSimpleName() + ": creating a chart component...");
+		
+		this.chartComponent = this._createChartComponent();
+		this.chartComponent.setChartEditor(this.chartEditor);
+		
+		// initialize the default shared context menus as Export, etc.
+		this.initDefaultContextMenus();
+		// initialize Listeners.
+		this.initEventsListeners();
+		// register user entries event call back extensions
+		this.registerEventCallBackExtensions();
+		
+		
+		// return true;
+		// }
+		// else {
+		// return false;
+		// }
 	}
 	
 	/**
@@ -165,45 +169,46 @@
 	/**
 	 * Creates the pop up menu dedicated to empty area location click event that is populated from plugin.xml.
 	 */
-	public void initEmptyAreaContextMenu()	{
+	public void initEmptyAreaContextMenu() {
 		Menu menu = TXMEditor.initContextMenu(this, CONTEXT_MENU_EMPTY_AREA_ID);
-	    this.contextMenus.set(EventCallBack.AREA_EMPTY, menu);
+		this.contextMenus.set(EventCallBack.AREA_EMPTY, menu);
 	}
-
 	
+	
 	/**
 	 * Creates the pop up menu dedicated to chart item location click event.
 	 */
-	public void initItemAreaContextMenu()	{
+	public void initItemAreaContextMenu() {
 		Menu menu = TXMEditor.initContextMenu(this, CONTEXT_MENU_ITEM_AREA_ID);
 		
-		//Menu menu = new Menu(this);
-	    //MenuItem chartEntityLabelItem = new MenuItem(menu, SWT.NONE);
-	    //chartEntityLabelItem.setText(""); // this string is dedicated to be overridden by the current selected chart entity label/name 
-
-	    // FIXME : tests
-//	    MenuItem refreshItem = new MenuItem(menu, SWT.NONE);
-//	    refreshItem.setText("Refresh");
-//	    MenuItem deleteItem = new MenuItem(menu, SWT.NONE);
-//	    deleteItem.setText("Delete");
-//
-	    // sub-menu for selected items
-//	    Menu newMenu = new Menu(menu);
-//	    chartEntityLabelItem.setMenu(newMenu);
-
-//	    MenuItem shortcutItem = new MenuItem(newMenu, SWT.NONE);
-//	    shortcutItem.setText("Shortcut");
-//	    MenuItem iconItem = new MenuItem(newMenu, SWT.NONE);
-//	    iconItem.setText("Icon");
-	    
-	    this.contextMenus.set(EventCallBack.AREA_ITEM, menu);
+		// Menu menu = new Menu(this);
+		// MenuItem chartEntityLabelItem = new MenuItem(menu, SWT.NONE);
+		// chartEntityLabelItem.setText(""); // this string is dedicated to be overridden by the current selected chart entity label/name
+		
+		// FIXME : tests
+		// MenuItem refreshItem = new MenuItem(menu, SWT.NONE);
+		// refreshItem.setText("Refresh");
+		// MenuItem deleteItem = new MenuItem(menu, SWT.NONE);
+		// deleteItem.setText("Delete");
+		//
+		// sub-menu for selected items
+		// Menu newMenu = new Menu(menu);
+		// chartEntityLabelItem.setMenu(newMenu);
+		
+		// MenuItem shortcutItem = new MenuItem(newMenu, SWT.NONE);
+		// shortcutItem.setText("Shortcut");
+		// MenuItem iconItem = new MenuItem(newMenu, SWT.NONE);
+		// iconItem.setText("Icon");
+		
+		this.contextMenus.set(EventCallBack.AREA_ITEM, menu);
 	}
 	
 	/**
 	 * Defines the current context menu to display on menu event.
+	 * 
 	 * @param index
 	 */
-	public void setCurrentContextMenu(int index)	{
+	public void setCurrentContextMenu(int index) {
 		
 		// Debug
 		Log.finest("ChartComposite.setCurrentContextMenu(): setting menu to " + index + " / " + this.contextMenus.get(index)); //$NON-NLS-1$
@@ -211,25 +216,26 @@
 		this.setMenu(this.contextMenus.get(index));
 	}
 	
-
+	
 	/**
 	 * Gets the menu specified by its index.
+	 * 
 	 * @param index
 	 * @return
 	 */
-	public Menu getContextMenu(int index)	{
+	public Menu getContextMenu(int index) {
 		return this.contextMenus.get(index);
 	}
 	
-
+	
 	/**
 	 * Resets the chart view (zoom, pan, rotation).
 	 */
-	public void resetView()	{
-		if(this.chartComponent != null)	{
+	public void resetView() {
+		if (this.chartComponent != null) {
 			this.chartComponent.resetView();
-
-			if(this.chartComponent.getChartEditor().getResult().needsToSquareOff())	{
+			
+			if (this.chartComponent.getChartEditor().getResult().needsToSquareOff()) {
 				this.chartComponent.squareOff();
 			}
 		}
@@ -240,8 +246,8 @@
 	 * Copies the chart view as image in the clipboard from the specified chart component.
 	 */
 	public abstract void copyChartViewToClipboard();
-
 	
+	
 	/**
 	 * Exports the current view of the composite in the specified file.
 	 * 
@@ -266,41 +272,46 @@
 	
 	/**
 	 * Gets the chart object.
+	 * 
 	 * @return
 	 */
-	public Object getChart()	{
+	public Object getChart() {
 		return this.getChartResult().getChart();
 	};
-
 	
+	
 	/**
 	 * Gets the linked result.
+	 * 
 	 * @return
 	 */
-	public ChartResult getChartResult()	{
+	public ChartResult getChartResult() {
 		return this.chartEditor.getResult();
 	}
 	
 	/**
 	 * Gets the charts engine of the linked result.
+	 * 
 	 * @return
 	 */
-	public ChartsEngine getChartsEngine()	{
+	public ChartsEngine getChartsEngine() {
 		return this.getChartResult().getChartsEngine();
 	}
 	
 	/**
 	 * Zooms the chart view at x and y coordinates.
+	 * 
 	 * @param x
 	 * @param y
 	 * @param zoomIn
 	 */
-	public void zoom(double x, double y, boolean zoomIn)	{
+	public void zoom(double x, double y, boolean zoomIn) {
 		this.chartComponent.zoom(x, y, zoomIn);
 	}
-
+	
 	/**
 	 * Pans the chart view.
+	 * 
 	 * @param chartComponent
 	 * @param srcX
 	 * @param srcY
@@ -308,142 +319,147 @@
 	 * @param dstY
 	 * @param panFactor
 	 */
-	public void pan(double srcX, double srcY, double dstX, double dstY, double panFactor)	{
+	public void pan(double srcX, double srcY, double dstX, double dstY, double panFactor) {
 		this.chartComponent.pan(srcX, srcY, dstX, dstY, panFactor);
 	}
-
+	
 	/**
-	 *  Constrains axes ticks to square aspect ratio.
+	 * Constrains axes ticks to square aspect ratio.
 	 */
-	public void squareOff()	{
-		if(this.chartComponent != null)	{
+	public void squareOff() {
+		if (this.chartComponent != null) {
 			this.chartComponent.squareOff();
 		}
 	}
-
+	
 	/**
 	 * Checks if the composite AND the chart component have the focus.
+	 * 
 	 * @return
 	 */
-	public boolean hasFocus()	{
+	public boolean hasFocus() {
 		return this.chartComponent.hasFocus() && this.isFocusControl();
 	}
 	
 	/**
 	 * Gets the mouse call back handler registered for the chart component.
+	 * 
 	 * @return
 	 */
 	public abstract EventCallBackHandler getMouseCallBackHandler();
-
-
+	
+	
 	/**
 	 * Gets the key call back handler registered for the chart component.
+	 * 
 	 * @return
 	 */
 	public abstract EventCallBackHandler getKeyCallBackHandler();
-
-
+	
+	
 	/**
 	 * Gets the mouse call back handler registered for the specified component.
+	 * 
 	 * @param component
 	 * @return
 	 */
 	public EventCallBackHandler getMouseCallBackHandler(Component component) {
 		EventCallBackHandler handler = null;
 		EventListener[] listeners = component.getMouseListeners();
-
-		for(int i = 0; i < listeners.length; i++) {
-			if(listeners[i] instanceof EventCallBackHandler)	{
+		
+		for (int i = 0; i < listeners.length; i++) {
+			if (listeners[i] instanceof EventCallBackHandler) {
 				handler = (EventCallBackHandler) listeners[i];
 				break;
 			}
 		}
 		return handler;
 	}
-
-
+	
+	
 	/**
 	 * Gets the key call back handler registered for the specified component.
+	 * 
 	 * @param component
 	 * @return
 	 */
 	public EventCallBackHandler getKeyCallBackHandler(Component component) {
 		EventCallBackHandler handler = null;
 		EventListener[] listeners = component.getKeyListeners();
-
-		for(int i = 0; i < listeners.length; i++) {
-			if(listeners[i] instanceof EventCallBackHandler)	{
+		
+		for (int i = 0; i < listeners.length; i++) {
+			if (listeners[i] instanceof EventCallBackHandler) {
 				handler = (EventCallBackHandler) listeners[i];
 				break;
 			}
 		}
 		return handler;
 	}
-
+	
 	/**
 	 * Gets the event call back handler of the specified class.
+	 * 
 	 * @param listenerType
 	 * @return
 	 */
-	public EventCallBackHandler getCallBackHandler(Class listenerType)	{
+	public EventCallBackHandler getCallBackHandler(Class listenerType) {
 		EventCallBackHandler handler = null;
 		EventListener[] listeners = ((Component) this.chartComponent).getListeners(listenerType);
-
-		for(int i = 0; i < listeners.length; i++) {
-			if(listeners[i] instanceof EventCallBackHandler)	{
+		
+		for (int i = 0; i < listeners.length; i++) {
+			if (listeners[i] instanceof EventCallBackHandler) {
 				handler = (EventCallBackHandler) listeners[i];
 				break;
 			}
 		}
 		return handler;
 	}
-
+	
 	/**
 	 * Initializes the default context menus.
+	 * 
 	 * @param composite
 	 */
-	public void initDefaultContextMenus()	{
+	public void initDefaultContextMenus() {
 		this.initItemAreaContextMenu();
 		this.initEmptyAreaContextMenu();
 		this.setCurrentContextMenu(EventCallBack.AREA_EMPTY);
 	}
-
 	
+	
 	/**
 	 * Registers user entries event call back extensions.
 	 */
-	public void registerEventCallBackExtensions()	{
+	public void registerEventCallBackExtensions() {
 		
 		ChartResult result = this.chartEditor.getResult();
 		
 		String extensionPointId = "org.txm.chartsengine.eventcallback"; //$NON-NLS-1$
 		IConfigurationElement[] contributions = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId);
 		
-		for(int i = 0; i < contributions.length; i++) {
-			if(
-				(
-						contributions[i].getAttribute("chartsEngineName") == null || //$NON-NLS-1$ // for callback that can be used for all charts engine implementations 
-						contributions[i].getAttribute("chartsEngineName").equals(result.getChartsEngine().getName()) //$NON-NLS-1$
-				)
-				&&
-				contributions[i].getAttribute("resultDataClass") != null //$NON-NLS-1$
-				&& contributions[i].getAttribute("resultDataClass").equals(result.getClass().getName()) //$NON-NLS-1$
-				
-				&& ((contributions[i].getAttribute("chartType") == null && result.getChartType().equals(ChartsEnginePreferences.DEFAULT_CHART_TYPE) //$NON-NLS-1$
-					||
-					contributions[i].getAttribute("chartType") != null && !result.getChartType().equals(ChartsEnginePreferences.DEFAULT_CHART_TYPE) && contributions[i].getAttribute("chartType").equals(result.getChartType()) //$NON-NLS-1$ //$NON-NLS-2$
-					)  //$NON-NLS-1$
-				)
-				
-			)	{
+		for (int i = 0; i < contributions.length; i++) {
+			if ((contributions[i].getAttribute("chartsEngineName") == null || //$NON-NLS-1$ // for callback that can be used for all charts engine implementations
+					contributions[i].getAttribute("chartsEngineName").equals(result.getChartsEngine().getName()) //$NON-NLS-1$
+			)
+					&&
+					contributions[i].getAttribute("resultDataClass") != null //$NON-NLS-1$
+					&& contributions[i].getAttribute("resultDataClass").equals(result.getClass().getName()) //$NON-NLS-1$
+					
+					&& ((contributions[i].getAttribute("chartType") == null && result.getChartType().equals(ChartsEnginePreferences.DEFAULT_CHART_TYPE) //$NON-NLS-1$
+							||
+							contributions[i].getAttribute("chartType") != null && !result.getChartType().equals(ChartsEnginePreferences.DEFAULT_CHART_TYPE) && contributions[i].getAttribute( //$NON-NLS-1$
+									"chartType").equals(result.getChartType())  //$NON-NLS-1$
+					))
+					
+			) {
 				try {
-					EventCallBack eventCallBack = (EventCallBack)contributions[i].createExecutableExtension("class");  //$NON-NLS-1$
+					EventCallBack eventCallBack = (EventCallBack) contributions[i].createExecutableExtension("class");  //$NON-NLS-1$
 					
 					eventCallBack.setChartEditor(this.chartEditor);
 					
 					EventCallBackHandler mouseHandler = this.getMouseCallBackHandler();
-					if(mouseHandler != null && mouseHandler.getEventCallBack(eventCallBack.getClass()) == null)	 {
-
+					if (mouseHandler != null && mouseHandler.getEventCallBack(eventCallBack.getClass()) == null) {
+						
 						Log.fine("ChartEditor.registerEventCallBackExtensions(): call back of type " + eventCallBack.getClass()  //$NON-NLS-1$
 								+ " registered in mouse handler (chart editor = " + this.chartEditor.getClass()  //$NON-NLS-1$
 								+ ", result data class = " + result.getClass()  //$NON-NLS-1$
@@ -453,7 +469,7 @@
 						mouseHandler.registerEventCallBack(eventCallBack);
 					}
 					EventCallBackHandler keyboardHandler = this.getKeyCallBackHandler();
-					if(keyboardHandler != null && keyboardHandler.getEventCallBack(eventCallBack.getClass()) == null)	 {
+					if (keyboardHandler != null && keyboardHandler.getEventCallBack(eventCallBack.getClass()) == null) {
 						
 						Log.fine("ChartEditor.registerEventCallBackExtensions(): call back of type " + eventCallBack.getClass()  //$NON-NLS-1$
 								+ " registered in key handler (chart editor = " + this.chartEditor.getClass()  //$NON-NLS-1$
@@ -464,7 +480,7 @@
 						keyboardHandler.registerEventCallBack(eventCallBack);
 					}
 				}
-				catch(CoreException e) {
+				catch (CoreException e) {
 					e.printStackTrace();
 				}
 				break;
@@ -475,6 +491,7 @@
 	
 	/**
 	 * Gets the chart component dedicated to rendering the chart.
+	 * 
 	 * @return the chartComponent
 	 */
 	public IChartComponent getChartComponent() {
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/handlers/ExportChart.java	(revision 2720)
@@ -64,60 +64,62 @@
  */
 // FIXME: SJ: this class should not used the SWTChartsComponentsProvider but directly the current charts engine
 public class ExportChart extends BaseAbstractHandler {
-
+	
 	private static final String ID = "ExportChart"; //$NON-NLS-1$
-
-
+	
+	
 	@Override
 	public Object execute(ExecutionEvent event) throws ExecutionException {
-
+		
 		Object selection = this.getCorporaViewSelectedObject(event);
-
-		if(!(selection instanceof ChartResult))	{
+		
+		if (!(selection instanceof ChartResult)) {
 			return null;
 		}
 		
 		final ChartResult chartResult = (ChartResult) selection;
 		
 		Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-
+		
 		final FileDialog dialog = new FileDialog(shell, SWT.SAVE);
-
+		
 		// Create the extensions from the current charts engine supported file formats
 		String extensions[] = new String[SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().size()];
 		int defaultChartFormatIndex = 0;
 		for (int i = 0; i < SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().size(); i++) {
 			extensions[i] = "*." + SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().get(i); //$NON-NLS-1$
-
+			
 			// Store the default chart export file format index
-			if(ChartsEnginePreferences.getInstance().getString(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT).equals(SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().get(i)))	{
+			if (ChartsEnginePreferences.getInstance().getString(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT).equals(SWTChartsComponentsProvider.getCurrent()
+					.getChartsEngineSupportedExportFileFormats().get(i))) {
 				defaultChartFormatIndex = i;
 			}
 		}
-
+		
 		dialog.setFilterExtensions(extensions);
 		// Select default chart export file format
 		dialog.setFilterIndex(defaultChartFormatIndex);
-
+		
 		dialog.setOverwrite(true);
-
+		
 		if (LastOpened.getFile(ID) != null) {
 			dialog.setFilterPath(LastOpened.getFolder(ID));
 		}
-
+		
 		dialog.setFileName(chartResult.getValidFileName());
 		
 		if (dialog.open() != null) {
 			StatusLine.setMessage("Exporting chart...");
-
+			
 			String filepath = dialog.getFilterPath() + "/" + dialog.getFileName(); //$NON-NLS-1$
 			final File file = new File(filepath);
-
+			
 			LastOpened.set(ID, file.getParent(), file.getName());
-
+			
 			try {
 				file.createNewFile();
-			} catch (IOException e1) {
+			}
+			catch (IOException e1) {
 				Log.severe(NLS.bind(TXMUIMessages.exportColonCantCreateFileP0ColonP1, file, e1));
 			}
 			if (!file.canWrite()) {
@@ -126,53 +128,59 @@
 			if (!file.isFile()) {
 				Log.severe("Error: " + file + " is not a file"); //$NON-NLS-1$ //$NON-NLS-2$
 			}
-
+			
 			JobHandler jobhandler = new JobHandler(TXMUIMessages.exportingResults) {
+				
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
 					try {
 						this.runInit(monitor);
 						monitor.beginTask(TXMUIMessages.exporting, 100);
-
+						
 						// compute the result if needed
-						if (!chartResult.hasBeenComputedOnce())	{
+						if (!chartResult.hasBeenComputedOnce()) {
 							chartResult.compute(monitor);
 						}
 						
 						String outputFormat = SWTChartsComponentsProvider.getCurrent().getChartsEngineSupportedExportFileFormats().get(dialog.getFilterIndex());
-						ChartsEngine.getCurrent().createChartFile(chartResult, file, outputFormat);
-
+						ChartsEngine.getCurrent().exportChart(chartResult, file, 1024, 576, outputFormat);
+						
 						if (file.exists()) {
-
+							
 							Log.info(NLS.bind(TXMUIMessages.p1ExportSavedInFileColonP0, file.getAbsolutePath(), outputFormat.toUpperCase()));
-
+							
 							// Open internal editor in the UI thread
-							if (TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPORT_SHOW))	{
+							if (TBXPreferences.getInstance().getBoolean(TBXPreferences.EXPORT_SHOW)) {
 								this.syncExec(new Runnable() {
+									
 									@Override
 									public void run() {
 										OpenGraph.OpenFile(file.getAbsolutePath());
 									}
 								});
 							}
-						} else {
+						}
+						else {
 							System.out.println(NLS.bind(TXMUIMessages.failedToExportInFileP0WithFormatP1, file.getAbsolutePath(), outputFormat));
 						}
-					} catch (ThreadDeath td) {
+					}
+					catch (ThreadDeath td) {
 						return Status.CANCEL_STATUS;
-					} catch (Exception e) {
+					}
+					catch (Exception e) {
 						org.txm.utils.logger.Log.printStackTrace(e);
 						return Status.CANCEL_STATUS;
-					} finally {
+					}
+					finally {
 						monitor.done();
 						JobsTimer.stopAndPrint();
 					}
 					return Status.OK_STATUS;
 				}
 			};
-
+			
 			jobhandler.startJob();
 		}
 		return null;
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java
===================================================================
--- tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java	(revision 2719)
+++ tmp/org.txm.chartsengine.rcp/src/org/txm/chartsengine/rcp/preferences/ChartsEnginePreferencePage.java	(revision 2720)
@@ -28,23 +28,23 @@
  *
  */
 public class ChartsEnginePreferencePage extends TXMPreferencePage {
-
+	
 	/**
 	 * The charts engine selection combo box.
 	 */
 	private ComboFieldEditor chartsEngineSelectionComboField;
-
+	
 	/**
 	 * The charts engine export formats selection combo box.
 	 */
 	private ComboFieldEditor chartsEngineExportFormatsComboField;
-
+	
 	protected boolean charsEngineHasChanged = false;
 	
-
+	
 	@Override
 	protected void createFieldEditors() {
-
+		
 		// Charts engine selection
 		String chartsEngines[][] = new String[ChartsEnginesManager.getInstance().size()][2];
 		
@@ -60,49 +60,49 @@
 		
 		
 		// FIXME: SJ: test to select the chart engine order rather than a exclusive one since the engines are not exclusive anymore, eg. some to create charts and other to create graphs
-//		ListEditor listEditor = new ListEditor(ChartsEnginePreferences.CHARTS_ENGINES_ORDER, "Ordre de préférence des moteurs", this.getFieldEditorParent()) {
-//			
-//			@Override
-//			protected String[] parseString(String enginesOrder) {
-//				return ChartsEnginePreferences.getEnginesOrder(enginesOrder);
-//			}
-//			
-//			@Override
-//			protected String getNewInputObject() {
-////				InputDialog dialog = new InputDialog(getShell(), "New Buildconfiguration", "Enter the name of the Buildconfiguration to add", "", null);
-////				if (dialog.open() == InputDialog.OK) {
-////					return dialog.getValue();
-////				}
-//				return null;
-//			}
-//			
-//			@Override
-//			protected String createList(String[] engineNames) {
-//				return ChartsEnginePreferences.createEnginesOrder(engineNames);
-//			}
-//		};
-//	
-//		// default initialization
-//		if(!TXMPreferences.keyExists("/" + InstanceScope.SCOPE +"/" + ChartsEnginePreferences.getInstance().getPreferencesNodeQualifier(), ChartsEnginePreferences.CHARTS_ENGINES_ORDER))	{
-//			ChartsEnginePreferences.getInstance().put(ChartsEnginePreferences.CHARTS_ENGINES_ORDER, ChartsEnginesManager.getInstance().createEnginesOrder());
-//		}
-//		
-//		listEditor.setPreferenceName(ChartsEnginePreferences.CHARTS_ENGINES_ORDER);
-//		listEditor.load();
-//		
-//		// hide the "New" and "Remove" buttons
-//		listEditor.getButtonBoxControl(this.getFieldEditorParent()).getChildren()[0].setVisible(false);;
-//		listEditor.getButtonBoxControl(this.getFieldEditorParent()).getChildren()[1].setVisible(false);
-//
-//	    this.addField(listEditor);
+		// ListEditor listEditor = new ListEditor(ChartsEnginePreferences.CHARTS_ENGINES_ORDER, "Ordre de préférence des moteurs", this.getFieldEditorParent()) {
+		//
+		// @Override
+		// protected String[] parseString(String enginesOrder) {
+		// return ChartsEnginePreferences.getEnginesOrder(enginesOrder);
+		// }
+		//
+		// @Override
+		// protected String getNewInputObject() {
+		//// InputDialog dialog = new InputDialog(getShell(), "New Buildconfiguration", "Enter the name of the Buildconfiguration to add", "", null);
+		//// if (dialog.open() == InputDialog.OK) {
+		//// return dialog.getValue();
+		//// }
+		// return null;
+		// }
+		//
+		// @Override
+		// protected String createList(String[] engineNames) {
+		// return ChartsEnginePreferences.createEnginesOrder(engineNames);
+		// }
+		// };
+		//
+		// // default initialization
+		// if(!TXMPreferences.keyExists("/" + InstanceScope.SCOPE +"/" + ChartsEnginePreferences.getInstance().getPreferencesNodeQualifier(), ChartsEnginePreferences.CHARTS_ENGINES_ORDER)) {
+		// ChartsEnginePreferences.getInstance().put(ChartsEnginePreferences.CHARTS_ENGINES_ORDER, ChartsEnginesManager.getInstance().createEnginesOrder());
+		// }
+		//
+		// listEditor.setPreferenceName(ChartsEnginePreferences.CHARTS_ENGINES_ORDER);
+		// listEditor.load();
+		//
+		// // hide the "New" and "Remove" buttons
+		// listEditor.getButtonBoxControl(this.getFieldEditorParent()).getChildren()[0].setVisible(false);;
+		// listEditor.getButtonBoxControl(this.getFieldEditorParent()).getChildren()[1].setVisible(false);
+		//
+		// this.addField(listEditor);
 		
-	    
-	    
-	    
+		
+		
+		
 		// current engine supported export formats
-	    this.createExportFormatComboField(ChartsEnginesManager.getInstance().getCurrentEngine());
-
-
+		this.createExportFormatComboField(ChartsEnginesManager.getInstance().getCurrentEngine());
+		
+		
 		// other shared preferences
 		SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, this.getFieldEditorParent());
 		
@@ -112,9 +112,9 @@
 		FontFieldEditor font = new FontFieldEditor(ChartsEnginePreferences.FONT, "Font", "Specificities / Spécificités / Специфичность", this.getFieldEditorParent()); //$NON-NLS-1$ //$NON-NLS-2$
 		this.addField(font);
 		// FIXME: preview area tests
-		//font.fillIntoGrid(this.getFieldEditorParent(), 4);
-		//((Text)font.getPreviewControl()).setLayoutData(new GridData(GridData.FILL_BOTH));
-		//System.out.println("ChartsEnginePreferencePage.createFieldEditors() " + font.getPreviewControl());
+		// font.fillIntoGrid(this.getFieldEditorParent(), 4);
+		// ((Text)font.getPreviewControl()).setLayoutData(new GridData(GridData.FILL_BOTH));
+		// System.out.println("ChartsEnginePreferencePage.createFieldEditors() " + font.getPreviewControl());
 		
 		
 	}
@@ -124,8 +124,9 @@
 	 * 
 	 * @param engine
 	 */
-	protected void createExportFormatComboField(ChartsEngine engine)	{
-		this.chartsEngineExportFormatsComboField = new ComboFieldEditor(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, ChartsUIMessages.defaultExportFormat, ChartsEnginesManager.getExportFormatsEntryNamesAndValues(engine), this.getFieldEditorParent());
+	protected void createExportFormatComboField(ChartsEngine engine) {
+		this.chartsEngineExportFormatsComboField = new ComboFieldEditor(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, ChartsUIMessages.defaultExportFormat, ChartsEnginesManager
+				.getExportFormatsEntryNamesAndValues(engine), this.getFieldEditorParent());
 		this.addField(this.chartsEngineExportFormatsComboField);
 	}
 	
@@ -133,49 +134,49 @@
 	@Override
 	public void propertyChange(PropertyChangeEvent event) {
 		super.propertyChange(event);
-
+		
 		// FIXME: SJ: test to try to update the Export formats combo box when changing of current charts engine
 		// NOTE: SJ: warning, event.getProperty() seems bugged and does not return the correct property name but the string "field_value_editor"
-		if(event.getSource() == this.chartsEngineSelectionComboField && !event.getNewValue().equals(event.getOldValue()))	{
+		if (event.getSource() == this.chartsEngineSelectionComboField && !event.getNewValue().equals(event.getOldValue())) {
 			this.charsEngineHasChanged = true;
-//			this.chartsEngineExportFormatsComboField.dispose();
-//			this.createExportFormatComboField(ChartsEnginesManager.getInstance().getEngine((String) event.getNewValue()));
-//			this.adjustGridLayout();
-//			this.getFieldEditorParent().layout();
+			// this.chartsEngineExportFormatsComboField.dispose();
+			// this.createExportFormatComboField(ChartsEnginesManager.getInstance().getEngine((String) event.getNewValue()));
+			// this.adjustGridLayout();
+			// this.getFieldEditorParent().layout();
 		}
 		
 	}
 	
-
 	
+	
 	@Override
 	public void init(IWorkbench workbench) {
 		this.setPreferenceStore(new TXMPreferenceStore(ChartsEnginePreferences.getInstance().getPreferencesNodeQualifier()));
 		this.setDescription(ChartsUIMessages.thesePreferencesWillApplyToNewChartsPreviouslyCreatedChartsWillNotBeAffected);
 	}
-
+	
 	@Override
 	public boolean performOk() {
-			
+		
 		super.performOk();
-
 		
+		
 		// Set the new monochrome color for all charts engine theme
-		for(int i = 0; i < ChartsEngine.getChartsEngines().size(); i++) {
-			ChartsEngine.getChartsEngines().get(i).getTheme().setMonochromeColor(ChartsEnginePreferences.getInstance().getString(ChartsEnginePreferences.MONOCHROME_COLOR));
+		for (ChartsEngine engine : ChartsEnginesManager.getChartsEngines()) {
+			engine.getTheme().setMonochromeColor(ChartsEnginePreferences.getInstance().getString(ChartsEnginePreferences.MONOCHROME_COLOR));
 		}
 		
 		Log.info(ChartsUIMessages.recreatingChartsEngineAndSWTChartComponentsProvider);
-
+		
 		ChartsEnginesManager.getInstance().setCurrentEngine(this.getPreferenceStore().getString(ChartsEnginePreferences.CURRENT_NAME));
 		
 		// Sets the new current charts SWT component provider according to the new current charts engine
 		SWTChartsComponentsProvider.setCurrrentComponentsProvider(ChartsEnginesManager.getInstance().getCurrentEngine());
 		
 		// Reset the default export format to the new current charts engine first supported export file format
-		//ChartsEnginePreferences.getInstance().put(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
-			
-
+		// ChartsEnginePreferences.getInstance().put(ChartsEnginePreferences.DEFAULT_EXPORT_FORMAT, ChartsEngine.getCurrent().getSupportedOutputFileFormats().get(0));
+		
+		
 		return true;
 	}
-}
\ No newline at end of file
+}
Index: tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java	(revision 2719)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartCreator.java	(revision 2720)
@@ -12,35 +12,43 @@
 
 /**
  * R base chart creator.
+ * 
+ * Currently the R chart creator can't update a chart. It is always recreated in the updateChart method
+ * 
+ * An empty file is created in the createChart method
+ * 
  * @author sjacquot
  *
  */
-public abstract class RChartCreator extends ChartCreator {
-
+public abstract class RChartCreator<R extends ChartResult> extends ChartCreator<RChartsEngine, R> {
 	
-	
+	/**
+	 * creates an empty file. the chart will be written after in the updateChart method
+	 */
 	@Override
-	public Object createChart(ChartResult result) {
-		//return this.createChartFile(result);
-		// FIXME: SJ: tests. No need to return the chart now? it will be done in updateChart()
-		return null;
+	public Object createChart(R result) {
+		return this.getChartsEngine().createTmpFile(this.getFileNamePrefix()); 
 	}
-
 	
-	@Override
-	public void updateChart(ChartResult result) {
+	/**
+	 * Effectively writes the R chart in the given file
+	 * 
+	 * @param result
+	 * @param file the file to write. not null
+	 * @return
+	 */
+	public abstract File createChart(R result, File file);
 	
+	@Override
+	public void updateChart(R result) {
+		
 		Object chart = result.getChart();
-
-		// creates a new chart but using the same file
-		// FIXME: SJ to MD: this case should never happen, if it happens then a bug must fixed at another location
-		// TODO: find the bug then just keep: this.createChartFile(result, (File)chart);
-		if (chart instanceof File) {
-			this.createChartFile(result, (File)chart);
+		
+		if (chart instanceof File) { // The RChartCreators can't update a chart -> the chart is always recreated
+			createChart(result, (File) chart);
 		}
-		// creates a new chart using a new file
 		else {
-			result.setChart(this.createChartFile(result));
+			Log.warning("Error: R chart was null in: " + result);
 		}
 	}
 	
@@ -49,21 +57,9 @@
 		Log.severe(this.getClass() + ".getSeriesShapesColors(): Not yet implemented."); //$NON-NLS-1$
 		return null;
 	}
-
-
 	
 	@Override
-	public Class getChartsEngineClass() {
+	public Class<RChartsEngine> getChartsEngineClass() {
 		return RChartsEngine.class;
 	}
-	
-	/**
-	 * Convenience method.
-	 * @return the casted charts engine.
-	 */
-	protected RChartsEngine getChartsEngine() {
-		return (RChartsEngine) this.chartsEngine;
-	}
-
-	
 }
Index: tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java	(revision 2719)
+++ tmp/org.txm.chartsengine.r.core/src/org/txm/chartsengine/r/core/RChartsEngine.java	(revision 2720)
@@ -1,18 +1,19 @@
 package org.txm.chartsengine.r.core;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.rosuda.REngine.REXPMismatchException;
+import org.eclipse.osgi.util.NLS;
 import org.txm.chartsengine.core.ChartsEngine;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.preferences.RChartsEnginePreferences;
 import org.txm.stat.engine.r.RDevice;
 import org.txm.stat.engine.r.RWorkspaceRenderer;
-import org.txm.statsengine.core.StatException;
 import org.txm.statsengine.r.core.RWorkspace;
 import org.txm.statsengine.r.core.exceptions.RWorkspaceException;
+import org.txm.utils.io.FileCopy;
 import org.txm.utils.logger.Log;
 
 
@@ -70,14 +71,43 @@
 	
 	
 	@Override
-	public File createChartFile(Object chart, File file) {
-		return this.plot(file, (String) chart);
+	public File exportChart(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormat) {
+		Object chart = result.getChart();
+		if (chart == null) {
+			Log.warning("Error: null chart");
+			return null;
+		}
+		if (!(chart instanceof File)) {
+			Log.warning("Error: RChartEngine only manage File charts: " + chart);
+			return null;
+		}
+		
+		if (this.getOutputFormat().equals(outputFormat)) {//
+			if (file == null || file.equals(chart)) {
+				return (File) chart; // no need to redraw the chart
+			}
+			else {
+				try {
+					FileCopy.copy((File) chart, file);
+					return file;
+				}
+				catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+		}
+		else {
+			Log.warning(NLS.bind("Error: RChartEngine export format ({0}) cannot differ from the current display format ({1})", outputFormat, this.getOutputFormat()));
+		}
+		return null;
 	}
 	
-	
 	/**
 	 * Plots the specified expression using R workspace instance and current charts engine output format.
 	 * 
+	 * the plot code is wrapped with R output format
+	 * 
 	 * @param file
 	 * @param cmd
 	 */
@@ -147,7 +177,7 @@
 	 * @param title
 	 * @return
 	 */
-	public File plot(File file, String cmd, ChartResult result, String title) {
+	protected File plot(File file, String cmd, ChartResult result, String title) {
 		return this.plot(file, cmd, result, title, null);
 	}
 	
Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCTextsBalanceSpiderChartCreator.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCTextsBalanceSpiderChartCreator.java	(revision 2719)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCTextsBalanceSpiderChartCreator.java	(revision 2720)
@@ -14,41 +14,42 @@
 import org.txm.textsbalance.core.functions.TextsBalance;
 
 public class JFCTextsBalanceSpiderChartCreator extends JFCChartCreator {
-
-
+	
+	
 	@Override
 	public JFreeChart createChart(ChartResult result) {
-
+		
 		TextsBalance textsBalance = (TextsBalance) result;
 		JFreeChart chart = null;
-
+		
 		// Creates an empty dataset
 		HashMap<Integer, Comparable[]> data = textsBalance.getDataset();
 		DefaultCategoryDataset dataset = new DefaultCategoryDataset();
 		
 		SpiderWebPlot plot = new SpiderWebPlot(dataset);
 		plot.setToolTipGenerator(new CategoryToolTipGenerator() {
+			
 			@Override
 			public String generateToolTip(CategoryDataset dataset, int row, int col) {
 				// FIXME: tests
-//				System.out.println("JFCBalanceSpiderChartCreator.createChart(...).new CategoryToolTipGenerator() {...}.generateToolTip() row = " + row + " col = " + col);
-//				System.out.println("JFCBalanceSpiderChartCreator.createChart(...).new CategoryToolTipGenerator() {...}.generateToolTip() " + dataset.getValue(row, col));
+				// System.out.println("JFCBalanceSpiderChartCreator.createChart(...).new CategoryToolTipGenerator() {...}.generateToolTip() row = " + row + " col = " + col);
+				// System.out.println("JFCBalanceSpiderChartCreator.createChart(...).new CategoryToolTipGenerator() {...}.generateToolTip() " + dataset.getValue(row, col));
 				
-//				if(balance.getValues().size() > col)	{
-//					 balance.getValues().get(col);
-//				}
-//				return "error";
+				// if(balance.getValues().size() > col) {
+				// balance.getValues().get(col);
+				// }
+				// return "error";
 				return String.valueOf(dataset.getValue(row, col).intValue());
 			}
 		});
-
-
+		
+		
 		chart = new JFreeChart(plot);
 		
 		return chart;
 	}
-
-
+	
+	
 	@Override
 	public void updateChart(ChartResult result) {
 		
@@ -58,10 +59,10 @@
 		
 		// freeze rendering while computing
 		chart.setNotify(false);
-
+		
 		// updating data set
 		HashMap<Integer, Comparable[]> data = textsBalance.getDataset();
-		DefaultCategoryDataset dataset = (DefaultCategoryDataset) ((SpiderWebPlot)chart.getPlot()).getDataset();
+		DefaultCategoryDataset dataset = (DefaultCategoryDataset) ((SpiderWebPlot) chart.getPlot()).getDataset();
 		dataset.clear();
 		
 		Set<Integer> keys = data.keySet();
@@ -73,7 +74,8 @@
 			dataset.addValue(key, value[0], value[1]);
 		}
 		
-		chart.setTitle("metadata = " + textsBalance.getStructuralUnitProperty() + ", N = " +  textsBalance.getValues().size() + ", fmin = " + textsBalance.getFMin() + ", fmax = " + textsBalance.getFMax() + ", group by texts = " + textsBalance.groupingByTexts());
+		chart.setTitle("metadata = " + textsBalance.getStructuralUnitProperty() + ", N = " + textsBalance.getValues().size() + ", fmin = " + textsBalance.getFMin() + ", fmax = " + textsBalance
+				.getFMax() + ", group by texts = " + textsBalance.groupingByTexts());
 		
 		super.updateChart(result);
 	}
@@ -82,11 +84,11 @@
 	public Class getResultDataClass() {
 		return TextsBalance.class;
 	}
-
-
-
-
-
 	
-
+	
+	
+	
+	
+	
+	
 }
Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java	(revision 2719)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java	(revision 2720)
@@ -2,9 +2,7 @@
 
 import java.io.File;
 
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
-import org.txm.chartsengine.r.core.RChartsEngine;
 import org.txm.textsbalance.core.functions.TextsBalance;
 
 /**
@@ -12,78 +10,66 @@
  * @author sjacquot
  *
  */
-public class RBalanceSpiderChartCreator extends RChartCreator {
-
-
+public class RBalanceSpiderChartCreator extends RChartCreator<TextsBalance> {
+	
+	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
+	public File createChart(TextsBalance result, File file) {
 		
-//		try {
-	
-			
-//			RWorkspace rw = RWorkspace.getRWorkspaceInstance();
-//	System.out.println("load wordcloud...");
-//			rw.eval("library(wordcloud)"); //$NON-NLS-1$
-			//System.out.println("tmpfreqs...");
-//			rw.addVectorToWorkspace("tmpfreqs", wordCloud.getFreqs()); //$NON-NLS-1$
-			//System.out.println("tmplabels...");
-//			rw.addVectorToWorkspace("tmplabels", wordCloud.getLabels()); //$NON-NLS-1$
-			
-			//wordcloud(words,freq,
-			// scale : A vector of length 2 indicating the range of the size of the words.
-			// min.freq:  words with frequency below min.freq will not be plotted
-			// max.words : Maximum number of words to be plotted. least frequent terms dropped
-			// random.order : plot words in random order. If false, they will be plotted in decreasing frequency
-			// random.color : choose colors randomly from the colors. If false, the color is chosen based on the frequency
-			// rot.per : proportion words with 90 degree rotation
-			// colors : color words from least to most frequent
-			// ordered.colors : if true, then colors are assigned to words in order
-			//System.out.println("wordcloud...");
-			
-			// FIXME : stars plot tests
-			//String cmd = "stars(mtcars[, 1:7], key.loc = c(14, 2), main = \"Motor Trend Cars : stars(*, full = F)\", full = FALSE)"; //$NON-NLS-1$
-			String cmd = "stars(USJudgeRatings, locations = c(0, 0), scale = FALSE, radius  =  FALSE, col.stars = 1:10, key.loc = c(0, 0), main = \"US Judges rated\")";
-			//String cmd = "stars(cbind(1:16, 10*(16:1)), draw.segments = TRUE, main = \"A Joke -- do *not* use symbols on 2D data!\")";
-			
-			
-
-			//rw.plot(file, cmd, ((RChartsEngine) this.chartsEngine).getRDevice());
-			
-			((RChartsEngine) this.chartsEngine).plot(file, cmd);
-			
-				//System.out.println("cleaning");
-//				rw.eval("rm(tmplabels)"); //$NON-NLS-1$
-//				rw.eval("rm(tmpfreqs)"); //$NON-NLS-1$
-//		}
-//		catch(RWorkspaceException e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
-//		catch(REXPMismatchException e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
-//		catch(StatException e) {
-//			// TODO Auto-generated catch block
-//			e.printStackTrace();
-//		}
+		// try {
 		
+		
+		// RWorkspace rw = RWorkspace.getRWorkspaceInstance();
+		// System.out.println("load wordcloud...");
+		// rw.eval("library(wordcloud)"); //$NON-NLS-1$
+		// System.out.println("tmpfreqs...");
+		// rw.addVectorToWorkspace("tmpfreqs", wordCloud.getFreqs()); //$NON-NLS-1$
+		// System.out.println("tmplabels...");
+		// rw.addVectorToWorkspace("tmplabels", wordCloud.getLabels()); //$NON-NLS-1$
+		
+		// wordcloud(words,freq,
+		// scale : A vector of length 2 indicating the range of the size of the words.
+		// min.freq: words with frequency below min.freq will not be plotted
+		// max.words : Maximum number of words to be plotted. least frequent terms dropped
+		// random.order : plot words in random order. If false, they will be plotted in decreasing frequency
+		// random.color : choose colors randomly from the colors. If false, the color is chosen based on the frequency
+		// rot.per : proportion words with 90 degree rotation
+		// colors : color words from least to most frequent
+		// ordered.colors : if true, then colors are assigned to words in order
+		// System.out.println("wordcloud...");
+		
+		// FIXME : stars plot tests
+		// String cmd = "stars(mtcars[, 1:7], key.loc = c(14, 2), main = \"Motor Trend Cars : stars(*, full = F)\", full = FALSE)"; //$NON-NLS-1$
+		String cmd = "stars(USJudgeRatings, locations = c(0, 0), scale = FALSE, radius  =  FALSE, col.stars = 1:10, key.loc = c(0, 0), main = \"US Judges rated\")";
+		// String cmd = "stars(cbind(1:16, 10*(16:1)), draw.segments = TRUE, main = \"A Joke -- do *not* use symbols on 2D data!\")";
+		
+		
+		
+		// rw.plot(file, cmd, ((RChartsEngine) this.chartsEngine).getRDevice());
+		this.chartsEngine.plot(file, cmd);
+		
+		// System.out.println("cleaning");
+		// rw.eval("rm(tmplabels)"); //$NON-NLS-1$
+		// rw.eval("rm(tmpfreqs)"); //$NON-NLS-1$
+		// }
+		// catch(RWorkspaceException e) {
+		// // TODO Auto-generated catch block
+		// e.printStackTrace();
+		// }
+		// catch(REXPMismatchException e) {
+		// // TODO Auto-generated catch block
+		// e.printStackTrace();
+		// }
+		// catch(StatException e) {
+		// // TODO Auto-generated catch block
+		// e.printStackTrace();
+		// }
+		
 		return file;
 	}
-
 	
-
-	// FIXME: to not load the chart creator, to remove when implemented
 	@Override
-	public Class getChartsEngineClass() {
-		return null;
-	}
-	
-	@Override
-	public Class getResultDataClass() {
+	public Class<TextsBalance> getResultDataClass() {
 		return TextsBalance.class;
 	}
-
-
-
 }
Index: tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java
===================================================================
--- tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java	(revision 2719)
+++ tmp/org.txm.ahc.core/src/org/txm/ahc/core/chartsengine/r/RAHCChartCreator.java	(revision 2720)
@@ -3,7 +3,6 @@
 import java.io.File;
 
 import org.txm.ahc.core.functions.AHC;
-import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 
 /**
@@ -13,13 +12,12 @@
  * @author sjacquot
  *
  */
-public class RAHCChartCreator extends RChartCreator {
+public class RAHCChartCreator extends RChartCreator<AHC> {
 	
-	
 	@Override
-	public File createChartFile(ChartResult result, File file) {
+	public File createChart(AHC result, File file) {
 		
-		AHC ahc = (AHC) result;
+		AHC ahc = result;
 		
 		String cmd = null;
 		// 2D
@@ -43,10 +41,7 @@
 	
 	
 	@Override
-	public Class getResultDataClass() {
+	public Class<AHC> getResultDataClass() {
 		return AHC.class;
 	}
-	
-	
-	
 }
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java	(revision 2719)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartCreator.java	(revision 2720)
@@ -2,35 +2,31 @@
 
 import java.awt.Color;
 import java.io.File;
+import java.lang.reflect.Field;
 import java.util.ArrayList;
-
 import org.txm.chartsengine.core.results.ChartResult;
-import org.txm.core.results.TXMResult;
 import org.txm.utils.logger.Log;
 
 
-
 /**
  * Abstract base for chart creation in command plug-ins from a result data.
  * 
  * @author sjacquot
  *
  */
-public abstract class ChartCreator {
-
+public abstract class ChartCreator<T extends ChartsEngine, R extends ChartResult> {
 	
 	public final static String extensionPointId = "org.txm.chartsengine.chartcreator"; //$NON-NLS-1$
-
 	
 	/**
 	 * Basic commands constants for chart updating.
 	 */
-	public static final int SHOW_TITLE = 0, SHOW_LEGEND = 1; 
+	public static final int SHOW_TITLE = 0, SHOW_LEGEND = 1;
 	
 	/**
 	 * The linked charts engine.
 	 */
-	protected ChartsEngine chartsEngine;
+	protected T chartsEngine;
 	
 	/**
 	 * The prefix that will be added to the generated file name.
@@ -42,91 +38,61 @@
 	 */
 	protected String chartType;
 	
-	
-	
 	/**
 	 * Default constructor.
 	 */
-	public ChartCreator() {
-	}
-
+	public ChartCreator() {}
 	
+	
 	/**
 	 * Sets the linked charts engine.
+	 * 
 	 * @param chartsEngine
 	 */
-	public void setChartsEngine(ChartsEngine chartsEngine)	{
+	public void setChartsEngine(T chartsEngine) {
 		this.chartsEngine = chartsEngine;
 	}
 	
-	
 	/**
 	 * Creates a chart object according to the specified result data.
+	 * 
 	 * @param result
 	 * @return
 	 */
-	public abstract Object createChart(ChartResult result);
+	public abstract Object createChart(R result);
 	
-	
 	/**
-	 * Creates a chart file according to the specified result data and parameters.
-	 * @param result
-	 * @param file
-	 * @return
-	 */
-	public File createChartFile(ChartResult result, File file)	{
-		Object chart = this.createChart(result);
-		// FIXME: SJ: became useless?
-		// Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc. 
-		//this.updateChart(result);
-		return this.chartsEngine.createChartFile(chart, file);
-	}
-	
-	/**
-	 * Creates a chart file according to the specified result data using the specified prefix for the file name.
-	 * @param result
-	 * @param fileNamePrefix
-	 * @return
-	 */
-	public File createChartFile(ChartResult result, String fileNamePrefix)	{
-		return this.createChartFile(result, this.chartsEngine.createTmpFile(fileNamePrefix));
-	}
-	
-
-	/**
-	 * Creates a chart file according to the specified result data.
-	 * @param result
-	 * @return
-	 */
-	public File createChartFile(ChartResult result) {
-		return this.createChartFile(result, this.fileNamePrefix);
-	}
-
-	/**
 	 * Updates an existing chart.
 	 * By default this method does nothing.
 	 * Subclasses should override this method to update a chart without recreating one.
 	 * This method is dedicated for example, to hide a title, to change a rendering style, etc.
 	 * This method is called by the SWT charts components provider when just after a chart is created.
+	 * 
 	 * @param result
 	 * @param preferencesNode
 	 */
-	public void updateChart(ChartResult result)	{
+	public void updateChart(R result) {
 		Log.severe("ChartCreator.updateChart(): not implemented. This method is intended to be overridden in subclasses."); //$NON-NLS-1$
 	}
 	
 	/**
 	 * Gets the type of the result data linked with this chart creator.
+	 * 
 	 * @return
 	 */
-	public abstract Class getResultDataClass();
-
+	public abstract Class<? extends R> getResultDataClass();
+	
+	public abstract Class<? extends T> getChartsEngineClass();
+	
 	/**
-	 * Gets the type of the charts engine with this chart creator.
-	 * @return
+	 * Convenience method.
+	 * 
+	 * @return the casted charts engine.
 	 */
-	public abstract Class getChartsEngineClass();
-
+	protected T getChartsEngine() {
+		return this.chartsEngine;
+	}
+	
 	/**
 	 * @param fileNamePrefix the fileNamePrefix to set
 	 */
@@ -136,29 +102,27 @@
 	
 	/**
 	 * Gets the color used to draw the shapes of the series.
+	 * 
 	 * @param chart
 	 * @param index
 	 * @return
 	 */
 	public abstract ArrayList<Color> getSeriesShapesColors(Object chart);
-
-
+	
 	/**
 	 * @return the fileNamePrefix
 	 */
 	public String getFileNamePrefix() {
 		return fileNamePrefix;
 	}
-
-
+	
 	/**
 	 * @return the chartType
 	 */
 	public String getChartType() {
 		return chartType;
 	}
-
-
+	
 	/**
 	 * @param chartType the chartType to set
 	 */
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 2719)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/results/ChartResult.java	(revision 2720)
@@ -8,6 +8,7 @@
 
 import org.txm.chartsengine.core.ChartCreator;
 import org.txm.chartsengine.core.ChartsEngine;
+import org.txm.chartsengine.core.ChartsEnginesManager;
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.core.results.Parameter;
 import org.txm.core.results.TXMResult;
@@ -272,21 +273,19 @@
 		
 		// try to find a chart creator in other charts engines
 		if (chartCreator == null) {
-			for (int i = 0; i < ChartsEngine.getChartsEngines().size(); i++) {
-				ChartsEngine chartsEngine = ChartsEngine.getChartsEngines().get(i);
-				if (chartsEngine == this.chartsEngine) {
-					continue;
+			for (ChartsEngine alternativeEngine : ChartsEnginesManager.getChartsEngines()) {
+				if (alternativeEngine == this.chartsEngine) {
+					continue; // not an alternative
 				}
-				chartCreator = chartsEngine.getChartCreator(this);
+				chartCreator = alternativeEngine.getChartCreator(this);
 				if (chartCreator != null) {
-					Log.finest("ChartResult.renderChart(): another suitable chart creator has been found in charts engine: " + chartsEngine + "."); //$NON-NLS-1$
-					this.chartsEngine = chartsEngine;
+					Log.finest("ChartResult.renderChart(): another suitable chart creator has been found in charts engine: " + alternativeEngine + "."); //$NON-NLS-1$
+					this.chartsEngine = alternativeEngine;
 					break;
 				}
 			}
 		}
 		
-		
 		if (chartCreator != null) {
 			
 			// FIXME: fix #1
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java	(revision 2719)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEnginesManager.java	(revision 2720)
@@ -2,6 +2,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.TreeSet;
 
@@ -23,6 +24,14 @@
  */
 public class ChartsEnginesManager extends EnginesManager<ChartsEngine> {
 	
+	private static final long serialVersionUID = 2369327408978181063L;
+	
+	/**
+	 * Installed charts engines.
+	 * TODO remove this static member and use the ChartsEnginesManager
+	 */
+	protected static ArrayList<ChartsEngine> chartsEngines;
+	
 	@Override
 	public boolean fetchEngines() {
 		return this.fetchEngines(ChartsEngine.EXTENSION_POINT_ID);
@@ -34,12 +43,12 @@
 		// FIXME: temporary solution to not break the charts engines but later need to stop to use
 		// ChartsEngine.chartsEngines, ChartsEngine.currentChartsEngineIndex, getCurrent() etc.
 		// and directly manage that in the Manager
-		ChartsEngine.chartsEngines = new ArrayList<>();
+		chartsEngines = new ArrayList<>();
 		// ChartsEngine.currentChartsEngineIndex = 0;
 		//
 		
 		for (ChartsEngine engine : this.values()) {
-			ChartsEngine.chartsEngines.add(engine);
+			chartsEngines.add(engine);
 		}
 		
 		// add the engines sorted by order defined in preferences
@@ -133,9 +142,9 @@
 	public ChartsEngine getChartsEngine(String outputFormat) {
 		
 		ChartsEngine chartsEngine = null;
-		for (int i = 0; i < ChartsEngine.chartsEngines.size(); i++) {
+		for (int i = 0; i < chartsEngines.size(); i++) {
 			
-			ChartsEngine tmpChartsEngine = ChartsEngine.chartsEngines.get(i);
+			ChartsEngine tmpChartsEngine = chartsEngines.get(i);
 			
 			// checking display formats
 			ArrayList<String> displayFormats = tmpChartsEngine.getSupportedOutputDisplayFormats();
@@ -216,4 +225,12 @@
 		return EngineType.CHARTS;
 	}
 	
+	/**
+	 * Returns the installed charts engine contributions.
+	 * 
+	 * @return
+	 */
+	public static ArrayList<ChartsEngine> getChartsEngines() {
+		return chartsEngines;
+	}
 }
Index: tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java
===================================================================
--- tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java	(revision 2719)
+++ tmp/org.txm.chartsengine.core/src/org/txm/chartsengine/core/ChartsEngine.java	(revision 2720)
@@ -22,8 +22,13 @@
 
 /**
  * Common charts engine. This is the superclass of all chart engine implementations.
+ * 
  * This class provides methods to create charts from variable chart creators stored by type of result data such as CA, CAH, Singular values, etc.
  * 
+ * It also stores the available chart creators
+ * 
+ * Provides methods to output the chart created by the ChartCreators
+ * 
  * @author sjacquot
  *
  */
@@ -58,12 +63,6 @@
 	protected HashMap<Class, HashMap<String, ChartCreator>> chartCreators;
 	
 	/**
-	 * Installed charts engines.
-	 * TODO remove this static member and use the ChartsEnginesManager
-	 */
-	protected static ArrayList<ChartsEngine> chartsEngines;
-	
-	/**
 	 * Current theme.
 	 */
 	protected Theme theme;
@@ -88,7 +87,7 @@
 	 * @param outputFormat
 	 */
 	protected ChartsEngine(String description, String outputFormat) {
-		this.chartCreators = new HashMap<Class, HashMap<String, ChartCreator>>();
+		this.chartCreators = new HashMap<>();
 		this.description = description;
 		this.outputFormat = outputFormat;
 		this.theme = new Theme();
@@ -158,7 +157,7 @@
 	 * @return
 	 */
 	public ArrayList<ChartCreator> getChartCreators(ChartResult result) {
-		ArrayList<ChartCreator> chartCreators = new ArrayList<ChartCreator>();
+		ArrayList<ChartCreator> chartCreators = new ArrayList<>();
 		HashMap<String, ChartCreator> map = this.chartCreators.get(result.getClass());
 		if (map != null) {
 			chartCreators.addAll(map.values());
@@ -204,7 +203,7 @@
 		}
 		
 		if (!this.chartCreators.containsKey(resultDataType)) {
-			HashMap<String, ChartCreator> m = new HashMap<String, ChartCreator>();
+			HashMap<String, ChartCreator> m = new HashMap<>();
 			m.put(chartType, chartCreator);
 			this.chartCreators.put(resultDataType, m);
 		}
@@ -288,18 +287,6 @@
 	// return chartsEngine;
 	// }
 	
-	
-	/**
-	 * Returns the installed charts engine contributions.
-	 * 
-	 * @return
-	 */
-	@Deprecated
-	public static ArrayList<ChartsEngine> getChartsEngines() {
-		return ChartsEngine.chartsEngines;
-	}
-	
-	
 	@Override
 	public boolean initialize() throws Exception {
 		this.registerChartCreatorExtensions();
@@ -332,7 +319,6 @@
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 			}
-			
 		}
 	}
 	
@@ -378,7 +364,7 @@
 			
 			// right padding to 3 characters long
 			if (prefix.length() < 3) {
-				prefix = String.format("%1$-3s", prefix).replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				prefix = String.format("%1$-3s", prefix).replace(' ', '_'); //$NON-NLS-1$
 			}
 			
 			file = File.createTempFile(prefix, "." + this.outputFormat, resultsDir);
@@ -395,33 +381,63 @@
 		return file;
 	}
 	
-	/**
-	 * Creates a file form the specified chart object.
-	 * 
-	 * @param chart
-	 * @param file
-	 * @return
-	 */
-	public abstract File createChartFile(Object chart, File file);
+	// public File createChartFile(ChartResult result);
 	
-	/**
-	 * Creates a chart according to the specified result and output format and writes it in the specified file.
-	 * 
-	 * @param result
-	 * @param file
-	 * @param outputFormat
-	 * @return
-	 */
-	public File createChartFile(ChartResult result, File file, String outputFormat) {
-		// FIXME : SJ: bad ? Switch the current charts engine output format, export the chart, and then roll back the output format
-		String oldOutputFormat = this.outputFormat;
-		this.setOutputFormat(outputFormat);
-		file = this.createChartFile(result.getChart(), file);
-		this.outputFormat = oldOutputFormat;
-		return file;
-	}
+	// /**
+	// * Creates a file form the specified chart object and output format.
+	// *
+	// * @param chart
+	// * @param file
+	// * @return
+	// */
+	// public abstract File createChartFile(Object chart, File file, String outputFormat);
+	//
+	// /**
+	// * Creates a chart according to the specified result and output format and writes it in the specified file.
+	// *
+	// * @param result
+	// * @param file
+	// * @param outputFormat
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, File file, String outputFormat) {
+	// // FIXME : SJ: bad ? Switch the current charts engine output format, export the chart, and then roll back the output format
+	// FIXME: this old code don't work with asynchronous calls
+	// String oldOutputFormat = this.outputFormat;
+	// this.setOutputFormat(outputFormat);
+	// file = this.createChartFile(result.getChart(), file);
+	// this.outputFormat = oldOutputFormat;
+	// return file;
+	// }
 	
+	// /**
+	// * Creates a chart file according to the specified result data, parameters and default outputFormat.
+	// *
+	// * @param result
+	// * @param file
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, File file) {
+	// Object chart = this.createChart(result);
+	// // FIXME: SJ: became useless?
+	// // Synchronizes the chart with the shared preferences as show title, show legend, rendering colors mode, etc.
+	// // this.updateChart(result);
+	// return this.exportChart(chart, file, this.outputFormat, 0, 0);
+	// }
 	
+	
+	// /**
+	// * Creates a chart file according to the specified result data using the specified prefix for the file name.
+	// *
+	// * @param result
+	// * @param fileNamePrefix
+	// * @return
+	// */
+	// public File createChartFile(ChartResult result, String fileNamePrefix) {
+	// return this.createChartFile(result, this.createTmpFile(fileNamePrefix));
+	// }
+	
+	
 	/**
 	 * Exports the chart to the specified file. Also crops the image according to the specified drawing area values.
 	 * 
@@ -452,8 +468,38 @@
 		return this.exportChart(chart, file, outputFormat, imageWidth, imageHeight, 0, 0, imageWidth, imageHeight);
 	}
 	
+	/**
+	 * Export a chart in a file
+	 * 
+	 * @param result
+	 * @param outputFormatSvg
+	 * @return
+	 */
+	public File exportChart(ChartResult result, String outputFormat) {
+		return exportChart(result, 1024, 576, outputFormat);
+	}
 	
 	/**
+	 * Export a chart in a file
+	 * 
+	 * @param result
+	 * @param outputFormatSvg
+	 * @return
+	 */
+	public File exportChart(ChartResult result, int imageWidth, int imageHeight, String outputFormat) {
+		return exportChart(result, createTmpFile("export"), imageWidth, imageHeight, outputFormat);
+	}
+	
+	/**
+	 * Export a chart in a file
+	 * 
+	 * @param result
+	 * @param outputFormatSvg
+	 * @return
+	 */
+	public abstract File exportChart(ChartResult result, File file, int imageWidth, int imageHeight, String outputFormat);
+	
+	/**
 	 * Gets the current output format.
 	 * 
 	 * @return
@@ -541,42 +587,43 @@
 		return directComputing;
 	}
 	
-	/**
-	 * 
-	 * @param result
-	 * @param chartType
-	 * @return
-	 */
-	public Object createChart(ChartResult result, String chartType) {
-		Object chart = null;
-		ChartCreator chartCreator = this.getChartCreator(result, chartType);
-		if (chartCreator != null) {
-			chart = chartCreator.createChart(result);
-		}
-		return chart;
-	}
+	// FIXME: MD: not used ? deprecated ?
+	// /**
+	// *
+	// * @param result
+	// * @param chartType
+	// * @return
+	// */
+	// public Object createChart(ChartResult result, String chartType) {
+	// Object chart = null;
+	// ChartCreator chartCreator = this.getChartCreator(result, chartType);
+	// if (chartCreator != null) {
+	// chart = chartCreator.createChart(result);
+	// }
+	// return chart;
+	// }
+	//
+	// /**
+	// *
+	// * @param result
+	// * @return
+	// */
+	// public Object createChart(ChartResult result) {
+	// return this.createChart(result, result.getChartType());
+	// }
+	//
+	// /**
+	// *
+	// * @param chart
+	// * @param result
+	// */
+	// public void updateChart(Object chart, ChartResult result) {
+	// ChartCreator chartCreator = this.getChartCreator(result, result.getChartType());
+	// if (chartCreator != null) {
+	// chartCreator.updateChart(result);
+	// }
+	// }
 	
-	/**
-	 * 
-	 * @param result
-	 * @return
-	 */
-	public Object createChart(ChartResult result) {
-		return this.createChart(result, result.getChartType());
-	}
-	
-	/**
-	 * 
-	 * @param chart
-	 * @param result
-	 */
-	public void updateChart(Object chart, ChartResult result) {
-		ChartCreator chartCreator = this.getChartCreator(result, result.getChartType());
-		if (chartCreator != null) {
-			chartCreator.updateChart(result);
-		}
-	}
-	
 	@Override
 	public void notify(TXMResult r, String state) {
 		// nothing to do
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 2719)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/editors/CAFactorialMapChartEditor.java	(revision 2720)
@@ -30,6 +30,7 @@
 import org.txm.rcp.swt.widget.structures.PropertiesComboViewer;
 import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.CQPCorpus;
+import org.txm.searchengine.cqp.corpus.MainCorpus;
 import org.txm.utils.logger.Log;
 
 /**
@@ -113,7 +114,7 @@
 	
 	
 	@Override
-	public void __createPartControl() {
+	public void __createPartControl() throws CqiClientException {
 		
 		// Main parameters
 		GLComposite mainParametersArea = this.getMainParametersComposite();
@@ -270,6 +271,12 @@
 			this.fMaxSpinner = thresholdsGroup.getFMaxSpinner();
 			this.vMaxSpinner = thresholdsGroup.getVMaxSpinner();
 			this.vMaxSpinner.setMinimum(2);
+			CQPCorpus corpus = getResult().getFirstParent(MainCorpus.class);
+			if (corpus != null) {
+				this.vMaxSpinner.setMaximum(corpus.getSize());
+				this.fMaxSpinner.setMaximum(corpus.getSize());
+				this.fMinSpinner.setMaximum(corpus.getSize());
+			}
 		}
 		
 		this.chartToolBar.pack();
