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

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

Index: tmp/org.txm.cooccurrence.chartsengine/META-INF/MANIFEST.MF
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/META-INF/MANIFEST.MF	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/META-INF/MANIFEST.MF	(revision 905)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Cooccurrence Graphs
+Bundle-SymbolicName: org.txm.cooccurrence.chartsengine;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: Textometrie.org
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.txm.chartsengine.graphstream.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.cooccurrence.core;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.cooccurrence.rcp;bundle-version="1.0.0";visibility:=reexport,
+ org.txm.chartsengine.rcp;bundle-version="1.0.0";visibility:=reexport
+Export-Package: org.txm.cooccurrence.chartsengine,
+ org.txm.cooccurrence.editors,
+ org.txm.cooccurrence.functions,
+ org.txm.cooccurrence.handlers

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

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

Index: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java	(revision 905)
@@ -0,0 +1,162 @@
+package org.txm.cooccurrence.chartsengine;
+/**
+ * 
+ */
+
+
+import java.awt.Color;
+import java.util.ArrayList;
+
+import org.graphstream.graph.Graph;
+import org.graphstream.graph.Node;
+import org.graphstream.graph.implementations.SingleGraph;
+import org.txm.chartsengine.core.results.ChartResult;
+import org.txm.chartsengine.graphstream.core.GSChartCreator;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.cooccurrence.functions.CooccurrenceGraph;
+
+/**
+ * Cooccurrence graph chart creator.
+ * 
+ * @author sjacquot
+ *
+ */
+public class CooccurrenceGSChartCreator extends GSChartCreator {
+
+	/**
+	 * 
+	 */
+	public CooccurrenceGSChartCreator() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.chartsengine.core.ChartCreator#createChart(org.txm.chartsengine.core.results.ChartResult)
+	 */
+	@Override
+	public Object createChart(ChartResult result) {
+
+		   String styleSheet =
+	                "node {" +
+	                "	fill-mode: dyn-plain;" + 
+	                "   fill-color: grey;" +
+	                "	size-mode: dyn-size;" + 
+	            	"	size: 5px;" + 
+//	                "   size: 30px, 30px;" +
+//	                "   text-size: 12px;" +
+//	                "   shape: freeplane;" +
+//	      //          "   size-mode: fit;" +
+//	                "   fill-mode: none;" +
+//	                "   stroke-mode: plain;" +
+	                "}" +
+	                "edge {" +
+	                "   shape: cubic-curve;" +
+
+
+
+//	                "   stroke-mode: plain;" +
+	                
+	                "}" +
+	                /*"node.marked {" +
+	                "   fill-color: red;" +
+	                "}" +*/
+	                
+	                "node.titre {" +
+	                "   size: 55px, 45px;" +
+	                "   fill-color: blue;" +
+	                "   text-color: red;" +
+	                "   shape: diamond;" +
+	                "}" +
+
+	                "node.axe {" +
+	                "   fill-color: blue;" +
+	                "   text-color: blue;" +
+	                "   shape: box;" +
+	                "}" +
+	                /*
+	                "node.mot {" +
+	                "   fill-color: green;" +
+	                "   text-color: green;" +
+	                "}" +*/
+	                "node.auteur {" +
+	                "   fill-color: red;" +
+	                "   text-color: gray;" +
+	                "   shape: diamond;" +
+	                "}";
+		
+		
+		Cooccurrence cooccurrence = (Cooccurrence) result.getParent();
+		//Graph graph = (Graph) result.getChart();
+		
+		Graph graph = new SingleGraph(cooccurrence.getSimpleName());
+		graph.addAttribute("ui.stylesheet", styleSheet);
+
+		
+//		graph.clear();
+//		graph.clearSinks();
+//	  	
+//		Generator gen = new DorogovtsevMendesGenerator();
+//    	gen.addSink(graph);
+//    	gen.begin();
+//    	for(int i=0; i<500; i++) {
+//    	    gen.nextEvents();
+//    	}
+//    	gen.end();
+
+		//graph.addAttribute("ui.stylesheet", styleSheet);
+		//System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); // Pour les fonctionnalités avancées des CSS
+
+		int maxSize = 20;
+		
+		// add query node
+		Node rootNode = graph.addNode(cooccurrence.getQuery().getQueryString());
+		rootNode.addAttribute("ui.size", 5);
+		rootNode.addAttribute("ui.color", Color.RED);
+		
+		// add cooccurrents nodes
+		for (int i = 0; i < cooccurrence.getLines().size(); i++) {
+			
+			Node n2 = graph.addNode(cooccurrence.getLines().get(i).occ);
+			n2.addAttribute("ui.size", cooccurrence.getLines().get(i).freq / 5);
+			
+			graph.addEdge(String.valueOf(i), rootNode, n2);
+
+		}
+		
+//		graph.addNode("A");
+//		graph.addNode("B");
+//		graph.addNode("C");
+//		graph.addEdge("AB", "A", "B");
+//		graph.addEdge("BC", "B", "C");
+//		graph.addEdge("CA", "C", "A");
+
+		// set text labels
+        for (Node n : graph) {
+        	n.setAttribute("ui.label", n.getId());
+        }
+	
+
+		// FIXME: tests (opening a Frame with the graph but be careful, closing the Frame closes the entire RCP app)
+    	//graph.display();
+		
+		return graph;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.chartsengine.core.ChartCreator#getResultDataClass()
+	 */
+	@Override
+	public Class getResultDataClass() {
+		return CooccurrenceGraph.class;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.chartsengine.core.ChartCreator#getSeriesShapesColors(java.lang.Object)
+	 */
+	@Override
+	public ArrayList<Color> getSeriesShapesColors(Object chart) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}

Property changes on: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/chartsengine/CooccurrenceGSChartCreator.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/handlers/ComputeCooccurrenceGraph.java
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/handlers/ComputeCooccurrenceGraph.java	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/handlers/ComputeCooccurrenceGraph.java	(revision 905)
@@ -0,0 +1,86 @@
+// 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.cooccurrence.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.txm.chartsengine.rcp.editors.ChartEditor;
+import org.txm.cooccurrence.core.functions.Cooccurrence;
+import org.txm.cooccurrence.functions.CooccurrenceGraph;
+import org.txm.rcp.handlers.BaseAbstractHandler;
+
+
+/**
+ * Opens a cooccurrence graph editor.
+ * Computes the result if it contains all required parameters.
+ * 
+ * @author mdecorde
+ * @author sjacquot
+ * 
+ */
+public class ComputeCooccurrenceGraph extends BaseAbstractHandler {
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		
+		if (!this.checkCorpusEngine())	{
+			return false;
+		}
+		
+		if(!this.checkStatsEngine()) {
+			return false;
+		}
+
+		
+		Object selection = this.getCorporaViewSelectedObject(event);
+		CooccurrenceGraph coocGraph = null;
+		
+		// Creating from Cooccurrence
+		if (selection instanceof Cooccurrence) {
+			coocGraph = new CooccurrenceGraph((Cooccurrence) selection);
+				
+		}
+		// Reopening from existing result
+		else if(selection instanceof CooccurrenceGraph)	{
+			coocGraph = (CooccurrenceGraph) selection;
+		}
+		// Error
+		else	{
+			return super.logCanNotCompute(selection);
+		}
+		
+		ChartEditor.openEditor(coocGraph);
+
+		return null;
+	}
+	
+}

Property changes on: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/handlers/ComputeCooccurrenceGraph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/functions/CooccurrenceGraph.java
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/functions/CooccurrenceGraph.java	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/functions/CooccurrenceGraph.java	(revision 905)
@@ -0,0 +1,134 @@
+package org.txm.cooccurrence.functions;
+/**
+ * 
+ */
+
+
+import java.io.File;
+
+import org.txm.chartsengine.core.results.ChartResult;
+import org.txm.core.results.TXMParameters;
+import org.txm.core.results.TXMResult;
+
+/**
+ * @author sjacquot
+ *
+ */
+public class CooccurrenceGraph extends ChartResult {
+
+	/**
+	 * @param parent
+	 */
+	public CooccurrenceGraph(TXMResult parent) {
+		super(parent);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param uuid
+	 */
+	public CooccurrenceGraph(String uuid) {
+		super(uuid);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param uuid
+	 * @param parent
+	 */
+	public CooccurrenceGraph(String uuid, TXMResult parent) {
+		super(uuid, parent);
+		// TODO Auto-generated constructor stub
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#saveParameters()
+	 */
+	@Override
+	public boolean saveParameters() throws Exception {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#loadParameters()
+	 */
+	@Override
+	public boolean loadParameters() throws Exception {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#setParameters(org.txm.core.results.TXMParameters)
+	 */
+	@Override
+	public boolean setParameters(TXMParameters parameters) throws Exception {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#getName()
+	 */
+	@Override
+	public String getName() {
+		// TODO Auto-generated method stub
+		return "graph";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#getSimpleName()
+	 */
+	@Override
+	public String getSimpleName() {
+		// TODO Auto-generated method stub
+		return "graph";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#getDetails()
+	 */
+	@Override
+	public String getDetails() {
+		// TODO Auto-generated method stub
+		return "graph";
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#clean()
+	 */
+	@Override
+	public void clean() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#canCompute()
+	 */
+	@Override
+	public boolean canCompute() throws Exception {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#_compute()
+	 */
+	@Override
+	protected boolean _compute() throws Exception {
+		// TODO Auto-generated method stub
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.txm.core.results.TXMResult#toTxt(java.io.File, java.lang.String, java.lang.String, java.lang.String)
+	 */
+	@Override
+	public boolean toTxt(File outfile, String encoding, String colseparator, String txtseparator) throws Exception {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+}

Property changes on: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/functions/CooccurrenceGraph.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/editors/CooccurrenceGraphEditor.java
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/editors/CooccurrenceGraphEditor.java	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/editors/CooccurrenceGraphEditor.java	(revision 905)
@@ -0,0 +1,27 @@
+package org.txm.cooccurrence.editors;
+
+import org.txm.chartsengine.rcp.editors.ChartEditor;
+import org.txm.cooccurrence.functions.CooccurrenceGraph;
+
+/**
+ * Cooccurrence graph chart editor.
+ * 
+ * @author sjacquot
+ *
+ */
+public class CooccurrenceGraphEditor extends ChartEditor<CooccurrenceGraph> {
+
+
+	@Override
+	public void updateEditorFromChart(boolean update) {
+		// nothing to do
+	}
+
+	@Override
+	public void __createPartControl() {
+		// TODO Auto-generated method stub
+		
+	}
+	
+	
+}

Property changes on: tmp/org.txm.cooccurrence.chartsengine/src/org/txm/cooccurrence/editors/CooccurrenceGraphEditor.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

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

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

Index: tmp/org.txm.cooccurrence.chartsengine/plugin.xml
===================================================================
--- tmp/org.txm.cooccurrence.chartsengine/plugin.xml	(revision 0)
+++ tmp/org.txm.cooccurrence.chartsengine/plugin.xml	(revision 905)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            defaultHandler="org.txm.cooccurrence.handlers.ComputeCooccurrenceGraph"
+            id="org.txm.cooccurrence.handlers.ComputeCooccurrenceGraph"
+            name="Compute Cooccurrence Graph"
+            returnTypeId="org.txm.cooccurrence.functions.CooccurrenceGraph">
+      </command>
+   </extension>
+
+   <extension
+         point="org.txm.chartsengine.chartcreator">
+      <ChartCreator
+            class="org.txm.cooccurrence.chartsengine.CooccurrenceGSChartCreator"
+            fileNamePrefix="cooc">
+      </ChartCreator>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.txm.rcp.views.corpora.CorporaView">
+         <command
+               commandId="org.txm.cooccurrence.handlers.ComputeCooccurrenceGraph"
+               style="push">
+            <visibleWhen
+                  checkEnabled="false">
+               <or>
+                  <reference
+                        definitionId="OneCooccurrenceSelected">
+                  </reference>
+               </or>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            class="org.txm.cooccurrence.editors.CooccurrenceGraphEditor"
+            default="false"
+            id="org.txm.cooccurrence.functions.CooccurrenceGraph"
+            name="Cooccurrence Graph Editor">
+      </editor>
+   </extension>
+
+
+</plugin>

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

