Index: tmp/org.txm.ahc.rcp/.project
===================================================================
--- tmp/org.txm.ahc.rcp/.project	(revision 0)
+++ tmp/org.txm.ahc.rcp/.project	(revision 685)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.ahc.rcp</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.ahc.rcp/.project
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 685)
@@ -0,0 +1,322 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+//
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+//
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+//
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+//
+//
+//
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$
+//
+package org.txm.ahc.rcp.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Spinner;
+import org.txm.ca.core.functions.CA;
+import org.txm.ca.core.preferences.CAPreferences;
+import org.txm.ahc.core.functions.AHC;
+import org.txm.ahc.core.messages.AHCCoreMessages;
+import org.txm.ahc.core.preferences.AHCPreferences;
+import org.txm.ahc.rcp.messages.AHCUIMessages;
+import org.txm.chartsengine.rcp.editors.ChartEditor;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.lexicaltable.core.functions.LexicalTable;
+import org.txm.lexicaltable.rcp.editors.LexicalTableDialog;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.rcp.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.Partition;
+import org.txm.searchengine.cqp.corpus.Property;
+import org.txm.statsengine.core.StatException;
+import org.txm.utils.logger.Log;
+
+/**
+ * If the selection is a CA or a Lexical Table result computes the CAH.
+ *
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class ComputeAHC extends BaseAbstractHandler {
+
+
+	// adds a double click listener to the Corpus View
+	static	{
+		CorporaView.addDoubleClickListener(AHC.class, ComputeAHC.class);
+	}
+	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+
+		if(!this.checkStatsEngine()) {
+			return null;
+		}
+
+		Object selection = this.getSelection();
+		AHC ahc = null;
+
+		
+		// reopening an existing result
+		if (selection instanceof AHC) {
+			ahc = (AHC) selection;
+		}
+		// creates from CA
+		else if (selection instanceof CA) {
+			ahc = new AHC((CA) selection);
+		}
+		// creates from LexicalTable
+		else if (selection instanceof LexicalTable) {
+			//System.out.println("Compute CAH with LT : "+((LexicalTable)selection.getFirstElement()).getName());
+			LexicalTable lexicaltable = (LexicalTable) selection;
+			
+			try {
+				ahc = new AHC(new CA(lexicaltable));
+			} catch (StatException e) {
+				System.out.println("Failed to build the CA with lexical table " + lexicaltable + ": " + e);
+				Log.printStackTrace(e);
+			}
+			lexicaltable.addChild(ahc);
+			
+		}
+		// creates from Partition
+		else if (selection instanceof Partition) {
+			//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName());
+			Partition partition = (Partition)selection;
+			try {
+				String title = AHCUIMessages.bind(AHCUIMessages.ComputeCAH_0, partition.getName());
+				int vMax = TXMPreferences.getInt(CAPreferences.V_MAX, CAPreferences.PREFERENCES_NODE);
+				int fMin = TXMPreferences.getInt(CAPreferences.F_MIN, CAPreferences.PREFERENCES_NODE);
+				Shell shell = Display.getCurrent().getActiveShell();
+				LexicalTableDialog d = new LexicalTableDialog(shell, partition.getCorpus(), title);
+				d.setFminAndVMax(fMin, vMax);
+				
+				if (d.open() == Window.OK) {
+					Property property = d.getProperty();
+					fMin = d.getFmin();
+					vMax = d.getMaxLines();
+					
+					LexicalTable lexicaltable = new LexicalTable(partition, property, fMin, vMax); // use the CAPreferencePage Fmin
+					ahc = new AHC(new CA(lexicaltable));
+				} else {
+					// canceled
+					return null;
+				}
+			} catch (Exception e) {
+				System.out.println("Failed to build the lexical table of " + partition + ": " + e);
+				Log.printStackTrace(e);
+				return null;
+			} 
+		}
+
+		ChartEditor.openEditor(ahc);
+
+
+		return null;
+	}
+
+
+
+
+	/**
+	 * The Class CAHParamDialog.
+	 */
+	// FIXME: not used?
+	public class CAHParamDialog extends Dialog {
+
+		//protected Combo methodsCombo;
+		//protected Combo metricsCombo;
+		/** The ncluster spinner. */
+		protected Spinner nclusterSpinner;
+
+		/** The docolumns button. */
+		protected Button docolumnsButton;
+
+		/** The title. */
+		protected String title;
+
+		/**
+		 * Instantiates a new cAH param dialog.
+		 *
+		 * @param parentShell the parent shell
+		 */
+		public CAHParamDialog(Shell parentShell) {
+			super(parentShell);
+			this.title = AHCCoreMessages.RESULT_TYPE;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
+		 */
+		@Override
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+
+			if (title != null)
+				newShell.setText(title);
+			else
+				newShell.setText(AHCCoreMessages.RESULT_TYPE);
+		}
+
+		/** The composite. */
+		protected Composite composite;
+
+		/** The method. */
+		private String method;
+
+		/** The metric. */
+		private String metric;
+
+		/** The Ncluster. */
+		private int Ncluster;
+
+		/** The doculumns. */
+		private boolean doculumns;
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		@Override
+		protected Control createDialogArea(Composite parent) {
+			composite = new Composite(parent, SWT.NONE);
+			GridLayout layout = new GridLayout(2, false);
+			composite.setLayout(layout);
+
+			// N CLUSTERS
+			Label label = new Label(composite, SWT.NONE);
+			label.setText(AHCUIMessages.CAHPreferencePage_2);
+
+			nclusterSpinner = new Spinner(composite, SWT.BORDER);
+			nclusterSpinner.setMinimum(2);
+			nclusterSpinner.setIncrement(1);
+			nclusterSpinner.setSelection(TXMPreferences.getInt(AHCPreferences.N_CLUSTERS, AHCPreferences.PREFERENCES_NODE));
+			nclusterSpinner.setMaximum(50);
+
+			// ROWS OR COLS
+			docolumnsButton = new Button(composite, SWT.RADIO);
+			docolumnsButton.setText(AHCUIMessages.COMPUTE_COLUMNS);
+			docolumnsButton.setSelection(true);
+
+			Button dorowsButton = new Button(composite, SWT.RADIO);
+			dorowsButton.setText(AHCUIMessages.COMPUTE_ROWS);
+
+			/*
+			// METHODS
+			Label methodLabel = new Label(composite, SWT.NONE);
+			methodLabel.setText("Methods");
+
+			methodLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+
+			methodsCombo = new Combo(composite, SWT.READ_ONLY);
+			methodsCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false));
+			methodsCombo.select(methodsCombo.indexOf(CAH.getDefaultMethod()));
+			for(String method : CAH.getMethods())
+				methodsCombo.add(method);
+
+			// METRICS
+			Label metricsLabel = new Label(composite, SWT.NONE);
+			metricsLabel.setText("Methods");
+
+			metricsLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER,
+					false, false));
+
+			metricsCombo = new Combo(composite, SWT.READ_ONLY);
+			metricsCombo.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
+					true, false));
+			metricsCombo.select(metricsCombo.indexOf(CAH.getDefaultMetric()));
+			for(String method : CAH.getMetrics())
+				metricsCombo.add(method);
+				*/
+
+			return composite;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+		 */
+		@Override
+		protected void okPressed() {
+			/*int idx = methodsCombo.getSelectionIndex();
+			method = methodsCombo.getItem(idx);
+
+			idx = metricsCombo.getSelectionIndex();
+			metric = metricsCombo.getItem(idx);
+*/
+			Ncluster = this.nclusterSpinner.getSelection();
+
+			doculumns = this.docolumnsButton.getSelection();
+
+			super.okPressed();
+		}
+
+		/**
+		 * Gets the method.
+		 *
+		 * @return the method
+		 */
+		public String getMethod() {
+			return method;
+		}
+
+		/**
+		 * Gets the metric.
+		 *
+		 * @return the metric
+		 */
+		public String getMetric() {
+			return metric;
+		}
+
+		/**
+		 * Gets the ncluster.
+		 *
+		 * @return the ncluster
+		 */
+		public int getNcluster() {
+			return Ncluster;
+		}
+
+		/**
+		 * Checks if is doculumns.
+		 *
+		 * @return true, if is doculumns
+		 */
+		public boolean isDoculumns() {
+			return doculumns;
+		}
+	}
+
+
+}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/package.html
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/package.html	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/package.html	(revision 685)
@@ -0,0 +1,5 @@
+<html>
+<body>
+	<p>Commands which call textometry functions</p>
+</body>
+</html>
\ No newline at end of file

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/preferences/AHCPreferencePage.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/preferences/AHCPreferencePage.java	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/preferences/AHCPreferencePage.java	(revision 685)
@@ -0,0 +1,97 @@
+// Copyright © 2010-2013 ENS de Lyon.
+// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
+// Lyon 2, University of Franche-Comté, University of Nice
+// Sophia Antipolis, University of Paris 3.
+// 
+// The TXM platform is free software: you can redistribute it
+// and/or modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation,
+// either version 2 of the License, or (at your option) any
+// later version.
+// 
+// The TXM platform is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied
+// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+// PURPOSE. See the GNU General Public License for more
+// details.
+// 
+// You should have received a copy of the GNU General
+// Public License along with the TXM platform. If not, see
+// http://www.gnu.org/licenses.
+// 
+// 
+// 
+// $LastChangedDate:$
+// $LastChangedRevision:$
+// $LastChangedBy:$ 
+//
+package org.txm.ahc.rcp.preferences;
+
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.txm.ahc.core.functions.AHC;
+import org.txm.ahc.core.messages.AHCCoreMessages;
+import org.txm.ahc.core.preferences.AHCPreferences;
+import org.txm.ahc.rcp.adapters.AHCAdapterFactory;
+import org.txm.ahc.rcp.messages.AHCUIMessages;
+import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
+import org.txm.rcp.preferences.TXMPreferencePage;
+import org.txm.rcp.preferences.TXMPreferenceStore;
+
+/**
+ * CAH preferences page.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class AHCPreferencePage extends TXMPreferencePage {
+
+
+
+	@Override
+	public void createFieldEditors() {
+
+		IntegerFieldEditor nClusters = new IntegerFieldEditor(AHCPreferences.N_CLUSTERS, AHCUIMessages.CAHPreferencePage_2, getFieldEditorParent());
+		addField(nClusters);
+
+		String list[] = AHC.getMethods(); 
+		String methods[][] = new String[list.length][2];
+		for(int i = 0 ; i < list.length ; i++)
+			methods[i][0] = methods[i][1] = list[i];
+				
+		ComboFieldEditor method = new ComboFieldEditor(AHCPreferences.METHOD, AHCUIMessages.CAHPreferencePage_3, methods, getFieldEditorParent());
+		addField(method);
+
+		list = AHC.getMetrics(); 
+		String metrics[][] = new String[list.length][2];
+		for(int i = 0 ; i < list.length ; i++)
+			metrics[i][0] = metrics[i][1] = list[i];
+		
+		ComboFieldEditor metric = new ComboFieldEditor(AHCPreferences.METRIC, AHCUIMessages.CAHPreferencePage_4, metrics, getFieldEditorParent());
+		addField(metric);
+		
+		
+		// Charts
+		Composite chartsTab = SWTChartsComponentsProvider.createChartsRenderingPreferencesTabFolderComposite(getFieldEditorParent());
+
+		String[][] labelAndValues = {{"2D", "true"}, {"3D", "false"}}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		RadioGroupFieldEditor default2D3Ddisplay = new RadioGroupFieldEditor(AHCPreferences.RENDERING_2D, AHCUIMessages.CAHPreferencePage_0, 2, labelAndValues, chartsTab);
+		addField(default2D3Ddisplay);
+		
+		
+		// other shared preferences
+		SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, chartsTab);
+	}
+
+	@Override
+	public void init(IWorkbench workbench) {
+		this.setPreferenceStore(new TXMPreferenceStore(AHCPreferences.PREFERENCES_NODE));
+		//setDescription("AHC");
+		this.setTitle(AHCCoreMessages.RESULT_TYPE);
+		this.setImageDescriptor(AHCAdapterFactory.ICON);
+	}
+
+}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/preferences/AHCPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/adapters/AHCAdapterFactory.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/adapters/AHCAdapterFactory.java	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/adapters/AHCAdapterFactory.java	(revision 685)
@@ -0,0 +1,47 @@
+// Copyright © 2010-2013 ENS de Lyon.
+package org.txm.ahc.rcp.adapters;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.FrameworkUtil;
+import org.txm.ahc.core.functions.AHC;
+import org.txm.rcp.adapters.TXMResultAdapter;
+import org.txm.rcp.adapters.TXMResultAdapterFactory;
+
+/**
+ * A factory for creating Adapter objects.
+ *  
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class AHCAdapterFactory extends TXMResultAdapterFactory {
+
+	
+	public static final ImageDescriptor ICON =
+			AbstractUIPlugin.imageDescriptorFromPlugin(FrameworkUtil.getBundle(AHCAdapterFactory.class).getSymbolicName(),
+					"platform:/plugin/"+ FrameworkUtil.getBundle(AHCAdapterFactory.class).getSymbolicName() + "/icons/cah.png"); //$NON-NLS-1$
+	
+	/**
+	 * Gets the adapter.
+	 *
+	 * @param adaptableObject the adaptable object
+	 * @param adapterType the adapter type
+	 * @return the adapter
+	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
+	 */
+	@Override
+	public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if(adapterType == IWorkbenchAdapter.class && adaptableObject instanceof AHC)	{
+			return new TXMResultAdapter() {
+				@Override
+				public ImageDescriptor getImageDescriptor(Object object) {
+					return ICON;
+				}
+			};
+		}
+		return null;
+	}
+
+
+}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/adapters/AHCAdapterFactory.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java	(revision 685)
@@ -0,0 +1,31 @@
+package org.txm.ahc.rcp.messages;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.utils.messages.Utf8NLS;
+
+public class AHCUIMessages extends NLS {
+	
+	static {
+		Utf8NLS.initializeMessages(AHCUIMessages.class);
+	}
+	
+	public static String CAHPreferencePage_0;
+	public static String CAHPreferencePage_2;
+	public static String CAHPreferencePage_3;
+	public static String CAHPreferencePage_4;
+	
+	public static String ComputeCAH_0;
+	
+	//FIXME: these keys/values are not used, remove or use them?
+	public static String ComputeCAH_1;
+	public static String ComputeCAH_2;
+	public static String ComputeCAH_3;
+	public static String ComputeCAH_5;
+	public static String ComputeCAH_6;
+	// end of fixme
+	
+	public static String COMPUTE_COLUMNS;
+	public static String COMPUTE_ROWS;
+	
+	public static String CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS;
+}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/AHCUIMessages.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages.properties	(revision 685)
@@ -0,0 +1,26 @@
+
+CAHPreferencePage_0 = Display chart in
+
+CAHPreferencePage_2 = Number of clusters
+
+CAHPreferencePage_3 = Method
+
+CAHPreferencePage_4 = Metric
+
+CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS = Number of clusters:
+
+COMPUTE_COLUMNS = Compute columns
+
+COMPUTE_ROWS = Compute rows
+
+ComputeCAH_0 = Compute Classification with {0}
+
+ComputeCAH_1 = Show chart
+
+ComputeCAH_2 = Error: temporary file created cannot be written:
+
+ComputeCAH_3 = Computing CAH with
+
+ComputeCAH_5 = Opening the Classification result
+
+ComputeCAH_6 = Error while computing Classification: {0}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_ru.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_ru.properties	(revision 685)
@@ -0,0 +1,13 @@
+
+CAHPreferencePage_0 = Показывать графики в 2D
+CAHPreferencePage_2 = Число кластеров
+CAHPreferencePage_3 = Метод
+CAHPreferencePage_4 = Метрика
+
+COMPUTE_COLUMNS = Колонки
+COMPUTE_ROWS    = Строчки
+
+ComputeCAH_0 = Расчет Классификации {0}
+ComputeCAH_1 = Показать график
+ComputeCAH_2 = ** Не удается записать данные во временный файл
+ComputeCAH_3 = Расчет классификации с 

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_ru.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_fr.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_fr.properties	(revision 685)
@@ -0,0 +1,26 @@
+
+CAHPreferencePage_0 = Afficher les graphiques en 2D
+
+CAHPreferencePage_2 = Nombre de clusters
+
+CAHPreferencePage_3 = Méthode
+
+CAHPreferencePage_4 = Métrique
+
+CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS = Nombre de clusters :
+
+COMPUTE_COLUMNS = Classer les colonnes
+
+COMPUTE_ROWS = Classer les lignes
+
+ComputeCAH_0 = Calcul de la Classification avec {0}
+
+ComputeCAH_1 = Afficher le graphique
+
+ComputeCAH_2 = ** Impossible d'écrire dans le fichier temporaire
+
+ComputeCAH_3 = Calcul de la classification avec
+
+ComputeCAH_5 = Ouverture de la fenêtre de Classification
+
+ComputeCAH_6 = Erreur lors de l'ouverture de l'éditeur de Classification : {0}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/messages/messages_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCChartEditor.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCChartEditor.java	(revision 0)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCChartEditor.java	(revision 685)
@@ -0,0 +1,123 @@
+package org.txm.ahc.rcp.editors;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.ToolItem;
+import org.txm.ahc.core.functions.AHC;
+import org.txm.ahc.core.preferences.AHCPreferences;
+import org.txm.ahc.rcp.messages.AHCUIMessages;
+import org.txm.chartsengine.rcp.editors.ChartEditor;
+import org.txm.core.results.Parameter;
+import org.txm.rcp.IImageKeys;
+import org.txm.rcp.editors.listeners.ComputeSelectionListener;
+
+/**
+ * CAH chart editor.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class AHCChartEditor extends ChartEditor<AHC> {
+
+	
+	/**
+	 * Rows computing button.
+	 */
+	protected ToolItem rowsComputing;
+	
+	
+
+	/**
+	 * The metric (euclidean, manhattan).
+	 */
+	@Parameter(key=AHCPreferences.METRIC)
+	protected String metric;
+
+	/**
+	 * The method (METHODS <- c("average", "single", "complete", "ward", "weighted", "flexible")).
+	 */
+	@Parameter(key=AHCPreferences.METHOD)
+	protected String method;
+
+	/**
+	 * The number of clusters.
+	 */
+	@Parameter(key=AHCPreferences.N_CLUSTERS)
+	protected Spinner numberOfClusters;
+
+	/**
+	 * To compute the columns or the rows.
+	 */
+	@Parameter(key=AHCPreferences.COLUMNS_COMPUTING)
+	protected ToolItem columnsComputing;
+	
+	/**
+	 * To render in 2D or 3D.
+	 */
+	@Parameter(key=AHCPreferences.RENDERING_2D)
+	protected Button rendering2D;
+
+	
+	
+
+	@Override
+	public void _createPartControl(Composite parent) {
+
+		// Extend the chart editor tool bar
+		new ToolItem(this.chartToolBar, SWT.SEPARATOR);
+
+		// Number of clusters
+	    CLabel clustersLabel = new CLabel(this.chartToolBar, SWT.CENTER);
+		clustersLabel.setText(AHCUIMessages.CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS);
+		this.chartToolBar.addControl(clustersLabel);
+
+	    this.numberOfClusters = new Spinner(this.chartToolBar, SWT.BORDER);
+	    this.numberOfClusters.setMinimum(2);
+	    this.numberOfClusters.setIncrement(1);
+	    this.chartToolBar.addControl(this.numberOfClusters);
+	    this.numberOfClusters.addSelectionListener(new ComputeSelectionListener(this));
+
+
+		// Columns
+		this.columnsComputing = new ToolItem(this.chartToolBar, SWT.RADIO);
+		this.columnsComputing.setToolTipText(AHCUIMessages.COMPUTE_COLUMNS);
+		this.columnsComputing.setImage(IImageKeys.getImage(AHCChartEditor.class, "icons/compute_columns.png")); //$NON-NLS-1$
+		this.columnsComputing.addSelectionListener(new ComputeSelectionListener(this));
+		// FIXME: keep this for offering an option "large icons" with text in buttons ?
+		//this.columnsComputing.setText(CAUIPMessages.ComputeClassification_5);
+		//this.columnsComputing.setSelection(this.getBooleanParameterValue(AHCPreferences.COLUMNS_COMPUTING));
+
+		// Rows
+		this.rowsComputing = new ToolItem(this.chartToolBar, SWT.RADIO);
+		this.rowsComputing.setToolTipText(AHCUIMessages.COMPUTE_ROWS);
+		this.rowsComputing.setImage(IImageKeys.getImage(AHCChartEditor.class, "icons/compute_rows.png")); //$NON-NLS-1$
+
+		
+		// 2D/3D rendering
+		this.rendering2D = new Button(this.chartToolBar, SWT.CHECK);
+		this.rendering2D.setText("2D");//$NON-NLS-1$
+		this.chartToolBar.addControl(this.rendering2D);
+		this.rendering2D.addSelectionListener(new ComputeSelectionListener(this));
+		//this.rendering2D.setBackground(itemSeparator.getParent().getBackground());
+
+	}
+
+
+	@Override
+	public void updateEditorFromResult(boolean update) {
+		
+		// Update the maximum value of the number of clusters spinner according to the new CAH configuration 
+		this.numberOfClusters.setMaximum(this.getResult().getMaxClustersCount());
+
+		// Updates the current value of the number of clusters spinner
+		this.numberOfClusters.setSelection(this.getResult().getNumberOfClusters());
+		
+		this.rowsComputing.setSelection(!this.getResult().isColumnsComputing());
+	}
+
+}

Property changes on: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/editors/AHCChartEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/build.properties
===================================================================
--- tmp/org.txm.ahc.rcp/build.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/build.properties	(revision 685)
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               OSGI-INF/,\
+               icons/

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

Index: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle.properties	(revision 685)
@@ -0,0 +1,8 @@
+
+command.name = Classification
+
+command.tooltip = Compute classification
+
+editor.name = Classification
+
+page.name = Classification

Property changes on: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru.properties
===================================================================
--- tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru.properties	(revision 685)
@@ -0,0 +1,5 @@
+
+command.name    = Классификация
+command.tooltip = Классификация
+
+page.name = Классификация

Property changes on: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 685)
@@ -0,0 +1,3 @@
+command.name=Classification
+command.tooltip=Calculer la classification
+page.name=Classification
\ No newline at end of file

Property changes on: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties
===================================================================
--- tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties	(revision 0)
+++ tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties	(revision 685)
@@ -0,0 +1,3 @@
+command.name=Классификация
+command.tooltip=Классификация
+page.name=Классификация
\ No newline at end of file

Property changes on: tmp/org.txm.ahc.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/icons/compute_rows.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.ahc.rcp/icons/compute_rows.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.ahc.rcp/icons/cah.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.ahc.rcp/icons/cah.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.ahc.rcp/icons/compute_columns.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/org.txm.ahc.rcp/icons/compute_columns.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.ahc.rcp/plugin.xml
===================================================================
--- tmp/org.txm.ahc.rcp/plugin.xml	(revision 0)
+++ tmp/org.txm.ahc.rcp/plugin.xml	(revision 685)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            categoryId="org.txm.rcp.category.txm"
+            defaultHandler="org.txm.ahc.rcp.handlers.ComputeAHC"
+            id="org.txm.cah.rcp.handlers.ComputeAHC"
+            name="%command.name">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="toolbar:org.txm.rcp.toolbartools?after=org.txm.ca.rcp.handlers.ComputeCA">
+         <command
+               commandId="org.txm.cah.rcp.handlers.ComputeAHC"
+               icon="icons/cah.png"
+               style="push"
+               tooltip="%command.tooltip">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OneCASelected">
+                  </reference>
+                  <reference
+                        definitionId="OneLexicalTableSelected">
+                  </reference>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.txm.rcp.views.corpora.CorporaView">
+         <command
+               commandId="org.txm.cah.rcp.handlers.ComputeAHC"
+               icon="icons/cah.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OneCASelected">
+                  </reference>
+                  <reference
+                        definitionId="OneLexicalTableSelected">
+                  </reference>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:menu.tools">
+         <command
+               commandId="org.txm.cah.rcp.handlers.ComputeAHC"
+               icon="icons/cah.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OneCASelected">
+                  </reference>
+                  <reference
+                        definitionId="OneLexicalTableSelected">
+                  </reference>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.txm.ahc.rcp.editors.AHCChartEditor"
+            default="false"
+            icon="icons/cah.png"
+            id="org.txm.ahc.core.functions.AHC"
+            name="%editor.name">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.txm.ahc.core.functions.AHC"
+            class="org.txm.ahc.rcp.adapters.AHCAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.model.IWorkbenchAdapter">
+         </adapter>
+      </factory>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.txm.rcp.preferences.UserPreferencePage"
+            class="org.txm.ahc.rcp.preferences.AHCPreferencePage"
+            id="org.txm.cah.rcp.preferences.CAHPreferencePage"
+            name="%page.name">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.core.expressions.definitions">
+      <definition
+            id="OneCAHSelected">
+         <with
+               variable="selection">
+            <iterate
+                  ifEmpty="false"
+                  operator="and">
+               <instanceof
+                     value="org.txm.ahc.core.functions.CAH">
+               </instanceof>
+            </iterate>
+         </with>
+      </definition>
+   </extension>
+
+</plugin>

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

Index: tmp/org.txm.ahc.rcp/.settings/org.eclipse.core.resources.prefs
===================================================================
--- tmp/org.txm.ahc.rcp/.settings/org.eclipse.core.resources.prefs	(revision 0)
+++ tmp/org.txm.ahc.rcp/.settings/org.eclipse.core.resources.prefs	(revision 685)
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/org/txm/ahc/rcp/messages/messages_fr.properties=UTF-8
+encoding//src/org/txm/ahc/rcp/messages/messages_ru.properties=UTF-8

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

Index: tmp/org.txm.ahc.rcp/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- tmp/org.txm.ahc.rcp/.settings/org.eclipse.jdt.core.prefs	(revision 0)
+++ tmp/org.txm.ahc.rcp/.settings/org.eclipse.jdt.core.prefs	(revision 685)
@@ -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.ahc.rcp/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.ahc.rcp/.classpath
===================================================================
--- tmp/org.txm.ahc.rcp/.classpath	(revision 0)
+++ tmp/org.txm.ahc.rcp/.classpath	(revision 685)
@@ -0,0 +1,11 @@
+<?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">
+		<accessrules>
+			<accessrule kind="accessible" pattern="**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

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

Index: tmp/org.txm.ahc.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.ahc.rcp/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.ahc.rcp/META-INF/MANIFEST.MF	(revision 685)
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: AHC RCP
+Bundle-SymbolicName: org.txm.ahc.rcp;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.txm.ahc.rcp.adapters,
+ org.txm.ahc.rcp.editors,
+ org.txm.ahc.rcp.handlers,
+ org.txm.ahc.rcp.messages,
+ org.txm.ahc.rcp.preferences
+Require-Bundle: org.txm.ahc.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.utils;bundle-version="1.0.0";visibility:=reexport,
+ org.eclipse.osgi;visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="3.10.0";visibility:=reexport,
+ org.eclipse.ui;bundle-version="3.106.1";visibility:=reexport,
+ org.txm.statsengine.r.rcp;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.lexicaltable.rcp;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.statsengine.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.searchengine.cqp.core;bundle-version="1.1.0";visibility:=reexport,
+ org.txm.ca.core;visibility:=reexport,
+ org.txm.lexicaltable.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.core;bundle-version="0.7.0";visibility:=reexport,
+ org.txm.rcp;bundle-version="0.7.8";visibility:=reexport,
+ org.eclipse.core.expressions;bundle-version="3.4.600";visibility:=reexport,
+ org.txm.searchengine.core;bundle-version="1.0.0";visibility:=reexport,
+ org.eclipse.core.commands
+Bundle-Vendor: Textometrie.org

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

