Index: tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle.properties
===================================================================
--- tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle.properties	(revision 0)
+++ tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle.properties	(revision 120)
@@ -0,0 +1,8 @@
+Bundle-Name = Partition RCP
+Bundle-Vendor = TXM
+command.name = Dimensions
+editor.name = Dimensions
+page.name = Partition
+command.tooltip=Dimensions
+PreferencesPage_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE=Display parts count in chart title
+PreferencesPage_DIMENSIONS_SORT_BY_PARTS_SIZE=Sort by part size
\ No newline at end of file

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

Index: tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru.properties
===================================================================
--- tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru.properties	(revision 0)
+++ tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru.properties	(revision 120)
@@ -0,0 +1,2 @@
+command.name=\u0420\u0430\u0437\u043c\u0435\u0440\u044b
+command.tooltip=\u0420\u0430\u0437\u043c\u0435\u0440\u044b
\ No newline at end of file

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

Index: tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_fr.properties
===================================================================
--- tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 0)
+++ tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_fr.properties	(revision 120)
@@ -0,0 +1,8 @@
+Bundle-Name = Partition RCP
+Bundle-Vendor = TXM
+command.name = Dimensions
+editor.name = Dimensions
+page.name = Partition
+command.tooltip=Visualiser la taille des parties
+PreferencesPage_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE=Afficher le nombre de parties dans le titre du graphique
+PreferencesPage_DIMENSIONS_SORT_BY_PARTS_SIZE=Trier par taille de partie

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

Index: tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties
===================================================================
--- tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties	(revision 0)
+++ tmp/org.txm.partition.rcp/OSGI-INF/l10n/bundle_ru_utf-8.properties	(revision 120)
@@ -0,0 +1,2 @@
+command.name=Размеры
+command.tooltip=Размеры
\ No newline at end of file

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

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

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

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

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

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

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

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

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

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

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

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

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

Index: tmp/org.txm.partition.rcp/plugin.xml
===================================================================
--- tmp/org.txm.partition.rcp/plugin.xml	(revision 0)
+++ tmp/org.txm.partition.rcp/plugin.xml	(revision 120)
@@ -0,0 +1,88 @@
+<?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.partition.rcp.handlers.ComputePartitionDimensionsBarChart"
+            id="ComputePartitionDimensionsBarChart"
+            name="%command.name">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="toolbar:org.txm.rcpapplication.toolbartools">
+         <command
+               commandId="ComputePartitionDimensionsBarChart"
+               icon="icons/dimensions.png"
+               style="push"
+               tooltip="%command.tooltip">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.txm.rcpapplication.views.CorporaView">
+         <command
+               commandId="ComputePartitionDimensionsBarChart"
+               icon="icons/dimensions.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="menu:menu.tools">
+         <command
+               commandId="ComputePartitionDimensionsBarChart"
+               icon="icons/dimensions.png"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OnePartitionSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.txm.rcpapplication.preferences.UserPreferencePage"
+            class="org.txm.partition.rcp.preferences.PartitionPreferencePage"
+            id="org.txm.rcp.partition.preferences.PartitionPreferencePage"
+            name="%page.name">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.txm.chartsengine.rcp.editors.ChartEditorPart"
+            default="false"
+            icon="icons/dimensions.png"
+            id="org.txm.searchengine.cqp.corpus.Partition"
+            name="%editor.name">
+      </editor>
+   </extension>
+
+</plugin>

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

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

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

Index: tmp/org.txm.partition.rcp/.settings/org.eclipse.core.resources.prefs
===================================================================
--- tmp/org.txm.partition.rcp/.settings/org.eclipse.core.resources.prefs	(revision 0)
+++ tmp/org.txm.partition.rcp/.settings/org.eclipse.core.resources.prefs	(revision 120)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//OSGI-INF/l10n/bundle_ru_utf-8.properties=UTF-8

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

Index: tmp/org.txm.partition.rcp/.classpath
===================================================================
--- tmp/org.txm.partition.rcp/.classpath	(revision 0)
+++ tmp/org.txm.partition.rcp/.classpath	(revision 120)
@@ -0,0 +1,8 @@
+<?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.7"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="OSGI-INF"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

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

Index: tmp/org.txm.partition.rcp/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.partition.rcp/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.partition.rcp/META-INF/MANIFEST.MF	(revision 120)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.txm.partition.rcp;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.txm.chartsengine.rcp,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.txm.core;bundle-version="0.7.0",
+ org.txm.rcp;bundle-version="0.7.8",
+ org.txm.partition.core;bundle-version="1.0.0",
+ org.txm.chartsengine.core
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %Bundle-Vendor

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

Index: tmp/org.txm.partition.rcp/.project
===================================================================
--- tmp/org.txm.partition.rcp/.project	(revision 0)
+++ tmp/org.txm.partition.rcp/.project	(revision 120)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.txm.partition.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>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>

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

Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 0)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/handlers/ComputePartitionDimensionsBarChart.java	(revision 120)
@@ -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.partition.rcp.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.txm.Toolbox;
+import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
+import org.txm.partition.core.preferences.PartitionDimensionsPreferences;
+import org.txm.rcpapplication.JobsTimer;
+import org.txm.rcpapplication.Messages;
+import org.txm.searchengine.cqp.corpus.Part;
+import org.txm.searchengine.cqp.corpus.Partition;
+
+/**
+ * Creates and opens a bar chart editor with the dimensions of the selected partition.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ * 
+ */
+public class ComputePartitionDimensionsBarChart extends AbstractHandler {
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		if (!Toolbox.isSearchEngineInitialized()) return false;
+		
+		if (!Toolbox.isStatEngineInitialized()) {
+			System.out.println(Messages.PartsSize_0);
+			return null;
+		}
+		
+		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
+
+		if (selection.getFirstElement() instanceof Partition) {
+			final Partition partition = (Partition) selection.getFirstElement();
+			try {
+
+				JobsTimer.start();
+
+				List<Part> parts = partition.getParts();
+				if(parts.size() == 0)	{
+					return false;
+				}
+
+				// Creates and opens the chart editor
+				SWTChartsComponentsProvider.getCurrent().openEditor(Messages.bind(Messages.PartsSize_18, partition.getName()), partition, PartitionDimensionsPreferences.PREFERENCES_NODE,
+						"Partition Dimensions Bar Chart");
+
+				// FIXME: Pie chart tests
+//				SWTChartsComponentsProvider.getCurrent().openEditor(Messages.bind(Messages.PartsSize_18, partition.getName()), partition, PartitionDimensionsPreferences.PREFERENCES_NODE,
+//						"Partition Dimensions Pie Chart");
+				
+				
+				JobsTimer.stopAndPrint();
+			} catch (Exception e) {
+				org.txm.rcpapplication.utils.Logger.printStackTrace(e);
+			}
+		}
+
+		return null;
+	}
+	
+}

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

Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java	(revision 0)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/preferences/PartitionPreferencePage.java	(revision 120)
@@ -0,0 +1,83 @@
+// 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.partition.rcp.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.txm.chartsengine.rcp.SWTChartsComponentsProvider;
+import org.txm.partition.core.preferences.PartitionDimensionsPreferences;
+import org.txm.partition.rcp.messages.RCPPartitionMessages;
+import org.txm.rcp.preferences.TXMPreferencePage;
+import org.txm.rcp.preferences.TXMPreferenceStore;
+import org.txm.rcpapplication.Messages;
+
+/**
+ * Partition preference page.
+ * @author mdecorde
+ * @author sjacquot
+ *
+ */
+public class PartitionPreferencePage extends TXMPreferencePage {
+
+
+	/**
+	 * Creates the field editors. Field editors are abstractions of the common
+	 * GUI blocks needed to manipulate various types of preferences. Each field
+	 * editor knows how to save and restore itself.
+	 */
+	@Override
+	public void createFieldEditors() {
+		
+		// Charts rendering
+		Composite chartsTab = SWTChartsComponentsProvider.createChartsRenderingPreferencesTabFolderComposite(this.getFieldEditorParent());
+		
+		this.addField(new BooleanFieldEditor(PartitionDimensionsPreferences.CHART_DIMENSIONS_SORTED_BY_SIZE, RCPPartitionMessages.PreferencesPage_DIMENSIONS_SORT_BY_PARTS_SIZE, chartsTab));
+		this.addField(new BooleanFieldEditor(PartitionDimensionsPreferences.CHART_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE, RCPPartitionMessages.PreferencesPage_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE, chartsTab));
+		
+		// other shared preferences
+		SWTChartsComponentsProvider.createChartsRenderingPreferencesFields(this, chartsTab);
+
+	}
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	@Override
+	public void init(IWorkbench workbench) {
+		this.setPreferenceStore(new TXMPreferenceStore(PartitionDimensionsPreferences.PREFERENCES_NODE));
+		//this.setDescription(Messages.DiagnosticPreferencePage_1);
+		this.setTitle(Messages.DiagnosticPreferencePage_1);
+	}
+
+
+}

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

Index: tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/messages/RCPPartitionMessages.java
===================================================================
--- tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/messages/RCPPartitionMessages.java	(revision 0)
+++ tmp/org.txm.partition.rcp/src/org/txm/partition/rcp/messages/RCPPartitionMessages.java	(revision 120)
@@ -0,0 +1,23 @@
+package org.txm.partition.rcp.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+
+
+public class RCPPartitionMessages extends NLS {
+
+	// FIXME: use the same properties file than the bundle	
+	private static final String BUNDLE_NAME = "l10n.bundle"; //$NON-NLS-1$
+
+	public static String PreferencesPage_DIMENSIONS_DISPLAY_PARTS_COUNT_IN_TITLE;
+	public static String PreferencesPage_DIMENSIONS_SORT_BY_PARTS_SIZE;
+	
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, RCPPartitionMessages.class);
+	}
+
+	private RCPPartitionMessages() {
+	}
+}

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

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

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

