Index: tmp/org.txm.textsbalance.core/build.properties
===================================================================
--- tmp/org.txm.textsbalance.core/build.properties	(revision 0)
+++ tmp/org.txm.textsbalance.core/build.properties	(revision 19)
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml

Property changes on: tmp/org.txm.textsbalance.core/build.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/plugin.xml
===================================================================
--- tmp/org.txm.textsbalance.core/plugin.xml	(revision 0)
+++ tmp/org.txm.textsbalance.core/plugin.xml	(revision 19)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.txm.textsbalance.core.preferences.TextsBalancePreferences">
+      </initializer>
+   </extension>
+   <extension
+         point="org.txm.chartsengine.chartcreator">
+      <ChartCreator
+            chartsEngineName="jfreechart_charts_engine"
+            class="org.txm.textsbalance.core.chartsengine.jfreechart.JFCBalanceSpiderChartCreator"
+            fileNamePrefix="texts_balance">
+      </ChartCreator>
+      <ChartCreator
+            chartsEngineName="TMP_r_charts_engine"
+            class="org.txm.textsbalance.core.chartsengine.r.RBalanceSpiderChartCreator"
+            fileNamePrefix="texts_balance">
+      </ChartCreator>
+   </extension>
+
+</plugin>

Property changes on: tmp/org.txm.textsbalance.core/plugin.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.textsbalance.core/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.textsbalance.core/.settings/org.eclipse.jdt.core.prefs	(revision 19)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6

Property changes on: tmp/org.txm.textsbalance.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/.classpath
===================================================================
--- tmp/org.txm.textsbalance.core/.classpath	(revision 0)
+++ tmp/org.txm.textsbalance.core/.classpath	(revision 19)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Property changes on: tmp/org.txm.textsbalance.core/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.textsbalance.core/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.textsbalance.core/META-INF/MANIFEST.MF	(revision 19)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Texts Balance TBX
+Bundle-SymbolicName: org.txm.textsbalance.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.txm.textsbalance.core.chartsengine.jfreechart,
+ org.txm.textsbalance.core.chartsengine.r,
+ org.txm.textsbalance.core.functions,
+ org.txm.textsbalance.core.preferences
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.txm.chartsengine.jfreechart.rcp;bundle-version="1.0.0",
+ org.txm.chartsengine.r.rcp;bundle-version="1.0.0",
+ org.txm.toolbox;bundle-version="0.7.0"
+Bundle-Vendor: TXM

Property changes on: tmp/org.txm.textsbalance.core/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/.project
===================================================================
--- tmp/org.txm.textsbalance.core/.project	(revision 0)
+++ tmp/org.txm.textsbalance.core/.project	(revision 19)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.textsbalance.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Property changes on: tmp/org.txm.textsbalance.core/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java	(revision 0)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java	(revision 19)
@@ -0,0 +1,282 @@
+/**
+ * 
+ */
+package org.txm.textsbalance.core.functions;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import org.txm.HasResults;
+import org.txm.Toolbox;
+import org.txm.functions.Function;
+import org.txm.functions.TXMResult;
+import org.txm.searchengine.cqp.AbstractCqiClient;
+import org.txm.searchengine.cqp.NetCqiClient;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.QueryResult;
+import org.txm.searchengine.cqp.corpus.StructuralUnit;
+import org.txm.searchengine.cqp.corpus.StructuralUnitProperty;
+import org.txm.searchengine.cqp.corpus.query.Match;
+import org.txm.searchengine.cqp.corpus.query.Query;
+import org.txm.utils.logger.Log;
+
+/**
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class TextsBalance extends Function implements TXMResult {
+
+	
+	
+	protected Corpus corpus;
+	
+	
+	HashMap<Integer, Comparable[]> dataset;
+	
+	
+	protected String propertyName;
+	protected List<String> values;
+	protected int fMin;
+	protected int fMax;
+	
+	protected String name;
+	
+	/**
+	 * 
+	 */
+	public TextsBalance(Corpus corpus) {
+		this.corpus = corpus;
+		
+		this.fMin = 999999999;
+		this.fMax = 0;
+	}
+
+	
+	/**
+	 * @param method 1: use CQL to solve matches, 2 uses corpus struct indexes, 2 is faster !
+	 * @param method
+	 * @param su
+	 * @param suPropertyName
+	 * @param groupByTexts
+	 * @throws CqiClientException
+	 */
+	public void compute(int method, StructuralUnit su, String suPropertyName, boolean groupByTexts) throws CqiClientException {
+		
+		this.name = su.getName() + "@" + suPropertyName + " (group by texts = " + groupByTexts + ")";
+		
+		Log.warning("Compute balance with metadata propertyName = " + suPropertyName + ", structural unit = " + su.getName() + " and count_texts = " + groupByTexts);
+		try {
+			if (suPropertyName == null || suPropertyName.length() == 0) return;
+			
+			
+			this.dataset = new HashMap<Integer, Comparable[]>();
+
+			this.propertyName = suPropertyName;
+			StructuralUnitProperty p = su.getProperty(suPropertyName);
+			this.values = p.getValues();
+			Collections.sort(values);
+
+
+			//int method = 2;
+			//System.out.println("Method: "+method);
+			//long time = System.currentTimeMillis();
+			if (method == 1) { // using CQL to solve matches
+				for (String value : values) {
+					int v = 0;
+					if (groupByTexts) {
+						QueryResult r = corpus.query(new Query("<"+p.getFullName()+"=\""+value+"\">[]"), "tmp", false);
+						v = r.getNMatch();
+						r.drop();
+					} else {
+						QueryResult r = corpus.query(new Query("[_."+p.getFullName()+"=\""+value+"\"] expand to text"), "tmp", false);
+						int t = 0;
+						for (Match m : r.getMatches()) t += m.getLength();
+						v = t;
+						r.drop();
+					}
+					if (v < fMin) fMin=v;
+					if (v > fMax) fMax=v;
+					dataset.put(v, new Comparable[]{p.getName(), value});
+				}
+			} else {
+				AbstractCqiClient CQI = Toolbox.getCqiClient();
+				if (CQI instanceof NetCqiClient) {
+					System.out.println("Error: CQP eval method only available with CQP memory mode");
+					return;
+				}
+
+				String supqn = p.getQualifiedName();
+				int nsup = CQI.attributeSize(supqn);
+
+				ArrayList<Match> sup_limits = new ArrayList<Match>(nsup);
+				for (int i = 0 ; i < nsup ; i++) {
+					int[] l = CQI.struc2Cpos(supqn, i);
+					sup_limits.add(new Match(l[0], l[1]));
+				}
+				//System.out.println("All sup limits are "+sup_limits);
+				List<Match> corpus_matches = corpus.getMatches();
+				//System.out.println("corpus matches: "+corpus_matches);
+				ArrayList<Integer> inter = intersect(corpus_matches, sup_limits);
+				//System.out.println( "No of $sup that covers $corpus: "+inter);
+				int[] structid = new int[inter.size()];
+				for (int i = 0 ; i < structid.length ; i++) structid[i] = inter.get(i);
+
+				String[] inter_values = CQI.struc2Str(supqn, structid);
+				//System.out.println( " with values: "+Arrays.toString(inter_values));
+				HashMap<String, Integer> inter_uniq = new HashMap<String, Integer>();
+
+				if (groupByTexts) {
+					for (String o : inter_values) {
+						if (!inter_uniq.containsKey(o)) {
+							inter_uniq.put(o, 0);
+						}
+						inter_uniq.put(o, inter_uniq.get(o) +1);
+					}
+				} else {
+					for (int imatch = 0 ; imatch < inter.size() ; imatch++) {
+						String o = inter_values[imatch];
+						if (!inter_uniq.containsKey(o)) {
+							inter_uniq.put(o, 0);
+						}
+						int s = sup_limits.get(inter.get(imatch)).getLength();
+						inter_uniq.put(o, inter_uniq.get(o) + s);
+
+					}
+				}
+				Object[] sortedkeys = inter_uniq.keySet().toArray();
+				Arrays.sort(sortedkeys);
+				for (Object k : sortedkeys) {
+					int v = inter_uniq.get(k);
+					if (v < fMin) fMin=v;
+					if (v > fMax) fMax=v;
+					dataset.put(v, new Comparable[]{p.getName(), k.toString()});
+					
+				}
+			}
+		}
+		catch(Exception e) {
+			System.out.println("Error while computing text informations: "+e);
+			e.printStackTrace();
+		}
+	}
+	
+	
+	/**
+	 * 
+	 * @param corpus
+	 * @param structs
+	 * @return
+	 */
+	public static ArrayList<Integer> intersect(List<Match> corpus, List<Match> structs) {
+		int ai=0, bi=0;
+		ArrayList<Integer> result = new ArrayList<Integer>();
+
+		while (ai < corpus.size() && bi < structs.size() ) {
+			if (structs.get(bi).contains(corpus.get(ai))) { 
+				result.add(bi);
+				ai++; 
+			} else if (corpus.get(ai).contains(structs.get(bi))) { 
+				result.add(bi);
+				bi++; 
+			} else { 
+				if (structs.get(bi).getStart() < corpus.get(ai).getStart()) {
+					bi++;
+				} else {
+					ai++;	
+				}
+			} 
+		}
+
+		return result;
+	}
+
+
+	/**
+	 * @return the dataset
+	 */
+	public HashMap<Integer, Comparable[]> getDataset() {
+		return dataset;
+	}
+
+
+	/**
+	 * @return the corpus
+	 */
+	public Corpus getCorpus() {
+		return corpus;
+	}
+
+
+	/**
+	 * @return the propertyName
+	 */
+	public String getPropertyName() {
+		return propertyName;
+	}
+
+
+	/**
+	 * @return the values
+	 */
+	public List<String> getValues() {
+		return values;
+	}
+
+
+	/**
+	 * @return the fMin
+	 */
+	public int getFMin() {
+		return fMin;
+	}
+
+
+	/**
+	 * @return the fMax
+	 */
+	public int getFMax() {
+		return fMax;
+	}
+
+
+	@Override
+	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public boolean delete() {
+		return this.corpus.removeResult(this);
+	}
+
+
+	@Override
+	public HasResults getParent() {
+		return this.corpus;
+	}
+
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+	
+	
+}

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

Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/MultipleSpiderWebPlot.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/MultipleSpiderWebPlot.java	(revision 0)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/MultipleSpiderWebPlot.java	(revision 19)
@@ -0,0 +1,667 @@
+/* ===========================================================
+ * JFreeChart : a free chart library for the Java(tm) platform
+ * ===========================================================
+ *
+ * (C) Copyright 2000-2013, by Object Refinery Limited and Contributors.
+ *
+ * Project Info:  http://www.jfree.org/jfreechart/index.html
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library 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 Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
+ * USA.
+ *
+ * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. 
+ * Other names may be trademarks of their respective owners.]
+ *
+ * --------------------
+ * MultipleSpiderWebPlot.java
+ * --------------------
+ * (C) Copyright 2004-2013, by Object Refinery Limited.
+ *
+ * Original Author:  David Gilbert (for Object Refinery Limited);
+ * Contributor(s):   Brian Cabana (patch 1943021);
+ *
+ * Changes
+ * -------
+ * 29-Jan-2004 : Version 1 (DG);
+ * 31-Mar-2004 : Added setPieIndex() call during drawing (DG);
+ * 20-Apr-2005 : Small change for update to LegendItem constructors (DG);
+ * 05-May-2005 : Updated draw() method parameters (DG);
+ * 16-Jun-2005 : Added get/setDataset() and equals() methods (DG);
+ * ------------- JFREECHART 1.0.x ---------------------------------------------
+ * 06-Apr-2006 : Fixed bug 1190647 - legend and section colors not consistent
+ *               when aggregation limit is specified (DG);
+ * 27-Sep-2006 : Updated draw() method for deprecated code (DG);
+ * 17-Jan-2007 : Updated prefetchSectionPaints() to check settings in
+ *               underlying SpiderWebPlot (DG);
+ * 17-May-2007 : Added argument check to setPieChart() (DG);
+ * 18-May-2007 : Set dataset for LegendItem (DG);
+ * 18-Apr-2008 : In the constructor, register the plot as a dataset listener -
+ *               see patch 1943021 from Brian Cabana (DG);
+ * 30-Dec-2008 : Added legendItemShape field, and fixed cloning bug (DG);
+ * 09-Jan-2009 : See ignoreNullValues to true for sub-chart (DG);
+ * 01-Jun-2009 : Set series key in getLegendItems() (DG);
+ * 03-Jul-2013 : Use ParamChecks (DG);
+ *
+ */
+
+package org.txm.textsbalance.core.chartsengine.jfreechart;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Paint;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.jfree.chart.ChartRenderingInfo;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.LegendItem;
+import org.jfree.chart.LegendItemCollection;
+import org.jfree.chart.event.PlotChangeEvent;
+import org.jfree.chart.plot.Plot;
+import org.jfree.chart.plot.PlotRenderingInfo;
+import org.jfree.chart.plot.PlotState;
+import org.jfree.chart.plot.SpiderWebPlot;
+import org.jfree.chart.title.TextTitle;
+import org.jfree.chart.util.ParamChecks;
+import org.jfree.data.category.CategoryDataset;
+import org.jfree.data.category.CategoryToPieDataset;
+import org.jfree.data.category.DefaultCategoryDataset;
+import org.jfree.data.general.DatasetChangeEvent;
+import org.jfree.data.general.DatasetUtilities;
+import org.jfree.data.general.PieDataset;
+import org.jfree.io.SerialUtilities;
+import org.jfree.ui.RectangleEdge;
+import org.jfree.ui.RectangleInsets;
+import org.jfree.util.ObjectUtilities;
+import org.jfree.util.PaintUtilities;
+import org.jfree.util.ShapeUtilities;
+import org.jfree.util.TableOrder;
+
+/**
+ * A plot that displays multiple pie plots using data from a
+ * {@link CategoryDataset}.
+ */
+public class MultipleSpiderWebPlot extends Plot implements Cloneable, Serializable {
+
+    /** The chart object that draws the individual pie charts. */
+    private JFreeChart spiderChart;
+
+    /** The dataset. */
+    private DefaultCategoryDataset dataset;
+
+    /** The data extract order (by row or by column). */
+    private TableOrder dataExtractOrder;
+
+    /** The pie section limit percentage. */
+    private double limit = 0.0;
+
+    /**
+     * The key for the aggregated items.
+     *
+     * @since 1.0.2
+     */
+    private Comparable aggregatedItemsKey;
+
+    /**
+     * The paint for the aggregated items.
+     *
+     * @since 1.0.2
+     */
+    private transient Paint aggregatedItemsPaint;
+
+    /**
+     * The colors to use for each section.
+     *
+     * @since 1.0.2
+     */
+    private transient Map sectionPaints;
+
+    /**
+     * The legend item shape (never null).
+     *
+     * @since 1.0.12
+     */
+    private transient Shape legendItemShape;
+
+    /**
+     * Creates a new plot with no data.
+     */
+    public MultipleSpiderWebPlot() {
+        this(null);
+    }
+
+    /**
+     * Creates a new plot.
+     *
+     * @param dataset  the dataset (<code>null</code> permitted).
+     */
+    public MultipleSpiderWebPlot(DefaultCategoryDataset dataset) {
+        super();
+        setDataset(dataset);
+        SpiderWebPlot piePlot = new SpiderWebPlot(null);
+        this.spiderChart = new JFreeChart(piePlot);
+        this.spiderChart.removeLegend();
+        this.dataExtractOrder = TableOrder.BY_COLUMN;
+        this.spiderChart.setBackgroundPaint(null);
+        TextTitle seriesTitle = new TextTitle("Series Title",
+                new Font("SansSerif", Font.BOLD, 12));
+        seriesTitle.setPosition(RectangleEdge.BOTTOM);
+        this.spiderChart.setTitle(seriesTitle);
+        this.aggregatedItemsKey = "Other";
+        this.aggregatedItemsPaint = Color.lightGray;
+        this.sectionPaints = new HashMap();
+        this.legendItemShape = new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0);
+    }
+
+    /**
+     * Returns the dataset used by the plot.
+     *
+     * @return The dataset (possibly <code>null</code>).
+     */
+    public CategoryDataset getDataset() {
+        return this.dataset;
+    }
+
+    /**
+     * Sets the dataset used by the plot and sends a {@link PlotChangeEvent}
+     * to all registered listeners.
+     *
+     * @param dataset  the dataset (<code>null</code> permitted).
+     */
+    public void setDataset(DefaultCategoryDataset dataset) {
+        // if there is an existing dataset, remove the plot from the list of
+        // change listeners...
+        if (this.dataset != null) {
+            this.dataset.removeChangeListener(this);
+        }
+
+        // set the new dataset, and register the chart as a change listener...
+        this.dataset = dataset;
+        if (dataset != null) {
+            setDatasetGroup(dataset.getGroup());
+            dataset.addChangeListener(this);
+        }
+
+        // send a dataset change event to self to trigger plot change event
+        datasetChanged(new DatasetChangeEvent(this, dataset));
+    }
+
+    /**
+     * Returns the pie chart that is used to draw the individual pie plots.
+     * Note that there are some attributes on this chart instance that will
+     * be ignored at rendering time (for example, legend item settings).
+     *
+     * @return The pie chart (never <code>null</code>).
+     *
+     * @see #setPieChart(JFreeChart)
+     */
+    public JFreeChart getPieChart() {
+        return this.spiderChart;
+    }
+
+    /**
+     * Sets the chart that is used to draw the individual pie plots.  The
+     * chart's plot must be an instance of {@link SpiderWebPlot}.
+     *
+     * @param pieChart  the pie chart (<code>null</code> not permitted).
+     *
+     * @see #getPieChart()
+     */
+    public void setPieChart(JFreeChart pieChart) {
+        ParamChecks.nullNotPermitted(pieChart, "pieChart");
+        if (!(pieChart.getPlot() instanceof SpiderWebPlot)) {
+            throw new IllegalArgumentException("The 'pieChart' argument must "
+                    + "be a chart based on a SpiderWebPlot.");
+        }
+        this.spiderChart = pieChart;
+        fireChangeEvent();
+    }
+
+    /**
+     * Returns the data extract order (by row or by column).
+     *
+     * @return The data extract order (never <code>null</code>).
+     */
+    public TableOrder getDataExtractOrder() {
+        return this.dataExtractOrder;
+    }
+
+    /**
+     * Sets the data extract order (by row or by column) and sends a
+     * {@link PlotChangeEvent} to all registered listeners.
+     *
+     * @param order  the order (<code>null</code> not permitted).
+     */
+    public void setDataExtractOrder(TableOrder order) {
+        ParamChecks.nullNotPermitted(order, "order");
+        this.dataExtractOrder = order;
+        fireChangeEvent();
+    }
+
+    /**
+     * Returns the limit (as a percentage) below which small pie sections are
+     * aggregated.
+     *
+     * @return The limit percentage.
+     */
+    public double getLimit() {
+        return this.limit;
+    }
+
+    /**
+     * Sets the limit below which pie sections are aggregated.
+     * Set this to 0.0 if you don't want any aggregation to occur.
+     *
+     * @param limit  the limit percent.
+     */
+    public void setLimit(double limit) {
+        this.limit = limit;
+        fireChangeEvent();
+    }
+
+    /**
+     * Returns the key for aggregated items in the pie plots, if there are any.
+     * The default value is "Other".
+     *
+     * @return The aggregated items key.
+     *
+     * @since 1.0.2
+     */
+    public Comparable getAggregatedItemsKey() {
+        return this.aggregatedItemsKey;
+    }
+
+    /**
+     * Sets the key for aggregated items in the pie plots.  You must ensure
+     * that this doesn't clash with any keys in the dataset.
+     *
+     * @param key  the key (<code>null</code> not permitted).
+     *
+     * @since 1.0.2
+     */
+    public void setAggregatedItemsKey(Comparable key) {
+        ParamChecks.nullNotPermitted(key, "key");
+        this.aggregatedItemsKey = key;
+        fireChangeEvent();
+    }
+
+    /**
+     * Returns the paint used to draw the pie section representing the
+     * aggregated items.  The default value is <code>Color.lightGray</code>.
+     *
+     * @return The paint.
+     *
+     * @since 1.0.2
+     */
+    public Paint getAggregatedItemsPaint() {
+        return this.aggregatedItemsPaint;
+    }
+
+    /**
+     * Sets the paint used to draw the pie section representing the aggregated
+     * items and sends a {@link PlotChangeEvent} to all registered listeners.
+     *
+     * @param paint  the paint (<code>null</code> not permitted).
+     *
+     * @since 1.0.2
+     */
+    public void setAggregatedItemsPaint(Paint paint) {
+        ParamChecks.nullNotPermitted(paint, "paint");
+        this.aggregatedItemsPaint = paint;
+        fireChangeEvent();
+    }
+
+    /**
+     * Returns a short string describing the type of plot.
+     *
+     * @return The plot type.
+     */
+    @Override
+    public String getPlotType() {
+        return "Multiple Pie Plot";
+         // TODO: need to fetch this from localised resources
+    }
+
+    /**
+     * Returns the shape used for legend items.
+     *
+     * @return The shape (never <code>null</code>).
+     *
+     * @see #setLegendItemShape(Shape)
+     *
+     * @since 1.0.12
+     */
+    public Shape getLegendItemShape() {
+        return this.legendItemShape;
+    }
+
+    /**
+     * Sets the shape used for legend items and sends a {@link PlotChangeEvent}
+     * to all registered listeners.
+     *
+     * @param shape  the shape (<code>null</code> not permitted).
+     *
+     * @see #getLegendItemShape()
+     *
+     * @since 1.0.12
+     */
+    public void setLegendItemShape(Shape shape) {
+        ParamChecks.nullNotPermitted(shape, "shape");
+        this.legendItemShape = shape;
+        fireChangeEvent();
+    }
+
+    /**
+     * Draws the plot on a Java 2D graphics device (such as the screen or a
+     * printer).
+     *
+     * @param g2  the graphics device.
+     * @param area  the area within which the plot should be drawn.
+     * @param anchor  the anchor point (<code>null</code> permitted).
+     * @param parentState  the state from the parent plot, if there is one.
+     * @param info  collects info about the drawing.
+     */
+    @Override
+    public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
+            PlotState parentState, PlotRenderingInfo info) {
+
+        // adjust the drawing area for the plot insets (if any)...
+        RectangleInsets insets = getInsets();
+        insets.trim(area);
+        drawBackground(g2, area);
+        drawOutline(g2, area);
+
+        // check that there is some data to display...
+        if (DatasetUtilities.isEmptyOrNull(this.dataset)) {
+            drawNoDataMessage(g2, area);
+            return;
+        }
+
+        int pieCount;
+        if (this.dataExtractOrder == TableOrder.BY_ROW) {
+            pieCount = this.dataset.getRowCount();
+        }
+        else {
+            pieCount = this.dataset.getColumnCount();
+        }
+
+        // the columns variable is always >= rows
+        int displayCols = (int) Math.ceil(Math.sqrt(pieCount));
+        int displayRows
+            = (int) Math.ceil((double) pieCount / (double) displayCols);
+
+        // swap rows and columns to match plotArea shape
+        if (displayCols > displayRows && area.getWidth() < area.getHeight()) {
+            int temp = displayCols;
+            displayCols = displayRows;
+            displayRows = temp;
+        }
+
+        prefetchSectionPaints();
+
+        int x = (int) area.getX();
+        int y = (int) area.getY();
+        int width = ((int) area.getWidth()) / displayCols;
+        int height = ((int) area.getHeight()) / displayRows;
+        int row = 0;
+        int column = 0;
+        int diff = (displayRows * displayCols) - pieCount;
+        int xoffset = 0;
+        Rectangle rect = new Rectangle();
+
+        for (int pieIndex = 0; pieIndex < pieCount; pieIndex++) {
+            rect.setBounds(x + xoffset + (width * column), y + (height * row),
+                    width, height);
+
+            String title;
+            if (this.dataExtractOrder == TableOrder.BY_ROW) {
+                title = this.dataset.getRowKey(pieIndex).toString();
+            }
+            else {
+                title = this.dataset.getColumnKey(pieIndex).toString();
+            }
+            this.spiderChart.setTitle(title);
+
+            DefaultCategoryDataset piedataset = new DefaultCategoryDataset();
+            for (int irow = 0 ; irow < this.dataset.getRowCount() ; irow++) {
+            	this.dataset.getValue(irow, pieIndex);
+            }
+            
+            SpiderWebPlot piePlot = (SpiderWebPlot) this.spiderChart.getPlot();
+            piePlot.setDataset(piedataset);
+            
+
+            ChartRenderingInfo subinfo = null;
+            if (info != null) {
+                subinfo = new ChartRenderingInfo();
+            }
+            this.spiderChart.draw(g2, rect, subinfo);
+            if (info != null) {
+                assert subinfo != null;
+                info.getOwner().getEntityCollection().addAll(
+                        subinfo.getEntityCollection());
+                info.addSubplotInfo(subinfo.getPlotInfo());
+            }
+
+            ++column;
+            if (column == displayCols) {
+                column = 0;
+                ++row;
+
+                if (row == displayRows - 1 && diff != 0) {
+                    xoffset = (diff * width) / 2;
+                }
+            }
+        }
+
+    }
+
+    /**
+     * For each key in the dataset, check the <code>sectionPaints</code>
+     * cache to see if a paint is associated with that key and, if not,
+     * fetch one from the drawing supplier.  These colors are cached so that
+     * the legend and all the subplots use consistent colors.
+     */
+    private void prefetchSectionPaints() {
+
+//        // pre-fetch the colors for each key...this is because the subplots
+//        // may not display every key, but we need the coloring to be
+//        // consistent...
+//
+//        SpiderWebPlot piePlot = (SpiderWebPlot) getPieChart().getPlot();
+//
+//        if (this.dataExtractOrder == TableOrder.BY_ROW) {
+//            // column keys provide potential keys for individual pies
+//            for (int c = 0; c < this.dataset.getColumnCount(); c++) {
+//                Comparable key = this.dataset.getColumnKey(c);
+//                Paint p = piePlot.getSeriesPaint(key);
+//                if (p == null) {
+//                    p = (Paint) this.sectionPaints.get(key);
+//                    if (p == null) {
+//                        p = getDrawingSupplier().getNextPaint();
+//                    }
+//                }
+//                this.sectionPaints.put(key, p);
+//            }
+//        }
+//        else {
+//            // row keys provide potential keys for individual pies
+//            for (int r = 0; r < this.dataset.getRowCount(); r++) {
+//                Comparable key = this.dataset.getRowKey(r);
+//                Paint p = piePlot.getSeriesPaint(key);
+//                if (p == null) {
+//                    p = (Paint) this.sectionPaints.get(key);
+//                    if (p == null) {
+//                        p = getDrawingSupplier().getNextPaint();
+//                    }
+//                }
+//                this.sectionPaints.put(key, p);
+//            }
+//        }
+
+    }
+
+    /**
+     * Returns a collection of legend items for the pie chart.
+     *
+     * @return The legend items.
+     */
+    @Override
+    public LegendItemCollection getLegendItems() {
+
+        LegendItemCollection result = new LegendItemCollection();
+        if (this.dataset == null) {
+            return result;
+        }
+
+        List keys = null;
+        prefetchSectionPaints();
+        if (this.dataExtractOrder == TableOrder.BY_ROW) {
+            keys = this.dataset.getColumnKeys();
+        }
+        else if (this.dataExtractOrder == TableOrder.BY_COLUMN) {
+            keys = this.dataset.getRowKeys();
+        }
+        if (keys == null) {
+            return result;
+        }
+        int section = 0;
+        Iterator iterator = keys.iterator();
+        while (iterator.hasNext()) {
+            Comparable key = (Comparable) iterator.next();
+            String label = key.toString();  // TODO: use a generator here
+            String description = label;
+            Paint paint = (Paint) this.sectionPaints.get(key);
+            LegendItem item = new LegendItem(label, description, null,
+                    null, getLegendItemShape(), paint,
+                    Plot.DEFAULT_OUTLINE_STROKE, paint);
+            item.setSeriesKey(key);
+            item.setSeriesIndex(section);
+            item.setDataset(getDataset());
+            result.add(item);
+            section++;
+        }
+        if (this.limit > 0.0) {
+            LegendItem a = new LegendItem(this.aggregatedItemsKey.toString(),
+                    this.aggregatedItemsKey.toString(), null, null,
+                    getLegendItemShape(), this.aggregatedItemsPaint,
+                    Plot.DEFAULT_OUTLINE_STROKE, this.aggregatedItemsPaint);
+            result.add(a);
+        }
+        return result;
+    }
+
+    /**
+     * Tests this plot for equality with an arbitrary object.  Note that the
+     * plot's dataset is not considered in the equality test.
+     *
+     * @param obj  the object (<code>null</code> permitted).
+     *
+     * @return <code>true</code> if this plot is equal to <code>obj</code>, and
+     *     <code>false</code> otherwise.
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (!(obj instanceof MultipleSpiderWebPlot)) {
+            return false;
+        }
+        MultipleSpiderWebPlot that = (MultipleSpiderWebPlot) obj;
+        if (this.dataExtractOrder != that.dataExtractOrder) {
+            return false;
+        }
+        if (this.limit != that.limit) {
+            return false;
+        }
+        if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {
+            return false;
+        }
+        if (!PaintUtilities.equal(this.aggregatedItemsPaint,
+                that.aggregatedItemsPaint)) {
+            return false;
+        }
+        if (!ObjectUtilities.equal(this.spiderChart, that.spiderChart)) {
+            return false;
+        }
+        if (!ShapeUtilities.equal(this.legendItemShape, that.legendItemShape)) {
+            return false;
+        }
+        if (!super.equals(obj)) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Returns a clone of the plot.
+     *
+     * @return A clone.
+     *
+     * @throws CloneNotSupportedException if some component of the plot does
+     *         not support cloning.
+     */
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        MultipleSpiderWebPlot clone = (MultipleSpiderWebPlot) super.clone();
+        clone.spiderChart = (JFreeChart) this.spiderChart.clone();
+        clone.sectionPaints = new HashMap(this.sectionPaints);
+        clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape);
+        return clone;
+    }
+
+    /**
+     * Provides serialization support.
+     *
+     * @param stream  the output stream.
+     *
+     * @throws IOException  if there is an I/O error.
+     */
+    private void writeObject(ObjectOutputStream stream) throws IOException {
+        stream.defaultWriteObject();
+        SerialUtilities.writePaint(this.aggregatedItemsPaint, stream);
+        SerialUtilities.writeShape(this.legendItemShape, stream);
+    }
+
+    /**
+     * Provides serialization support.
+     *
+     * @param stream  the input stream.
+     *
+     * @throws IOException  if there is an I/O error.
+     * @throws ClassNotFoundException  if there is a classpath problem.
+     */
+    private void readObject(ObjectInputStream stream)
+        throws IOException, ClassNotFoundException {
+        stream.defaultReadObject();
+        this.aggregatedItemsPaint = SerialUtilities.readPaint(stream);
+        this.legendItemShape = SerialUtilities.readShape(stream);
+        this.sectionPaints = new HashMap();
+    }
+
+}

Property changes on: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/MultipleSpiderWebPlot.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCBalanceSpiderChartCreator.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCBalanceSpiderChartCreator.java	(revision 0)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCBalanceSpiderChartCreator.java	(revision 19)
@@ -0,0 +1,83 @@
+package org.txm.textsbalance.core.chartsengine.jfreechart;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.labels.CategoryToolTipGenerator;
+import org.jfree.chart.plot.SpiderWebPlot;
+import org.jfree.data.category.CategoryDataset;
+import org.jfree.data.category.DefaultCategoryDataset;
+import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
+import org.txm.chartsengine.jfreechart.core.themes.base.Theme;
+import org.txm.textsbalance.core.functions.TextsBalance;
+
+public class JFCBalanceSpiderChartCreator extends JFCChartCreator {
+
+	public JFCBalanceSpiderChartCreator() {
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public JFreeChart createChart(Object resultData, String preferencesNode) {
+
+		final TextsBalance balance = (TextsBalance) resultData;
+		
+		HashMap<Integer, Comparable[]> data = balance.getDataset();
+		
+		
+		JFreeChart chart = null;
+
+		DefaultCategoryDataset dataset = new DefaultCategoryDataset();
+		
+		Set<Integer> keys = data.keySet();
+		Iterator<Integer> it = keys.iterator();
+		while (it.hasNext()){
+		   int key = it.next();
+		   Comparable[] value = data.get(key);
+		   dataset.addValue(key, value[0], value[1]);
+		}
+		
+		
+		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));
+				
+//				if(balance.getValues().size() > col)	{
+//					 balance.getValues().get(col);
+//				}
+//				return "error";
+				return String.valueOf(dataset.getValue(row, col).intValue());
+			}
+		});
+
+
+		chart = new JFreeChart(plot);
+		chart.setTitle("metadata = " + balance.getPropertyName() + ", N = " +  balance.getValues().size() + ", fmin = " + balance.getFMin() + ", fmax = " + balance.getFMax());
+
+		// FIXME: tests
+		//this.getChartsEngine().getTheme().apply(chart);
+		this.getChartsEngine().getTheme().applyThemeToChart(chart, Theme.ITEMS_RENDERING_GRAYSCALE_MODE);
+		
+		return chart;
+		
+	}
+
+
+	@Override
+	public Class getResultDataType() {
+		return TextsBalance.class;
+	}
+
+
+
+
+
+	
+
+}

Property changes on: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCBalanceSpiderChartCreator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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 0)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java	(revision 19)
@@ -0,0 +1,88 @@
+package org.txm.textsbalance.core.chartsengine.r;
+
+import java.io.File;
+
+import org.rosuda.REngine.REXPMismatchException;
+import org.txm.chartsengine.core.ChartCreator;
+import org.txm.chartsengine.r.core.RChartsEngine;
+import org.txm.stat.StatException;
+import org.txm.stat.engine.r.RWorkspace;
+import org.txm.stat.engine.r.RWorkspaceException;
+import org.txm.textsbalance.core.functions.TextsBalance;
+
+public class RBalanceSpiderChartCreator extends ChartCreator {
+
+	public RBalanceSpiderChartCreator() {
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public Object createChart(Object resultData, String preferencesNode) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public File createChartFile(Object resultData, File file, String preferencesNode) {
+		
+//		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();
+//		}
+		
+		return file;
+	}
+
+	@Override
+	public Class getResultDataType() {
+		return TextsBalance.class;
+	}
+
+
+
+}

Property changes on: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/r/RBalanceSpiderChartCreator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/preferences/TextsBalancePreferences.java
===================================================================
--- tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/preferences/TextsBalancePreferences.java	(revision 0)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/preferences/TextsBalancePreferences.java	(revision 19)
@@ -0,0 +1,66 @@
+package org.txm.textsbalance.core.preferences;
+
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.service.prefs.Preferences;
+import org.txm.tbx.preferences.TXMPreferences;
+
+/**
+ * Preferences initializer and manager.
+ * @author sjacquot
+ *
+ */
+public class TextsBalancePreferences extends TXMPreferences {
+
+
+	// auto populate the preference node qualifier from the current bundle id
+	public static final String PREFERENCES_NODE = FrameworkUtil.getBundle(TextsBalancePreferences.class).getSymbolicName();
+
+	
+	public static final String PREFERENCES_PREFIX = "texts_balance_"; //$NON-NLS-1$
+	
+	public static final String GROUP_BY_WORDS = PREFERENCES_PREFIX + "count_by_words"; //$NON-NLS-1$
+	public static final String METHOD = PREFERENCES_PREFIX + "method"; //$NON-NLS-1$
+	
+	// local result preferences
+	public static final String STRUCTURAL_UNIT = PREFERENCES_PREFIX + "structural_unit"; //$NON-NLS-1$
+	public static final String STRUCTURAL_UNIT_PROPERTY_INDEX = PREFERENCES_PREFIX + "structural_unit_property_index"; //$NON-NLS-1$
+	
+	
+	public TextsBalancePreferences() {
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	public void initializeDefaultPreferences() {
+
+		// FIXME: trying to store the preference in the host plugin preference node
+//		IPreferencesService service = Platform.getPreferencesService();
+//		service.getRootNode().node(DefaultScope.SCOPE).node(Application.PLUGIN_ID).putBoolean(GROUP_BY_WORDS, true);
+//		service.getRootNode().node(DefaultScope.SCOPE).node(Application.PLUGIN_ID).putInt(METHOD, 2);
+//		try {
+//			service.getRootNode().flush();
+//		} catch (BackingStoreException e) {
+//			System.err.println(e);
+//		}
+		
+		Preferences defaultPreferences = DefaultScope.INSTANCE.getNode(PREFERENCES_NODE);
+//		//Preferences defaultPreferences = DefaultScope.INSTANCE.getNode(Application.PLUGIN_ID);
+		defaultPreferences.putBoolean(GROUP_BY_WORDS, true);
+		defaultPreferences.putInt(METHOD, 2);
+		
+		
+		defaultPreferences.put(STRUCTURAL_UNIT, "text");
+		defaultPreferences.putInt(STRUCTURAL_UNIT_PROPERTY_INDEX, 0);
+
+		// FIXME: Debug
+//		System.err.println("*******************************TextsBalancePreferencesInitializer.initializeDefaultPreferences()");
+		
+	}
+	
+	
+
+}
+
+

Property changes on: tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/preferences/TextsBalancePreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

