Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java	(revision 402)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifictiesBarChart.java	(revision 403)
@@ -87,7 +87,7 @@
 			specificitiesResult.setSelectedSpecificitiesIndex(specificteIndices);
 
 			// Create and open the chart editor
-			final ChartEditorPart editor = SWTChartsComponentsProvider.getCurrent().openEditor(specificitiesResult, SpecificitiesPreferences.PREFERENCES_NODE);
+			final ChartEditorPart editor = SWTChartsComponentsProvider.getCurrent().openEditor(specificitiesResult);
 			editor.getEditorInput().setAlwaysRecreateEditor(true);
 
 			
@@ -98,7 +98,7 @@
 				final ToolItem groupBarsByLines = new ToolItem(toolBar, SWT.CHECK);
 				groupBarsByLines.setToolTipText(SpecificitiesUIMessages.SpecificitiesPreferencePage_4);
 				groupBarsByLines.setImage(IImageKeys.getImage(ComputeSpecifities.class, "icons/silk_group_bars_by_lines.png"));
-				groupBarsByLines.setSelection(TXMPreferences.getBoolean(SpecificitiesPreferences.PREFERENCES_NODE, editor.getResultData(), SpecificitiesPreferences.CHART_TRANSPOSE));
+				groupBarsByLines.setSelection(specificitiesResult.getBooleanParameterValue(SpecificitiesPreferences.CHART_TRANSPOSE));
 				groupBarsByLines.addSelectionListener(new SelectionListener() {
 					
 					@Override
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 402)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/handlers/ComputeSpecifities.java	(revision 403)
@@ -43,6 +43,8 @@
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.core.preferences.LexicalTablePreferences;
+import org.txm.rcp.editors.TXMEditorPart;
+import org.txm.rcp.editors.TXMResultEditorInput;
 import org.txm.rcp.handlers.BaseAbstractHandler;
 import org.txm.rcp.JobsTimer;
 import org.txm.rcp.Messages;
@@ -112,10 +114,10 @@
 			return null;
 		}
 		Object s = selection.getFirstElement();
-		final int maxScore = TXMPreferences.getInt(SpecificitiesPreferences.PREFERENCES_NODE, SpecificitiesPreferences.MAX_SCORE);
+		final int maxScore = TXMPreferences.getInt(SpecificitiesPreferences.MAX_SCORE, SpecificitiesPreferences.PREFERENCES_NODE);
 		if(s instanceof Partition) {
 			final Partition partition = (Partition) selection.getFirstElement();
-			final int Fmin = TXMPreferences.getInt(LexicalTablePreferences.PREFERENCES_NODE, LexicalTablePreferences.F_MIN);
+			final int Fmin = TXMPreferences.getInt(LexicalTablePreferences.F_MIN, LexicalTablePreferences.PREFERENCES_NODE);
 
 			final ComputeSpecificitiesDialog d = new ComputeSpecificitiesDialog(window.getShell(), partition, false);
 			int code = d.open();
@@ -350,7 +352,7 @@
 		else if(s instanceof SpecificitesResult) {
 			SpecificitesResult specifRes = (SpecificitesResult) s;
 			Partition partition = null;
-			IEditorInput editorInput = null;
+			TXMResultEditorInput editorInput = null;
 
 			if(specifRes.getLexicalTable() != null) {
 				if(specifRes.getLexicalTable().getPartition() != null) {
@@ -365,13 +367,7 @@
 				editorInput = new SpecificitiesResultEditorInput(specifRes, specifRes.getCorpus());
 			}
 
-			IWorkbenchPage page = window.getActivePage();
-			try {
-				page.openEditor(editorInput, SpecificitiesTableEditor.ID);
-			}
-			catch(PartInitException e) {
-				System.err.println(Messages.CorporaView_5 + e);
-			}
+			TXMEditorPart.openEditor(editorInput, SpecificitiesTableEditor.ID);
 		}
 
 		return null;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java	(revision 402)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesTableLabelProvider.java	(revision 403)
@@ -58,7 +58,7 @@
 	public SpecificitiesTableLabelProvider() {
 		//this.partindexes = partindexes;
 		//showPValues = "true".equals(Toolbox.getParam(SpecificitiesPreferencePage.SPECIF_PVALUES)); //$NON-NLS-1$
-		this.format = TXMPreferences.getString(SpecificitiesPreferences.PREFERENCES_NODE, SpecificitiesPreferences.FORMAT);
+		this.format = TXMPreferences.getString(SpecificitiesPreferences.FORMAT, SpecificitiesPreferences.PREFERENCES_NODE);
 		if (format == null || format.trim().length() == 0) format = "%,.1f"; //$NON-NLS-1$
 	}
 
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesException.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesException.java	(revision 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesException.java	(revision 403)
@@ -1,79 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform is distributed in the hope that it will be
-// useful, but WITHOUT ANY WARRANTY; without even the implied
-// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-// PURPOSE. See the GNU General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-// 
-// 
-// 
-// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun., 06 mai 2013) $
-// $LastChangedRevision: 2386 $
-// $LastChangedBy: mdecorde $ 
-//
-package org.txm.specificities.core.functions;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class SpecificitesException.
- *
- * @author sloiseau
- */
-public class SpecificitesException extends Exception {
-
-	/** The Constant serialVersionUID. */
-	private static final long serialVersionUID = 4206288552541531386L;
-
-	/**
-	 * Instantiates a new specificites exception.
-	 */
-	public SpecificitesException() {
-		super();
-		// TODO Auto-generated constructor stub
-	}
-
-	/**
-	 * Instantiates a new specificites exception.
-	 *
-	 * @param arg0 the arg0
-	 * @param arg1 the arg1
-	 */
-	public SpecificitesException(String arg0, Throwable arg1) {
-		super(arg0, arg1);
-		// TODO Auto-generated constructor stub
-	}
-
-	/**
-	 * Instantiates a new specificites exception.
-	 *
-	 * @param arg0 the arg0
-	 */
-	public SpecificitesException(String arg0) {
-		super(arg0);
-		// TODO Auto-generated constructor stub
-	}
-
-	/**
-	 * Instantiates a new specificites exception.
-	 *
-	 * @param arg0 the arg0
-	 */
-	public SpecificitesException(Throwable arg0) {
-		super(arg0);
-		// TODO Auto-generated constructor stub
-	}
-}
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificites2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificites2.java	(revision 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Specificites2.java	(revision 403)
@@ -1,67 +0,0 @@
-package org.txm.specificities.core.functions;
-
-import org.txm.functions.contrasts.Contrast;
-import org.txm.lexicaltable.core.functions.LexicalTable;
-import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
-import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
-import org.txm.searchengine.cqp.corpus.Corpus;
-import org.txm.searchengine.cqp.corpus.Partition;
-import org.txm.searchengine.cqp.corpus.Property;
-import org.txm.searchengine.cqp.corpus.Subcorpus;
-import org.txm.specificities.core.statsengine.r.function.SpecificitiesImpl;
-import org.txm.statsengine.core.StatException;
-import org.txm.statsengine.r.core.RWorkspace;
-
-public class Specificites2 extends Contrast {
-
-	private ILexicalTable itable;
-
-	public Specificites2(Corpus corpus, Subcorpus subcorpus, Property property)
-			throws StatException, CqiClientException {
-		super(corpus, subcorpus, property);
-	}
-
-	public Specificites2(Partition partition, Property property, int Fmin)
-			throws StatException, CqiClientException {
-		super(partition, property, Fmin);
-	}
-
-
-	public Specificites2(LexicalTable table) {
-		super(table);
-	}
-
-	public boolean compute() throws StatException {
-		itable = table.getData();
-		colNames = itable.getColNames().asStringsArray();
-		rowNames = itable.getRowNames().asStringsArray();
-		frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(itable.getSymbol());
-
-		// compute
-		indices = new SpecificitiesImpl(itable).getScores(); //$NON-NLS-1$
-		return true;
-	}
-
-	@Override
-	public String getName() {
-		return "Specif2"; //$NON-NLS-1$
-	}
-
-	@Override
-	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-
-	}
-}
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Chi2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Chi2.java	(revision 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/Chi2.java	(revision 403)
@@ -1,70 +0,0 @@
-package org.txm.specificities.core.functions;
-
-import org.txm.functions.contrasts.Contrast;
-import org.txm.lexicaltable.core.functions.LexicalTable;
-import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
-import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
-import org.txm.searchengine.cqp.corpus.Corpus;
-import org.txm.searchengine.cqp.corpus.Partition;
-import org.txm.searchengine.cqp.corpus.Property;
-import org.txm.searchengine.cqp.corpus.Subcorpus;
-import org.txm.statsengine.core.StatException;
-import org.txm.statsengine.r.core.RWorkspace;
-
-public class Chi2 extends Contrast {
-	
-	private ILexicalTable itable;
-	
-	public Chi2(Corpus corpus, Subcorpus subcorpus, Property property)
-			throws StatException, CqiClientException {
-		super(corpus, subcorpus, property);
-	}
-
-	public Chi2(Partition partition, Property property, int Fmin)
-			throws StatException, CqiClientException {
-		super(partition, property, Fmin);
-	}
-
-
-	public Chi2(LexicalTable table) {
-		super(table);
-	}
-
-	@Override
-	public boolean compute() throws StatException {
-		itable = table.getData();
-		colNames = itable.getColNames().asStringsArray();
-		rowNames = itable.getRowNames().asStringsArray();
-		frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(itable.getSymbol());
-		
-		// compute
-		String cmd = "mat <- "+itable.getSymbol()+"\n"+ //$NON-NLS-1$ //$NON-NLS-2$
-					" mat2 <- rowSums(mat) %o% colSums(mat) / sum(mat)"+"\n"+ //$NON-NLS-1$ //$NON-NLS-2$
-					symbol +" <- (mat - mat2) ^ 2 / mat2"; //$NON-NLS-1$
-		indices = RWorkspace.getRWorkspaceInstance().evalToDouble2D(cmd);
-		return true;
-	}
-
-	@Override
-	public String getName() {
-		return "Chi2"; //$NON-NLS-1$
-	}
-
-	@Override
-	public String getSimpleName() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public String getDetails() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void clean() {
-		// TODO Auto-generated method stub
-		
-	}
-}
Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/___SpecificitesException.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/___SpecificitesException.java	(revision 0)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/___SpecificitesException.java	(revision 403)
@@ -0,0 +1,80 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate: 2013-05-06 17:38:43 +0200 (lun., 06 mai 2013) $
+// $LastChangedRevision: 2386 $
+// $LastChangedBy: mdecorde $ 
+//
+package org.txm.specificities.core.functions;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SpecificitesException.
+ *
+ * @author sloiseau
+ */
+//FIXME: not used?
+public class ___SpecificitesException extends Exception {
+
+	/** The Constant serialVersionUID. */
+	private static final long serialVersionUID = 4206288552541531386L;
+
+	/**
+	 * Instantiates a new specificites exception.
+	 */
+	public ___SpecificitesException() {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * Instantiates a new specificites exception.
+	 *
+	 * @param arg0 the arg0
+	 * @param arg1 the arg1
+	 */
+	public ___SpecificitesException(String arg0, Throwable arg1) {
+		super(arg0, arg1);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * Instantiates a new specificites exception.
+	 *
+	 * @param arg0 the arg0
+	 */
+	public ___SpecificitesException(String arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * Instantiates a new specificites exception.
+	 *
+	 * @param arg0 the arg0
+	 */
+	public ___SpecificitesException(Throwable arg0) {
+		super(arg0);
+		// TODO Auto-generated constructor stub
+	}
+}

Property changes on: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/___SpecificitesException.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java	(revision 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/functions/SpecificitesResult.java	(revision 403)
@@ -39,7 +39,7 @@
 
 import org.rosuda.REngine.REXPMismatchException;
 import org.rosuda.REngine.Rserve.RserveException;
-import org.txm.functions.Function;
+import org.txm.functions.TXMCommand;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.lexicaltable.core.functions.LexicalTableFactory;
 import org.txm.lexicon.core.corpusengine.cqp.Lexicon;
@@ -63,7 +63,7 @@
  * @author sloiseau
  * 
  */
-public class SpecificitesResult extends Function  {
+public class SpecificitesResult extends TXMCommand  {
 
 	public static int MAXSPECIF = 1000;
 
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 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/jfreechart/JFCSpecificitiesBarChartCreator.java	(revision 403)
@@ -17,7 +17,7 @@
 import org.txm.chartsengine.jfreechart.core.themes.base.ExtendedNumberAxis;
 import org.txm.chartsengine.jfreechart.core.themes.base.SymbolAxisBetweenTicks;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
 import org.txm.specificities.core.functions.SpecificitesResult;
 import org.txm.specificities.core.messages.SpecificitiesCoreMessages;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
@@ -33,15 +33,14 @@
 	}
 
 	@Override
-	public JFreeChart createChart(ITXMResult result, String preferencesNode) {
+	public JFreeChart createChart(TXMResult result) {
 
 		SpecificitesResult specificitiesResult = (SpecificitesResult) result;
 
 		// parameters
-		boolean transpose = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_TRANSPOSE);
-		boolean drawBars = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_DRAW_BARS);
-		boolean drawLines = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_DRAW_LINES);
-		float banality = TXMPreferences.getFloat(preferencesNode, result, SpecificitiesPreferences.CHART_BANALITY);
+		boolean drawBars = result.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_BARS);
+		boolean drawLines = result.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_LINES);
+		float banality = result.getFloatParameterValue(SpecificitiesPreferences.CHART_BANALITY);
 		
 		JFreeChart chart = null;
 
@@ -85,7 +84,7 @@
 	}
 
 	@Override
-	public void updateChart(Object chart, ITXMResult result, String preferencesNode) {
+	public void updateChart(Object chart, TXMResult result) {
 		
 		SpecificitesResult specificitiesResult = (SpecificitesResult) result;
 		JFreeChart jfcChart = (JFreeChart) chart;
@@ -100,7 +99,7 @@
 		String[] xAxisSymbols;
 
 		// Transpose the data set
-		if(TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_TRANSPOSE))	{
+		if(result.getBooleanParameterValue(SpecificitiesPreferences.CHART_TRANSPOSE))	{
 	        xAxisSymbols = new String[specificitiesResult.getSelectedTypeNames().length];
 
 			for(int i = 0; i < specificitiesResult.getSelectedPartNames().length; i++) {
@@ -139,7 +138,7 @@
         	minimumValue = 0;
         }
         if(maximumValue < 0)	{
-        	maximumValue = TXMPreferences.getFloat(preferencesNode, result, SpecificitiesPreferences.CHART_BANALITY);
+        	maximumValue = result.getFloatParameterValue(SpecificitiesPreferences.CHART_BANALITY);
         }
         // Custom range axis to cut the values to minimum and maximum values
         jfcChart.getXYPlot().setRangeAxis(new ExtendedNumberAxis((NumberAxis) jfcChart.getXYPlot().getRangeAxis(), true, true, minimumValue, maximumValue));
@@ -147,7 +146,7 @@
         jfcChart.getXYPlot().setDomainAxis(new SymbolAxisBetweenTicks(SpecificitiesCoreMessages.Charts_X_AXIS_LABEL, xAxisSymbols));
 
         
-		super.updateChart(chart, result, preferencesNode);
+		super.updateChart(chart, result);
 		
 	}
 	
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 402)
+++ tmp/org.txm.specificities.core/src/org/txm/specificities/core/chartsengine/r/RSpecificitiesBarChartCreator.java	(revision 403)
@@ -5,7 +5,7 @@
 import org.txm.chartsengine.core.preferences.ChartsEnginePreferences;
 import org.txm.chartsengine.r.core.RChartCreator;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
 import org.txm.specificities.core.functions.SpecificitesResult;
 import org.txm.specificities.core.messages.SpecificitiesCoreMessages;
 import org.txm.specificities.core.preferences.SpecificitiesPreferences;
@@ -27,24 +27,24 @@
 	}
 
 	@Override
-	public Object createChart(ITXMResult result, String preferencesNode) {
+	public Object createChart(TXMResult result) {
 		return null;
 	}
 
 	
 	@Override
-	public File createChartFile(ITXMResult result, File file, String preferencesNode) {
+	public File createChartFile(TXMResult result, File file) {
 
 		try {
 			
 			SpecificitesResult specificitiesResult = (SpecificitesResult) result;
 
 			// parameters
-			boolean transpose = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_TRANSPOSE);
-			boolean drawBars = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_DRAW_BARS);
-			boolean drawLines = TXMPreferences.getBoolean(preferencesNode, result, SpecificitiesPreferences.CHART_DRAW_LINES);
-			float banality = TXMPreferences.getFloat(preferencesNode, result, SpecificitiesPreferences.CHART_BANALITY);
-			int renderingColorMode = TXMPreferences.getInt(preferencesNode, result, ChartsEnginePreferences.RENDERING_COLORS_MODE);
+			boolean transpose = result.getBooleanParameterValue(SpecificitiesPreferences.CHART_TRANSPOSE);
+			boolean drawBars = result.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_BARS);
+			boolean drawLines = result.getBooleanParameterValue(SpecificitiesPreferences.CHART_DRAW_LINES);
+			float banality = result.getFloatParameterValue(SpecificitiesPreferences.CHART_BANALITY);
+			int renderingColorMode = result.getIntParameterValue(ChartsEnginePreferences.RENDERING_COLORS_MODE);
 			
 			//boolean grayscale = (renderingColorMode == ChartsEngine.RENDERING_GRAYSCALE_MODE);
 			
@@ -79,7 +79,7 @@
 
 			// Title
 			String title = "";
-			if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_TITLE))	{
+			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_TITLE))	{
 				title = specificitiesResult.getName();	
 			}
 			
@@ -151,12 +151,12 @@
 
 			
 			// Grid
-			if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_GRID))	{
+			if(result.getBooleanParameterValue(ChartsEnginePreferences.SHOW_GRID))	{
 				cmd += this.getChartsEngine().getGridPlotCmd();
 			}
 			
 			// Legend
-			if(TXMPreferences.getBoolean(preferencesNode, result, ChartsEnginePreferences.SHOW_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$
 				}
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java	(revision 0)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java	(revision 403)
@@ -0,0 +1,69 @@
+package org.txm.functions.contrasts;
+
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+import org.txm.statsengine.core.StatException;
+import org.txm.statsengine.r.core.RWorkspace;
+
+public class Chi2 extends Contrast {
+	
+	private ILexicalTable itable;
+	
+	public Chi2(Corpus corpus, Subcorpus subcorpus, Property property)
+			throws StatException, CqiClientException {
+		super(corpus, subcorpus, property);
+	}
+
+	public Chi2(Partition partition, Property property, int Fmin)
+			throws StatException, CqiClientException {
+		super(partition, property, Fmin);
+	}
+
+
+	public Chi2(LexicalTable table) {
+		super(table);
+	}
+
+	@Override
+	public boolean compute() throws StatException {
+		itable = table.getData();
+		colNames = itable.getColNames().asStringsArray();
+		rowNames = itable.getRowNames().asStringsArray();
+		frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(itable.getSymbol());
+		
+		// compute
+		String cmd = "mat <- "+itable.getSymbol()+"\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+					" mat2 <- rowSums(mat) %o% colSums(mat) / sum(mat)"+"\n"+ //$NON-NLS-1$ //$NON-NLS-2$
+					symbol +" <- (mat - mat2) ^ 2 / mat2"; //$NON-NLS-1$
+		indices = RWorkspace.getRWorkspaceInstance().evalToDouble2D(cmd);
+		return true;
+	}
+
+	@Override
+	public String getName() {
+		return "Chi2"; //$NON-NLS-1$
+	}
+
+	@Override
+	public String getSimpleName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public String getDetails() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+		
+	}
+}

Property changes on: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Chi2.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java	(revision 0)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java	(revision 403)
@@ -0,0 +1,66 @@
+package org.txm.functions.contrasts;
+
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicaltable.core.statsengine.data.ILexicalTable;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.Subcorpus;
+import org.txm.specificities.core.statsengine.r.function.SpecificitiesImpl;
+import org.txm.statsengine.core.StatException;
+import org.txm.statsengine.r.core.RWorkspace;
+
+public class Specificites2 extends Contrast {
+
+	private ILexicalTable itable;
+
+	public Specificites2(Corpus corpus, Subcorpus subcorpus, Property property)
+			throws StatException, CqiClientException {
+		super(corpus, subcorpus, property);
+	}
+
+	public Specificites2(Partition partition, Property property, int Fmin)
+			throws StatException, CqiClientException {
+		super(partition, property, Fmin);
+	}
+
+
+	public Specificites2(LexicalTable table) {
+		super(table);
+	}
+
+	public boolean compute() throws StatException {
+		itable = table.getData();
+		colNames = itable.getColNames().asStringsArray();
+		rowNames = itable.getRowNames().asStringsArray();
+		frequencies = RWorkspace.getRWorkspaceInstance().evalToInt2D(itable.getSymbol());
+
+		// compute
+		indices = new SpecificitiesImpl(itable).getScores(); //$NON-NLS-1$
+		return true;
+	}
+
+	@Override
+	public String getName() {
+		return "Specif2"; //$NON-NLS-1$
+	}
+
+	@Override
+	public String getSimpleName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public String getDetails() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+
+	}
+}

Property changes on: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Specificites2.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrasts.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrasts.java	(revision 402)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrasts.java	(revision 403)
@@ -4,8 +4,6 @@
 
 import org.txm.core.messages.TXMCoreMessages;
 import org.txm.lexicaltable.core.functions.LexicalTable;
-import org.txm.specificities.core.functions.Chi2;
-import org.txm.specificities.core.functions.Specificites2;
 
 public class Contrasts {
 	LexicalTable table;
