Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 634)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java	(revision 635)
@@ -913,6 +913,35 @@
 		this.lexicon = null;
 	}
 
+	/**
+	 * Sets the query.
+	 * @param query
+	 */
+	public void setQuery(Query query)	{
+		this.pQuery = query;
+	}
+	
+	/**
+	 * Sets the properties.
+	 * @param properties
+	 */
+	public void setProperties(List<Property> properties)	{
+		this.pProperties = properties;
+	}
+	
+	/**
+	 * Sets the property.
+	 * Clears all existing properties.
+	 * @param property
+	 */
+	public void setProperty(Property property)	{
+		List<Property> properties = new ArrayList<Property>();
+		properties.add(property);
+		this.setProperties(properties);
+	}
+	
+	
+	
 	public void setParameters(Query query, List<Property> props, Integer filterFmin, Integer filterFmax, Integer filterVmax, Integer nLinesPerPage) {
 		this.pQuery = query;
 		this.pProperties = props;
Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java	(revision 634)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesSelectionEditor.java	(revision 635)
@@ -44,7 +44,6 @@
 		groupBarsByLines.setToolTipText(SpecificitiesUIMessages.SpecificitiesPreferencePage_4);
 		groupBarsByLines.setImage(IImageKeys.getImage(ComputeSpecifities.class, "icons/silk_group_bars_by_lines.png"));
 		groupBarsByLines.addSelectionListener(new ComputeSelectionListener(this));
-
 		
 		
 		// Banality
@@ -53,10 +52,9 @@
 		
 		banality = new FloatSpinner(this.getCommandParametersGroup(), SWT.BORDER);
 		banality.setToolTipText("Banality threshold");
-		banality.setDigits(1);
 		banality.setIncrement(1);
 		banality.setMinimum(0);
-		banality.setMaximum(200);
+		banality.setMaximumAsFloat(2);
 		banality.addSelectionListener(new ComputeSelectionListener(this));
 		
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 634)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 635)
@@ -680,7 +680,7 @@
 					f.set(this, value);
 				}
 				// FIXME: debug
-				System.err.println("TXMEditor.autoUpdateEditorFieldsFromResult(): setting editor parameter " + parameter.key() + " = " + value + " (" + value.getClass() + ")");
+				System.err.println("TXMEditor.autoUpdateEditorFieldsFromResult(): setting editor parameter " + parameter.key() + " = " + value + " (" + value.getClass() + " to object " + object.getClass() + ")");
 				
 				// FIXME: need to extend this list of managed Widgets
 			}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/FloatSpinner.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/FloatSpinner.java	(revision 634)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/FloatSpinner.java	(revision 635)
@@ -21,6 +21,7 @@
 	 */
 	public FloatSpinner(Composite parent, int style) {
 		super(parent, style);
+		this.setDigits(1);
 	}
 
 	/**
@@ -39,6 +40,13 @@
 		return (float) (super.getSelection() / Math.pow(10, this.getDigits()));
 	}
 	
+	/**
+	 * Sets the maximum that the receiver will allow.
+	 * @param value
+	 */
+	public void setMaximumAsFloat(float value){
+		this.setMaximum((int) (value * Math.pow(10, this.getDigits())));
+	}
 	
 	@Override
 	protected void checkSubclass() {
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 634)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/editors/WordCloudEditor.java	(revision 635)
@@ -38,60 +38,37 @@
 	
 	@Override
 	public void _createPartControl(Composite parent) {
-//		super.createPartControl(parent);
 
-		//Composite paramPanel = new Composite(parent, SWT.NONE);
-
-		//		FormData fdata = new FormData();
-		//		fdata.top = new FormAttachment(0);
-		//		fdata.left = new FormAttachment(0);
-		//		fdata.right = new FormAttachment(100);
-		//		this.getParametersComposite().setLayoutData(fdata);
-
-		//		FormData fdata = new FormData();
-		//		fdata.top = new FormAttachment(this.getParametersComposite());
-		//		fdata.left = new FormAttachment(0);
-		//		fdata.right = new FormAttachment(100);
-		//		fdata.bottom = new FormAttachment(100);
-
-		// fill param Area
-		//		RowLayout layout = new RowLayout();
-		//		layout.wrap = true;
-		//		layout.center = true;
-		//		this.getParametersComposite().setLayout(layout);
-
 		// for group tests
-		Composite p = this.getCommandParametersGroup();
-		// for tab folder tests
-		//Composite p = this.getCommandParametersComposite();
+		Composite parametersArea = this.getCommandParametersGroup();
 
 		// fmin
-		new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_fmin);
-		minFreq = new Spinner(p, SWT.BORDER);
+		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_fmin);
+		minFreq = new Spinner(parametersArea, SWT.BORDER);
 		minFreq.setMinimum(1);
 		minFreq.setIncrement(1);
 		minFreq.setMaximum(100000000);
 
 		// max words / vmax
-		new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_vmax);
-		maxWordsCount = new Spinner(p, SWT.BORDER);
+		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_vmax);
+		maxWordsCount = new Spinner(parametersArea, SWT.BORDER);
 		maxWordsCount.setMinimum(10);
 		maxWordsCount.setIncrement(1);
 		maxWordsCount.setMaximum(100000);
 
 		// rotation percent
-		new Label(p, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_Percent_of_rotated_labels);
-		rotationPercent = new Spinner(p, SWT.BORDER);
+		new Label(parametersArea, SWT.NONE).setText(WordCloudUIMessages.EditorToolBar_Percent_of_rotated_labels);
+		rotationPercent = new Spinner(parametersArea, SWT.BORDER);
 		rotationPercent.setMinimum(0);
 		rotationPercent.setIncrement(1);
 		rotationPercent.setMaximum(100);
 
 		// random positions
-		randomPositions = new Button(p, SWT.CHECK);
+		randomPositions = new Button(parametersArea, SWT.CHECK);
 		randomPositions.setText(WordCloudUIMessages.EditorToolBar_Randomize_positions);
 		
 
-		p.pack();
+		parametersArea.pack();
 
 		Log.info(WordCloudUIMessages.Log_WordCloud_ready + this.getResult());
 
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 634)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/handlers/ComputeWordCloud.java	(revision 635)
@@ -27,6 +27,8 @@
 //
 package org.txm.wordcloud.rcp.handlers;
 
+import java.util.ArrayList;
+
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.txm.chartsengine.rcp.editors.ChartEditor;
@@ -35,12 +37,15 @@
 import org.txm.rcp.commands.OpenBrowser;
 import org.txm.rcp.handlers.BaseAbstractHandler;
 import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.clientExceptions.CqiClientException;
 import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.searchengine.cqp.corpus.query.Query;
 import org.txm.wordcloud.core.functions.WordCloud;
 import org.txm.wordcloud.core.messages.WordCloudCoreMessages;
 
 /**
- * Open the WordCloud Editor.
+ * Computes and opens a WordCloudEditor.
  * 
  * @author mdecorde
  * @author sjacquot
@@ -54,11 +59,6 @@
 	}
 	
 	
-
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-	 */
 	@Override
 	public Object execute(final ExecutionEvent event) throws ExecutionException {
 
@@ -67,10 +67,9 @@
 		}
 
 		Object selection = this.getSelection(event);
-		 WordCloud wordCloud = null;
+		WordCloud wordCloud = null;
 		
-		
-		// reopening an existing result
+		// Reopening an existing result
 		if (selection instanceof WordCloud) {
 			wordCloud = ((WordCloud) selection);
 		}
@@ -80,14 +79,41 @@
 				OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/extensions#wordcloud"); //$NON-NLS-1$
 			}
 
-			// creates new result from Corpus
+			// Creating from Corpus
 			if (selection instanceof Corpus) {
-				wordCloud = new WordCloud(new Index((Corpus)selection));
+				try {
+					Corpus corpus = (Corpus) selection; 
+					String lang = corpus.getLang();
+					Query query;
+					if (corpus.getProperty(lang + "pos") != null) {
+						query = new Query(WordCloud.getQueryForLang(lang));
+					}
+					else {
+						query = new Query("[]");
+					}
+					
+					System.out.println("Used query: " + query);
+
+					Index index = new Index((Corpus)selection);
+					index.setQuery(query);
+					index.setProperty(corpus.getWordProperty());
+					
+					wordCloud = new WordCloud(index);
+				}
+				catch (CqiClientException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
 			}
-			// creates new result from Index
+			// Creating from Index
 			else if (selection instanceof Index) {
 				wordCloud = new WordCloud((Index)selection);
 			}
+			// Error
+			else	{
+				return super.logCanNotCompute(selection);
+			}
+
 		}
 		
 		StatusLine.setMessage(WordCloudCoreMessages.StatusBar_Opening_result);
Index: tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/preferences/WordCloudPreferencePage.java
===================================================================
--- tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/preferences/WordCloudPreferencePage.java	(revision 634)
+++ tmp/org.txm.wordcloud.rcp/src/org/txm/wordcloud/rcp/preferences/WordCloudPreferencePage.java	(revision 635)
@@ -49,23 +49,6 @@
 public class WordCloudPreferencePage extends TXMPreferencePage {
 
 
-	/**
-	 * The Constant ID.
-	 */
-	public static final String ID = "org.txm.wordcloud.rcp.preferences.WordCloudPreferencePage"; //$NON-NLS-1$
-
-	/**
-	 * Instantiates a new Wordcloud preference page.
-	 */
-	public WordCloudPreferencePage() {
-		super();
-	}
-
-	/**
-	 * Creates the field editors. Field editors are abstractions of the common
-	 * GUI blocks needed to manipulate various types of preferences. Each field
-	 * editor knows how to save and restore itself.
-	 */
 	@Override
 	public void createFieldEditors() {
 		
@@ -83,12 +66,6 @@
 	}
 	
 	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-	 */
 	@Override
 	public void init(IWorkbench workbench) {
 		this.setPreferenceStore(new TXMPreferenceStore(WordCloudPreferences.PREFERENCES_NODE));
Index: tmp/org.txm.wordcloud.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- tmp/org.txm.wordcloud.rcp/OSGI-INF/l10n/bundle.properties	(revision 634)
+++ tmp/org.txm.wordcloud.rcp/OSGI-INF/l10n/bundle.properties	(revision 635)
@@ -1,5 +1,5 @@
-Bundle-Name=WordCloud RCP
-command.label=WordCloud
-command.name=WordCloud
-editor.name=WordCloud
+Bundle-Name = WordCloud RCP
+command.label = WordCloud
+command.name = WordCloud
+editor.name = WordCloud
 page.name = WordCloud
\ No newline at end of file
Index: tmp/org.txm.wordcloud.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.wordcloud.rcp/META-INF/MANIFEST.MF	(revision 634)
+++ tmp/org.txm.wordcloud.rcp/META-INF/MANIFEST.MF	(revision 635)
@@ -4,16 +4,18 @@
 Bundle-SymbolicName: org.txm.wordcloud.rcp;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.txm.utils;bundle-version="1.0.0",
+Require-Bundle: org.txm.rcp;bundle-version="0.7.8",
+ org.txm.utils;bundle-version="1.0.0",
  org.eclipse.osgi;bundle-version="3.10.2",
+ org.txm.index.rcp;bundle-version="1.0.0",
  org.eclipse.core.runtime;bundle-version="3.10.0",
  org.txm.lexicon.core;bundle-version="1.0.0",
+ org.txm.chartsengine.core;bundle-version="1.0.0",
  org.txm.index.core;bundle-version="1.0.0",
  org.txm.searchengine.cqp.core;bundle-version="1.1.0",
  org.eclipse.ui;bundle-version="3.106.1",
  org.txm.wordcloud.core;bundle-version="1.0.0",
  org.txm.chartsengine.rcp,
- org.txm.core;bundle-version="0.7.0",
- org.txm.rcp;bundle-version="0.7.8"
+ org.txm.core;bundle-version="0.7.0"
 Bundle-Vendor: Textometrie.org
 Bundle-ActivationPolicy: lazy
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 634)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 635)
@@ -1312,12 +1312,12 @@
 		this.monitor = monitor;
 
 		// FIXME: Debug
-		System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : computing result of type " + this.getClass() + "...");
+		System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing result of type " + this.getClass() + "...");
 
 		if (!this.isDirtyFromHistory()) {
 
 			// FIXME: Debug
-			System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : result parameters have not changed since last computing, computing skipped.");
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": result parameters have not changed since last computing, computing skipped.");
 
 			return true;
 		}
@@ -1325,7 +1325,7 @@
 		if (!this.isDirty()) {
 
 			// FIXME: Debug
-			System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : result is not dirty, computing skipped.");
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": result is not dirty, computing skipped.");
 
 			return true;
 		}
@@ -1336,7 +1336,7 @@
 		// SJ: other way, test the object itself
 		if (parent != null && !parent.getHasBeenComputedOnce()) { 
 			if (!this.parent.compute( monitor)) {
-				System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : parent result could not be computed, computing stoped.");
+				System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": parent result could not be computed, computing stoped.");
 
 				return false;
 			}
@@ -1344,7 +1344,7 @@
 
 		if (!this.canCompute()) {
 			// FIXME: Debug
-			System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : missing or wrong parameters, computing aborted.");
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": missing or wrong parameters, computing aborted.");
 
 			return false;
 		}
@@ -1352,7 +1352,7 @@
 		if (!this._compute()) {
 
 			// FIXME: Debug
-			System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : computing failed.");
+			System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing failed.");
 
 			return false;
 		}
@@ -1363,17 +1363,17 @@
 		}
 
 		if (!this.autoSaveParametersFromAnnotations()) {
-			System.out.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : failed to save parameters from annotations for " + this.getName() + ".");
+			System.out.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": failed to save parameters from annotations for " + this.getName() + ".");
 		}
 		if (!this.saveParameters()) {
-			System.out.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : failed to save parameters for " + this.getName() + ".");
+			System.out.println("TXMResult.compute():" + this.getClass().getSimpleName() + ": failed to save parameters for " + this.getName() + ".");
 		}
 
 
 		this.dirty = false; // the computing was successful, the result is no more dirty
 		this.hasBeenComputedOnce = true; 
 		// FIXME: Debug
-		System.err.println("TXMResult.compute() "+this.getClass().getSimpleName()+" : computing of result type " + this.getClass() + " done.");
+		System.err.println("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done.");
 
 		return true;
 	}
Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/editors/PartitionDimensionsEditor.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/editors/PartitionDimensionsEditor.java	(revision 634)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/editors/PartitionDimensionsEditor.java	(revision 635)
@@ -19,6 +19,9 @@
 public class PartitionDimensionsEditor extends ChartEditor<PartitionDimensions> {
 
 
+	/**
+	 * To sort or not the parts by size.
+	 */
 	@Parameter(key=PartitionDimensionsPreferences.CHART_DIMENSIONS_SORT_BY_SIZE)
 	protected ToolItem sortByPartSize;
 	
Index: tmp/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java
===================================================================
--- tmp/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java	(revision 634)
+++ tmp/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java	(revision 635)
@@ -293,8 +293,9 @@
 		}
 
 		for(List<String> list : values) {
-			for(String value : list)
+			for(String value : list) {
 				System.out.print("\t"+value); //$NON-NLS-1$
+			}
 			System.out.println();
 		}
 		System.out.println();
Index: tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/TextsBalanceEditor.java
===================================================================
--- tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/TextsBalanceEditor.java	(revision 634)
+++ tmp/org.txm.textsbalance.rcp/src/org/txm/textsbalance/rcp/editors/TextsBalanceEditor.java	(revision 635)
@@ -24,16 +24,28 @@
 public class TextsBalanceEditor extends ChartEditor<TextsBalance> {
 
 
-
+	/**
+	 * Group by words.
+	 */
 	protected Button groupByWords;
 
+
 	
+	/**
+	 * Structural unit to explore.
+	 */
 	@Parameter(key=TextsBalancePreferences.STRUCTURAL_UNIT)
 	protected StructuralUnitsComboViewer structuralUnitsComboViewer;
 	
+	/**
+	 * Structural unit property to explore.
+	 */
 	@Parameter(key=TextsBalancePreferences.STRUCTURAL_UNIT_PROPERTY)
 	protected StructuralUnitPropertiesComboViewer structuralUnitPropertiesComboViewer;
 	
+	/**
+	 * Group by texts or not.
+	 */
 	@Parameter(key=TextsBalancePreferences.GROUP_BY_TEXTS)
 	protected Button groupByTexts;
 	
@@ -42,7 +54,6 @@
 	
 	@Override
 	public void _createPartControl(Composite parent) {
-		//super._createPartControl(parent);
 		
 		if (((TextsBalance)this.getResult()).getCorpus() == null) {
 			System.out.println("Error: no corpus");
@@ -56,21 +67,14 @@
 		Group group = new Group(parametersArea, SWT.NONE);
 		
 		group.setText("Group by");
-		//group.setLayout(new RowLayout(SWT.VERTICAL));
 		group.setLayout(new RowLayout());
 		
-//		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
-//		gridData.horizontalSpan = 2;
-//		gridData.verticalIndent = 10;
-//		group.setLayoutData(gridData);
-
-		
 		this.groupByTexts = new Button(group, SWT.RADIO);
-		this.groupByTexts.setText("text");
+		this.groupByTexts.setText("text"); //$NON-NLS-1$
 		this.groupByTexts.setSelection(this.getResult().isGroupByTexts());	
 		
 		this.groupByWords = new Button(group, SWT.RADIO);
-		this.groupByWords.setText("word");
+		this.groupByWords.setText("word"); //$NON-NLS-1$
 		this.groupByWords.setSelection(!groupByTexts.getSelection());
 
 		
@@ -89,40 +93,5 @@
 
 	}
 
-	
 
-	
-//	/**
-//	 * 
-//	 * @param corpus
-//	 * @param structs
-//	 * @return
-//	 */
-//	public 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;
-//	}
-//
-
 }
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 634)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/functions/TextsBalance.java	(revision 635)
@@ -42,19 +42,27 @@
 	protected int fMin;
 	protected int fMax;
 	
-	protected String name;
+	//protected String name;
 
 
 	protected int method;
 
 	
-	
+	/**
+	 * Structural unit to explore.
+	 */
 	@Parameter(key=TextsBalancePreferences.STRUCTURAL_UNIT)
 	protected StructuralUnit structuralUnit;
 
+	/**
+	 * Structural unit property to explore.
+	 */
 	@Parameter(key=TextsBalancePreferences.STRUCTURAL_UNIT_PROPERTY)
 	protected StructuralUnitProperty structuralUnitProperty;
 
+	/**
+	 * Group by texts or not.
+	 */
 	@Parameter(key=TextsBalancePreferences.GROUP_BY_TEXTS)
 	protected boolean groupByTexts;
 	
@@ -75,11 +83,7 @@
 		// TODO Auto-generated method stub
 		try {
 			StructuralUnit su = this.getCorpus().getStructuralUnit(this.getStringParameterValue(TextsBalancePreferences.STRUCTURAL_UNIT));
-			this.setParameters(
-					this.getIntParameterValue(TextsBalancePreferences.METHOD),
-					su, 
-					su.getProperty(this.getStringParameterValue(TextsBalancePreferences.STRUCTURAL_UNIT_PROPERTY)),
-					this.getBooleanParameterValue(TextsBalancePreferences.GROUP_BY_TEXTS));
+			this.setParameters(su, su.getProperty(this.getStringParameterValue(TextsBalancePreferences.STRUCTURAL_UNIT_PROPERTY)));
 		}
 		catch(CqiClientException e) {
 			// TODO Auto-generated catch block
@@ -96,7 +100,7 @@
 	 * @param suPropertyName
 	 * @param groupByTexts
 	 */
-	public void setParameters(int method, StructuralUnit su, StructuralUnitProperty sup, boolean groupByTexts) {
+	public void setParameters(StructuralUnit su, StructuralUnitProperty sup) {
 		this.structuralUnit = su;
 		this.structuralUnitProperty = sup;
 		
@@ -105,10 +109,6 @@
 			this.structuralUnitProperty = this.structuralUnit.getUserDefinedOrderedProperties().get(0);
 		}
 		
-		
-		this.groupByTexts = groupByTexts;
-		this.method = method;
-		
 		this.setDirty();
 	}
 	
@@ -123,21 +123,16 @@
 	 */
 	protected boolean _compute() {
 		
-		this.name = this.structuralUnit.getName() + "@" + this.structuralUnitProperty + " (group by texts = " + this.groupByTexts + ")";
-		
-		Log.warning("Computing balance with metadata propertyName = " + this.structuralUnitProperty + ", structural unit = " + this.structuralUnit.getName() + " and groupByTexts = " + this.groupByTexts);
+		this.subTask("Computing balance with metadata propertyName = " + this.structuralUnitProperty + ", structural unit = " + this.structuralUnit.getName() + " and groupByTexts = " + this.groupByTexts); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		try {
 			this.dataset = new HashMap<Integer, Comparable[]>();
 			
-			//StructuralUnitProperty p = structuralUnit.getProperty(suPropertyName);
 			StructuralUnitProperty p = this.structuralUnitProperty;
 			this.values = p.getValues();
-			Collections.sort(values);
+			Collections.sort(this.values);
 
-			//this.method = 2;
-			//System.out.println("Method: "+method);
-			//long time = System.currentTimeMillis();
-			if (this.method == 1) { // using CQL to solve matches
+			 // using CQL to solve matches
+			if (this.method == 1) {
 				for (String value : this.values) {
 					int v = 0;
 					if (this.groupByTexts) {
@@ -148,7 +143,9 @@
 					else {
 						QueryResult r = this.getCorpus().query(new Query("[_."+p.getFullName()+"=\""+value+"\"] expand to text"), "tmp", false);
 						int t = 0;
-						for (Match m : r.getMatches()) t += m.getLength();
+						for (Match m : r.getMatches()) {
+							t += m.getLength();
+						}
 						v = t;
 						r.drop();
 					}
@@ -160,7 +157,8 @@
 					}
 					this.dataset.put(v, new Comparable[]{p.getName(), value});
 				}
-			} else {
+			}
+			else {
 				AbstractCqiClient CQI = CQPEngine.getCqiClient();
 				if (CQI instanceof NetCqiClient) {
 					System.out.println("Error: CQP eval method only available with CQP memory mode");
@@ -170,45 +168,47 @@
 				String supqn = p.getQualifiedName();
 				int nsup = CQI.attributeSize(supqn);
 
-				ArrayList<Match> sup_limits = new ArrayList<Match>(nsup);
+				ArrayList<Match> supLimits = 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]));
+					supLimits.add(new Match(l[0], l[1]));
 				}
 				//System.out.println("All sup limits are "+sup_limits);
 				List<Match> corpus_matches = this.getCorpus().getMatches();
 				//System.out.println("corpus matches: "+corpus_matches);
-				ArrayList<Integer> inter = intersect(corpus_matches, sup_limits);
+				ArrayList<Integer> inter = intersect(corpus_matches, supLimits);
 				//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);
+				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);
+				String[] interValues = CQI.struc2Str(supqn, structId);
 				//System.out.println( " with values: "+Arrays.toString(inter_values));
-				HashMap<String, Integer> inter_uniq = new HashMap<String, Integer>();
+				HashMap<String, Integer> interUniq = new HashMap<String, Integer>();
 
 				if (this.groupByTexts) {
-					for (String o : inter_values) {
-						if (!inter_uniq.containsKey(o)) {
-							inter_uniq.put(o, 0);
+					for (String o : interValues) {
+						if (!interUniq.containsKey(o)) {
+							interUniq.put(o, 0);
 						}
-						inter_uniq.put(o, inter_uniq.get(o) +1);
+						interUniq.put(o, interUniq.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);
+					for (int iMatch = 0 ; iMatch < inter.size() ; iMatch++) {
+						String o = interValues[iMatch];
+						if (!interUniq.containsKey(o)) {
+							interUniq.put(o, 0);
 						}
-						int s = sup_limits.get(inter.get(imatch)).getLength();
-						inter_uniq.put(o, inter_uniq.get(o) + s);
+						int s = supLimits.get(inter.get(iMatch)).getLength();
+						interUniq.put(o, interUniq.get(o) + s);
 
 					}
 				}
-				Object[] sortedkeys = inter_uniq.keySet().toArray();
+				Object[] sortedkeys = interUniq.keySet().toArray();
 				Arrays.sort(sortedkeys);
 				for (Object k : sortedkeys) {
-					int v = inter_uniq.get(k);
+					int v = interUniq.get(k);
 					if (v < this.fMin) {
 						this.fMin = v;
 					}
@@ -216,12 +216,11 @@
 						this.fMax = v;
 					}
 					this.dataset.put(v, new Comparable[]{p.getName(), k.toString()});
-					
 				}
 			}
 		}
 		catch(Exception e) {
-			System.out.println("Error while computing text informations: "+e);
+			System.out.println("Error while computing text information: " + e);
 			e.printStackTrace();
 			return false;
 		}
@@ -333,12 +332,12 @@
 
 	@Override
 	public String getSimpleName() {
-		return this.name;
+		return 	this.structuralUnit.getName() + "@" + this.structuralUnitProperty + " (group by texts = " + this.groupByTexts + ")";
 	}
 
 	@Override
 	public String getDetails() {
-		return name;
+		return this.getName();
 	}
 
 	@Override
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 634)
+++ tmp/org.txm.textsbalance.core/src/org/txm/textsbalance/core/chartsengine/jfreechart/JFCTextsBalanceSpiderChartCreator.java	(revision 635)
@@ -9,6 +9,7 @@
 import org.jfree.chart.plot.SpiderWebPlot;
 import org.jfree.data.category.CategoryDataset;
 import org.jfree.data.category.DefaultCategoryDataset;
+import org.jfree.util.Log;
 import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 import org.txm.textsbalance.core.functions.TextsBalance;
@@ -67,9 +68,10 @@
 		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]);
+			int key = it.next();
+			Comparable[] value = data.get(key);
+			System.out.println("JFCTextsBalanceSpiderChartCreator.updateChart(): adding " + key + ", " + value[0] + ", " + value[1] + " to dataset."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			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());
Index: tmp/org.txm.wordcloud.core/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.wordcloud.core/META-INF/MANIFEST.MF	(revision 634)
+++ tmp/org.txm.wordcloud.core/META-INF/MANIFEST.MF	(revision 635)
@@ -5,20 +5,18 @@
 Bundle-Version: 1.0.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Require-Bundle: org.txm.utils;bundle-version="1.0.0",
- org.txm.chartsengine.jfreechart.core;bundle-version="1.0.0",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.txm.core;bundle-version="0.7.0",
  org.txm.chartsengine.core;bundle-version="1.0.0",
  org.txm.searchengine.cqp.core;bundle-version="1.1.0",
+ org.txm.statsengine.r.core;bundle-version="1.0.0",
+ org.txm.chartsengine.jfreechart.core;bundle-version="1.0.0",
  org.txm.statsengine.core;bundle-version="1.0.0",
  org.txm.chartsengine.r.core;bundle-version="1.0.0",
- org.txm.statsengine.r.core;bundle-version="1.0.0",
- org.eclipse.core.runtime;bundle-version="3.10.0",
- org.txm.core;bundle-version="0.7.0",
- org.txm.index.core;bundle-version="1.0.0",
- org.txm.lexicon.core
+ org.txm.index.core;bundle-version="1.0.0"
 Export-Package: org.txm.wordcloud.core.chartsengine.jfreechart,
  org.txm.wordcloud.core.chartsengine.r,
  org.txm.wordcloud.core.functions,
  org.txm.wordcloud.core.messages,
  org.txm.wordcloud.core.preferences
-Import-Package: org.txm.chartsengine.core
 Bundle-Vendor: Textometrie.org
Index: tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java
===================================================================
--- tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java	(revision 634)
+++ tmp/org.txm.wordcloud.core/src/org/txm/wordcloud/core/functions/WordCloud.java	(revision 635)
@@ -22,27 +22,38 @@
  */
 public class WordCloud extends ChartResult {
 	
-	//TODO: test rw.setStringEncoding("UTF-8"); // or connection
+	
 	private int[] freqs;
 	private String[] labels;
 	
 	
-	
+	/**
+	 * Minimum frequency.
+	 */
 	@Parameter(key=WordCloudPreferences.F_MIN)
 	protected int fMin;
 	
+	/**
+	 * 
+	 */
 	@Parameter(key=WordCloudPreferences.MAX_WORDS_COUNT)
 	protected int maxWordsCount;
 
+	/**
+	 * 
+	 */
 	@Parameter(key=WordCloudPreferences.ROTATION_PERCENT)
 	protected float rotationPercent;
 	
+	/**
+	 * 
+	 */
 	@Parameter(key=WordCloudPreferences.RANDOM_POSITIONS)
 	protected boolean randomPositions;
 
 	
 	/**
-	 * 
+	 * Creates a WordCloud.
 	 * @param index
 	 */
 	public WordCloud(Index index) {
@@ -66,6 +77,62 @@
 		}
 	}
 
+	
+	@Override
+	protected boolean _compute() {
+//		// FIXME: source must always be an Index because the corpus source produces an Index
+//		// from corpus
+//		if (source instanceof Corpus)	{ 
+//			try {
+//				Corpus corpus = (Corpus) source;
+//				Query query;
+//				String lang = corpus.getLang();
+//				if (corpus.getProperty(lang + "pos") != null) {
+//					query = new Query(getQueryForLang(lang));
+//				}
+//				else {
+//					query = new Query("[]");
+//				}
+//				
+//				System.out.println("Used query: " + query);
+//				
+//				ArrayList<Property> props = new ArrayList<Property>();
+//				props.add(corpus.getWordProperty());
+//				Index index = new Index(corpus);
+//				index.setParameters(query, props, null, null, null, null);
+//				if (!query.toString().equals("[]")) {
+//					corpus.addChild(index);
+//				}
+//
+//				index.compute(false, monitor);
+//				
+//				index.addChild(this);
+//					
+//				List<Line> lines = index.getAllLines();
+//				if (lines != null && lines.size() > 0) {
+//					this.initWith(index);
+//				}
+//				else {
+//					Log.severe("Error: Could not build a word selection with this corpus");
+//					throw new IllegalArgumentException("Error: Index failed with corpus " + corpus + " with lang " + lang + " and query " + query);
+//				}
+//			}
+//			catch(Exception e) {
+//				System.out.println("Error: "+e.getLocalizedMessage());
+//				Log.printStackTrace(e);
+//				return false;
+//			}
+			this.initWith((Index)parent);
+//		}
+//		// from index
+//		else if(this.source instanceof Index)	{
+//			this.initWith((Index) this.source);
+//			return true;
+//		}
+//		
+		return true;
+	}
+	
 	// FIXME: to remove?
 	private void removeDiacritics() {
 		//for (int i = 0; i < labels.length ; i++)
@@ -165,10 +232,7 @@
 	
 	@Override
 	public String getSimpleName() {
-		return WordCloudCoreMessages.RESULT_TYPE + " (" + this.fMin
-				+ " / "
-				+ this.maxWordsCount
-				+ ")";
+		return WordCloudCoreMessages.RESULT_TYPE + " (" + this.fMin + " / " + this.maxWordsCount + ")"; //$NON-NLS-1$  //$NON-NLS-2$  //$NON-NLS-3$
 	}
 
 	@Override
@@ -212,7 +276,7 @@
 	 * @param lang
 	 * @return
 	 */
-	private String getQueryForLang(String lang) {
+	public static String getQueryForLang(String lang) {
 		if ("fr".equals(lang)) {
 			return "[frpos=\"NOM|NAM|ADJ|VER.*\"  & frlemma!=\"être|avoir|faire|pouvoir|devoir|vouloir|falloir|aller|dire|savoir\"]"; // requete de Serge pour le français TT
 		}
@@ -224,61 +288,8 @@
 		}
 	}
 	
-	@Override
-	protected boolean _compute() {
-//		// FIXME: source must always be an Index because the corpus source produces an Index
-//		// from corpus
-//		if (source instanceof Corpus)	{ 
-//			try {
-//				Corpus corpus = (Corpus) source;
-//				Query query;
-//				String lang = corpus.getLang();
-//				if (corpus.getProperty(lang + "pos") != null) {
-//					query = new Query(getQueryForLang(lang));
-//				}
-//				else {
-//					query = new Query("[]");
-//				}
-//				
-//				System.out.println("Used query: " + query);
-//				
-//				ArrayList<Property> props = new ArrayList<Property>();
-//				props.add(corpus.getWordProperty());
-//				Index index = new Index(corpus);
-//				index.setParameters(query, props, null, null, null, null);
-//				if (!query.toString().equals("[]")) {
-//					corpus.addChild(index);
-//				}
-//
-//				index.compute(false, monitor);
-//				
-//				index.addChild(this);
-//					
-//				List<Line> lines = index.getAllLines();
-//				if (lines != null && lines.size() > 0) {
-//					this.initWith(index);
-//				}
-//				else {
-//					Log.severe("Error: Could not build a word selection with this corpus");
-//					throw new IllegalArgumentException("Error: Index failed with corpus " + corpus + " with lang " + lang + " and query " + query);
-//				}
-//			}
-//			catch(Exception e) {
-//				System.out.println("Error: "+e.getLocalizedMessage());
-//				Log.printStackTrace(e);
-//				return false;
-//			}
-			this.initWith((Index)parent);
-//		}
-//		// from index
-//		else if(this.source instanceof Index)	{
-//			this.initWith((Index) this.source);
-//			return true;
-//		}
-//		
-		return true;
-	}
 
+
 	@Override
 	public boolean loadParameters() throws Exception {
 		// nothing to do
@@ -291,7 +302,10 @@
 		return true;
 	}
 
-	
+	/**
+	 * 
+	 * @return
+	 */
 	public int getFMin() {
 		return fMin;
 	}
Index: tmp/org.txm.index.rcp/plugin.xml
===================================================================
--- tmp/org.txm.index.rcp/plugin.xml	(revision 634)
+++ tmp/org.txm.index.rcp/plugin.xml	(revision 635)
@@ -178,6 +178,19 @@
             </iterate>
          </with>
       </definition>
+      <definition
+            id="OneLexiconSelected">
+         <with
+               variable="selection">
+            <iterate
+                  ifEmpty="false"
+                  operator="and">
+               <instanceof
+                     value="org.txm.lexicon.core.functions.Lexicon">
+               </instanceof>
+            </iterate>
+         </with>
+      </definition>
    </extension>
    <extension
          point="org.txm.statengine.r.rcp.sendtor">
