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

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

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

Index: tmp/org.txm.cah.rcp/.classpath
===================================================================
--- tmp/org.txm.cah.rcp/.classpath	(revision 0)
+++ tmp/org.txm.cah.rcp/.classpath	(revision 285)
@@ -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.cah.rcp/.classpath
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.cah.rcp/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.cah.rcp/META-INF/MANIFEST.MF	(revision 285)
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: CAH RCP
+Bundle-SymbolicName: org.txm.cah.rcp;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.txm.cah.rcp.adapters,
+ org.txm.cah.rcp.editors,
+ org.txm.cah.rcp.handlers,
+ org.txm.cah.rcp.messages,
+ org.txm.cah.rcp.preferences
+Require-Bundle: org.txm.cah.core;bundle-version="1.0.0",
+ org.txm.chartsengine.rcp;bundle-version="1.0.0",
+ org.txm.core;bundle-version="0.7.0",
+ org.txm.rcp;bundle-version="0.7.8",
+ org.eclipse.ui;bundle-version="3.106.1",
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.txm.ca.core,
+ org.txm.lexicaltable.core;bundle-version="1.0.0",
+ org.txm.lexicaltable.rcp;bundle-version="1.0.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600"
+Bundle-Vendor: Textometrie.org

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

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

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java	(revision 285)
@@ -0,0 +1,349 @@
+// 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.cah.rcp.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+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.eclipse.ui.handlers.HandlerUtil;
+import org.txm.ca.core.functions.CA;
+import org.txm.ca.core.preferences.CAPreferences;
+import org.txm.cah.core.functions.CAH;
+import org.txm.cah.core.messages.CAHCoreMessages;
+import org.txm.cah.core.preferences.CAHPreferences;
+import org.txm.cah.rcp.messages.CAHUIMessages;
+import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.lexicaltable.core.functions.LexicalTableFactory;
+import org.txm.lexicaltable.core.statsengine.data.LexicalTable;
+import org.txm.lexicaltable.rcp.editors.LexicalTableDialog;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+import org.txm.rcpapplication.TxmPreferences;
+import org.txm.rcpapplication.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 ComputeCAH extends BaseAbstractHandler {
+
+
+	// adds a double click listener to the Corpus View
+	static	{
+		CorporaView.addDoubleClickListener(CAH.class, ComputeCAH.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;
+		}
+
+
+		CAH cah = null;
+		CA ca = null;
+		LexicalTable lexicaltable = null;
+		Partition partition = null;
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		
+		// Build the CA or not depending on the selection
+		if (selection.getFirstElement() instanceof CAH) {
+			cah = (CAH) selection.getFirstElement();
+		} else if (selection.getFirstElement() instanceof CA) {
+			//System.out.println("Compute CAH with CA : "+((CA)selection.getFirstElement()).getName());
+			ca = (CA) selection.getFirstElement();
+		} else if (selection.getFirstElement() instanceof LexicalTable) {
+			//System.out.println("Compute CAH with LT : "+((LexicalTable)selection.getFirstElement()).getName());
+			lexicaltable = (LexicalTable) selection.getFirstElement();
+			
+			try {
+				ca = new CA(lexicaltable);
+			} catch (StatException e) {
+				System.out.println("Failed to build the CA with lexical table " + lexicaltable + ": " + e);
+				Log.printStackTrace(e);
+			}
+			lexicaltable.addResult(ca);
+			
+//			if (lexicaltable.getPartition() != null)
+//				lexicaltable.getPartition().storeResult(ca);
+//			else if (lexicaltable.getCorpus() != null)
+//				lexicaltable.getCorpus().storeResult(ca);
+		} else if (selection.getFirstElement() instanceof Partition) {
+			//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName());
+			partition = (Partition)selection.getFirstElement();
+			try {
+				String title = CAHUIMessages.bind(CAHUIMessages.ComputeCAH_0, partition.getName());
+				int vmax = TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, CAPreferences.V_MAX);
+				int fmin = TXMPreferences.getInt(CAPreferences.PREFERENCES_NODE, CAPreferences.F_MIN);
+				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 = LexicalTableFactory.getLexicalTable(partition, property, fmin); // use the CAPreferencePage Fmin
+					lexicaltable.cut(vmax);
+					partition.addResult(lexicaltable);
+					
+					ca = new CA(lexicaltable);
+					lexicaltable.addResult(ca);
+				} else {
+					// canceled
+					return null;
+				}
+			} catch (Exception e) {
+				System.out.println("Failed to build the lexical table of " + partition + ": " + e);
+				Log.printStackTrace(e);
+				return null;
+			} 
+		}
+
+		// Use existent CAH (used when reopening an editor from a CAH result node)
+		//FIXME: why we remove the result from the parent here? it shouldn't be necessary
+		if (cah != null)	{
+			if (cah.getParent() != null)	{
+				cah.getParent().removeResult(cah);
+			}
+		} else {
+//			if (ca == null) cah = new CAH(lexicaltable, computeColumns, method, metric, ncluster, display2D);
+//			else 
+				cah = new CAH(ca,
+						TXMPreferences.getBoolean(CAHPreferences.PREFERENCES_NODE, CAHPreferences.COLUMNS_COMPUTING),
+						TXMPreferences.getString(CAHPreferences.PREFERENCES_NODE, CAHPreferences.METHOD),
+						TXMPreferences.getString(CAHPreferences.PREFERENCES_NODE, CAHPreferences.METRIC),
+						TXMPreferences.getInt(CAHPreferences.PREFERENCES_NODE, CAHPreferences.N_CLUSTERS)
+						);
+		}
+	
+		//compute(cah, null);
+		SWTChartsComponentsProvider.getCurrent().openEditor(cah, CAHPreferences.PREFERENCES_NODE);
+
+		return null;
+	}
+
+
+
+
+	/**
+	 * The Class CAHParamDialog.
+	 */
+	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 = CAHCoreMessages.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(CAHCoreMessages.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(CAHUIMessages.CAHPreferencePage_2);
+
+			nclusterSpinner = new Spinner(composite, SWT.BORDER);
+			nclusterSpinner.setMinimum(2);
+			nclusterSpinner.setIncrement(1);
+			nclusterSpinner.setSelection(TxmPreferences.getInt(CAHPreferences.N_CLUSTERS, 2));
+			nclusterSpinner.setMaximum(50);
+
+			// ROWS OR COLS
+			docolumnsButton = new Button(composite, SWT.RADIO);
+			docolumnsButton.setText(CAHUIMessages.COMPUTE_COLUMNS);
+			docolumnsButton.setSelection(true);
+
+			Button dorowsButton = new Button(composite, SWT.RADIO);
+			dorowsButton.setText(CAHUIMessages.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.cah.rcp/src/org/txm/cah/rcp/handlers/ComputeCAH.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/package.html
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/package.html	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/handlers/package.html	(revision 285)
@@ -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.cah.rcp/src/org/txm/cah/rcp/handlers/package.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/preferences/CAHPreferencePage.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/preferences/CAHPreferencePage.java	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/preferences/CAHPreferencePage.java	(revision 285)
@@ -0,0 +1,98 @@
+// 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.cah.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.cah.core.functions.CAH;
+import org.txm.cah.core.messages.CAHCoreMessages;
+import org.txm.cah.core.preferences.CAHPreferences;
+import org.txm.cah.rcp.adapters.CAHAdapterFactory;
+import org.txm.cah.rcp.messages.CAHUIMessages;
+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 CAHPreferencePage extends TXMPreferencePage {
+
+
+
+	@Override
+	public void createFieldEditors() {
+
+		
+		IntegerFieldEditor nClusters = new IntegerFieldEditor(CAHPreferences.N_CLUSTERS, CAHUIMessages.CAHPreferencePage_2, getFieldEditorParent());
+		addField(nClusters);
+
+		String list[] = CAH.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(CAHPreferences.METHOD, CAHUIMessages.CAHPreferencePage_3, methods, getFieldEditorParent());
+		addField(method);
+
+		list = CAH.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(CAHPreferences.METRIC, CAHUIMessages.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(CAHPreferences.DISPLAY_2D, CAHUIMessages.CAHPreferencePage_0, 2, labelAndValues, chartsTab);
+		addField(default2D3Ddisplay);
+		
+		
+		// other shared preferences
+		SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, chartsTab);
+	}
+
+	@Override
+	public void init(IWorkbench workbench) {
+		this.setPreferenceStore(new TXMPreferenceStore(CAHPreferences.PREFERENCES_NODE));
+		//setDescription("CAH");
+		this.setTitle(CAHCoreMessages.RESULT_TYPE);
+		this.setImageDescriptor(CAHAdapterFactory.ICON);
+	}
+
+}

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

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/adapters/CAHAdapterFactory.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/adapters/CAHAdapterFactory.java	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/adapters/CAHAdapterFactory.java	(revision 285)
@@ -0,0 +1,47 @@
+// Copyright © 2010-2013 ENS de Lyon.
+package org.txm.cah.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.cah.core.functions.CAH;
+import org.txm.rcp.adapters.TXMResultAdapter;
+import org.txm.rcp.adapters.TXMResultAdapterFactory;
+
+/**
+ * A factory for creating Adapter objects.
+ *  
+ * @author mdecorde
+ * @author sjacquot
+ */
+public class CAHAdapterFactory extends TXMResultAdapterFactory {
+
+	
+	public static final ImageDescriptor ICON =
+			AbstractUIPlugin.imageDescriptorFromPlugin(FrameworkUtil.getBundle(CAHAdapterFactory.class).getSymbolicName(),
+					"platform:/plugin/"+ FrameworkUtil.getBundle(CAHAdapterFactory.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 CAH)	{
+			return new TXMResultAdapter() {
+				@Override
+				public ImageDescriptor getImageDescriptor(Object object) {
+					return ICON;
+				}
+			};
+		}
+		return null;
+	}
+
+
+}

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

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages.properties
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages.properties	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages.properties	(revision 285)
@@ -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.cah.rcp/src/org/txm/cah/rcp/messages/messages.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru.properties
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru.properties	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru.properties	(revision 285)
@@ -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.cah.rcp/src/org/txm/cah/rcp/messages/messages_ru.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_fr.properties
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_fr.properties	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/messages_fr.properties	(revision 285)
@@ -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.cah.rcp/src/org/txm/cah/rcp/messages/messages_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/CAHUIMessages.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/CAHUIMessages.java	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/messages/CAHUIMessages.java	(revision 285)
@@ -0,0 +1,39 @@
+package org.txm.cah.rcp.messages;
+
+import org.eclipse.osgi.util.NLS;
+import org.txm.utils.messages.Utf8NLS;
+
+public class CAHUIMessages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.txm.cah.rcp.messages.messages"; //$NON-NLS-1$
+	
+	
+	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;
+	
+	static {
+		// initializes resource bundle
+		Utf8NLS.initializeMessages(BUNDLE_NAME, CAHUIMessages.class);
+	}
+	
+	private CAHUIMessages() {
+		//no instantiation
+	}
+}

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

Index: tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java
===================================================================
--- tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java	(revision 0)
+++ tmp/org.txm.cah.rcp/src/org/txm/cah/rcp/editors/CAHChartEditor.java	(revision 285)
@@ -0,0 +1,312 @@
+package org.txm.cah.rcp.editors;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.swt.widgets.ToolItem;
+import org.txm.cah.core.functions.CAH;
+import org.txm.cah.core.messages.CAHCoreMessages;
+import org.txm.cah.core.preferences.CAHPreferences;
+import org.txm.cah.rcp.messages.CAHUIMessages;
+import org.txm.chartsengine.rcp.editors.ChartEditorPart;
+import org.txm.chartsengine.rcp.messages.SWTComponentsProviderMessages;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.core.results.ITXMResult;
+import org.txm.rcpapplication.IImageKeys;
+import org.txm.rcpapplication.JobsTimer;
+import org.txm.rcpapplication.commands.editor.CustomizableEditor;
+import org.txm.rcpapplication.utils.JobHandler;
+import org.txm.rcpapplication.views.QueriesView;
+import org.txm.rcpapplication.views.corpora.CorporaView;
+import org.txm.searchengine.cqp.corpus.Corpus;
+import org.txm.statsengine.r.rcp.views.RVariablesView;
+import org.txm.utils.logger.Log;
+
+/**
+ * CAH chart editor.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class CAHChartEditor extends ChartEditorPart implements CustomizableEditor {
+
+
+
+	/**
+	 * Numbers of clusters.
+	 */
+	protected Spinner numbersOfClusters;
+
+
+
+	@Override
+	public void createPartControl(Composite parent) {
+
+		super.createPartControl(parent);
+
+
+		// Extend the chart editor tool bar
+		ToolItem separator = new ToolItem(this.toolBar, SWT.SEPARATOR);
+
+		// Number of clusters
+		ToolItem itemSeparator = new ToolItem(this.toolBar, SWT.SEPARATOR);
+	    CLabel clustersLabel = new CLabel(this.toolBar, SWT.CENTER);
+		clustersLabel.setText(CAHUIMessages.CHART_TOOLBAR_BUTTON_NUMBER_OF_CLUSTERS);
+		clustersLabel.pack();
+		itemSeparator.setWidth(clustersLabel.getBounds().width);
+	    itemSeparator.setControl(clustersLabel);
+
+	    itemSeparator = new ToolItem(this.toolBar, SWT.SEPARATOR);
+	    this.numbersOfClusters = new Spinner(this.toolBar, SWT.BORDER);
+	    this.numbersOfClusters.setMinimum(2);
+	    this.numbersOfClusters.setIncrement(1);
+
+		itemSeparator.setControl(this.numbersOfClusters);
+		this.numbersOfClusters.pack();
+		itemSeparator.setWidth(this.numbersOfClusters.getBounds().width);
+
+
+		// Columns
+		final ToolItem computeColumns = new ToolItem(this.toolBar, SWT.RADIO);
+		computeColumns.setToolTipText(CAHUIMessages.COMPUTE_COLUMNS);
+		computeColumns.setImage(IImageKeys.getImage(CAHChartEditor.class, "icons/compute_columns.png")); //$NON-NLS-1$
+		// FIXME: keep this for offering an option "large icons" with text in buttons ?
+		//computeColumns.setText(CAUIPMessages.ComputeClassification_5);
+		computeColumns.setSelection(TXMPreferences.getBoolean(CAHPreferences.PREFERENCES_NODE, this.getResultData(), CAHPreferences.COLUMNS_COMPUTING));
+
+		// Rows
+		final ToolItem computeRows = new ToolItem(this.toolBar, SWT.RADIO);
+		computeRows.setToolTipText(CAHUIMessages.COMPUTE_ROWS);
+		computeRows.setImage(IImageKeys.getImage(CAHChartEditor.class, "icons/compute_rows.png")); //$NON-NLS-1$
+		// FIXME: keep this for offering an option "large icons" with text in buttons ?
+		//computeRows.setText(CAUIPMessages.ComputeClassification_6);
+		computeRows.setSelection(!TXMPreferences.getBoolean(CAHPreferences.PREFERENCES_NODE, this.getResultData(), CAHPreferences.COLUMNS_COMPUTING));
+
+		
+		// 2D/3D
+		final Combo displayCombo = new Combo(this.toolBar, SWT.READ_ONLY);
+		String items[] = { "2D", "3D" }; //$NON-NLS-1$ //$NON-NLS-2$
+		displayCombo.setItems(items);
+		if(TXMPreferences.getBoolean(CAHPreferences.PREFERENCES_NODE, this.getResultData(), CAHPreferences.DISPLAY_2D))	{
+			displayCombo.select(0);
+		}
+		else	{
+			displayCombo.select(1);
+		}
+		
+		ToolItem comboItem = new ToolItem(this.toolBar, SWT.SEPARATOR);
+		comboItem.setControl(displayCombo);
+		displayCombo.pack();
+		comboItem.setWidth(displayCombo.getBounds().width);
+		
+		// Listeners
+		SelectionListener listener = new SelectionListener() {
+			
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				CAH cah = getResultData();
+
+				// Numbers of clusters
+				if(e.getSource() == numbersOfClusters)	{
+					
+					TXMPreferences.putLocalInt(cah, CAHPreferences.N_CLUSTERS, ((Spinner)e.getSource()).getSelection());
+					cah.setNCluster(((Spinner)e.getSource()).getSelection());
+				}
+				// Compute columns or rows
+				else if(e.getSource() == computeColumns || e.getSource() == computeRows)	{
+					
+					// cancel the event if nothing has changed
+//					if(e.getSource() == computeColumns && computeColumns.getSelection()
+//							|| e.getSource() == computeRows && computeRows.getSelection())	{
+//						return;
+//					}
+					
+					
+					TXMPreferences.putLocalBoolean(cah, CAHPreferences.COLUMNS_COMPUTING, computeColumns.getSelection());
+					cah.setColumnsComputing(computeColumns.getSelection());
+					
+					// reset the number of clusters
+					TXMPreferences.putLocalInt(cah, CAHPreferences.N_CLUSTERS, TXMPreferences.getInt(CAHPreferences.PREFERENCES_NODE, CAHPreferences.N_CLUSTERS));
+					cah.setNCluster(TXMPreferences.getInt(CAHPreferences.PREFERENCES_NODE, CAHPreferences.N_CLUSTERS));
+
+					updateNumbersOfClustersCurrentValue();
+					// Update the maximum value of the number of clusters spinner according to the new CAH configuration 
+					updateNumbersOfClustersMaxValue();
+				}
+				else if(e.getSource() == displayCombo)	{
+					TXMPreferences.putLocalBoolean(cah, CAHPreferences.DISPLAY_2D, (displayCombo.getSelectionIndex() == 0));
+				}
+				
+				
+				// Recompute the CAH and the chart
+				compute(true);
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// TODO Auto-generated method stub
+				
+			}
+		};
+		
+		this.numbersOfClusters.addSelectionListener(listener);
+		computeColumns.addSelectionListener(listener);
+		displayCombo.addSelectionListener(listener);
+		
+		this.compute(false);
+		
+		
+
+	}
+
+
+	/**
+	 * Computes the result and the chart.
+	 * @param update
+	 */
+	public void compute(final boolean update)	{
+		
+		JobHandler jobhandler = new JobHandler(CAHCoreMessages.LOG_COMPUTE_CAH) {
+			@Override
+			protected IStatus run(IProgressMonitor monitor) {
+				this.runInit(monitor);
+				try {
+
+					this.acquireSemaphore();
+					getResultData().stepCompute();
+					this.releaseSemaphore();
+
+					if(!update)	{
+
+						getResultData().getCA().addResult(getResultData());
+						
+						// Refresh views
+						this.syncExec(new Runnable() {
+							@Override
+							public void run() {
+								
+							    updateNumbersOfClustersMaxValue();
+							    updateNumbersOfClustersCurrentValue();
+
+								
+								// Refresh UI
+								CorporaView.refresh();
+								CorporaView.expand(getResultData().getParent());
+								QueriesView.refresh();
+								RVariablesView.refresh();
+							}
+						});
+					
+						
+					}
+					
+					computeChart(update);
+					
+				}
+				catch (ThreadDeath td) {
+					return Status.CANCEL_STATUS;
+				}
+				catch (Exception e) {
+					System.out.println(e.getLocalizedMessage());
+					org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+					Log.severe("Error while computing CAH: " + e.getLocalizedMessage());
+				}
+				finally {
+					monitor.done();
+					JobsTimer.stopAndPrint();
+				}
+				return Status.OK_STATUS;
+			}
+		};
+		jobhandler.startJob();
+	}
+	
+	
+	
+	
+	/**
+	 * Updates the maximum value of the number of clusters spinner according to the CAH configuration.
+	 */
+	public void updateNumbersOfClustersMaxValue()	{
+		int max = this.getResultData().getMaxClustersCount();
+		this.numbersOfClusters.setMaximum(max);
+	}
+
+	/**
+	 * Updates the current value of the number of clusters spinner.
+	 */
+	public void updateNumbersOfClustersCurrentValue()	{
+		this.numbersOfClusters.setSelection(TXMPreferences.getInt(CAHPreferences.PREFERENCES_NODE, this.getResultData(), CAHPreferences.N_CLUSTERS));
+	}
+
+
+	@Override
+	public void setName(String name) {
+		this.setPartName(name);
+	}
+
+	@Override
+	public void setIcon(Image titleImage) {
+		this.setTitleImage(titleImage);
+	}
+
+	@Override
+	public void setSource(Object source) {
+		if (source instanceof CAH)
+			getEditorInput().setResult((ITXMResult) source);
+	}
+
+	@Override
+	public Object getSource() {
+		return getResultData();
+	}
+
+	@Override
+	public Object toConcordance() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	@Override
+	public Object toIndex() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	@Override
+	public Object toProgression() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+
+	@Override
+	public CAH getResultData() {
+		return (CAH) super.getResultData();
+	}
+
+
+
+	@Override
+	public boolean usingCorpus(Corpus corpus) {
+		CAH cah = getResultData();
+		if (cah != null && cah.getCorpus() != null) 
+			return cah.getCorpus().getName().equals(corpus.getName());
+		return false;
+	}
+
+
+	@Override
+	public boolean updateCorpus(Corpus corpus) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

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

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

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

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

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

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

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

Index: tmp/org.txm.cah.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- tmp/org.txm.cah.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 0)
+++ tmp/org.txm.cah.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 285)
@@ -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.cah.rcp/OSGI-INF/l10n/bundle_fr.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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

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

Index: tmp/org.txm.cah.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.cah.rcp/icons/compute_rows.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

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

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

Index: tmp/org.txm.cah.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.cah.rcp/icons/compute_columns.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: tmp/org.txm.cah.rcp/plugin.xml
===================================================================
--- tmp/org.txm.cah.rcp/plugin.xml	(revision 0)
+++ tmp/org.txm.cah.rcp/plugin.xml	(revision 285)
@@ -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.rcpapplication.category.txm"
+            defaultHandler="org.txm.cah.rcp.handlers.ComputeCAH"
+            id="ComputeCAH"
+            name="%command.name">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+         <command
+               commandId="ComputeCAH"
+               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.rcpapplication.views.CorporaView">
+         <command
+               commandId="ComputeCAH"
+               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="ComputeCAH"
+               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.cah.rcp.editors.CAHChartEditor"
+            default="false"
+            icon="icons/cah.png"
+            id="org.txm.cah.core.functions.CAH"
+            name="%editor.name">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.txm.cah.core.functions.CAH"
+            class="org.txm.cah.rcp.adapters.CAHAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.model.IWorkbenchAdapter">
+         </adapter>
+      </factory>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            class="org.txm.cah.rcp.preferences.CAHPreferencePage"
+            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.cah.core.functions.CAH">
+               </instanceof>
+            </iterate>
+         </with>
+      </definition>
+   </extension>
+
+</plugin>

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

