Index: tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java
===================================================================
--- tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 2586)
+++ tmp/org.txm.specificities.rcp/src/org/txm/specificities/rcp/editors/SpecificitiesEditor.java	(revision 2587)
@@ -66,61 +66,62 @@
  * 
  * @author mdecorde
  * @author sjacquot
- * @author sloiseau 
+ * @author sloiseau
  * 
  */
 public class SpecificitiesEditor extends TXMEditor<Specificities> {
-
+	
 	public final static String ID = SpecificitiesEditor.class.getName();
-
+	
 	/** The specificities table. */
 	private Table specificitesTable;
+	
 	private TableViewer viewer;
-
+	
 	/**
 	 * Viewer comparator for sorting.
 	 */
 	protected SpecificitiesLinesViewerComparator viewerComparator;
-
-
+	
+	
 	TableColumn typeFrequencyColumn;
 	
 	
 	/**
 	 * Unit property.
 	 */
-	@Parameter(key=TXMPreferences.UNIT_PROPERTY)
+	@Parameter(key = TXMPreferences.UNIT_PROPERTY)
 	protected PropertiesComboViewer unitPropertyComboViewer;
 	
 	/**
 	 * Maximum score.
 	 */
-	@Parameter(key=SpecificitiesPreferences.MAX_SCORE)
+	@Parameter(key = SpecificitiesPreferences.MAX_SCORE)
 	protected Spinner maxScoreFilter;
-
+	
 	/**
 	 * Minimum frequency filtering spinner.
 	 */
-	@Parameter(key=TXMPreferences.F_MIN)
+	@Parameter(key = TXMPreferences.F_MIN)
 	protected Spinner fMinSpinner;
-
+	
 	/**
 	 * Maximum number of lines filtering.
 	 */
-	@Parameter(key=TXMPreferences.V_MAX)
+	@Parameter(key = TXMPreferences.V_MAX)
 	protected Spinner vMaxSpinner;
 	
 	
 	@Override
 	public void _createPartControl() {
-
+		
 		try {
 			// Main parameters
 			GLComposite mainParametersArea = this.getMainParametersComposite();
 			mainParametersArea.getLayout().numColumns = 2;
 			
 			// parent parameters
-			if (!this.getResult().getParent().isVisible())	{
+			if (!this.getResult().getParent().isVisible()) {
 				// unit property
 				new Label(mainParametersArea, SWT.NONE).setText(TXMCoreMessages.common_property);
 				this.unitPropertyComboViewer = new PropertiesComboViewer(mainParametersArea, this, false,
@@ -128,7 +129,7 @@
 						this.getResult().getUnitProperty(), false);
 			}
 			
-
+			
 			// Extended parameters
 			Composite extendedParametersArea = this.getExtendedParametersGroup();
 			
@@ -137,10 +138,10 @@
 			this.maxScoreFilter = maxScore.getSpinner();
 			this.maxScoreFilter.setMinimum(0);
 			this.maxScoreFilter.setMaximum(100000);
-
+			
 			// Result area
 			GLComposite resultArea = this.getResultArea();
-
+			
 			// create table viewer
 			viewer = new TableViewer(resultArea, SWT.VIRTUAL | SWT.MULTI | SWT.FULL_SELECTION);
 			viewer.getTable().addKeyListener(new TableKeyListener(viewer));
@@ -154,8 +155,8 @@
 			// creates the viewer comparator
 			this.viewerComparator = new SpecificitiesLinesViewerComparator(Toolbox.getCollator(this.getResult()));
 			viewer.setComparator(this.viewerComparator);
-
-
+			
+			
 			// create 1st column: Unit
 			TableColumn unitColumn = new TableColumn(specificitesTable, SWT.NONE);
 			unitColumn.setText(TXMCoreMessages.common_units);
@@ -176,9 +177,9 @@
 			// add a separator empty column
 			TableColumn separatorColumn = new TableColumn(specificitesTable, SWT.NONE);
 			separatorColumn.setResizable(false);
-
+			
 			specificitesTable.setHeaderVisible(true);
-
+			
 			// Horizontal bar on second table takes up a little extra space.
 			// To keep vertical scroll bars in sink, force table1 to end above
 			// horizontal scrollbar
@@ -188,7 +189,7 @@
 			spacerData.heightHint = hBarRight.getSize().y;
 			spacer.setLayoutData(spacerData);
 			spacer.setVisible(false);
-
+			
 			// Register the context menu
 			TXMEditor.initContextMenu(this.specificitesTable, this.getSite(), this.viewer);
 			
@@ -203,80 +204,82 @@
 				this.vMaxSpinner.setMinimum(1);
 			}
 			
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			Log.severe(NLS.bind(SpecificitiesUIMessages.failedToComputeSpecificities, e.getMessage()));
 			Log.printStackTrace(e);
 		}
 	}
-
-
 	
+	
+	
 	@Override
 	public void updateEditorFromResult(boolean update) {
 		try {
-
+			
 			String[] lexicalTableColumnNames = null;
 			int[] lexicalTableColumnTotalFrequencies = null;
-
+			
 			try {
 				lexicalTableColumnNames = this.getResult().getColumnsNames();
 				lexicalTableColumnTotalFrequencies = this.getResult().getColumnsFrequenciesSums();
-			} catch (Exception e) {
+			}
+			catch (Exception e) {
 				Log.severe(NLS.bind(RCoreMessages.error_unexpectedErrorInRStatisticsEngine, e));
 				Log.printStackTrace(e);
 				return;
 			}
-
+			
 			int len = lexicalTableColumnNames.length;
 			if (len == 2) {
 				len--; // show only the first column specifs since they are the same (modulo signus)
 			}
-			if(!update
-//					//&& this.getResult().hasBeenComputedOnce()
-					)	{
-
+			if (!update
+			// //&& this.getResult().hasBeenComputedOnce()
+			) {
 				
 				
+				
 				// remove lexical table columns if already exist
-//				int columnsCount = specificitesTable.getColumnCount();
-//				System.out.println("SpecificitiesEditor.updateEditorFromResult(): column count = " + columnsCount);
-//				for (int firstLexicalTableColumnIndex = 3; firstLexicalTableColumnIndex < columnsCount - 1; firstLexicalTableColumnIndex++) {
-//					System.err.println("SpecificitiesEditor.updateEditorFromResult() removing column " + firstLexicalTableColumnIndex);
-//					specificitesTable.getColumn(firstLexicalTableColumnIndex).dispose();
-//				}
+				// int columnsCount = specificitesTable.getColumnCount();
+				// System.out.println("SpecificitiesEditor.updateEditorFromResult(): column count = " + columnsCount);
+				// for (int firstLexicalTableColumnIndex = 3; firstLexicalTableColumnIndex < columnsCount - 1; firstLexicalTableColumnIndex++) {
+				// System.err.println("SpecificitiesEditor.updateEditorFromResult() removing column " + firstLexicalTableColumnIndex);
+				// specificitesTable.getColumn(firstLexicalTableColumnIndex).dispose();
+				// }
 				
 				// System.out.println("partnames: "+Arrays.toString(partNames));
-				 // for each lexical table column
-				for (int i = 0, firstLexicalTableColumnIndex = 3; i < len ; i++, firstLexicalTableColumnIndex += 2) {
-
-					//System.err.println("SpecificitiesEditor.updateEditorFromResult() creating column freq at index " + firstLexicalTableColumnIndex);
+				// for each lexical table column
+				for (int i = 0, firstLexicalTableColumnIndex = 3; i < len; i++, firstLexicalTableColumnIndex += 2) {
 					
-					//FREQ COLUMN
+					// System.err.println("SpecificitiesEditor.updateEditorFromResult() creating column freq at index " + firstLexicalTableColumnIndex);
+					
+					// FREQ COLUMN
 					final TableColumn freqpartTableColumn = new TableColumn(specificitesTable, SWT.NONE);
-//					freqpartTableColumn.setText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$ 
-//					freqpartTableColumn.setToolTipText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$ 
-//					//System.out.println("create column "+lexicalTableColumnNames[i]);
-//					freqpartTableColumn.setAlignment(SWT.RIGHT);
-//					freqpartTableColumn.pack();
+					// freqpartTableColumn.setText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$
+					// freqpartTableColumn.setToolTipText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$
+					// //System.out.println("create column "+lexicalTableColumnNames[i]);
+					// freqpartTableColumn.setAlignment(SWT.RIGHT);
+					// freqpartTableColumn.pack();
 					
 					viewerComparator.addSelectionAdapter(viewer, freqpartTableColumn, firstLexicalTableColumnIndex);
-
 					
-					//System.err.println("SpecificitiesEditor.updateEditorFromResult() creating column score at index " + (firstLexicalTableColumnIndex + 1));
 					
-					//SCORE COLUMN
+					// System.err.println("SpecificitiesEditor.updateEditorFromResult() creating column score at index " + (firstLexicalTableColumnIndex + 1));
+					
+					// SCORE COLUMN
 					final TableColumn lexicalTableColumn = new TableColumn(specificitesTable, SWT.NONE);
-					lexicalTableColumn.setText(SpecificitiesUIMessages.index); 
-					//lexicalTableColumn.setToolTipText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$ 
+					lexicalTableColumn.setText(SpecificitiesUIMessages.index);
+					// lexicalTableColumn.setToolTipText(lexicalTableColumnNames[i] + " t=" + lexicalTableColumnTotalFrequencies[i]); //$NON-NLS-1$
 					// System.out.println("create column "+partNames[i]);
 					lexicalTableColumn.setAlignment(SWT.RIGHT);
 					lexicalTableColumn.pack();
-
+					
 					viewerComparator.addSelectionAdapter(viewer, lexicalTableColumn, (firstLexicalTableColumnIndex + 1));
 				}
 			}
-
-			if(!this.getResult().isDirty())	{
+			
+			if (!this.getResult().isDirty()) {
 				
 				// units
 				String[] typeNames = this.getResult().getTypeNames();
@@ -287,13 +290,13 @@
 				int[][] specFreqs = this.getResult().getFrequencies();
 				
 				// units' total in parts
-				//final int[] sortedPartIndexes = specificitesResult.getSortedPartIndexes();
-	
+				// final int[] sortedPartIndexes = specificitesResult.getSortedPartIndexes();
+				
 				// Create an array of lines to fill the tables
-//				Log.finest("len types: " + typeNames.length);
-//				Log.finest("len freq: " + typeFreq.length);
-//				Log.finest("len specfreqs: " + specFreqs.length);
-//				Log.finest("len specidx: " + specIndex.length);
+				// Log.finest("len types: " + typeNames.length);
+				// Log.finest("len freq: " + typeFreq.length);
+				// Log.finest("len specfreqs: " + specFreqs.length);
+				// Log.finest("len specidx: " + specIndex.length);
 				
 				Object[] tableLines = new Object[typeNames.length];
 				for (int j = 0; j < tableLines.length; j++) {
@@ -304,60 +307,62 @@
 			else {
 				viewer.setInput(null);
 			}
-
+			
 			// Updating the main frequency table header
 			String text = TXMCoreMessages.common_frequency;
-			if(this.getResult().hasBeenComputedOnce())	{
+			if (this.getResult().hasBeenComputedOnce()) {
 				text += " " + SpecificitiesUIMessages.t + " " + this.getResult().getFrequenciesSum();
 			}
 			typeFrequencyColumn.setText(text);
-			typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText()); 
+			typeFrequencyColumn.setToolTipText(typeFrequencyColumn.getText());
 			typeFrequencyColumn.pack();
 			
 			// Updating the table headers from lexical table values
-			for (int i = 0, firstLexicalTableColumnIndex = 3; i < len ; i++, firstLexicalTableColumnIndex += 2) {
+			for (int i = 0, firstLexicalTableColumnIndex = 3; i < len; i++, firstLexicalTableColumnIndex += 2) {
 				// frequency columns
 				TableColumn freqpartTableColumn = specificitesTable.getColumn(firstLexicalTableColumnIndex);
 				text = lexicalTableColumnNames[i];
-				if(this.getResult().hasBeenComputedOnce())	{
+				if (this.getResult().hasBeenComputedOnce()) {
 					text += " t=" + lexicalTableColumnTotalFrequencies[i];
 				}
-				freqpartTableColumn.setText(text); 
-				freqpartTableColumn.setToolTipText(freqpartTableColumn.getText()); 
-				//System.out.println("create column "+lexicalTableColumnNames[i]);
+				freqpartTableColumn.setText(text);
+				freqpartTableColumn.setToolTipText(freqpartTableColumn.getText());
+				// System.out.println("create column "+lexicalTableColumnNames[i]);
 				freqpartTableColumn.setAlignment(SWT.RIGHT);
-				freqpartTableColumn.pack();
+				// freqpartTableColumn.pack();
 			}
-
-			// Pack the columns so the label of the sort column is not truncated due of the sorting order arrow display			
+			
+			// Pack the columns so the label of the sort column is not truncated due of the sorting order arrow display
 			TXMEditor.packColumns(viewer);
 			
-		} catch (Exception e) {
+		}
+		catch (Exception e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}
 	}
-
-
+	
+	
 	@Override
 	public void setFocus() {
 		this.specificitesTable.setFocus();
 	}
-
+	
 	/**
 	 * Gets the current selected lines in table.
+	 * 
 	 * @return
 	 */
-	public ISelection getTableSelection()	{
+	public ISelection getTableSelection() {
 		return this.viewer.getSelection();
 	}
 	
-
+	
 	@Override
 	public void updateResultFromEditor() {
 		// nothing to do
 	}
-
-
-
-}
\ No newline at end of file
+	
+	
+	
+}
